medusa-storefront-data 2.5.4 → 2.5.5
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 +18 -11
- package/package.json +1 -1
- package/src/server/dynamic-config.ts +1 -0
- package/src/server/page-input.ts +57 -3
- 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 -176
- package/dist/src/server/dynamic-config.d.ts.map +0 -1
- package/dist/src/server/dynamic-config.js +0 -648
- 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/help-faq-section-defaults.json +0 -92
- package/dist/src/server/help-sections/help-faq.d.ts +0 -11
- package/dist/src/server/help-sections/help-faq.d.ts.map +0 -1
- package/dist/src/server/help-sections/help-faq.js +0 -6
- package/dist/src/server/help-sections/index.d.ts +0 -2
- package/dist/src/server/help-sections/index.d.ts.map +0 -1
- package/dist/src/server/help-sections/index.js +0 -1
- 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 -294
- package/dist/src/server/homepage-config.types.d.ts.map +0 -1
- package/dist/src/server/homepage-config.types.js +0 -34
- package/dist/src/server/homepage-section-defaults.d.ts +0 -189
- package/dist/src/server/homepage-section-defaults.d.ts.map +0 -1
- package/dist/src/server/homepage-section-defaults.js +0 -190
- 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 -253
- 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,12 +0,0 @@
|
|
|
1
|
-
import { sectionCopyFields, short, } from "../shared";
|
|
2
|
-
export const newArrivalsSectionId = "newArrivals";
|
|
3
|
-
export const newArrivalsDynamicConfigStructure = [
|
|
4
|
-
...sectionCopyFields(),
|
|
5
|
-
short("variant", "Layout: grid | classic | legacy | preview"),
|
|
6
|
-
];
|
|
7
|
-
export const newArrivalsHomepageSectionField = {
|
|
8
|
-
id: newArrivalsSectionId,
|
|
9
|
-
title: "New arrivals",
|
|
10
|
-
type: "object",
|
|
11
|
-
children: newArrivalsDynamicConfigStructure,
|
|
12
|
-
};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { type DynamicConfigStructureField } from "../shared";
|
|
2
|
-
export declare const promoAnnouncementsSectionId: "promoAnnouncements";
|
|
3
|
-
export declare const promoAnnouncementsDynamicConfigStructure: DynamicConfigStructureField[];
|
|
4
|
-
export declare const promoAnnouncementsHomepageSectionField: DynamicConfigStructureField;
|
|
5
|
-
//# sourceMappingURL=promo-announcements.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"promo-announcements.d.ts","sourceRoot":"","sources":["../../../../src/dynamic-config-schema/sections/promo-announcements.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,2BAA2B,EAAE,MAAM,WAAW,CAAA;AAEnE,eAAO,MAAM,2BAA2B,EAAG,oBAA6B,CAAA;AAExE,eAAO,MAAM,wCAAwC,EAAE,2BAA2B,EAQ/E,CAAA;AAEH,eAAO,MAAM,sCAAsC,EAAE,2BAMlD,CAAA"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { short } from "../shared";
|
|
2
|
-
export const promoAnnouncementsSectionId = "promoAnnouncements";
|
|
3
|
-
export const promoAnnouncementsDynamicConfigStructure = [
|
|
4
|
-
{
|
|
5
|
-
id: "messages",
|
|
6
|
-
title: "Ticker messages",
|
|
7
|
-
type: "array",
|
|
8
|
-
children: [short("message", "Message", true)],
|
|
9
|
-
},
|
|
10
|
-
];
|
|
11
|
-
export const promoAnnouncementsHomepageSectionField = {
|
|
12
|
-
id: promoAnnouncementsSectionId,
|
|
13
|
-
title: "Promo ticker",
|
|
14
|
-
type: "object",
|
|
15
|
-
children: promoAnnouncementsDynamicConfigStructure,
|
|
16
|
-
};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { type DynamicConfigStructureField } from "../shared";
|
|
2
|
-
export declare const promoCountdownSectionId: "promoCountdown";
|
|
3
|
-
export declare const promoCountdownDynamicConfigStructure: DynamicConfigStructureField[];
|
|
4
|
-
export declare const promoCountdownHomepageSectionField: DynamicConfigStructureField;
|
|
5
|
-
//# sourceMappingURL=promo-countdown.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"promo-countdown.d.ts","sourceRoot":"","sources":["../../../../src/dynamic-config-schema/sections/promo-countdown.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,2BAA2B,EACjC,MAAM,WAAW,CAAA;AAElB,eAAO,MAAM,uBAAuB,EAAG,gBAAyB,CAAA;AAEhE,eAAO,MAAM,oCAAoC,EAAE,2BAA2B,EAQ3E,CAAA;AAEH,eAAO,MAAM,kCAAkC,EAAE,2BAKhD,CAAA"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { bool, long, short, } from "../shared";
|
|
2
|
-
export const promoCountdownSectionId = "promoCountdown";
|
|
3
|
-
export const promoCountdownDynamicConfigStructure = [
|
|
4
|
-
short("code", "Promo code"),
|
|
5
|
-
long("text", "Message"),
|
|
6
|
-
short("endAt", "End date (ISO 8601)"),
|
|
7
|
-
bool("active", "Show bar"),
|
|
8
|
-
short("ctaLabel", "CTA label"),
|
|
9
|
-
short("ctaHref", "CTA link"),
|
|
10
|
-
];
|
|
11
|
-
export const promoCountdownHomepageSectionField = {
|
|
12
|
-
id: promoCountdownSectionId,
|
|
13
|
-
title: "Promo countdown bar",
|
|
14
|
-
type: "object",
|
|
15
|
-
children: promoCountdownDynamicConfigStructure,
|
|
16
|
-
};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { type DynamicConfigStructureField } from "../shared";
|
|
2
|
-
export declare const shopByAgeSectionId: "shopByAge";
|
|
3
|
-
export declare const shopByAgeHomepageSectionField: DynamicConfigStructureField;
|
|
4
|
-
export declare const shopByAgeDynamicConfigStructure: DynamicConfigStructureField[];
|
|
5
|
-
//# sourceMappingURL=shop-by-age.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"shop-by-age.d.ts","sourceRoot":"","sources":["../../../../src/dynamic-config-schema/sections/shop-by-age.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,2BAA2B,EACjC,MAAM,WAAW,CAAA;AAElB,eAAO,MAAM,kBAAkB,EAAG,WAAoB,CAAA;AAEtD,eAAO,MAAM,6BAA6B,6BAGzC,CAAA;AAED,eAAO,MAAM,+BAA+B,+BACE,CAAA"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { copyOnlyHomepageSection, } from "../shared";
|
|
2
|
-
export const shopByAgeSectionId = "shopByAge";
|
|
3
|
-
export const shopByAgeHomepageSectionField = copyOnlyHomepageSection(shopByAgeSectionId, "Shop by age");
|
|
4
|
-
export const shopByAgeDynamicConfigStructure = shopByAgeHomepageSectionField.children ?? [];
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { type DynamicConfigStructureField } from "../shared";
|
|
2
|
-
export declare const shopByCategorySectionId: "shopByCategory";
|
|
3
|
-
export declare const shopByCategoryHomepageSectionField: DynamicConfigStructureField;
|
|
4
|
-
export declare const shopByCategoryDynamicConfigStructure: DynamicConfigStructureField[];
|
|
5
|
-
//# sourceMappingURL=shop-by-category.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"shop-by-category.d.ts","sourceRoot":"","sources":["../../../../src/dynamic-config-schema/sections/shop-by-category.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,2BAA2B,EACjC,MAAM,WAAW,CAAA;AAElB,eAAO,MAAM,uBAAuB,EAAG,gBAAyB,CAAA;AAEhE,eAAO,MAAM,kCAAkC,6BAG9C,CAAA;AAED,eAAO,MAAM,oCAAoC,+BACE,CAAA"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { copyOnlyHomepageSection, } from "../shared";
|
|
2
|
-
export const shopByCategorySectionId = "shopByCategory";
|
|
3
|
-
export const shopByCategoryHomepageSectionField = copyOnlyHomepageSection(shopByCategorySectionId, "Shop by category");
|
|
4
|
-
export const shopByCategoryDynamicConfigStructure = shopByCategoryHomepageSectionField.children ?? [];
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { type DynamicConfigStructureField } from "../shared";
|
|
2
|
-
export declare const testimonialsSectionId: "testimonials";
|
|
3
|
-
export declare const testimonialsDynamicConfigStructure: DynamicConfigStructureField[];
|
|
4
|
-
export declare const testimonialsHomepageSectionField: DynamicConfigStructureField;
|
|
5
|
-
//# sourceMappingURL=testimonials.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"testimonials.d.ts","sourceRoot":"","sources":["../../../../src/dynamic-config-schema/sections/testimonials.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,2BAA2B,EACjC,MAAM,WAAW,CAAA;AAElB,eAAO,MAAM,qBAAqB,EAAG,cAAuB,CAAA;AAE5D,eAAO,MAAM,kCAAkC,EAAE,2BAA2B,EACa,CAAA;AAEzF,eAAO,MAAM,gCAAgC,EAAE,2BAK9C,CAAA"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { short, testimonialItemsArray, } from "../shared";
|
|
2
|
-
export const testimonialsSectionId = "testimonials";
|
|
3
|
-
export const testimonialsDynamicConfigStructure = [short("title", "Section title"), short("subtitle", "Subtitle"), testimonialItemsArray];
|
|
4
|
-
export const testimonialsHomepageSectionField = {
|
|
5
|
-
id: testimonialsSectionId,
|
|
6
|
-
title: "Testimonials",
|
|
7
|
-
type: "object",
|
|
8
|
-
children: testimonialsDynamicConfigStructure,
|
|
9
|
-
};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { type DynamicConfigStructureField } from "../shared";
|
|
2
|
-
export declare const themeDressesSectionId: "themeDresses";
|
|
3
|
-
export declare const themeDressesHomepageSectionField: DynamicConfigStructureField;
|
|
4
|
-
export declare const themeDressesDynamicConfigStructure: DynamicConfigStructureField[];
|
|
5
|
-
//# sourceMappingURL=theme-dresses.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"theme-dresses.d.ts","sourceRoot":"","sources":["../../../../src/dynamic-config-schema/sections/theme-dresses.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,2BAA2B,EACjC,MAAM,WAAW,CAAA;AAElB,eAAO,MAAM,qBAAqB,EAAG,cAAuB,CAAA;AAE5D,eAAO,MAAM,gCAAgC,6BAG5C,CAAA;AAED,eAAO,MAAM,kCAAkC,+BACE,CAAA"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { copyOnlyHomepageSection, } from "../shared";
|
|
2
|
-
export const themeDressesSectionId = "themeDresses";
|
|
3
|
-
export const themeDressesHomepageSectionField = copyOnlyHomepageSection(themeDressesSectionId, "Theme dresses");
|
|
4
|
-
export const themeDressesDynamicConfigStructure = themeDressesHomepageSectionField.children ?? [];
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { type DynamicConfigStructureField } from "../shared";
|
|
2
|
-
export declare const videoStoriesSectionId: "videoStories";
|
|
3
|
-
export declare const videoStoriesDynamicConfigStructure: DynamicConfigStructureField[];
|
|
4
|
-
export declare const videoStoriesHomepageSectionField: DynamicConfigStructureField;
|
|
5
|
-
//# sourceMappingURL=video-stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"video-stories.d.ts","sourceRoot":"","sources":["../../../../src/dynamic-config-schema/sections/video-stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,2BAA2B,EACjC,MAAM,WAAW,CAAA;AAElB,eAAO,MAAM,qBAAqB,EAAG,cAAuB,CAAA;AAE5D,eAAO,MAAM,kCAAkC,EAAE,2BAA2B,EAgBzE,CAAA;AAEH,eAAO,MAAM,gCAAgC,EAAE,2BAK9C,CAAA"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { sectionCopyFields, short, } from "../shared";
|
|
2
|
-
export const videoStoriesSectionId = "videoStories";
|
|
3
|
-
export const videoStoriesDynamicConfigStructure = [
|
|
4
|
-
...sectionCopyFields(),
|
|
5
|
-
{
|
|
6
|
-
id: "videoUrls",
|
|
7
|
-
title: "Video URLs",
|
|
8
|
-
type: "array",
|
|
9
|
-
children: [
|
|
10
|
-
{
|
|
11
|
-
id: "videoUrl",
|
|
12
|
-
title: "Video",
|
|
13
|
-
type: "object",
|
|
14
|
-
children: [short("url", "Video URL", true)],
|
|
15
|
-
},
|
|
16
|
-
],
|
|
17
|
-
},
|
|
18
|
-
];
|
|
19
|
-
export const videoStoriesHomepageSectionField = {
|
|
20
|
-
id: videoStoriesSectionId,
|
|
21
|
-
title: "Video stories",
|
|
22
|
-
type: "object",
|
|
23
|
-
children: videoStoriesDynamicConfigStructure,
|
|
24
|
-
};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { type DynamicConfigStructureField } from "../shared";
|
|
2
|
-
export declare const whyChooseUsSectionId: "whyChooseUs";
|
|
3
|
-
export declare const whyChooseUsDynamicConfigStructure: DynamicConfigStructureField[];
|
|
4
|
-
export declare const whyChooseUsHomepageSectionField: DynamicConfigStructureField;
|
|
5
|
-
//# sourceMappingURL=why-choose-us.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"why-choose-us.d.ts","sourceRoot":"","sources":["../../../../src/dynamic-config-schema/sections/why-choose-us.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,2BAA2B,EACjC,MAAM,WAAW,CAAA;AAElB,eAAO,MAAM,oBAAoB,EAAG,aAAsB,CAAA;AAE1D,eAAO,MAAM,iCAAiC,EAAE,2BAA2B,EAC9B,CAAA;AAE7C,eAAO,MAAM,+BAA+B,EAAE,2BAK7C,CAAA"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { featureItemsArray, sectionCopyFields, } from "../shared";
|
|
2
|
-
export const whyChooseUsSectionId = "whyChooseUs";
|
|
3
|
-
export const whyChooseUsDynamicConfigStructure = [...sectionCopyFields(), featureItemsArray];
|
|
4
|
-
export const whyChooseUsHomepageSectionField = {
|
|
5
|
-
id: whyChooseUsSectionId,
|
|
6
|
-
title: "Why choose us",
|
|
7
|
-
type: "object",
|
|
8
|
-
children: whyChooseUsDynamicConfigStructure,
|
|
9
|
-
};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Medusa dynamic-config admin field shapes.
|
|
3
|
-
* Field ids match `homepage-config.sections.*` and `normalizeHomepageConfig`.
|
|
4
|
-
*
|
|
5
|
-
* Backend usage:
|
|
6
|
-
* ```ts
|
|
7
|
-
* import { homepageSectionsStructure } from "medusa-storefront-data/dynamic-config-schema"
|
|
8
|
-
* import { promoAnnouncementsHomepageSectionField } from "medusa-storefront-data/dynamic-config-schema/sections/promoAnnouncements"
|
|
9
|
-
* ```
|
|
10
|
-
*/
|
|
11
|
-
export type DynamicConfigFieldType = "short-text" | "long-text" | "file" | "boolean" | "number" | "object" | "array";
|
|
12
|
-
/** Compatible with `medusa-plugin-dynamic-config` structure entries. */
|
|
13
|
-
export type DynamicConfigStructureField = {
|
|
14
|
-
id: string;
|
|
15
|
-
title: string;
|
|
16
|
-
type: DynamicConfigFieldType;
|
|
17
|
-
required?: boolean;
|
|
18
|
-
children?: DynamicConfigStructureField[];
|
|
19
|
-
};
|
|
20
|
-
type Field = DynamicConfigStructureField;
|
|
21
|
-
export declare const short: (id: string, title: string, required?: boolean) => Field;
|
|
22
|
-
export declare const long: (id: string, title: string, required?: boolean) => Field;
|
|
23
|
-
export declare const file: (id: string, title: string, required?: boolean) => Field;
|
|
24
|
-
export declare const bool: (id: string, title: string, required?: boolean) => Field;
|
|
25
|
-
export declare const number: (id: string, title: string, required?: boolean) => Field;
|
|
26
|
-
/** Shared copy fields for most homepage sections. */
|
|
27
|
-
export declare const sectionCopyFields: () => Field[];
|
|
28
|
-
/** Section object with copy fields only. */
|
|
29
|
-
export declare function copyOnlyHomepageSection(id: string, title: string): Field;
|
|
30
|
-
export declare const featureItemsArray: Field;
|
|
31
|
-
export declare const testimonialItemsArray: Field;
|
|
32
|
-
export declare const bannerSlide: Field;
|
|
33
|
-
export declare const shoppableLookObject: Field;
|
|
34
|
-
export {};
|
|
35
|
-
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/dynamic-config-schema/shared.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,MAAM,MAAM,sBAAsB,GAC9B,YAAY,GACZ,WAAW,GACX,MAAM,GACN,SAAS,GACT,QAAQ,GACR,QAAQ,GACR,OAAO,CAAA;AAEX,wEAAwE;AACxE,MAAM,MAAM,2BAA2B,GAAG;IACxC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,sBAAsB,CAAA;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,2BAA2B,EAAE,CAAA;CACzC,CAAA;AAED,KAAK,KAAK,GAAG,2BAA2B,CAAA;AAWxC,eAAO,MAAM,KAAK,GAAI,IAAI,MAAM,EAAE,OAAO,MAAM,EAAE,kBAAgB,KAAG,KAC1B,CAAA;AAE1C,eAAO,MAAM,IAAI,GAAI,IAAI,MAAM,EAAE,OAAO,MAAM,EAAE,kBAAgB,KAAG,KAC1B,CAAA;AAEzC,eAAO,MAAM,IAAI,GAAI,IAAI,MAAM,EAAE,OAAO,MAAM,EAAE,kBAAgB,KAAG,KAC/B,CAAA;AAEpC,eAAO,MAAM,IAAI,GAAI,IAAI,MAAM,EAAE,OAAO,MAAM,EAAE,kBAAgB,KAAG,KAC5B,CAAA;AAEvC,eAAO,MAAM,MAAM,GAAI,IAAI,MAAM,EAAE,OAAO,MAAM,EAAE,kBAAgB,KAAG,KAC/B,CAAA;AAEtC,qDAAqD;AACrD,eAAO,MAAM,iBAAiB,QAAO,KAAK,EASzC,CAAA;AAED,4CAA4C;AAC5C,wBAAgB,uBAAuB,CACrC,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,MAAM,GACZ,KAAK,CAOP;AAED,eAAO,MAAM,iBAAiB,EAAE,KAe/B,CAAA;AAED,eAAO,MAAM,qBAAqB,EAAE,KAiBnC,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,KAYzB,CAAA;AAED,eAAO,MAAM,mBAAmB,EAAE,KAajC,CAAA"}
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Medusa dynamic-config admin field shapes.
|
|
3
|
-
* Field ids match `homepage-config.sections.*` and `normalizeHomepageConfig`.
|
|
4
|
-
*
|
|
5
|
-
* Backend usage:
|
|
6
|
-
* ```ts
|
|
7
|
-
* import { homepageSectionsStructure } from "medusa-storefront-data/dynamic-config-schema"
|
|
8
|
-
* import { promoAnnouncementsHomepageSectionField } from "medusa-storefront-data/dynamic-config-schema/sections/promoAnnouncements"
|
|
9
|
-
* ```
|
|
10
|
-
*/
|
|
11
|
-
function field(id, title, type, required = false) {
|
|
12
|
-
return { id, title, type, required };
|
|
13
|
-
}
|
|
14
|
-
export const short = (id, title, required = false) => field(id, title, "short-text", required);
|
|
15
|
-
export const long = (id, title, required = false) => field(id, title, "long-text", required);
|
|
16
|
-
export const file = (id, title, required = false) => field(id, title, "file", required);
|
|
17
|
-
export const bool = (id, title, required = false) => field(id, title, "boolean", required);
|
|
18
|
-
export const number = (id, title, required = false) => field(id, title, "number", required);
|
|
19
|
-
/** Shared copy fields for most homepage sections. */
|
|
20
|
-
export const sectionCopyFields = () => [
|
|
21
|
-
short("title", "Section title"),
|
|
22
|
-
short("subtitle", "Subtitle"),
|
|
23
|
-
short("name", "Name (alias for title)"),
|
|
24
|
-
long("description", "Description"),
|
|
25
|
-
short("text", "Text"),
|
|
26
|
-
short("eyebrow", "Eyebrow"),
|
|
27
|
-
short("variant", "Layout variant (e.g. grid | classic)"),
|
|
28
|
-
short("layout", "Layout (alias for variant)"),
|
|
29
|
-
];
|
|
30
|
-
/** Section object with copy fields only. */
|
|
31
|
-
export function copyOnlyHomepageSection(id, title) {
|
|
32
|
-
return {
|
|
33
|
-
id,
|
|
34
|
-
title,
|
|
35
|
-
type: "object",
|
|
36
|
-
children: sectionCopyFields(),
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
export const featureItemsArray = {
|
|
40
|
-
id: "features",
|
|
41
|
-
title: "Features",
|
|
42
|
-
type: "array",
|
|
43
|
-
children: [
|
|
44
|
-
{
|
|
45
|
-
id: "feature",
|
|
46
|
-
title: "Feature",
|
|
47
|
-
type: "object",
|
|
48
|
-
children: [
|
|
49
|
-
short("name", "Name", true),
|
|
50
|
-
file("icon", "Icon"),
|
|
51
|
-
],
|
|
52
|
-
},
|
|
53
|
-
],
|
|
54
|
-
};
|
|
55
|
-
export const testimonialItemsArray = {
|
|
56
|
-
id: "items",
|
|
57
|
-
title: "Reviews",
|
|
58
|
-
type: "array",
|
|
59
|
-
children: [
|
|
60
|
-
{
|
|
61
|
-
id: "testimonial",
|
|
62
|
-
title: "Review",
|
|
63
|
-
type: "object",
|
|
64
|
-
children: [
|
|
65
|
-
long("text", "Review text", true),
|
|
66
|
-
short("name", "Customer name", true),
|
|
67
|
-
file("avatar", "Avatar"),
|
|
68
|
-
short("rating", "Rating (1–5)"),
|
|
69
|
-
],
|
|
70
|
-
},
|
|
71
|
-
],
|
|
72
|
-
};
|
|
73
|
-
export const bannerSlide = {
|
|
74
|
-
id: "slide",
|
|
75
|
-
title: "Banner slide",
|
|
76
|
-
type: "object",
|
|
77
|
-
children: [
|
|
78
|
-
file("image", "Image", true),
|
|
79
|
-
short("title", "Title"),
|
|
80
|
-
short("subtitle", "Subtitle"),
|
|
81
|
-
long("description", "Description"),
|
|
82
|
-
short("buttonText", "Button label"),
|
|
83
|
-
short("buttonLink", "Button link"),
|
|
84
|
-
],
|
|
85
|
-
};
|
|
86
|
-
export const shoppableLookObject = {
|
|
87
|
-
id: "look",
|
|
88
|
-
title: "Look",
|
|
89
|
-
type: "object",
|
|
90
|
-
children: [
|
|
91
|
-
file("image", "Look image", true),
|
|
92
|
-
{
|
|
93
|
-
id: "productHandles",
|
|
94
|
-
title: "Product handles",
|
|
95
|
-
type: "array",
|
|
96
|
-
children: [short("handle", "Handle")],
|
|
97
|
-
},
|
|
98
|
-
],
|
|
99
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { type DynamicConfigStructureField } from "./shared";
|
|
2
|
-
type Field = DynamicConfigStructureField;
|
|
3
|
-
export declare const siteBrandingStructure: Field[];
|
|
4
|
-
export declare const contactStructure: Field[];
|
|
5
|
-
export declare const socialLinksStructure: Field[];
|
|
6
|
-
export declare const faqsStructure: Field[];
|
|
7
|
-
export declare const heroBannersStructure: Field[];
|
|
8
|
-
/** Layout promo bar (`homepage-config.promo-bar`). */
|
|
9
|
-
export declare const promoBarStructure: Field[];
|
|
10
|
-
export {};
|
|
11
|
-
//# sourceMappingURL=site-configs.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"site-configs.d.ts","sourceRoot":"","sources":["../../../src/dynamic-config-schema/site-configs.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,2BAA2B,EACjC,MAAM,UAAU,CAAA;AAEjB,KAAK,KAAK,GAAG,2BAA2B,CAAA;AAExC,eAAO,MAAM,qBAAqB,EAAE,KAAK,EAGxC,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,EAKnC,CAAA;AAED,eAAO,MAAM,oBAAoB,EAAE,KAAK,EAkBvC,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,EAkBhC,CAAA;AAED,eAAO,MAAM,oBAAoB,EAAE,KAAK,EAavC,CAAA;AAED,sDAAsD;AACtD,eAAO,MAAM,iBAAiB,EAAE,KAAK,EAKpC,CAAA"}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { bannerSlide, bool, file, long, short, } from "./shared";
|
|
2
|
-
export const siteBrandingStructure = [
|
|
3
|
-
file("logo", "Logo"),
|
|
4
|
-
long("description", "Site description (footer / SEO)"),
|
|
5
|
-
];
|
|
6
|
-
export const contactStructure = [
|
|
7
|
-
short("phone", "Phone"),
|
|
8
|
-
short("email", "Email"),
|
|
9
|
-
short("whatsapp", "WhatsApp"),
|
|
10
|
-
long("address", "Address"),
|
|
11
|
-
];
|
|
12
|
-
export const socialLinksStructure = [
|
|
13
|
-
{
|
|
14
|
-
id: "links",
|
|
15
|
-
title: "Social links",
|
|
16
|
-
type: "array",
|
|
17
|
-
children: [
|
|
18
|
-
{
|
|
19
|
-
id: "link",
|
|
20
|
-
title: "Social link",
|
|
21
|
-
type: "object",
|
|
22
|
-
children: [
|
|
23
|
-
short("name", "Platform name", true),
|
|
24
|
-
short("url", "URL", true),
|
|
25
|
-
file("icon", "Icon"),
|
|
26
|
-
],
|
|
27
|
-
},
|
|
28
|
-
],
|
|
29
|
-
},
|
|
30
|
-
];
|
|
31
|
-
export const faqsStructure = [
|
|
32
|
-
{
|
|
33
|
-
id: "items",
|
|
34
|
-
title: "FAQs",
|
|
35
|
-
type: "array",
|
|
36
|
-
children: [
|
|
37
|
-
{
|
|
38
|
-
id: "faq",
|
|
39
|
-
title: "FAQ",
|
|
40
|
-
type: "object",
|
|
41
|
-
children: [
|
|
42
|
-
short("category", "Category"),
|
|
43
|
-
short("question", "Question", true),
|
|
44
|
-
long("answer", "Answer", true),
|
|
45
|
-
],
|
|
46
|
-
},
|
|
47
|
-
],
|
|
48
|
-
},
|
|
49
|
-
];
|
|
50
|
-
export const heroBannersStructure = [
|
|
51
|
-
{
|
|
52
|
-
id: "desktop",
|
|
53
|
-
title: "Desktop / web carousel",
|
|
54
|
-
type: "array",
|
|
55
|
-
children: [bannerSlide],
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
id: "mobile",
|
|
59
|
-
title: "Mobile carousel (optional)",
|
|
60
|
-
type: "array",
|
|
61
|
-
children: [bannerSlide],
|
|
62
|
-
},
|
|
63
|
-
];
|
|
64
|
-
/** Layout promo bar (`homepage-config.promo-bar`). */
|
|
65
|
-
export const promoBarStructure = [
|
|
66
|
-
short("promo-text", "Promo message"),
|
|
67
|
-
short("promo-code", "Promo code"),
|
|
68
|
-
short("promo-value", "Promo value"),
|
|
69
|
-
bool("promo-active", "Show promo bar"),
|
|
70
|
-
];
|
package/dist/src/edge.d.ts
DELETED
package/dist/src/edge.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"edge.d.ts","sourceRoot":"","sources":["../../src/edge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACjF,YAAY,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAC"}
|
package/dist/src/edge.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { medusaListRegions, medusaMergeCarts } from "medusa-services/middleware";
|
package/dist/src/middleware.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"middleware.d.ts","sourceRoot":"","sources":["../../src/middleware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACjF,YAAY,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAC"}
|
package/dist/src/middleware.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { medusaListRegions, medusaMergeCarts } from "medusa-services/middleware";
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { HttpTypes } from "@medusajs/types";
|
|
2
|
-
import type { BrandPillarConfig } from "./dynamic-config";
|
|
3
|
-
/** Brand pillar cards from top-level product categories (not CMS pillars array). */
|
|
4
|
-
export declare function buildBrandPillarsFromCategories(categories: HttpTypes.StoreProductCategory[], collections: Array<Record<string, unknown>> | undefined, sectionTitle: string): {
|
|
5
|
-
sectionTitle: string;
|
|
6
|
-
pillars: BrandPillarConfig[];
|
|
7
|
-
};
|
|
8
|
-
//# sourceMappingURL=brand-pillars-from-categories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"brand-pillars-from-categories.d.ts","sourceRoot":"","sources":["../../../src/server/brand-pillars-from-categories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AA+HzD,oFAAoF;AACpF,wBAAgB,+BAA+B,CAC7C,UAAU,EAAE,SAAS,CAAC,oBAAoB,EAAE,EAC5C,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,SAAS,EACvD,YAAY,EAAE,MAAM,GACnB;IAAE,YAAY,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,iBAAiB,EAAE,CAAA;CAAE,CAsBxD"}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
function normalizeKey(value) {
|
|
2
|
-
return value
|
|
3
|
-
.toLowerCase()
|
|
4
|
-
.trim()
|
|
5
|
-
.replace(/&/g, "and")
|
|
6
|
-
.replace(/[^a-z0-9]+/g, "-")
|
|
7
|
-
.replace(/^-+|-+$/g, "");
|
|
8
|
-
}
|
|
9
|
-
function collectionImageForCategory(collections, category) {
|
|
10
|
-
if (!collections?.length)
|
|
11
|
-
return null;
|
|
12
|
-
const handleKey = category.handle ? normalizeKey(category.handle) : "";
|
|
13
|
-
const nameKey = category.name ? normalizeKey(category.name) : "";
|
|
14
|
-
for (const entry of collections) {
|
|
15
|
-
const meta = entry.metadata ?? {};
|
|
16
|
-
const image = meta.category_image || meta.image || meta.thumbnail;
|
|
17
|
-
if (!image)
|
|
18
|
-
continue;
|
|
19
|
-
const cHandle = entry.handle ?? "";
|
|
20
|
-
const cTitle = entry.title ?? "";
|
|
21
|
-
if ((handleKey && normalizeKey(cHandle) === handleKey) ||
|
|
22
|
-
(nameKey && normalizeKey(cTitle) === nameKey)) {
|
|
23
|
-
return image;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
return null;
|
|
27
|
-
}
|
|
28
|
-
function imageFromCategory(category) {
|
|
29
|
-
const meta = category.metadata ?? {};
|
|
30
|
-
return (meta.category_image ||
|
|
31
|
-
meta.image ||
|
|
32
|
-
meta.thumbnail ||
|
|
33
|
-
category.thumbnail ||
|
|
34
|
-
null);
|
|
35
|
-
}
|
|
36
|
-
function resolveCategoryImage(category, collections) {
|
|
37
|
-
const fromCategory = imageFromCategory(category);
|
|
38
|
-
if (fromCategory)
|
|
39
|
-
return fromCategory;
|
|
40
|
-
const parent = category.parent_category;
|
|
41
|
-
if (parent) {
|
|
42
|
-
const fromParent = imageFromCategory(parent);
|
|
43
|
-
if (fromParent)
|
|
44
|
-
return fromParent;
|
|
45
|
-
}
|
|
46
|
-
return collectionImageForCategory(collections, category);
|
|
47
|
-
}
|
|
48
|
-
function categoryDescription(category) {
|
|
49
|
-
const meta = category.metadata ?? {};
|
|
50
|
-
const native = category.description;
|
|
51
|
-
return String(native ?? meta.category_description ?? meta.description ?? "").trim();
|
|
52
|
-
}
|
|
53
|
-
function categoryHref(category) {
|
|
54
|
-
const meta = category.metadata ?? {};
|
|
55
|
-
const custom = meta.category_link?.trim();
|
|
56
|
-
if (custom)
|
|
57
|
-
return custom;
|
|
58
|
-
if (category.handle)
|
|
59
|
-
return `/categories/${category.handle}`;
|
|
60
|
-
return undefined;
|
|
61
|
-
}
|
|
62
|
-
function pickBrandPillarCategories(categories, collections, limit = 4) {
|
|
63
|
-
const valid = (categories ?? []).filter((c) => c.name && c.handle);
|
|
64
|
-
const topLevel = valid.filter((c) => !c.parent_category_id);
|
|
65
|
-
const withImage = topLevel.filter((c) => Boolean(resolveCategoryImage(c, collections)));
|
|
66
|
-
const pool = withImage.length >= 2 ? withImage : topLevel;
|
|
67
|
-
return [...pool]
|
|
68
|
-
.sort((a, b) => Number(Boolean(resolveCategoryImage(b, collections))) -
|
|
69
|
-
Number(Boolean(resolveCategoryImage(a, collections))) ||
|
|
70
|
-
(a.name ?? "").localeCompare(b.name ?? ""))
|
|
71
|
-
.slice(0, limit);
|
|
72
|
-
}
|
|
73
|
-
/** Brand pillar cards from top-level product categories (not CMS pillars array). */
|
|
74
|
-
export function buildBrandPillarsFromCategories(categories, collections, sectionTitle) {
|
|
75
|
-
const pillars = pickBrandPillarCategories(categories, collections).flatMap((category) => {
|
|
76
|
-
const title = (category.name ?? "").trim();
|
|
77
|
-
const image = resolveCategoryImage(category, collections) ?? undefined;
|
|
78
|
-
if (!title || !image)
|
|
79
|
-
return [];
|
|
80
|
-
const description = categoryDescription(category);
|
|
81
|
-
const href = categoryHref(category);
|
|
82
|
-
return [
|
|
83
|
-
{
|
|
84
|
-
title,
|
|
85
|
-
description,
|
|
86
|
-
image,
|
|
87
|
-
...(href ? { href } : {}),
|
|
88
|
-
},
|
|
89
|
-
];
|
|
90
|
-
});
|
|
91
|
-
return { sectionTitle, pillars };
|
|
92
|
-
}
|