medusa-storefront-data 2.5.1 → 2.5.3
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/HOMEPAGE_CONFIG.md +83 -10
- package/package.json +160 -115
- package/src/server/cart.ts +1 -1
- package/src/server/dynamic-config.ts +132 -12
- package/src/server/help-faq-section-defaults.json +92 -0
- package/src/server/help-sections/help-faq.ts +25 -0
- package/src/server/help-sections/index.ts +8 -0
- package/src/server/homepage-config.types.ts +24 -0
- package/src/server/homepage-section-defaults.ts +3 -0
- package/src/server/normalize-homepage-config.ts +39 -0
- package/dist/segment-data/default-page-input.json +0 -191
- package/dist/src/config.d.ts +0 -3
- package/dist/src/config.d.ts.map +0 -1
- package/dist/src/config.js +0 -31
- package/dist/src/cookies.d.ts +0 -23
- package/dist/src/cookies.d.ts.map +0 -1
- package/dist/src/cookies.js +0 -140
- package/dist/src/dynamic-config-schema/index.d.ts +0 -103
- package/dist/src/dynamic-config-schema/index.d.ts.map +0 -1
- package/dist/src/dynamic-config-schema/index.js +0 -172
- package/dist/src/dynamic-config-schema/sections/about-brand.d.ts +0 -5
- package/dist/src/dynamic-config-schema/sections/about-brand.d.ts.map +0 -1
- package/dist/src/dynamic-config-schema/sections/about-brand.js +0 -30
- package/dist/src/dynamic-config-schema/sections/baptism-picks.d.ts +0 -5
- package/dist/src/dynamic-config-schema/sections/baptism-picks.d.ts.map +0 -1
- package/dist/src/dynamic-config-schema/sections/baptism-picks.js +0 -17
- package/dist/src/dynamic-config-schema/sections/baptism.d.ts +0 -5
- package/dist/src/dynamic-config-schema/sections/baptism.d.ts.map +0 -1
- package/dist/src/dynamic-config-schema/sections/baptism.js +0 -4
- package/dist/src/dynamic-config-schema/sections/blog-posts.d.ts +0 -5
- package/dist/src/dynamic-config-schema/sections/blog-posts.d.ts.map +0 -1
- package/dist/src/dynamic-config-schema/sections/blog-posts.js +0 -31
- package/dist/src/dynamic-config-schema/sections/brand-marquee.d.ts +0 -5
- package/dist/src/dynamic-config-schema/sections/brand-marquee.d.ts.map +0 -1
- package/dist/src/dynamic-config-schema/sections/brand-marquee.js +0 -9
- package/dist/src/dynamic-config-schema/sections/brand-pillars.d.ts +0 -5
- package/dist/src/dynamic-config-schema/sections/brand-pillars.d.ts.map +0 -1
- package/dist/src/dynamic-config-schema/sections/brand-pillars.js +0 -29
- package/dist/src/dynamic-config-schema/sections/category-pills.d.ts +0 -5
- package/dist/src/dynamic-config-schema/sections/category-pills.d.ts.map +0 -1
- package/dist/src/dynamic-config-schema/sections/category-pills.js +0 -4
- package/dist/src/dynamic-config-schema/sections/celebrity-trust.d.ts +0 -5
- package/dist/src/dynamic-config-schema/sections/celebrity-trust.d.ts.map +0 -1
- package/dist/src/dynamic-config-schema/sections/celebrity-trust.js +0 -4
- package/dist/src/dynamic-config-schema/sections/features.d.ts +0 -5
- package/dist/src/dynamic-config-schema/sections/features.d.ts.map +0 -1
- package/dist/src/dynamic-config-schema/sections/features.js +0 -12
- package/dist/src/dynamic-config-schema/sections/hero.d.ts +0 -6
- package/dist/src/dynamic-config-schema/sections/hero.d.ts.map +0 -1
- package/dist/src/dynamic-config-schema/sections/hero.js +0 -9
- package/dist/src/dynamic-config-schema/sections/index.d.ts +0 -24
- package/dist/src/dynamic-config-schema/sections/index.d.ts.map +0 -1
- package/dist/src/dynamic-config-schema/sections/index.js +0 -23
- package/dist/src/dynamic-config-schema/sections/instagram-posts.d.ts +0 -5
- package/dist/src/dynamic-config-schema/sections/instagram-posts.d.ts.map +0 -1
- package/dist/src/dynamic-config-schema/sections/instagram-posts.js +0 -30
- package/dist/src/dynamic-config-schema/sections/loved-by-moms.d.ts +0 -5
- package/dist/src/dynamic-config-schema/sections/loved-by-moms.d.ts.map +0 -1
- package/dist/src/dynamic-config-schema/sections/loved-by-moms.js +0 -4
- package/dist/src/dynamic-config-schema/sections/luxe-favourites.d.ts +0 -5
- package/dist/src/dynamic-config-schema/sections/luxe-favourites.d.ts.map +0 -1
- package/dist/src/dynamic-config-schema/sections/luxe-favourites.js +0 -4
- package/dist/src/dynamic-config-schema/sections/new-arrivals-classic.d.ts +0 -5
- package/dist/src/dynamic-config-schema/sections/new-arrivals-classic.d.ts.map +0 -1
- package/dist/src/dynamic-config-schema/sections/new-arrivals-classic.js +0 -12
- package/dist/src/dynamic-config-schema/sections/new-arrivals.d.ts +0 -5
- package/dist/src/dynamic-config-schema/sections/new-arrivals.d.ts.map +0 -1
- package/dist/src/dynamic-config-schema/sections/new-arrivals.js +0 -12
- package/dist/src/dynamic-config-schema/sections/promo-announcements.d.ts +0 -5
- package/dist/src/dynamic-config-schema/sections/promo-announcements.d.ts.map +0 -1
- package/dist/src/dynamic-config-schema/sections/promo-announcements.js +0 -16
- package/dist/src/dynamic-config-schema/sections/promo-countdown.d.ts +0 -5
- package/dist/src/dynamic-config-schema/sections/promo-countdown.d.ts.map +0 -1
- package/dist/src/dynamic-config-schema/sections/promo-countdown.js +0 -16
- package/dist/src/dynamic-config-schema/sections/shop-by-age.d.ts +0 -5
- package/dist/src/dynamic-config-schema/sections/shop-by-age.d.ts.map +0 -1
- package/dist/src/dynamic-config-schema/sections/shop-by-age.js +0 -4
- package/dist/src/dynamic-config-schema/sections/shop-by-category.d.ts +0 -5
- package/dist/src/dynamic-config-schema/sections/shop-by-category.d.ts.map +0 -1
- package/dist/src/dynamic-config-schema/sections/shop-by-category.js +0 -4
- package/dist/src/dynamic-config-schema/sections/testimonials.d.ts +0 -5
- package/dist/src/dynamic-config-schema/sections/testimonials.d.ts.map +0 -1
- package/dist/src/dynamic-config-schema/sections/testimonials.js +0 -9
- package/dist/src/dynamic-config-schema/sections/theme-dresses.d.ts +0 -5
- package/dist/src/dynamic-config-schema/sections/theme-dresses.d.ts.map +0 -1
- package/dist/src/dynamic-config-schema/sections/theme-dresses.js +0 -4
- package/dist/src/dynamic-config-schema/sections/video-stories.d.ts +0 -5
- package/dist/src/dynamic-config-schema/sections/video-stories.d.ts.map +0 -1
- package/dist/src/dynamic-config-schema/sections/video-stories.js +0 -24
- package/dist/src/dynamic-config-schema/sections/why-choose-us.d.ts +0 -5
- package/dist/src/dynamic-config-schema/sections/why-choose-us.d.ts.map +0 -1
- package/dist/src/dynamic-config-schema/sections/why-choose-us.js +0 -9
- package/dist/src/dynamic-config-schema/shared.d.ts +0 -35
- package/dist/src/dynamic-config-schema/shared.d.ts.map +0 -1
- package/dist/src/dynamic-config-schema/shared.js +0 -99
- package/dist/src/dynamic-config-schema/site-configs.d.ts +0 -11
- package/dist/src/dynamic-config-schema/site-configs.d.ts.map +0 -1
- package/dist/src/dynamic-config-schema/site-configs.js +0 -70
- package/dist/src/edge.d.ts +0 -3
- package/dist/src/edge.d.ts.map +0 -1
- package/dist/src/edge.js +0 -1
- package/dist/src/middleware.d.ts +0 -3
- package/dist/src/middleware.d.ts.map +0 -1
- package/dist/src/middleware.js +0 -1
- package/dist/src/server/brand-pillars-from-categories.d.ts +0 -8
- package/dist/src/server/brand-pillars-from-categories.d.ts.map +0 -1
- package/dist/src/server/brand-pillars-from-categories.js +0 -92
- package/dist/src/server/cart.d.ts +0 -96
- package/dist/src/server/cart.d.ts.map +0 -1
- package/dist/src/server/cart.js +0 -797
- package/dist/src/server/categories.d.ts +0 -4
- package/dist/src/server/categories.d.ts.map +0 -1
- package/dist/src/server/categories.js +0 -34
- package/dist/src/server/collections.d.ts +0 -8
- package/dist/src/server/collections.d.ts.map +0 -1
- package/dist/src/server/collections.js +0 -39
- package/dist/src/server/config-merge.d.ts +0 -3
- package/dist/src/server/config-merge.d.ts.map +0 -1
- package/dist/src/server/config-merge.js +0 -31
- package/dist/src/server/contact.d.ts +0 -34
- package/dist/src/server/contact.d.ts.map +0 -1
- package/dist/src/server/contact.js +0 -57
- package/dist/src/server/customer-registration.d.ts +0 -142
- package/dist/src/server/customer-registration.d.ts.map +0 -1
- package/dist/src/server/customer-registration.js +0 -295
- package/dist/src/server/customer.d.ts +0 -48
- package/dist/src/server/customer.d.ts.map +0 -1
- package/dist/src/server/customer.js +0 -413
- package/dist/src/server/dynamic-config-api.d.ts +0 -11
- package/dist/src/server/dynamic-config-api.d.ts.map +0 -1
- package/dist/src/server/dynamic-config-api.js +0 -46
- package/dist/src/server/dynamic-config.d.ts +0 -157
- package/dist/src/server/dynamic-config.d.ts.map +0 -1
- package/dist/src/server/dynamic-config.js +0 -573
- package/dist/src/server/fulfillment.d.ts +0 -5
- package/dist/src/server/fulfillment.d.ts.map +0 -1
- package/dist/src/server/fulfillment.js +0 -47
- package/dist/src/server/guest.d.ts +0 -81
- package/dist/src/server/guest.d.ts.map +0 -1
- package/dist/src/server/guest.js +0 -183
- package/dist/src/server/home-sections/about-brand.d.ts +0 -9
- package/dist/src/server/home-sections/about-brand.d.ts.map +0 -1
- package/dist/src/server/home-sections/about-brand.js +0 -9
- package/dist/src/server/home-sections/baptism-picks.d.ts +0 -10
- package/dist/src/server/home-sections/baptism-picks.d.ts.map +0 -1
- package/dist/src/server/home-sections/baptism-picks.js +0 -27
- package/dist/src/server/home-sections/baptism.d.ts +0 -13
- package/dist/src/server/home-sections/baptism.d.ts.map +0 -1
- package/dist/src/server/home-sections/baptism.js +0 -43
- package/dist/src/server/home-sections/blog-posts.d.ts +0 -9
- package/dist/src/server/home-sections/blog-posts.d.ts.map +0 -1
- package/dist/src/server/home-sections/blog-posts.js +0 -9
- package/dist/src/server/home-sections/brand-marquee.d.ts +0 -8
- package/dist/src/server/home-sections/brand-marquee.d.ts.map +0 -1
- package/dist/src/server/home-sections/brand-marquee.js +0 -7
- package/dist/src/server/home-sections/brand-pillars.d.ts +0 -9
- package/dist/src/server/home-sections/brand-pillars.d.ts.map +0 -1
- package/dist/src/server/home-sections/brand-pillars.js +0 -9
- package/dist/src/server/home-sections/category-pills.d.ts +0 -9
- package/dist/src/server/home-sections/category-pills.d.ts.map +0 -1
- package/dist/src/server/home-sections/category-pills.js +0 -19
- package/dist/src/server/home-sections/celebrity-trust.d.ts +0 -12
- package/dist/src/server/home-sections/celebrity-trust.d.ts.map +0 -1
- package/dist/src/server/home-sections/celebrity-trust.js +0 -27
- package/dist/src/server/home-sections/features.d.ts +0 -9
- package/dist/src/server/home-sections/features.d.ts.map +0 -1
- package/dist/src/server/home-sections/features.js +0 -9
- package/dist/src/server/home-sections/hero.d.ts +0 -9
- package/dist/src/server/home-sections/hero.d.ts.map +0 -1
- package/dist/src/server/home-sections/hero.js +0 -9
- package/dist/src/server/home-sections/instagram-posts.d.ts +0 -9
- package/dist/src/server/home-sections/instagram-posts.d.ts.map +0 -1
- package/dist/src/server/home-sections/instagram-posts.js +0 -9
- package/dist/src/server/home-sections/loved-by-moms.d.ts +0 -12
- package/dist/src/server/home-sections/loved-by-moms.d.ts.map +0 -1
- package/dist/src/server/home-sections/loved-by-moms.js +0 -20
- package/dist/src/server/home-sections/luxe-favourites.d.ts +0 -11
- package/dist/src/server/home-sections/luxe-favourites.d.ts.map +0 -1
- package/dist/src/server/home-sections/luxe-favourites.js +0 -19
- package/dist/src/server/home-sections/new-arrivals-classic.d.ts +0 -8
- package/dist/src/server/home-sections/new-arrivals-classic.d.ts.map +0 -1
- package/dist/src/server/home-sections/new-arrivals-classic.js +0 -10
- package/dist/src/server/home-sections/new-arrivals.d.ts +0 -12
- package/dist/src/server/home-sections/new-arrivals.d.ts.map +0 -1
- package/dist/src/server/home-sections/new-arrivals.js +0 -28
- package/dist/src/server/home-sections/promo-announcements.d.ts +0 -7
- package/dist/src/server/home-sections/promo-announcements.d.ts.map +0 -1
- package/dist/src/server/home-sections/promo-announcements.js +0 -7
- package/dist/src/server/home-sections/promo-countdown.d.ts +0 -6
- package/dist/src/server/home-sections/promo-countdown.d.ts.map +0 -1
- package/dist/src/server/home-sections/promo-countdown.js +0 -5
- package/dist/src/server/home-sections/shared.d.ts +0 -10
- package/dist/src/server/home-sections/shared.d.ts.map +0 -1
- package/dist/src/server/home-sections/shared.js +0 -29
- package/dist/src/server/home-sections/shop-by-age.d.ts +0 -9
- package/dist/src/server/home-sections/shop-by-age.d.ts.map +0 -1
- package/dist/src/server/home-sections/shop-by-age.js +0 -17
- package/dist/src/server/home-sections/shop-by-category.d.ts +0 -10
- package/dist/src/server/home-sections/shop-by-category.d.ts.map +0 -1
- package/dist/src/server/home-sections/shop-by-category.js +0 -17
- package/dist/src/server/home-sections/testimonials.d.ts +0 -9
- package/dist/src/server/home-sections/testimonials.d.ts.map +0 -1
- package/dist/src/server/home-sections/testimonials.js +0 -9
- package/dist/src/server/home-sections/theme-dresses.d.ts +0 -12
- package/dist/src/server/home-sections/theme-dresses.d.ts.map +0 -1
- package/dist/src/server/home-sections/theme-dresses.js +0 -27
- package/dist/src/server/home-sections/video-stories.d.ts +0 -9
- package/dist/src/server/home-sections/video-stories.d.ts.map +0 -1
- package/dist/src/server/home-sections/video-stories.js +0 -9
- package/dist/src/server/home-sections/why-choose-us.d.ts +0 -9
- package/dist/src/server/home-sections/why-choose-us.d.ts.map +0 -1
- package/dist/src/server/home-sections/why-choose-us.js +0 -9
- package/dist/src/server/home.d.ts +0 -51
- package/dist/src/server/home.d.ts.map +0 -1
- package/dist/src/server/home.js +0 -1
- package/dist/src/server/homepage-config.types.d.ts +0 -274
- package/dist/src/server/homepage-config.types.d.ts.map +0 -1
- package/dist/src/server/homepage-config.types.js +0 -33
- package/dist/src/server/homepage-section-defaults.d.ts +0 -188
- package/dist/src/server/homepage-section-defaults.d.ts.map +0 -1
- package/dist/src/server/homepage-section-defaults.js +0 -188
- package/dist/src/server/index.d.ts +0 -25
- package/dist/src/server/index.d.ts.map +0 -1
- package/dist/src/server/index.js +0 -24
- package/dist/src/server/locale-actions.d.ts +0 -14
- package/dist/src/server/locale-actions.d.ts.map +0 -1
- package/dist/src/server/locale-actions.js +0 -58
- package/dist/src/server/locales.d.ts +0 -8
- package/dist/src/server/locales.d.ts.map +0 -1
- package/dist/src/server/locales.js +0 -12
- package/dist/src/server/normalize-homepage-config.d.ts +0 -7
- package/dist/src/server/normalize-homepage-config.d.ts.map +0 -1
- package/dist/src/server/normalize-homepage-config.js +0 -213
- package/dist/src/server/notifications.d.ts +0 -2
- package/dist/src/server/notifications.d.ts.map +0 -1
- package/dist/src/server/notifications.js +0 -20
- package/dist/src/server/onboarding.d.ts +0 -2
- package/dist/src/server/onboarding.d.ts.map +0 -1
- package/dist/src/server/onboarding.js +0 -8
- package/dist/src/server/orders.d.ts +0 -63
- package/dist/src/server/orders.d.ts.map +0 -1
- package/dist/src/server/orders.js +0 -230
- package/dist/src/server/page-input.d.ts +0 -19
- package/dist/src/server/page-input.d.ts.map +0 -1
- package/dist/src/server/page-input.js +0 -42
- package/dist/src/server/payment-details.d.ts +0 -5
- package/dist/src/server/payment-details.d.ts.map +0 -1
- package/dist/src/server/payment-details.js +0 -28
- package/dist/src/server/payment.d.ts +0 -3
- package/dist/src/server/payment.d.ts.map +0 -1
- package/dist/src/server/payment.js +0 -13
- package/dist/src/server/pincode.d.ts +0 -7
- package/dist/src/server/pincode.d.ts.map +0 -1
- package/dist/src/server/pincode.js +0 -30
- package/dist/src/server/products.d.ts +0 -54
- package/dist/src/server/products.d.ts.map +0 -1
- package/dist/src/server/products.js +0 -154
- package/dist/src/server/regions.d.ts +0 -5
- package/dist/src/server/regions.d.ts.map +0 -1
- package/dist/src/server/regions.js +0 -57
- package/dist/src/server/resolve-home-segment-data.d.ts +0 -25
- package/dist/src/server/resolve-home-segment-data.d.ts.map +0 -1
- package/dist/src/server/resolve-home-segment-data.js +0 -20
- package/dist/src/server/returns.d.ts +0 -29
- package/dist/src/server/returns.d.ts.map +0 -1
- package/dist/src/server/returns.js +0 -132
- package/dist/src/server/shoppable-looks.d.ts +0 -17
- package/dist/src/server/shoppable-looks.d.ts.map +0 -1
- package/dist/src/server/shoppable-looks.js +0 -136
- package/dist/src/server/swaps.d.ts +0 -15
- package/dist/src/server/swaps.d.ts.map +0 -1
- package/dist/src/server/swaps.js +0 -89
- package/dist/src/server/variants.d.ts +0 -3
- package/dist/src/server/variants.d.ts.map +0 -1
- package/dist/src/server/variants.js +0 -15
- package/dist/src/server/wishlist.d.ts +0 -11
- package/dist/src/server/wishlist.d.ts.map +0 -1
- package/dist/src/server/wishlist.js +0 -49
- package/dist/src/util/get-locale-header.d.ts +0 -4
- package/dist/src/util/get-locale-header.d.ts.map +0 -1
- package/dist/src/util/get-locale-header.js +0 -7
- package/dist/src/util/medusa-error.d.ts +0 -2
- package/dist/src/util/medusa-error.d.ts.map +0 -1
- package/dist/src/util/medusa-error.js +0 -18
- package/dist/src/util/revalidate-cart.d.ts +0 -2
- package/dist/src/util/revalidate-cart.d.ts.map +0 -1
- package/dist/src/util/revalidate-cart.js +0 -8
- package/dist/src/util/sort-products.d.ts +0 -3
- package/dist/src/util/sort-products.d.ts.map +0 -1
- package/dist/src/util/sort-products.js +0 -1
- package/dist/src/util/store-client.d.ts +0 -11
- package/dist/src/util/store-client.d.ts.map +0 -1
- package/dist/src/util/store-client.js +0 -75
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Default `homepage-config.sections` blocks.
|
|
3
|
-
* Dynamic config overrides any field; unset fields keep these defaults.
|
|
4
|
-
*/
|
|
5
|
-
export const DEFAULT_HOMEPAGE_SECTIONS = {
|
|
6
|
-
promoAnnouncements: {
|
|
7
|
-
messages: [
|
|
8
|
-
"Free shipping on orders over a threshold",
|
|
9
|
-
"Worldwide shipping available",
|
|
10
|
-
"Selected products available with customisation",
|
|
11
|
-
"Need help choosing? Book a video call consultation",
|
|
12
|
-
],
|
|
13
|
-
},
|
|
14
|
-
hero: {},
|
|
15
|
-
categoryPills: {},
|
|
16
|
-
newArrivals: {
|
|
17
|
-
title: "New Arrivals",
|
|
18
|
-
subtitle: "Fresh styles just landed",
|
|
19
|
-
variant: "grid",
|
|
20
|
-
},
|
|
21
|
-
newArrivalsClassic: {
|
|
22
|
-
title: "New Arrivals",
|
|
23
|
-
subtitle: "Fresh styles just landed",
|
|
24
|
-
variant: "classic",
|
|
25
|
-
},
|
|
26
|
-
promoCountdown: {
|
|
27
|
-
code: "SAVE50",
|
|
28
|
-
text: "Up to 50% off — shop your favourites before they're gone!",
|
|
29
|
-
"end-at": "2026-12-31T23:59:59.000Z",
|
|
30
|
-
active: false,
|
|
31
|
-
"cta-label": "Shop Offers",
|
|
32
|
-
"cta-href": "/store",
|
|
33
|
-
},
|
|
34
|
-
celebrityTrust: {
|
|
35
|
-
title: "Trusted by Celebrities",
|
|
36
|
-
text: "When the stars dress their little ones in our collections.",
|
|
37
|
-
},
|
|
38
|
-
luxeFavourites: {
|
|
39
|
-
title: "Luxe Favourites",
|
|
40
|
-
},
|
|
41
|
-
shopByCategory: {
|
|
42
|
-
title: "Shop By Categories",
|
|
43
|
-
description: "Browse by style and occasion",
|
|
44
|
-
},
|
|
45
|
-
baptism: {
|
|
46
|
-
title: "Baptism",
|
|
47
|
-
},
|
|
48
|
-
baptismPicks: {
|
|
49
|
-
title: "Baptism Picks",
|
|
50
|
-
looks: [],
|
|
51
|
-
},
|
|
52
|
-
themeDresses: {
|
|
53
|
-
title: "Theme",
|
|
54
|
-
description: "Dress her in a dreamy theme outfit for her birthday celebration",
|
|
55
|
-
},
|
|
56
|
-
brandMarquee: {
|
|
57
|
-
text: "est. 2012",
|
|
58
|
-
},
|
|
59
|
-
aboutBrand: {
|
|
60
|
-
eyebrow: "Who We Are",
|
|
61
|
-
title: "Discover what makes us different",
|
|
62
|
-
description: "We offer stylish, comfortable, and high-quality clothing for children, crafted for everyday wear and special occasions.",
|
|
63
|
-
readMoreHref: "/about",
|
|
64
|
-
stats: [
|
|
65
|
-
{ label: "Visit us in store", value: "Find a location" },
|
|
66
|
-
{ label: "Happy customers", value: "150k+" },
|
|
67
|
-
{ label: "Products", value: "3000+" },
|
|
68
|
-
],
|
|
69
|
-
},
|
|
70
|
-
testimonials: {
|
|
71
|
-
title: "What Clients Talk About Us",
|
|
72
|
-
description: "The Trust We've Earned",
|
|
73
|
-
items: [
|
|
74
|
-
{
|
|
75
|
-
text: "Amazing place if you are looking for a dress for ur little girl's special day. You can even get many aesthetic pics just from the shop because the interior of the shop is amazing too.. the dresses are customizable according to themes that you prefer. My little girl looked like a princess in her pink and white dress which I found within minutes entering the shop.",
|
|
76
|
-
name: "Greeshma thottippal shanmughan",
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
text: "I frequently buy dresses for my baby from this store and I am extremely satisfied with the purchase. The quality of the dresses was excellent, and it was perfect for special occasions like birthdays and celebrations.",
|
|
80
|
-
name: "Priyanka Rajesh",
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
text: "I recently bought an Onam outfit from this boutique and I'm so glad I did! The quality is excellent, and the design is beautiful. My daughter looked absolutely stunning in it.",
|
|
84
|
-
name: "Riya Rilju",
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
text: "I'm beyond happy with the beautiful baptism dress they made for my baby! The craftsmanship, attention to detail, and love put into every stitch truly show.",
|
|
88
|
-
name: "Chinju anthony",
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
text: "This is my third baby dress purchase from this store, and I'm still as impressed as ever! The dresses are absolutely adorable, and the sizing is perfect for my little one.",
|
|
92
|
-
name: "Susmitha",
|
|
93
|
-
},
|
|
94
|
-
],
|
|
95
|
-
},
|
|
96
|
-
instagramPosts: {
|
|
97
|
-
title: "Follow Us on Instagram",
|
|
98
|
-
handle: "yourbrand",
|
|
99
|
-
"profile-url": "https://www.instagram.com/yourbrand/",
|
|
100
|
-
"profile-image": "/Logo.png",
|
|
101
|
-
posts: [],
|
|
102
|
-
},
|
|
103
|
-
brandPillars: {
|
|
104
|
-
title: "This approach resulted in the beautiful structure",
|
|
105
|
-
pillars: [
|
|
106
|
-
{
|
|
107
|
-
title: "Your favorite kids destination",
|
|
108
|
-
description: "Trendy, high-quality outfits for little ones—pieces designed for comfort, celebration, and the memories you make together.",
|
|
109
|
-
image: "/features/store.jpg",
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
title: "Video call consultation",
|
|
113
|
-
description: "Shop from home with our video call service. Our team shows styles in real-time and helps you pick the perfect outfits.",
|
|
114
|
-
image: "/features/video.jpg",
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
title: "Design Your Dream Outfit",
|
|
118
|
-
description: "We customize colors, themes, and handwork to create a perfectly fitted outfit for your little one's special moments.",
|
|
119
|
-
image: "/features/design.jpg",
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
title: "Luxury Fabrics, Made for Kids",
|
|
123
|
-
description: "We use premium, breathable fabrics so each outfit feels luxurious and comfortable all day.",
|
|
124
|
-
image: "/features/fabric.jpg",
|
|
125
|
-
},
|
|
126
|
-
],
|
|
127
|
-
},
|
|
128
|
-
features: {
|
|
129
|
-
title: "Why shop with us",
|
|
130
|
-
description: "Secure checkout, fast delivery, and easy exchanges",
|
|
131
|
-
features: [
|
|
132
|
-
{ name: "100% Secure", icon: "/secure.svg" },
|
|
133
|
-
{ name: "Easy Exchanges", icon: "/exchnage.svg" },
|
|
134
|
-
{ name: "Fast Delivery", icon: "/fast.svg" },
|
|
135
|
-
{ name: "Cash On Delivery", icon: "/cash.svg" },
|
|
136
|
-
],
|
|
137
|
-
},
|
|
138
|
-
whyChooseUs: {
|
|
139
|
-
title: "Why Choose Us?",
|
|
140
|
-
features: [
|
|
141
|
-
{ "feature-name": "Premium Quality", "feature-icon": "/icons/quality.svg" },
|
|
142
|
-
{ "feature-name": "Easy Returns", "feature-icon": "/icons/returns.svg" },
|
|
143
|
-
{ "feature-name": "Fast Delivery", "feature-icon": "/icons/delivery.svg" },
|
|
144
|
-
{ "feature-name": "Secure Checkout", "feature-icon": "/icons/secure.svg" },
|
|
145
|
-
],
|
|
146
|
-
},
|
|
147
|
-
lovedByMoms: {
|
|
148
|
-
title: "Loved by Moms",
|
|
149
|
-
description: "Top-rated styles loved by parents and kids alike.",
|
|
150
|
-
},
|
|
151
|
-
shopByAge: {
|
|
152
|
-
title: "Shop By Age",
|
|
153
|
-
},
|
|
154
|
-
videoStories: {
|
|
155
|
-
title: "Watch Stories & Reviews",
|
|
156
|
-
"video-urls": [],
|
|
157
|
-
},
|
|
158
|
-
blogPosts: {
|
|
159
|
-
title: "Blog posts",
|
|
160
|
-
posts: [
|
|
161
|
-
{
|
|
162
|
-
title: "Which Theme Dress Matches Her Vibe?",
|
|
163
|
-
href: "/blog/theme-dress-vibe",
|
|
164
|
-
category: "Theme Dress",
|
|
165
|
-
date: "May 24, 2026",
|
|
166
|
-
},
|
|
167
|
-
{
|
|
168
|
-
title: "How to Choose a Birthday Frock That Matches Your Party Theme",
|
|
169
|
-
href: "/blog/birthday-frock-party-theme",
|
|
170
|
-
category: "Birthday Dress",
|
|
171
|
-
date: "May 14, 2026",
|
|
172
|
-
},
|
|
173
|
-
{
|
|
174
|
-
title: "Beyond Pink: Trending Colors in Kid's Party Wear",
|
|
175
|
-
href: "/blog/trending-party-wear-colors",
|
|
176
|
-
category: "Girls Party Dresses",
|
|
177
|
-
date: "Apr 30, 2026",
|
|
178
|
-
},
|
|
179
|
-
{
|
|
180
|
-
title: "Wearable Wonders: 3D Hand-Embroidered Theme Dresses",
|
|
181
|
-
href: "/blog/3d-hand-embroidered-dresses",
|
|
182
|
-
category: "Birthday dress for Baby Girl",
|
|
183
|
-
date: "Apr 25, 2026",
|
|
184
|
-
},
|
|
185
|
-
],
|
|
186
|
-
},
|
|
187
|
-
};
|
|
188
|
-
export const HOME_SECTION_COPY_ID_LIST = Object.keys(DEFAULT_HOMEPAGE_SECTIONS);
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export * from "./cart";
|
|
2
|
-
export * from "./categories";
|
|
3
|
-
export * from "./collections";
|
|
4
|
-
export * from "./customer-registration";
|
|
5
|
-
export * from "./customer";
|
|
6
|
-
export * from "./dynamic-config";
|
|
7
|
-
export * from "./page-input";
|
|
8
|
-
export * from "./resolve-home-segment-data";
|
|
9
|
-
export * from "./fulfillment";
|
|
10
|
-
export * from "./guest";
|
|
11
|
-
export * from "./locale-actions";
|
|
12
|
-
export * from "./locales";
|
|
13
|
-
export * from "./notifications";
|
|
14
|
-
export * from "./onboarding";
|
|
15
|
-
export * from "./orders";
|
|
16
|
-
export * from "./payment-details";
|
|
17
|
-
export * from "./payment";
|
|
18
|
-
export * from "./products";
|
|
19
|
-
export * from "./regions";
|
|
20
|
-
export * from "./returns";
|
|
21
|
-
export * from "./swaps";
|
|
22
|
-
export * from "./variants";
|
|
23
|
-
export * from "./wishlist";
|
|
24
|
-
export * from "./home";
|
|
25
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/server/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAA;AACtB,cAAc,cAAc,CAAA;AAC5B,cAAc,eAAe,CAAA;AAC7B,cAAc,yBAAyB,CAAA;AACvC,cAAc,YAAY,CAAA;AAC1B,cAAc,kBAAkB,CAAA;AAChC,cAAc,cAAc,CAAA;AAC5B,cAAc,6BAA6B,CAAA;AAC3C,cAAc,eAAe,CAAA;AAC7B,cAAc,SAAS,CAAA;AACvB,cAAc,kBAAkB,CAAA;AAChC,cAAc,WAAW,CAAA;AACzB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,cAAc,CAAA;AAC5B,cAAc,UAAU,CAAA;AACxB,cAAc,mBAAmB,CAAA;AACjC,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,WAAW,CAAA;AACzB,cAAc,SAAS,CAAA;AACvB,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAC1B,cAAc,QAAQ,CAAA"}
|
package/dist/src/server/index.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export * from "./cart";
|
|
2
|
-
export * from "./categories";
|
|
3
|
-
export * from "./collections";
|
|
4
|
-
export * from "./customer-registration";
|
|
5
|
-
export * from "./customer";
|
|
6
|
-
export * from "./dynamic-config";
|
|
7
|
-
export * from "./page-input";
|
|
8
|
-
export * from "./resolve-home-segment-data";
|
|
9
|
-
export * from "./fulfillment";
|
|
10
|
-
export * from "./guest";
|
|
11
|
-
export * from "./locale-actions";
|
|
12
|
-
export * from "./locales";
|
|
13
|
-
export * from "./notifications";
|
|
14
|
-
export * from "./onboarding";
|
|
15
|
-
export * from "./orders";
|
|
16
|
-
export * from "./payment-details";
|
|
17
|
-
export * from "./payment";
|
|
18
|
-
export * from "./products";
|
|
19
|
-
export * from "./regions";
|
|
20
|
-
export * from "./returns";
|
|
21
|
-
export * from "./swaps";
|
|
22
|
-
export * from "./variants";
|
|
23
|
-
export * from "./wishlist";
|
|
24
|
-
export * from "./home";
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Gets the current locale from cookies
|
|
3
|
-
*/
|
|
4
|
-
export declare const getLocale: () => Promise<string | null>;
|
|
5
|
-
/**
|
|
6
|
-
* Sets the locale cookie
|
|
7
|
-
*/
|
|
8
|
-
export declare const setLocaleCookie: (locale: string) => Promise<void>;
|
|
9
|
-
/**
|
|
10
|
-
* Updates the locale preference and stores in cookie.
|
|
11
|
-
* Also updates the cart with the new locale if one exists.
|
|
12
|
-
*/
|
|
13
|
-
export declare const updateLocale: (localeCode: string) => Promise<string>;
|
|
14
|
-
//# sourceMappingURL=locale-actions.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"locale-actions.d.ts","sourceRoot":"","sources":["../../../src/server/locale-actions.ts"],"names":[],"mappings":"AAWA;;GAEG;AACH,eAAO,MAAM,SAAS,QAAa,OAAO,CAAC,MAAM,GAAG,IAAI,CAOvD,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,eAAe,GAAU,QAAQ,MAAM,kBAQnD,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY,GAAU,YAAY,MAAM,KAAG,OAAO,CAAC,MAAM,CA0BrE,CAAA"}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use server";
|
|
2
|
-
import { medusaCartUpdate } from "medusa-services/cart";
|
|
3
|
-
import { revalidateTag } from "next/cache";
|
|
4
|
-
import { cookies as nextCookies } from "next/headers";
|
|
5
|
-
import { getCartId, getCacheTag } from "../cookies";
|
|
6
|
-
import { getStoreClientOptions } from "../util/store-client";
|
|
7
|
-
import { revalidateCartTags } from "../util/revalidate-cart";
|
|
8
|
-
const LOCALE_COOKIE_NAME = "_medusa_locale";
|
|
9
|
-
/**
|
|
10
|
-
* Gets the current locale from cookies
|
|
11
|
-
*/
|
|
12
|
-
export const getLocale = async () => {
|
|
13
|
-
try {
|
|
14
|
-
const cookies = await nextCookies();
|
|
15
|
-
return cookies.get(LOCALE_COOKIE_NAME)?.value ?? null;
|
|
16
|
-
}
|
|
17
|
-
catch {
|
|
18
|
-
return null;
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
/**
|
|
22
|
-
* Sets the locale cookie
|
|
23
|
-
*/
|
|
24
|
-
export const setLocaleCookie = async (locale) => {
|
|
25
|
-
const cookies = await nextCookies();
|
|
26
|
-
cookies.set(LOCALE_COOKIE_NAME, locale, {
|
|
27
|
-
maxAge: 60 * 60 * 24 * 365, // 1 year
|
|
28
|
-
httpOnly: false, // Allow client-side access
|
|
29
|
-
sameSite: "strict",
|
|
30
|
-
secure: process.env.NODE_ENV === "production",
|
|
31
|
-
});
|
|
32
|
-
};
|
|
33
|
-
/**
|
|
34
|
-
* Updates the locale preference and stores in cookie.
|
|
35
|
-
* Also updates the cart with the new locale if one exists.
|
|
36
|
-
*/
|
|
37
|
-
export const updateLocale = async (localeCode) => {
|
|
38
|
-
await setLocaleCookie(localeCode);
|
|
39
|
-
const cartId = await getCartId();
|
|
40
|
-
if (cartId) {
|
|
41
|
-
const options = await getStoreClientOptions();
|
|
42
|
-
await medusaCartUpdate(cartId, { locale: localeCode }, options);
|
|
43
|
-
await revalidateCartTags();
|
|
44
|
-
}
|
|
45
|
-
const productsCacheTag = await getCacheTag("products");
|
|
46
|
-
if (productsCacheTag) {
|
|
47
|
-
revalidateTag(productsCacheTag);
|
|
48
|
-
}
|
|
49
|
-
const categoriesCacheTag = await getCacheTag("categories");
|
|
50
|
-
if (categoriesCacheTag) {
|
|
51
|
-
revalidateTag(categoriesCacheTag);
|
|
52
|
-
}
|
|
53
|
-
const collectionsCacheTag = await getCacheTag("collections");
|
|
54
|
-
if (collectionsCacheTag) {
|
|
55
|
-
revalidateTag(collectionsCacheTag);
|
|
56
|
-
}
|
|
57
|
-
return localeCode;
|
|
58
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type StoreLocale } from "medusa-services/locales";
|
|
2
|
-
export type Locale = StoreLocale;
|
|
3
|
-
/**
|
|
4
|
-
* Fetches available locales from the backend.
|
|
5
|
-
* Returns null if the endpoint returns 404 (locales not configured).
|
|
6
|
-
*/
|
|
7
|
-
export declare const listLocales: () => Promise<Locale[] | null>;
|
|
8
|
-
//# sourceMappingURL=locales.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../src/server/locales.ts"],"names":[],"mappings":"AAEA,OAAO,EAAoB,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAG5E,MAAM,MAAM,MAAM,GAAG,WAAW,CAAA;AAEhC;;;GAGG;AACH,eAAO,MAAM,WAAW,QAAa,OAAO,CAAC,MAAM,EAAE,GAAG,IAAI,CAI3D,CAAA"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use server";
|
|
2
|
-
import { medusaLocaleList } from "medusa-services/locales";
|
|
3
|
-
import { getStoreClientOptions } from "../util/store-client";
|
|
4
|
-
/**
|
|
5
|
-
* Fetches available locales from the backend.
|
|
6
|
-
* Returns null if the endpoint returns 404 (locales not configured).
|
|
7
|
-
*/
|
|
8
|
-
export const listLocales = async () => {
|
|
9
|
-
const options = await getStoreClientOptions();
|
|
10
|
-
const result = await medusaLocaleList(options);
|
|
11
|
-
return result?.locales ?? null;
|
|
12
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { HomepageConfig } from "./homepage-config.types";
|
|
2
|
-
/**
|
|
3
|
-
* Accepts simplified `homepage-config` (site / banners / sections) or legacy shape.
|
|
4
|
-
* Storefront always receives the legacy `HomepageConfig` it already parses.
|
|
5
|
-
*/
|
|
6
|
-
export declare function normalizeHomepageConfig(input: unknown): HomepageConfig;
|
|
7
|
-
//# sourceMappingURL=normalize-homepage-config.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"normalize-homepage-config.d.ts","sourceRoot":"","sources":["../../../src/server/normalize-homepage-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAwM7D;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,cAAc,CAmCtE"}
|
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
function asObject(v) {
|
|
2
|
-
return v && typeof v === "object" && !Array.isArray(v) ? v : null;
|
|
3
|
-
}
|
|
4
|
-
function asArray(v) {
|
|
5
|
-
return Array.isArray(v) ? v : [];
|
|
6
|
-
}
|
|
7
|
-
/** Map simplified banner row → legacy `homepage-banner` / `app-banner` entry. */
|
|
8
|
-
function legacyBannerEntry(row, prefix) {
|
|
9
|
-
const r = asObject(row);
|
|
10
|
-
if (!r)
|
|
11
|
-
return null;
|
|
12
|
-
const image = r.image ?? r[`${prefix}-image`];
|
|
13
|
-
if (!image)
|
|
14
|
-
return null;
|
|
15
|
-
return {
|
|
16
|
-
[prefix]: {
|
|
17
|
-
[`${prefix}-image`]: image,
|
|
18
|
-
[`${prefix}-title`]: r.title ?? r[`${prefix}-title`],
|
|
19
|
-
[`${prefix}-subtitle`]: r.subtitle ?? r[`${prefix}-subtitle`],
|
|
20
|
-
[`${prefix}-description`]: r.description ?? r[`${prefix}-description`],
|
|
21
|
-
[`${prefix}-button-name`]: r.buttonText ?? r.buttonName ?? r[`${prefix}-button-name`],
|
|
22
|
-
[`${prefix}-button-link`]: r.buttonLink ?? r[`${prefix}-button-link`],
|
|
23
|
-
...(prefix === "app-banner" && r.link != null
|
|
24
|
-
? { "app-banner-link": r.link }
|
|
25
|
-
: {}),
|
|
26
|
-
},
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
function normalizeBanners(site) {
|
|
30
|
-
const banners = asObject(site?.banners) ?? asObject(site);
|
|
31
|
-
const desktopRaw = banners?.desktop ?? banners?.["homepage-banner-array"] ?? site?.["homepage-banner-array"];
|
|
32
|
-
const mobileRaw = banners?.mobile ?? banners?.["app-banner-array"] ?? site?.["app-banner-array"];
|
|
33
|
-
const desktop = asArray(desktopRaw)
|
|
34
|
-
.map((row) => legacyBannerEntry(row, "homepage-banner"))
|
|
35
|
-
.filter(Boolean);
|
|
36
|
-
const mobile = asArray(mobileRaw)
|
|
37
|
-
.map((row) => legacyBannerEntry(row, "app-banner"))
|
|
38
|
-
.filter(Boolean);
|
|
39
|
-
return { desktop, mobile };
|
|
40
|
-
}
|
|
41
|
-
function normalizeContact(site) {
|
|
42
|
-
const c = asObject(site?.contact) ?? asObject(site?.["contact-us"]);
|
|
43
|
-
if (!c)
|
|
44
|
-
return undefined;
|
|
45
|
-
return {
|
|
46
|
-
"contact-phone": c.phone ?? c["contact-phone"],
|
|
47
|
-
"contact-email": c.email ?? c["contact-email"],
|
|
48
|
-
"contact-whatsapp": c.whatsapp ?? c["contact-whatsapp"],
|
|
49
|
-
"contact-address": c.address ?? c["contact-address"],
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
function normalizeSocial(site) {
|
|
53
|
-
const raw = site?.social ?? site?.["social-links"];
|
|
54
|
-
return asArray(raw).map((item) => {
|
|
55
|
-
const row = asObject(item?.["social-link"]) ?? asObject(item);
|
|
56
|
-
if (!row)
|
|
57
|
-
return null;
|
|
58
|
-
return {
|
|
59
|
-
"social-link": {
|
|
60
|
-
"social-platform-name": row.name ?? row["social-platform-name"],
|
|
61
|
-
"social-platform-url": row.url ?? row["social-platform-url"],
|
|
62
|
-
"social-platform-icon": row.icon ?? row["social-platform-icon"],
|
|
63
|
-
},
|
|
64
|
-
};
|
|
65
|
-
}).filter(Boolean);
|
|
66
|
-
}
|
|
67
|
-
function normalizeFaqs(site) {
|
|
68
|
-
const raw = site?.faqs ?? site?.["faq-array"];
|
|
69
|
-
return asArray(raw).map((item) => {
|
|
70
|
-
const f = asObject(item?.faq) ?? asObject(item);
|
|
71
|
-
if (!f)
|
|
72
|
-
return null;
|
|
73
|
-
return {
|
|
74
|
-
faq: {
|
|
75
|
-
"faq-category": f.category ?? f["faq-category"],
|
|
76
|
-
"faq-question": f.question ?? f["faq-question"],
|
|
77
|
-
"faq-answer": f.answer ?? f["faq-answer"],
|
|
78
|
-
},
|
|
79
|
-
};
|
|
80
|
-
}).filter(Boolean);
|
|
81
|
-
}
|
|
82
|
-
function normalizeTestimonialItem(item) {
|
|
83
|
-
const r = asObject(item?.testimonial) ?? asObject(item);
|
|
84
|
-
if (!r)
|
|
85
|
-
return null;
|
|
86
|
-
const text = String(r.text ?? r.description ?? "").trim();
|
|
87
|
-
const name = String(r.name ?? "").trim();
|
|
88
|
-
if (!text || !name)
|
|
89
|
-
return null;
|
|
90
|
-
return { text, name, avatar: r.avatar, rating: r.rating };
|
|
91
|
-
}
|
|
92
|
-
function normalizeSections(sections) {
|
|
93
|
-
const out = { ...sections };
|
|
94
|
-
const promoAnnouncements = asObject(sections.promoAnnouncements);
|
|
95
|
-
if (promoAnnouncements?.messages) {
|
|
96
|
-
const messages = asArray(promoAnnouncements.messages)
|
|
97
|
-
.map((m) => {
|
|
98
|
-
if (typeof m === "string")
|
|
99
|
-
return m.trim();
|
|
100
|
-
const row = asObject(m);
|
|
101
|
-
return String(row?.message ?? row?.text ?? "").trim();
|
|
102
|
-
})
|
|
103
|
-
.filter(Boolean);
|
|
104
|
-
out.promoAnnouncements = { ...promoAnnouncements, messages };
|
|
105
|
-
}
|
|
106
|
-
const testimonials = asObject(sections.testimonials);
|
|
107
|
-
if (testimonials) {
|
|
108
|
-
const items = testimonials.items ??
|
|
109
|
-
testimonials.testimonials ??
|
|
110
|
-
testimonials.reviews;
|
|
111
|
-
if (Array.isArray(items)) {
|
|
112
|
-
out.testimonials = {
|
|
113
|
-
...testimonials,
|
|
114
|
-
items: items.map(normalizeTestimonialItem).filter(Boolean),
|
|
115
|
-
};
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
const promo = asObject(sections.promoCountdown);
|
|
119
|
-
if (promo) {
|
|
120
|
-
out.promoCountdown = {
|
|
121
|
-
code: promo.code ?? promo["promo-code"],
|
|
122
|
-
text: promo.text ?? promo.message ?? promo["promo-text"],
|
|
123
|
-
"end-at": promo.endAt ?? promo["end-at"],
|
|
124
|
-
active: promo.active ?? promo["promo-active"],
|
|
125
|
-
"cta-label": promo.ctaLabel ?? promo["cta-label"],
|
|
126
|
-
"cta-href": promo.ctaHref ?? promo["cta-href"],
|
|
127
|
-
};
|
|
128
|
-
}
|
|
129
|
-
const baptism = asObject(sections.baptismPicks);
|
|
130
|
-
if (baptism?.looks) {
|
|
131
|
-
out.baptismPicks = {
|
|
132
|
-
title: baptism.title,
|
|
133
|
-
looks: asArray(baptism.looks).map((look) => {
|
|
134
|
-
const L = asObject(look?.look) ?? asObject(look);
|
|
135
|
-
if (!L)
|
|
136
|
-
return null;
|
|
137
|
-
return {
|
|
138
|
-
image: L.image,
|
|
139
|
-
"product-ids": L.productIds ?? L["product-ids"],
|
|
140
|
-
"product-handles": L.productHandles ?? L["product-handles"],
|
|
141
|
-
};
|
|
142
|
-
}).filter(Boolean),
|
|
143
|
-
};
|
|
144
|
-
}
|
|
145
|
-
const ig = asObject(sections.instagramPosts);
|
|
146
|
-
if (ig) {
|
|
147
|
-
out.instagramPosts = {
|
|
148
|
-
title: ig.title,
|
|
149
|
-
handle: ig.handle,
|
|
150
|
-
"profile-url": ig.profileUrl ?? ig["profile-url"],
|
|
151
|
-
"profile-image": ig.profileImage ?? ig["profile-image"],
|
|
152
|
-
posts: asArray(ig.posts).map((p) => {
|
|
153
|
-
const row = asObject(p?.post) ?? asObject(p);
|
|
154
|
-
return row ? { image: row.image, url: row.url ?? row.link } : null;
|
|
155
|
-
}).filter(Boolean),
|
|
156
|
-
};
|
|
157
|
-
}
|
|
158
|
-
const about = asObject(sections.aboutBrand);
|
|
159
|
-
if (about) {
|
|
160
|
-
out.aboutBrand = {
|
|
161
|
-
eyebrow: about.eyebrow,
|
|
162
|
-
title: about.title,
|
|
163
|
-
description: about.description ?? about.text,
|
|
164
|
-
readMoreHref: about.readMoreHref ?? about["read-more-link"],
|
|
165
|
-
stats: about.stats,
|
|
166
|
-
};
|
|
167
|
-
}
|
|
168
|
-
// brandPillars: title only in simplified CMS (cards from categories in storefront)
|
|
169
|
-
const pillars = asObject(sections.brandPillars);
|
|
170
|
-
if (pillars && !pillars.pillars) {
|
|
171
|
-
out.brandPillars = {
|
|
172
|
-
title: pillars.title,
|
|
173
|
-
description: pillars.description,
|
|
174
|
-
};
|
|
175
|
-
}
|
|
176
|
-
return out;
|
|
177
|
-
}
|
|
178
|
-
/**
|
|
179
|
-
* Accepts simplified `homepage-config` (site / banners / sections) or legacy shape.
|
|
180
|
-
* Storefront always receives the legacy `HomepageConfig` it already parses.
|
|
181
|
-
*/
|
|
182
|
-
export function normalizeHomepageConfig(input) {
|
|
183
|
-
if (!input || typeof input !== "object")
|
|
184
|
-
return {};
|
|
185
|
-
const raw = input;
|
|
186
|
-
const site = asObject(raw.site);
|
|
187
|
-
const hasSimplifiedSite = Boolean(site);
|
|
188
|
-
if (!hasSimplifiedSite) {
|
|
189
|
-
return raw;
|
|
190
|
-
}
|
|
191
|
-
const { desktop, mobile } = normalizeBanners(raw);
|
|
192
|
-
const sections = normalizeSections(asObject(raw.sections) ?? {});
|
|
193
|
-
const legacy = {
|
|
194
|
-
logo: site?.logo ?? raw.logo,
|
|
195
|
-
"website-description": site?.description ??
|
|
196
|
-
raw["website-description"],
|
|
197
|
-
sections: sections,
|
|
198
|
-
};
|
|
199
|
-
if (desktop.length)
|
|
200
|
-
legacy["homepage-banner-array"] = desktop;
|
|
201
|
-
if (mobile.length)
|
|
202
|
-
legacy["app-banner-array"] = mobile;
|
|
203
|
-
const contact = normalizeContact(site);
|
|
204
|
-
if (contact)
|
|
205
|
-
legacy["contact-us"] = contact;
|
|
206
|
-
const social = normalizeSocial(site);
|
|
207
|
-
if (social.length)
|
|
208
|
-
legacy["social-links"] = social;
|
|
209
|
-
const faqs = normalizeFaqs(site);
|
|
210
|
-
if (faqs.length)
|
|
211
|
-
legacy["faq-array"] = faqs;
|
|
212
|
-
return legacy;
|
|
213
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"notifications.d.ts","sourceRoot":"","sources":["../../../src/server/notifications.ts"],"names":[],"mappings":"AAKA,wBAAsB,yBAAyB,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,GAAG,gBAgB9E"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use server";
|
|
2
|
-
import { sdk } from "../config";
|
|
3
|
-
import { getAuthHeaders } from "../cookies";
|
|
4
|
-
export async function registerNotificationToken(token, deviceInfo) {
|
|
5
|
-
const headers = (await getAuthHeaders());
|
|
6
|
-
try {
|
|
7
|
-
const result = await sdk.client.fetch(`/store/notification-tokens`, {
|
|
8
|
-
method: "POST",
|
|
9
|
-
body: {
|
|
10
|
-
token,
|
|
11
|
-
device_info: deviceInfo,
|
|
12
|
-
},
|
|
13
|
-
headers,
|
|
14
|
-
});
|
|
15
|
-
return result;
|
|
16
|
-
}
|
|
17
|
-
catch (error) {
|
|
18
|
-
return null;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"onboarding.d.ts","sourceRoot":"","sources":["../../../src/server/onboarding.ts"],"names":[],"mappings":"AAIA,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,MAAM,iBAIzD"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use server";
|
|
2
|
-
import { cookies as nextCookies } from "next/headers";
|
|
3
|
-
import { redirect } from "next/navigation";
|
|
4
|
-
export async function resetOnboardingState(orderId) {
|
|
5
|
-
const cookies = await nextCookies();
|
|
6
|
-
cookies.set("_medusa_onboarding", "false", { maxAge: -1 });
|
|
7
|
-
redirect(`http://localhost:7001/a/orders/${orderId}`);
|
|
8
|
-
}
|