storefront-layouts 1.0.3 → 1.0.4
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/components/auth/LoginForm.js +2 -2
- package/dist/components/auth/LoginSheet.js +2 -2
- package/dist/components/auth/login-form-core.js +3 -3
- package/dist/components/auth/login-sheet-header.js +3 -3
- package/dist/components/auth/login-sheet-registry.js +2 -2
- package/dist/components/auth/login-sheet-themes/booking-agenda.theme.js +1 -1
- package/dist/components/auth/login-sheet-themes/booking.theme.js +1 -1
- package/dist/components/auth/login-sheet-themes/clothing-minimal.theme.js +1 -1
- package/dist/components/auth/login-sheet-themes/clothing.theme.js +1 -1
- package/dist/components/auth/login-sheet-themes/electronics-grid.theme.js +1 -1
- package/dist/components/auth/login-sheet-themes/electronics.theme.js +1 -1
- package/dist/components/auth/login-sheet-themes/food-modern.theme.js +1 -1
- package/dist/components/auth/login-sheet-themes/food.theme.js +1 -1
- package/dist/components/auth/login-sheet-themes/index.js +9 -9
- package/dist/components/auth/login-sheet-themes/motivational-speaker.theme.js +1 -1
- package/dist/components/auth/login-sheet-themes/theme-input-baselines.d.ts +2 -2
- package/dist/components/auth/login-sheet-themes/theme-input-baselines.d.ts.map +1 -1
- package/dist/components/auth/login-sheet-themes/theme-input-baselines.js +2 -2
- package/dist/components/auth/login-sheets/StoreLoginSheetShell.d.ts.map +1 -1
- package/dist/components/auth/login-sheets/StoreLoginSheetShell.js +6 -6
- package/dist/components/auth/use-login-submit.js +3 -3
- package/dist/components/cart/InventoryHoldCountdown.js +2 -2
- package/dist/components/categories/category-masonry-grid.js +3 -3
- package/dist/components/checkout/CheckoutFeeLines.js +1 -1
- package/dist/components/checkout/ShippingOptionsPanel.js +3 -3
- package/dist/components/learning/CertificateTemplates.js +2 -2
- package/dist/components/learning/CertificateViewer.js +3 -3
- package/dist/components/learning/MentorshipProgress.d.ts.map +1 -1
- package/dist/components/learning/MentorshipProgress.js +4 -4
- package/dist/components/product/ProductVariationSelectors.js +1 -1
- package/dist/components/rich-text/CategoryDescription.js +2 -2
- package/dist/components/rich-text/ProductDescription.js +2 -2
- package/dist/components/rich-text/RichTextExcerpt.js +1 -1
- package/dist/components/rich-text/SafeRichHtml.d.ts +8 -11
- package/dist/components/rich-text/SafeRichHtml.d.ts.map +1 -1
- package/dist/components/rich-text/SafeRichHtml.js +3 -5
- package/dist/components/shipping/ProductDeliveryInfoSection.d.ts.map +1 -1
- package/dist/components/shipping/ProductDeliveryInfoSection.js +7 -4
- package/dist/components/shipping/ShippingQuoteAddressForm.js +3 -3
- package/dist/components/ui/alert-modal.js +2 -2
- package/dist/components/ui/avatar-image.js +1 -1
- package/dist/components/ui/badge.js +1 -1
- package/dist/components/ui/breadcrumbs.js +1 -1
- package/dist/components/ui/button.d.ts +1 -1
- package/dist/components/ui/button.js +1 -1
- package/dist/components/ui/card.js +1 -1
- package/dist/components/ui/category-tree.js +2 -2
- package/dist/components/ui/checkout-button.d.ts.map +1 -1
- package/dist/components/ui/checkout-button.js +11 -283
- package/dist/components/ui/guest-checkout-modal.js +3 -3
- package/dist/components/ui/image-skeleton.js +2 -2
- package/dist/components/ui/image-with-fallback.d.ts +3 -1
- package/dist/components/ui/image-with-fallback.d.ts.map +1 -1
- package/dist/components/ui/image-with-fallback.js +55 -139
- package/dist/components/ui/input.js +1 -1
- package/dist/components/ui/limited-time-offer-badge.js +2 -2
- package/dist/components/ui/loading-skeleton-wrapper.js +1 -1
- package/dist/components/ui/modal.js +2 -2
- package/dist/components/ui/otp-input.js +1 -1
- package/dist/components/ui/out-of-stock-overlay.js +1 -1
- package/dist/components/ui/page-animate-wrapper.js +2 -2
- package/dist/components/ui/page-content-loader.js +2 -2
- package/dist/components/ui/page-loader.js +1 -1
- package/dist/components/ui/product-card.d.ts.map +1 -1
- package/dist/components/ui/product-card.js +17 -17
- package/dist/components/ui/product-rating.js +1 -1
- package/dist/components/ui/product-stock-badge.js +2 -2
- package/dist/components/ui/review-form.js +2 -2
- package/dist/components/ui/route-skeleton-loader.js +6 -6
- package/dist/components/ui/sheet.d.ts +2 -1
- package/dist/components/ui/sheet.d.ts.map +1 -1
- package/dist/components/ui/sheet.js +4 -4
- package/dist/components/ui/skeleton.js +1 -1
- package/dist/components/ui/skeletons/index.js +5 -5
- package/dist/components/ui/skeletons/product-grid-skeleton.js +1 -1
- package/dist/components/ui/store-logos.d.ts.map +1 -1
- package/dist/components/ui/store-logos.js +4 -4
- package/dist/components/ui/toast.js +1 -1
- package/dist/components/ui/video-player.js +2 -2
- package/dist/editor/alignment-schemas/booking.js +1 -1
- package/dist/editor/alignment-schemas/clothing-minimal.js +1 -1
- package/dist/editor/alignment-schemas/index.js +20 -20
- package/dist/editor/alignment-schemas/lazy-loader.js +1 -1
- package/dist/editor/alignment-schemas/metadata.js +1 -1
- package/dist/editor/alignment-schemas/resolve-canvas-inspector-leaf.js +3 -3
- package/dist/editor/blocks/index.js +3 -3
- package/dist/editor/blocks/migrate-clothing-minimal.js +3 -3
- package/dist/editor/blocks/nav-outline-utils.js +2 -2
- package/dist/editor/blocks/registry.js +1 -1
- package/dist/editor/document/adapter.js +4 -4
- package/dist/editor/document/block-tree.js +1 -1
- package/dist/editor/document/index.js +6 -6
- package/dist/editor/document/validate.js +1 -1
- package/dist/editor/index.js +12 -12
- package/dist/editor/layout-content-loader.js +3 -3
- package/dist/editor/payaza-form/ArrayItemManager.js +2 -2
- package/dist/editor/payaza-form/EditorCanvasPreview.js +5 -5
- package/dist/editor/payaza-form/FieldRenderer.js +17 -17
- package/dist/editor/payaza-form/IframePreviewMessageBridge.js +3 -3
- package/dist/editor/payaza-form/PayazaFormEditor.js +31 -31
- package/dist/editor/payaza-form/PayazaFormEditorFullPage.js +2 -2
- package/dist/editor/payaza-form/SliderArrayEditor.js +3 -3
- package/dist/editor/payaza-form/components/ArrayField.js +1 -1
- package/dist/editor/payaza-form/components/BlockStylesInspector.js +1 -1
- package/dist/editor/payaza-form/components/BlocksField.js +9 -9
- package/dist/editor/payaza-form/components/ButtonField.js +3 -3
- package/dist/editor/payaza-form/components/CanvasGranularInspector.js +11 -11
- package/dist/editor/payaza-form/components/IconField.js +2 -2
- package/dist/editor/payaza-form/components/ImageField.js +1 -1
- package/dist/editor/payaza-form/components/NumberField.js +1 -1
- package/dist/editor/payaza-form/components/RichTextField.js +2 -2
- package/dist/editor/payaza-form/components/SectionField.js +1 -1
- package/dist/editor/payaza-form/components/SectionSchemaInspector.js +3 -3
- package/dist/editor/payaza-form/components/StarRatingField.js +2 -2
- package/dist/editor/payaza-form/components/TextField.js +1 -1
- package/dist/editor/payaza-form/data-merger.js +6 -6
- package/dist/editor/payaza-form/data-transformer.js +3 -3
- package/dist/editor/payaza-form/engine.js +1 -1
- package/dist/editor/payaza-form/examples/custom-widgets.example.js +1 -1
- package/dist/editor/payaza-form/index.js +8 -8
- package/dist/editor/payaza-form/layout-loader.js +2 -2
- package/dist/editor/payaza-form/preview-message-handler.js +3 -3
- package/dist/editor/payaza-form/schema-bridge.js +3 -3
- package/dist/editor/payaza-form/widget-registry.js +1 -1
- package/dist/editor/shared/BlockOutlineTree.js +2 -2
- package/dist/editor/shared/EditorHeader.js +2 -2
- package/dist/editor/shared/EditorNavigator.js +2 -2
- package/dist/editor/shared/IframePreview.js +6 -6
- package/dist/editor/shared/InlineCanvasPreview.js +8 -8
- package/dist/editor/shared/LayoutRenderer.js +1 -1
- package/dist/editor/shared/ResizableSidebar.js +1 -1
- package/dist/editor/shared/index.js +7 -7
- package/dist/hooks/use-analytics.js +3 -3
- package/dist/hooks/use-api.js +1 -1
- package/dist/hooks/use-cart-api.d.ts.map +1 -1
- package/dist/hooks/use-cart-api.js +8 -3
- package/dist/hooks/use-catalog-loader.js +3 -3
- package/dist/hooks/use-catalog-price-range.d.ts +2 -5
- package/dist/hooks/use-catalog-price-range.d.ts.map +1 -1
- package/dist/hooks/use-catalog-price-range.js +20 -5
- package/dist/hooks/use-category-products.d.ts +8 -0
- package/dist/hooks/use-category-products.d.ts.map +1 -0
- package/dist/hooks/use-category-products.js +43 -0
- package/dist/hooks/use-checkout-fees.d.ts +3 -4
- package/dist/hooks/use-checkout-fees.d.ts.map +1 -1
- package/dist/hooks/use-checkout-fees.js +1 -1
- package/dist/hooks/use-content-ready.js +1 -1
- package/dist/hooks/use-featured-products.d.ts +3 -0
- package/dist/hooks/use-featured-products.d.ts.map +1 -0
- package/dist/hooks/use-featured-products.js +25 -0
- package/dist/hooks/use-multi-store-checkout-fees.d.ts +3 -4
- package/dist/hooks/use-multi-store-checkout-fees.d.ts.map +1 -1
- package/dist/hooks/use-multi-store-checkout-fees.js +1 -1
- package/dist/hooks/use-navigation-loading.js +1 -1
- package/dist/hooks/use-payaza-checkout.d.ts +1 -1
- package/dist/hooks/use-payaza-checkout.d.ts.map +1 -1
- package/dist/hooks/use-payaza-checkout.js +9 -3
- package/dist/hooks/use-product-brands.d.ts +5 -0
- package/dist/hooks/use-product-brands.d.ts.map +1 -0
- package/dist/hooks/use-product-brands.js +25 -0
- package/dist/hooks/use-product-by-slug.d.ts +7 -0
- package/dist/hooks/use-product-by-slug.d.ts.map +1 -0
- package/dist/hooks/use-product-by-slug.js +38 -0
- package/dist/hooks/use-product-reviews.d.ts +15 -0
- package/dist/hooks/use-product-reviews.d.ts.map +1 -0
- package/dist/hooks/use-product-reviews.js +75 -0
- package/dist/hooks/use-product-variation-selection.d.ts +2 -8
- package/dist/hooks/use-product-variation-selection.d.ts.map +1 -1
- package/dist/hooks/use-product-variation-selection.js +1 -1
- package/dist/hooks/use-products-api.js +3 -3
- package/dist/hooks/use-shipping-quote.js +2 -2
- package/dist/hooks/use-store-api.js +4 -4
- package/dist/hooks/usePreviewSlideSync.js +1 -1
- package/dist/index.d.ts +62 -74
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +141 -153
- package/dist/layouts/booking/components/BookingHomePage.d.ts.map +1 -1
- package/dist/layouts/booking/components/BookingHomePage.js +68 -74
- package/dist/layouts/booking/components/BookingMultilineHeading.js +1 -1
- package/dist/layouts/booking/components/BookingTestimonialCard.js +2 -2
- package/dist/layouts/booking/components/BookingTestimonialsEmptyState.js +1 -1
- package/dist/layouts/booking/components/booking-footer-defaults.js +2 -2
- package/dist/layouts/booking/index.js +8 -8
- package/dist/layouts/booking/pages/AboutPage.d.ts +1 -1
- package/dist/layouts/booking/pages/AboutPage.d.ts.map +1 -1
- package/dist/layouts/booking/pages/AboutPage.js +39 -60
- package/dist/layouts/booking/pages/BookPage.d.ts.map +1 -1
- package/dist/layouts/booking/pages/BookPage.js +16 -22
- package/dist/layouts/booking/pages/CategoriesPage.js +6 -6
- package/dist/layouts/booking/pages/CategoryPage.d.ts +1 -1
- package/dist/layouts/booking/pages/CategoryPage.d.ts.map +1 -1
- package/dist/layouts/booking/pages/CategoryPage.js +17 -26
- package/dist/layouts/booking/pages/ContactPage.d.ts +1 -1
- package/dist/layouts/booking/pages/ContactPage.d.ts.map +1 -1
- package/dist/layouts/booking/pages/ContactPage.js +5 -12
- package/dist/layouts/booking/pages/ProductDetailPage.d.ts +1 -1
- package/dist/layouts/booking/pages/ProductDetailPage.d.ts.map +1 -1
- package/dist/layouts/booking/pages/ProductDetailPage.js +203 -150
- package/dist/layouts/booking/pages/ServicesPage.d.ts +1 -1
- package/dist/layouts/booking/pages/ServicesPage.d.ts.map +1 -1
- package/dist/layouts/booking/pages/ServicesPage.js +11 -31
- package/dist/layouts/booking-agenda/components/BookingHomePageAgenda.d.ts.map +1 -1
- package/dist/layouts/booking-agenda/components/BookingHomePageAgenda.js +21 -30
- package/dist/layouts/booking-agenda/index.js +8 -8
- package/dist/layouts/booking-agenda/pages/AboutPage.d.ts +1 -1
- package/dist/layouts/booking-agenda/pages/AboutPage.d.ts.map +1 -1
- package/dist/layouts/booking-agenda/pages/AboutPage.js +11 -14
- package/dist/layouts/booking-agenda/pages/BookPage.d.ts.map +1 -1
- package/dist/layouts/booking-agenda/pages/BookPage.js +15 -21
- package/dist/layouts/booking-agenda/pages/CategoriesPage.js +5 -5
- package/dist/layouts/booking-agenda/pages/CategoryPage.d.ts +1 -1
- package/dist/layouts/booking-agenda/pages/CategoryPage.d.ts.map +1 -1
- package/dist/layouts/booking-agenda/pages/CategoryPage.js +12 -18
- package/dist/layouts/booking-agenda/pages/ContactPage.d.ts +1 -1
- package/dist/layouts/booking-agenda/pages/ContactPage.d.ts.map +1 -1
- package/dist/layouts/booking-agenda/pages/ContactPage.js +8 -13
- package/dist/layouts/booking-agenda/pages/ProductDetailPage.d.ts +1 -1
- package/dist/layouts/booking-agenda/pages/ProductDetailPage.d.ts.map +1 -1
- package/dist/layouts/booking-agenda/pages/ProductDetailPage.js +202 -149
- package/dist/layouts/booking-agenda/pages/ServicesPage.d.ts +1 -1
- package/dist/layouts/booking-agenda/pages/ServicesPage.d.ts.map +1 -1
- package/dist/layouts/booking-agenda/pages/ServicesPage.js +8 -23
- package/dist/layouts/clothing/components/ClothingHomePage.d.ts.map +1 -1
- package/dist/layouts/clothing/components/ClothingHomePage.js +199 -136
- package/dist/layouts/clothing/index.js +7 -7
- package/dist/layouts/clothing/pages/AboutPage.d.ts +1 -1
- package/dist/layouts/clothing/pages/AboutPage.d.ts.map +1 -1
- package/dist/layouts/clothing/pages/AboutPage.js +19 -33
- package/dist/layouts/clothing/pages/CategoriesPage.js +8 -8
- package/dist/layouts/clothing/pages/CategoryPage.d.ts +1 -1
- package/dist/layouts/clothing/pages/CategoryPage.d.ts.map +1 -1
- package/dist/layouts/clothing/pages/CategoryPage.js +15 -41
- package/dist/layouts/clothing/pages/ContactPage.d.ts +1 -1
- package/dist/layouts/clothing/pages/ContactPage.d.ts.map +1 -1
- package/dist/layouts/clothing/pages/ContactPage.js +5 -8
- package/dist/layouts/clothing/pages/ProductDetailPage.d.ts +1 -1
- package/dist/layouts/clothing/pages/ProductDetailPage.d.ts.map +1 -1
- package/dist/layouts/clothing/pages/ProductDetailPage.js +256 -167
- package/dist/layouts/clothing/pages/ProductsPage.d.ts +1 -1
- package/dist/layouts/clothing/pages/ProductsPage.d.ts.map +1 -1
- package/dist/layouts/clothing/pages/ProductsPage.js +125 -59
- package/dist/layouts/clothing/payaza-bindings.js +2 -2
- package/dist/layouts/clothing-minimal/components/ClothingHomePageMinimal.d.ts.map +1 -1
- package/dist/layouts/clothing-minimal/components/ClothingHomePageMinimal.js +32 -131
- package/dist/layouts/clothing-minimal/components/clothing-minimal-block-render.js +8 -8
- package/dist/layouts/clothing-minimal/index.js +7 -7
- package/dist/layouts/clothing-minimal/pages/AboutPage.d.ts +1 -1
- package/dist/layouts/clothing-minimal/pages/AboutPage.d.ts.map +1 -1
- package/dist/layouts/clothing-minimal/pages/AboutPage.js +37 -61
- package/dist/layouts/clothing-minimal/pages/CategoriesPage.js +7 -7
- package/dist/layouts/clothing-minimal/pages/CategoryPage.d.ts +1 -1
- package/dist/layouts/clothing-minimal/pages/CategoryPage.d.ts.map +1 -1
- package/dist/layouts/clothing-minimal/pages/CategoryPage.js +13 -18
- package/dist/layouts/clothing-minimal/pages/ContactPage.d.ts +1 -1
- package/dist/layouts/clothing-minimal/pages/ContactPage.d.ts.map +1 -1
- package/dist/layouts/clothing-minimal/pages/ContactPage.js +5 -8
- package/dist/layouts/clothing-minimal/pages/ProductDetailPage.d.ts +1 -1
- package/dist/layouts/clothing-minimal/pages/ProductDetailPage.d.ts.map +1 -1
- package/dist/layouts/clothing-minimal/pages/ProductDetailPage.js +202 -143
- package/dist/layouts/clothing-minimal/pages/ProductsPage.d.ts +1 -1
- package/dist/layouts/clothing-minimal/pages/ProductsPage.d.ts.map +1 -1
- package/dist/layouts/clothing-minimal/pages/ProductsPage.js +126 -57
- package/dist/layouts/electronics/components/ElectronicsCategoriesPage.js +7 -7
- package/dist/layouts/electronics/components/ElectronicsGridProductCard.js +10 -10
- package/dist/layouts/electronics/components/ElectronicsHomePage.d.ts.map +1 -1
- package/dist/layouts/electronics/components/ElectronicsHomePage.js +29 -31
- package/dist/layouts/electronics/components/ElectronicsPageWrapper.js +4 -4
- package/dist/layouts/electronics/components/ElectronicsProductsPage.d.ts.map +1 -1
- package/dist/layouts/electronics/components/ElectronicsProductsPage.js +81 -23
- package/dist/layouts/electronics/components/ElectronicsStoreFooter.js +2 -2
- package/dist/layouts/electronics/components/ElectronicsStoreHeader.js +6 -6
- package/dist/layouts/electronics/index.js +18 -18
- package/dist/layouts/electronics/pages/AboutPage.d.ts +1 -1
- package/dist/layouts/electronics/pages/AboutPage.d.ts.map +1 -1
- package/dist/layouts/electronics/pages/AboutPage.js +11 -14
- package/dist/layouts/electronics/pages/CategoriesPage.js +1 -1
- package/dist/layouts/electronics/pages/CategoryPage.d.ts +1 -1
- package/dist/layouts/electronics/pages/CategoryPage.d.ts.map +1 -1
- package/dist/layouts/electronics/pages/CategoryPage.js +14 -20
- package/dist/layouts/electronics/pages/ContactPage.d.ts +1 -1
- package/dist/layouts/electronics/pages/ContactPage.d.ts.map +1 -1
- package/dist/layouts/electronics/pages/ContactPage.js +8 -13
- package/dist/layouts/electronics/pages/HelpCenterPage.js +1 -1
- package/dist/layouts/electronics/pages/PrivacyPolicyPage.js +1 -1
- package/dist/layouts/electronics/pages/ProductDetailPage.d.ts +1 -1
- package/dist/layouts/electronics/pages/ProductDetailPage.d.ts.map +1 -1
- package/dist/layouts/electronics/pages/ProductDetailPage.js +201 -142
- package/dist/layouts/electronics/pages/ProductsPage.d.ts +1 -1
- package/dist/layouts/electronics/pages/ProductsPage.d.ts.map +1 -1
- package/dist/layouts/electronics/pages/ProductsPage.js +119 -49
- package/dist/layouts/electronics/pages/TermsPage.js +1 -1
- package/dist/layouts/electronics/pages/TrackOrderPage.js +4 -4
- package/dist/layouts/electronics-grid/components/ElectronicsGridProductCard.js +10 -10
- package/dist/layouts/electronics-grid/components/ElectronicsHomePageGrid.d.ts.map +1 -1
- package/dist/layouts/electronics-grid/components/ElectronicsHomePageGrid.js +75 -33
- package/dist/layouts/electronics-grid/index.js +14 -14
- package/dist/layouts/electronics-grid/pages/AboutPage.d.ts +1 -1
- package/dist/layouts/electronics-grid/pages/AboutPage.d.ts.map +1 -1
- package/dist/layouts/electronics-grid/pages/AboutPage.js +11 -14
- package/dist/layouts/electronics-grid/pages/CategoriesPage.js +1 -1
- package/dist/layouts/electronics-grid/pages/CategoryPage.d.ts +1 -1
- package/dist/layouts/electronics-grid/pages/CategoryPage.d.ts.map +1 -1
- package/dist/layouts/electronics-grid/pages/CategoryPage.js +14 -20
- package/dist/layouts/electronics-grid/pages/ContactPage.d.ts +1 -1
- package/dist/layouts/electronics-grid/pages/ContactPage.d.ts.map +1 -1
- package/dist/layouts/electronics-grid/pages/ContactPage.js +8 -13
- package/dist/layouts/electronics-grid/pages/ElectronicsGridCategoriesPage.js +6 -6
- package/dist/layouts/electronics-grid/pages/HelpCenterPage.js +1 -1
- package/dist/layouts/electronics-grid/pages/PrivacyPolicyPage.js +1 -1
- package/dist/layouts/electronics-grid/pages/ProductDetailPage.d.ts +1 -1
- package/dist/layouts/electronics-grid/pages/ProductDetailPage.d.ts.map +1 -1
- package/dist/layouts/electronics-grid/pages/ProductDetailPage.js +201 -142
- package/dist/layouts/electronics-grid/pages/ProductsPage.d.ts +1 -1
- package/dist/layouts/electronics-grid/pages/ProductsPage.d.ts.map +1 -1
- package/dist/layouts/electronics-grid/pages/ProductsPage.js +121 -52
- package/dist/layouts/electronics-grid/pages/TermsPage.js +1 -1
- package/dist/layouts/electronics-grid/pages/TrackOrderPage.js +4 -4
- package/dist/layouts/food/components/FoodHomePage.d.ts.map +1 -1
- package/dist/layouts/food/components/FoodHomePage.js +42 -41
- package/dist/layouts/food/index.js +8 -8
- package/dist/layouts/food/pages/AboutPage.d.ts +1 -1
- package/dist/layouts/food/pages/AboutPage.d.ts.map +1 -1
- package/dist/layouts/food/pages/AboutPage.js +44 -45
- package/dist/layouts/food/pages/CategoriesPage.js +6 -6
- package/dist/layouts/food/pages/CategoryPage.d.ts +1 -1
- package/dist/layouts/food/pages/CategoryPage.d.ts.map +1 -1
- package/dist/layouts/food/pages/CategoryPage.js +23 -21
- package/dist/layouts/food/pages/ContactPage.d.ts +1 -1
- package/dist/layouts/food/pages/ContactPage.d.ts.map +1 -1
- package/dist/layouts/food/pages/ContactPage.js +5 -7
- package/dist/layouts/food/pages/MenuPage.d.ts +1 -1
- package/dist/layouts/food/pages/MenuPage.d.ts.map +1 -1
- package/dist/layouts/food/pages/MenuPage.js +81 -42
- package/dist/layouts/food/pages/ProductDetailPage.d.ts +1 -1
- package/dist/layouts/food/pages/ProductDetailPage.d.ts.map +1 -1
- package/dist/layouts/food/pages/ProductDetailPage.js +209 -171
- package/dist/layouts/food/pages/ProductsPage.d.ts +1 -1
- package/dist/layouts/food/pages/ProductsPage.d.ts.map +1 -1
- package/dist/layouts/food/pages/ProductsPage.js +130 -45
- package/dist/layouts/food-modern/components/FoodHomePageModern.js +10 -10
- package/dist/layouts/food-modern/index.js +8 -8
- package/dist/layouts/food-modern/pages/AboutPage.d.ts +1 -1
- package/dist/layouts/food-modern/pages/AboutPage.d.ts.map +1 -1
- package/dist/layouts/food-modern/pages/AboutPage.js +11 -14
- package/dist/layouts/food-modern/pages/CategoriesPage.js +5 -5
- package/dist/layouts/food-modern/pages/CategoryPage.d.ts +1 -1
- package/dist/layouts/food-modern/pages/CategoryPage.d.ts.map +1 -1
- package/dist/layouts/food-modern/pages/CategoryPage.js +23 -20
- package/dist/layouts/food-modern/pages/ContactPage.d.ts +1 -1
- package/dist/layouts/food-modern/pages/ContactPage.d.ts.map +1 -1
- package/dist/layouts/food-modern/pages/ContactPage.js +5 -7
- package/dist/layouts/food-modern/pages/MenuPage.d.ts +1 -1
- package/dist/layouts/food-modern/pages/MenuPage.d.ts.map +1 -1
- package/dist/layouts/food-modern/pages/MenuPage.js +81 -46
- package/dist/layouts/food-modern/pages/ProductDetailPage.d.ts +1 -1
- package/dist/layouts/food-modern/pages/ProductDetailPage.d.ts.map +1 -1
- package/dist/layouts/food-modern/pages/ProductDetailPage.js +202 -143
- package/dist/layouts/food-modern/pages/ProductsPage.d.ts +1 -1
- package/dist/layouts/food-modern/pages/ProductsPage.d.ts.map +1 -1
- package/dist/layouts/food-modern/pages/ProductsPage.js +117 -33
- package/dist/layouts/motivational-speaker/components/MotivationalHomePage.d.ts.map +1 -1
- package/dist/layouts/motivational-speaker/components/MotivationalHomePage.js +32 -23
- package/dist/layouts/motivational-speaker/components/MotivationalSpeakerPageWrapper.js +1 -1
- package/dist/layouts/motivational-speaker/index.js +9 -9
- package/dist/layouts/motivational-speaker/pages/AboutPage.d.ts +1 -1
- package/dist/layouts/motivational-speaker/pages/AboutPage.d.ts.map +1 -1
- package/dist/layouts/motivational-speaker/pages/AboutPage.js +6 -9
- package/dist/layouts/motivational-speaker/pages/CategoryPage.d.ts +1 -1
- package/dist/layouts/motivational-speaker/pages/CategoryPage.d.ts.map +1 -1
- package/dist/layouts/motivational-speaker/pages/CategoryPage.js +18 -22
- package/dist/layouts/motivational-speaker/pages/ContactPage.d.ts +1 -1
- package/dist/layouts/motivational-speaker/pages/ContactPage.d.ts.map +1 -1
- package/dist/layouts/motivational-speaker/pages/ContactPage.js +9 -13
- package/dist/layouts/motivational-speaker/pages/ProductsPage.d.ts +1 -1
- package/dist/layouts/motivational-speaker/pages/ProductsPage.d.ts.map +1 -1
- package/dist/layouts/motivational-speaker/pages/ProductsPage.js +121 -52
- package/dist/layouts/motivational-speaker/pages/ServiceDetailPage.d.ts +1 -1
- package/dist/layouts/motivational-speaker/pages/ServiceDetailPage.d.ts.map +1 -1
- package/dist/layouts/motivational-speaker/pages/ServiceDetailPage.js +15 -24
- package/dist/layouts/motivational-speaker/pages/ServicesPage.d.ts +1 -1
- package/dist/layouts/motivational-speaker/pages/ServicesPage.d.ts.map +1 -1
- package/dist/layouts/motivational-speaker/pages/ServicesPage.js +8 -23
- package/dist/layouts/motivational-speaker/pages/SubscriptionPage.js +7 -7
- package/dist/layouts/shared/components/BaseStoreLayout.js +9 -9
- package/dist/layouts/shared/components/CartLineQuantityControl.js +1 -1
- package/dist/layouts/shared/components/GenericPageWrapper.js +3 -3
- package/dist/layouts/shared/components/ProductPriceFilterSection.js +4 -4
- package/dist/layouts/shared/components/PromoBanner.d.ts +1 -4
- package/dist/layouts/shared/components/PromoBanner.d.ts.map +1 -1
- package/dist/layouts/shared/components/PromoBanner.js +12 -8
- package/dist/layouts/shared/components/StoreFooter.js +10 -10
- package/dist/layouts/shared/components/StoreHeader.js +7 -7
- package/dist/layouts/shared/components/TestimonialCard.d.ts.map +1 -1
- package/dist/layouts/shared/components/TestimonialCard.js +2 -2
- package/dist/layouts/shared/components/headers/BookingAgendaSidebar.js +2 -2
- package/dist/layouts/shared/components/headers/ClothingMinimalHeader.js +11 -11
- package/dist/layouts/shared/components/headers/FoodModernHeader.js +7 -7
- package/dist/layouts/shared/index.js +22 -22
- package/dist/layouts/shared/pages/AccountPage.d.ts.map +1 -1
- package/dist/layouts/shared/pages/AccountPage.js +101 -27
- package/dist/layouts/shared/pages/CartPage.d.ts.map +1 -1
- package/dist/layouts/shared/pages/CartPage.js +39 -90
- package/dist/layouts/shared/pages/CheckoutPage.d.ts.map +1 -1
- package/dist/layouts/shared/pages/CheckoutPage.js +349 -868
- package/dist/layouts/shared/pages/CookiePolicyPage.js +1 -1
- package/dist/layouts/shared/pages/FeatureDisabledPage.js +1 -1
- package/dist/layouts/shared/pages/HelpCenterPage.js +1 -1
- package/dist/layouts/shared/pages/MaintenancePage.d.ts.map +1 -1
- package/dist/layouts/shared/pages/MaintenancePage.js +2 -3
- package/dist/layouts/shared/pages/PortfolioPage.d.ts.map +1 -1
- package/dist/layouts/shared/pages/PortfolioPage.js +2 -2
- package/dist/layouts/shared/pages/PrivacyPolicyPage.js +1 -1
- package/dist/layouts/shared/pages/SizeGuidePage.js +1 -1
- package/dist/layouts/shared/pages/StyleGuidePage.js +3 -3
- package/dist/layouts/shared/pages/TeamPage.d.ts.map +1 -1
- package/dist/layouts/shared/pages/TeamPage.js +1 -1
- package/dist/layouts/shared/pages/TermsPage.js +1 -1
- package/dist/layouts/shared/pages/TrackOrderPage.js +4 -4
- package/dist/layouts/shared/pages/WishlistPage.d.ts.map +1 -1
- package/dist/layouts/shared/pages/WishlistPage.js +44 -29
- package/dist/layouts/shared/wrappers/BookingAgendaLayout.d.ts.map +1 -1
- package/dist/layouts/shared/wrappers/BookingAgendaLayout.js +80 -35
- package/dist/layouts/shared/wrappers/ClothingLayout.js +8 -8
- package/dist/layouts/shared/wrappers/ClothingMinimalLayout.js +7 -7
- package/dist/layouts/shared/wrappers/ElectronicsLayout.js +5 -5
- package/dist/layouts/shared/wrappers/FoodModernLayout.js +6 -6
- package/dist/layouts/shared/wrappers/MotivationalLayout.js +9 -9
- package/dist/layouts/shared/wrappers/StandardLayout.js +8 -8
- package/dist/lib/api.d.ts +3 -4
- package/dist/lib/api.d.ts.map +1 -1
- package/dist/lib/api.js +69 -109
- package/dist/lib/auth-context.js +2 -2
- package/dist/lib/content-selectors.d.ts +1 -1
- package/dist/lib/content-selectors.d.ts.map +1 -1
- package/dist/lib/content-selectors.js +8 -0
- package/dist/lib/layout-config-hydration.js +2 -2
- package/dist/lib/loading-context.d.ts.map +1 -1
- package/dist/lib/loading-context.js +11 -21
- package/dist/lib/payaza-checkout.d.ts.map +1 -1
- package/dist/lib/payaza-checkout.js +2 -4
- package/dist/lib/payaza-public-key.d.ts +6 -0
- package/dist/lib/payaza-public-key.d.ts.map +1 -0
- package/dist/lib/payaza-public-key.js +10 -0
- package/dist/lib/rich-html.d.ts +31 -26
- package/dist/lib/rich-html.d.ts.map +1 -1
- package/dist/lib/rich-html.js +1 -0
- package/dist/lib/services/analytics.service.js +1 -1
- package/dist/lib/services/auth.service.js +1 -1
- package/dist/lib/services/booking.service.js +1 -1
- package/dist/lib/services/category.service.js +1 -1
- package/dist/lib/services/checkout.service.d.ts +3 -0
- package/dist/lib/services/checkout.service.d.ts.map +1 -1
- package/dist/lib/services/checkout.service.js +1 -1
- package/dist/lib/services/contact.service.js +1 -1
- package/dist/lib/services/customer.service.js +1 -1
- package/dist/lib/services/fees.service.d.ts +17 -63
- package/dist/lib/services/fees.service.d.ts.map +1 -1
- package/dist/lib/services/fees.service.js +4 -138
- package/dist/lib/services/index.js +13 -13
- package/dist/lib/services/location.service.js +1 -1
- package/dist/lib/services/order.service.js +1 -1
- package/dist/lib/services/payment.service.js +1 -1
- package/dist/lib/services/product.service.d.ts +7 -2
- package/dist/lib/services/product.service.d.ts.map +1 -1
- package/dist/lib/services/product.service.js +13 -1
- package/dist/lib/services/promo.service.js +1 -1
- package/dist/lib/services/review.service.js +1 -1
- package/dist/lib/services/service.service.js +1 -1
- package/dist/lib/services/shipping.service.js +1 -1
- package/dist/lib/services/store.service.js +1 -1
- package/dist/lib/store-config-utils.d.ts +1 -10
- package/dist/lib/store-config-utils.d.ts.map +1 -1
- package/dist/lib/store-config-utils.js +73 -261
- package/dist/lib/store-config.js +1 -1
- package/dist/lib/store-context.d.ts +1 -23
- package/dist/lib/store-context.d.ts.map +1 -1
- package/dist/lib/store-context.js +89 -111
- package/dist/lib/store-types.d.ts +9 -91
- package/dist/lib/store-types.d.ts.map +1 -1
- package/dist/lib/utils/asset-helpers.js +1 -1
- package/dist/lib/utils/catalog-price-bounds.d.ts +16 -6
- package/dist/lib/utils/catalog-price-bounds.d.ts.map +1 -1
- package/dist/lib/utils/catalog-price-bounds.js +58 -14
- package/dist/lib/utils/category-tree.d.ts +9 -0
- package/dist/lib/utils/category-tree.d.ts.map +1 -1
- package/dist/lib/utils/category-tree.js +26 -0
- package/dist/lib/utils/editor-preview.d.ts +5 -0
- package/dist/lib/utils/editor-preview.d.ts.map +1 -1
- package/dist/lib/utils/editor-preview.js +17 -3
- package/dist/lib/utils/fee-calculations.d.ts +5 -1
- package/dist/lib/utils/fee-calculations.d.ts.map +1 -1
- package/dist/lib/utils/fee-calculations.js +28 -31
- package/dist/lib/utils/index.d.ts +1 -1
- package/dist/lib/utils/index.d.ts.map +1 -1
- package/dist/lib/utils/index.js +4 -4
- package/dist/lib/utils/product-images.js +1 -1
- package/dist/lib/utils/product-share.js +1 -1
- package/dist/lib/utils/url-helpers.d.ts +6 -0
- package/dist/lib/utils/url-helpers.d.ts.map +1 -1
- package/dist/lib/utils/url-helpers.js +20 -4
- package/dist/preview/LayoutPreview.js +6 -6
- package/dist/preview/PreviewRouter.js +4 -4
- package/dist/preview/canvas/PreviewCanvasEnhancer.js +8 -8
- package/dist/preview/canvas/preview-flush-await.js +1 -1
- package/dist/preview/canvas/preview-isolation.js +1 -1
- package/dist/preview/canvas/preview-route.js +2 -2
- package/dist/preview/index.js +5 -5
- package/dist/styles/index.css +190 -149
- package/package.json +31 -43
|
@@ -1,44 +1,34 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
3
|
+
import { useFeaturedProducts } from '../../../hooks/use-featured-products';
|
|
4
|
+
import { Button } from '../../../components/ui/button';
|
|
5
|
+
import { useStore } from '../../../lib/store-context';
|
|
6
|
+
import { ImageWithFallback } from '../../../components/ui/image-with-fallback';
|
|
7
|
+
import { useToast } from '../../../components/ui/toast';
|
|
7
8
|
import { ArrowUpRight, Plus } from 'lucide-react';
|
|
8
9
|
import Link from 'next/link';
|
|
9
|
-
import { formatCurrency, filterActiveProducts } from '../../../lib/utils
|
|
10
|
-
import {
|
|
11
|
-
import { getLayoutText, getBannerImage, getTextContent } from '../../../lib/utils/asset-helpers
|
|
12
|
-
import { PromoBanner } from '../../shared/components/PromoBanner
|
|
13
|
-
import { DynamicIcon } from '../../../components/ui/dynamic-icon
|
|
14
|
-
import { getPayazaSectionInlineStyle } from '../../../lib/payaza-section-styles.js';
|
|
15
|
-
import { encodePayazaFieldKey, payazaInlineBindingProps, payazaIconBindingProps } from '../../../preview/canvas/field-key.js';
|
|
16
|
-
import { richFieldHtmlForRender } from '../../../lib/rich-html.js';
|
|
17
|
-
import { compactArrayItems, readItemIconName } from '../../../lib/compact-array-items.js';
|
|
18
|
-
import { showLayoutDecorativeBadges } from '../../../lib/layout-badges.js';
|
|
19
|
-
import { heroUsesBlocks, renderHeroBlocks, renderFeaturesBlocks, renderCategoriesHeaderBlocks, renderFeaturedIntroBlocks, renderShopTheLookBlocks, promoConfigFromBlocks, } from './clothing-minimal-block-render.js';
|
|
20
|
-
import { trackStorefrontEvent } from '../../../lib/mixpanel.js';
|
|
21
|
-
function hasPayazaBlocks(section) {
|
|
22
|
-
if (section === null || typeof section !== 'object')
|
|
23
|
-
return false;
|
|
24
|
-
const b = section.blocks;
|
|
25
|
-
return Array.isArray(b) && b.length > 0;
|
|
26
|
-
}
|
|
10
|
+
import { formatCurrency, filterActiveProducts } from '../../../lib/utils';
|
|
11
|
+
import { countProductsInCategoryTree, getCategoriesForDisplay, } from '../../../lib/utils/category-tree';
|
|
12
|
+
import { getLayoutText, getBannerImage, getTextContent } from '../../../lib/utils/asset-helpers';
|
|
13
|
+
import { PromoBanner } from '../../shared/components/PromoBanner';
|
|
14
|
+
import { DynamicIcon } from '../../../components/ui/dynamic-icon';
|
|
27
15
|
export function ClothingHomePageMinimal({ storeConfig: initialConfig }) {
|
|
28
16
|
const { store, addToCart } = useStore();
|
|
29
17
|
const storeConfig = store || initialConfig;
|
|
30
18
|
const layoutConfig = storeConfig.layoutConfig;
|
|
31
19
|
// In preview mode, use mock data if none are available
|
|
32
20
|
const isPreview = (typeof window !== 'undefined' && window.__IS_PREVIEW__) || storeConfig.layoutConfig?.isPreview;
|
|
33
|
-
const
|
|
34
|
-
const categories = (storeConfig.categories && storeConfig.categories.length > 0)
|
|
21
|
+
const allCategories = (storeConfig.categories && storeConfig.categories.length > 0)
|
|
35
22
|
? storeConfig.categories
|
|
36
23
|
: (isPreview ? [
|
|
37
24
|
{ id: 'cat1', name: 'Essentials', slug: 'essentials', image: 'https://images.unsplash.com/photo-1523381210434-271e8be1f52b?q=80&w=800' },
|
|
38
25
|
{ id: 'cat2', name: 'Accessories', slug: 'accessories', image: 'https://images.unsplash.com/photo-1523275335684-37898b6baf30?q=80&w=800' },
|
|
39
26
|
{ id: 'cat3', name: 'Collections', slug: 'collections', image: 'https://images.unsplash.com/photo-1490481651871-ab68de25d43d?q=80&w=800' }
|
|
40
27
|
] : []);
|
|
41
|
-
const
|
|
28
|
+
const initialProducts = storeConfig.products || [];
|
|
29
|
+
const rawProducts = useFeaturedProducts(storeConfig.id, initialProducts, !isPreview);
|
|
30
|
+
const categoryProducts = filterActiveProducts(initialProducts);
|
|
31
|
+
const categories = getCategoriesForDisplay(allCategories, categoryProducts, 3);
|
|
42
32
|
const activeProducts = filterActiveProducts(rawProducts);
|
|
43
33
|
// Use real active products if available, otherwise if in preview, use all products (including drafts),
|
|
44
34
|
// and if still none, use mock data
|
|
@@ -57,115 +47,26 @@ export function ClothingHomePageMinimal({ storeConfig: initialConfig }) {
|
|
|
57
47
|
addToCart(product);
|
|
58
48
|
addToast(`${product.name} added to cart`, 'success');
|
|
59
49
|
};
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
if (stored && typeof stored === 'object' && stored.sanitizedHtml) {
|
|
77
|
-
return _jsx("span", { dangerouslySetInnerHTML: { __html: stored.sanitizedHtml } });
|
|
78
|
-
}
|
|
79
|
-
const titleText = (typeof stored === 'string' ? stored : null) || getLayoutText(storeConfig, 'hero.title', 'Simplicity is the ultimate sophistication.');
|
|
80
|
-
if (titleText.includes('sophistication')) {
|
|
81
|
-
const parts = titleText.split('sophistication');
|
|
82
|
-
return (_jsxs(_Fragment, { children: [parts[0], _jsx("span", { className: "font-serif italic", children: "sophistication" }), parts[1]] }));
|
|
83
|
-
}
|
|
84
|
-
return titleText;
|
|
85
|
-
})() }), _jsx("p", { className: "text-gray-600 text-lg leading-relaxed", ...payazaInlineBindingProps(isPreview, 'hero', ['subtitle'], { rich: 'inline' }), dangerouslySetInnerHTML: {
|
|
86
|
-
__html: richFieldHtmlForRender(layoutConfig?.sections?.hero?.subtitle, getLayoutText(storeConfig, 'hero.subtitle', storeConfig.description
|
|
87
|
-
? `${storeConfig.description} Discover our latest arrivals, crafted for the modern individual who values quality and timeless design.`
|
|
88
|
-
: 'Discover our latest arrivals, crafted for the modern individual who values quality and timeless design.')),
|
|
89
|
-
} }), _jsx("div", { className: "pt-4", children: _jsx(Link, { href: `/${storeConfig.slug}/products`, children: _jsx(Button, { className: "h-14 px-10 rounded-full bg-black text-white hover:bg-gray-800 text-base transition-all hover:scale-105", children: _jsx("span", { ...payazaInlineBindingProps(isPreview, 'hero', ['primaryCTA'], { rich: 'inline' }), dangerouslySetInnerHTML: {
|
|
90
|
-
__html: richFieldHtmlForRender(layoutConfig?.sections?.hero?.primaryCTA, getLayoutText(storeConfig, 'common.shopNow', 'Shop Collection')),
|
|
91
|
-
} }) }) }) })] }) }), _jsx("div", { className: "relative h-[60vh] lg:h-full w-full lg:order-2 order-1 overflow-hidden group", children: _jsx(ImageWithFallback, { src: getBannerImage(storeConfig, 'hero_main', 'https://images.unsplash.com/photo-1539109136881-3be0616acf4b?q=80&w=1887&auto=format&fit=crop'), alt: "Minimal Fashion", className: "absolute inset-0 w-full h-full object-cover object-center group-hover:scale-105 transition-transform duration-[2s]", ...payazaImg('hero', ['image']) }) })] }) }))), layoutConfig?.sections?.features?.show !== false &&
|
|
92
|
-
(hasPayazaBlocks(layoutConfig?.sections?.features)
|
|
93
|
-
? renderFeaturesBlocks(layoutConfig.sections.features, {
|
|
94
|
-
isPreview,
|
|
95
|
-
storeConfig,
|
|
96
|
-
slug: storeConfig.slug,
|
|
97
|
-
})
|
|
98
|
-
: (_jsx("section", { "data-section": "features", "data-payaza-section-key": "features", "data-payaza-page": "home", className: "py-12 border-b border-gray-100 bg-white", children: _jsx("div", { className: "container mx-auto px-4 md:px-8", children: _jsx("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-8", children: compactArrayItems(layoutConfig?.sections?.features?.items || [
|
|
99
|
-
{ icon: 'Truck', title: 'Global Delivery', description: 'Free on orders over $200' },
|
|
100
|
-
{ icon: 'ShieldCheck', title: 'Secure Payment', description: '100% secure checkout' },
|
|
101
|
-
{ icon: 'RefreshCw', title: 'Easy Returns', description: '30-day return policy' },
|
|
102
|
-
]).map((item, idx) => (_jsxs("div", { className: "flex items-center gap-4 group", children: [_jsx("div", { className: "w-12 h-12 rounded-full bg-gray-50 flex items-center justify-center group-hover:bg-black group-hover:text-white transition-colors duration-300", ...payazaIconBindingProps(isPreview, 'features', ['items', String(idx), 'icon']), children: _jsx(DynamicIcon, { name: readItemIconName(item, 'Truck'), className: "w-5 h-5" }) }), _jsxs("div", { children: [_jsx("h3", { className: "text-sm font-bold uppercase tracking-wider", ...payazaInlineBindingProps(isPreview, 'features', ['items', String(idx), 'title'], {
|
|
103
|
-
rich: 'inline',
|
|
104
|
-
}), dangerouslySetInnerHTML: {
|
|
105
|
-
__html: richFieldHtmlForRender(item.title, 'Global Delivery'),
|
|
106
|
-
} }), _jsx("p", { className: "text-xs text-gray-500", ...payazaInlineBindingProps(isPreview, 'features', ['items', String(idx), 'description'], {
|
|
107
|
-
rich: 'inline',
|
|
108
|
-
}), dangerouslySetInnerHTML: {
|
|
109
|
-
__html: richFieldHtmlForRender(item.description, 'Free on orders over $200'),
|
|
110
|
-
} })] })] }, idx))) }) }) }))), layoutConfig?.sections?.categories?.show !== false && (_jsx("section", { "data-section": "categories", "data-payaza-section-key": "categories", "data-payaza-page": "home", className: "py-16 md:py-24 px-4 md:px-8", children: _jsxs("div", { className: "container mx-auto", children: [hasPayazaBlocks(layoutConfig?.sections?.categories)
|
|
111
|
-
? renderCategoriesHeaderBlocks(layoutConfig.sections.categories, {
|
|
112
|
-
isPreview,
|
|
113
|
-
storeConfig,
|
|
114
|
-
slug: storeConfig.slug,
|
|
115
|
-
})
|
|
116
|
-
: (_jsxs("div", { className: "flex justify-between items-end mb-8 md:mb-12", children: [_jsx("h2", { className: "text-3xl font-light", ...payazaInlineBindingProps(isPreview, 'categories', ['title'], { rich: 'inline' }), dangerouslySetInnerHTML: {
|
|
117
|
-
__html: richFieldHtmlForRender(layoutConfig?.sections?.categories?.title, getLayoutText(storeConfig, 'sections.categories.title', 'Categories')),
|
|
118
|
-
} }), _jsx(Link, { href: `/${storeConfig.slug}/categories`, className: "text-sm font-bold uppercase tracking-wider border-b border-black pb-1 hover:text-gray-600 hover:border-gray-600 transition-colors", children: _jsx("span", { ...payazaInlineBindingProps(isPreview, 'categories', ['viewAllLabel'], { rich: 'inline' }), dangerouslySetInnerHTML: {
|
|
119
|
-
__html: richFieldHtmlForRender(layoutConfig?.sections?.categories?.viewAllLabel, getLayoutText(storeConfig, 'sections.categories.viewAll', 'View All')),
|
|
120
|
-
} }) })] })), _jsx("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-8", children: categories.slice(0, 3).map((category, idx) => (_jsxs(Link, { href: `/${storeConfig.slug}/categories/${category.slug}`, className: "group block cursor-pointer", children: [_jsxs("div", { className: "relative aspect-[3/4] overflow-hidden bg-[#F4F4F4] mb-4", children: [_jsx(ImageWithFallback, { src: category.image, alt: category.name, className: "w-full h-full object-cover transition-transform duration-700 group-hover:scale-110", skeletonAspectRatio: "3/4" }), _jsx("div", { className: "absolute inset-0 bg-black/0 group-hover:bg-black/10 transition-colors duration-500" }), _jsx("div", { className: "absolute top-4 right-4 bg-white rounded-full p-2 opacity-0 group-hover:opacity-100 transform translate-y-2 group-hover:translate-y-0 transition-all duration-300", children: _jsx(ArrowUpRight, { className: "h-5 w-5" }) })] }), _jsx("h3", { className: "text-xl font-medium mb-1", children: category.name }), isPreview && _jsxs("p", { className: "text-sm text-gray-500", children: [12 + idx * 5, " Items"] })] }, category.id))) })] }) })), layoutConfig?.sections?.featuredProducts?.show !== false && (_jsx("section", { "data-section": "featuredProducts", "data-payaza-section-key": "featuredProducts", "data-payaza-page": "home", className: "py-16 md:py-24 bg-[#FAFAFA]", children: _jsxs("div", { className: "container mx-auto px-4 md:px-8", children: [hasPayazaBlocks(layoutConfig?.sections?.featuredProducts) ? (renderFeaturedIntroBlocks(layoutConfig.sections.featuredProducts, {
|
|
121
|
-
isPreview,
|
|
122
|
-
storeConfig,
|
|
123
|
-
slug: storeConfig.slug,
|
|
124
|
-
})) : (_jsxs("div", { className: "max-w-2xl mx-auto text-center mb-10 md:mb-16", children: [_jsx("h2", { className: "text-3xl md:text-4xl font-light mb-4", ...payazaInlineBindingProps(isPreview, 'featuredProducts', ['title'], { rich: 'inline' }), dangerouslySetInnerHTML: {
|
|
125
|
-
__html: richFieldHtmlForRender(layoutConfig?.sections?.featuredProducts?.title, 'The Essentials'),
|
|
126
|
-
} }), _jsx("p", { className: "text-gray-500", ...payazaInlineBindingProps(isPreview, 'featuredProducts', ['subtitle'], { rich: 'inline' }), dangerouslySetInnerHTML: {
|
|
127
|
-
__html: richFieldHtmlForRender(layoutConfig?.sections?.featuredProducts?.subtitle, 'Timeless pieces designed to build the foundation of your wardrobe.'),
|
|
128
|
-
} })] })), _jsx("div", { className: "grid grid-cols-2 lg:grid-cols-4 gap-x-6 gap-y-12 md:gap-8", children: products.slice(0, 4).map((product) => (_jsx("div", { className: "group", children: _jsxs(Link, { href: `/${storeConfig.slug}/products/${product.slug}`, onClick: () => trackStorefrontEvent('Product_clicked', {
|
|
129
|
-
storeId: storeConfig.id,
|
|
130
|
-
storeSlug: storeConfig.slug,
|
|
131
|
-
productId: product.id,
|
|
132
|
-
productName: product.name,
|
|
133
|
-
categoryId: product.categoryId,
|
|
134
|
-
price: product.price,
|
|
135
|
-
}), children: [_jsxs("div", { className: "aspect-[3/4] bg-white overflow-hidden relative mb-4", children: [_jsx(ImageWithFallback, { src: getPrimaryProductImageUrl(product.images, {
|
|
136
|
-
placeholder: isPreview ? EDITOR_PRODUCT_IMAGE_PLACEHOLDER : undefined,
|
|
137
|
-
}), alt: product.name, className: "w-full h-full object-cover mix-blend-multiply group-hover:scale-105 transition-transform duration-500", skeletonAspectRatio: "3/4" }), _jsx("div", { className: "hidden lg:flex absolute inset-0 bg-black/5 opacity-0 group-hover:opacity-100 transition-opacity items-end justify-center pb-6", children: _jsx("button", { onClick: (e) => {
|
|
50
|
+
return (_jsxs("div", { className: "min-h-screen bg-white text-black font-sans selection:bg-black selection:text-white", children: [layoutConfig?.sections?.hero?.show !== false && (_jsx("section", { "data-section": "hero", className: "lg:h-screen h-auto w-full", children: _jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-2 h-full", children: [_jsx("div", { className: "relative bg-[#F4F4F4] flex flex-col justify-center px-12 md:px-24 lg:order-1 order-2 py-20 lg:py-0", children: _jsxs("div", { className: "space-y-6 md:space-y-8 max-w-lg animate-fade-in-up", children: [_jsx("span", { className: "text-xs font-bold uppercase tracking-[0.2em] text-gray-500", children: layoutConfig?.sections?.hero?.badge || getTextContent(storeConfig, 'hero_badge', 'New Collection 2024') }), _jsx("h1", { className: "text-4xl md:text-7xl font-light tracking-tight leading-[1.1]", children: (() => {
|
|
51
|
+
const titleText = layoutConfig?.sections?.hero?.title || getLayoutText(storeConfig, 'hero.title', 'Simplicity is the ultimate sophistication.');
|
|
52
|
+
// If title contains "sophistication", preserve the italic styling
|
|
53
|
+
if (titleText.includes('sophistication')) {
|
|
54
|
+
const parts = titleText.split('sophistication');
|
|
55
|
+
return (_jsxs(_Fragment, { children: [parts[0], _jsx("span", { className: "font-serif italic", children: "sophistication" }), parts[1]] }));
|
|
56
|
+
}
|
|
57
|
+
return titleText;
|
|
58
|
+
})() }), _jsx("p", { className: "text-gray-600 text-lg leading-relaxed", children: layoutConfig?.sections?.hero?.subtitle || getLayoutText(storeConfig, 'hero.subtitle', storeConfig.description ? `${storeConfig.description} Discover our latest arrivals, crafted for the modern individual who values quality and timeless design.` : 'Discover our latest arrivals, crafted for the modern individual who values quality and timeless design.') }), _jsx("div", { className: "pt-4", children: _jsx(Link, { href: `/${storeConfig.slug}/products`, children: _jsx(Button, { className: "h-14 px-10 rounded-full bg-black text-white hover:bg-gray-800 text-base transition-all hover:scale-105", children: layoutConfig?.sections?.hero?.primaryCTA || getLayoutText(storeConfig, 'common.shopNow', 'Shop Collection') }) }) })] }) }), _jsxs("div", { className: "relative h-[60vh] lg:h-full w-full lg:order-2 order-1 overflow-hidden group", children: [_jsx(ImageWithFallback, { src: getBannerImage(storeConfig, 'hero_main', 'https://images.unsplash.com/photo-1539109136881-3be0616acf4b?q=80&w=1887&auto=format&fit=crop'), alt: "Minimal Fashion", className: "absolute inset-0 w-full h-full object-cover object-center group-hover:scale-105 transition-transform duration-[2s]" }), _jsxs("div", { className: "absolute bottom-8 right-8 bg-white/90 backdrop-blur p-4 rounded-lg hidden md:block", children: [_jsx("p", { className: "text-xs font-bold uppercase tracking-wider mb-1", children: "Featured Look" }), _jsx("p", { className: "text-sm text-gray-600", children: "Linen Blend Blazer - $299" })] })] })] }) })), layoutConfig?.sections?.features?.show !== false && (_jsx("section", { "data-section": "features", className: "py-12 border-b border-gray-100 bg-white", children: _jsx("div", { className: "container mx-auto px-4 md:px-8", children: _jsx("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-8", children: (layoutConfig?.sections?.features?.items || [
|
|
59
|
+
{ icon: 'Truck', title: 'Global Delivery', description: 'Free on orders over $200' },
|
|
60
|
+
{ icon: 'ShieldCheck', title: 'Secure Payment', description: '100% secure checkout' },
|
|
61
|
+
{ icon: 'RefreshCw', title: 'Easy Returns', description: '30-day return policy' }
|
|
62
|
+
]).filter(Boolean).map((item, idx) => (_jsxs("div", { className: "flex items-center gap-4 group", children: [_jsx("div", { className: "w-12 h-12 rounded-full bg-gray-50 flex items-center justify-center group-hover:bg-black group-hover:text-white transition-colors duration-300", children: _jsx(DynamicIcon, { name: item.icon, className: "w-5 h-5" }) }), _jsxs("div", { children: [_jsx("h3", { className: "text-sm font-bold uppercase tracking-wider", children: item.title }), _jsx("p", { className: "text-xs text-gray-500", children: item.description })] })] }, idx))) }) }) })), layoutConfig?.sections?.categories?.show !== false && (_jsx("section", { "data-section": "categories", className: "py-16 md:py-24 px-4 md:px-8", children: _jsxs("div", { className: "container mx-auto", children: [_jsxs("div", { className: "flex justify-between items-end mb-8 md:mb-12", children: [_jsx("h2", { className: "text-3xl font-light", children: layoutConfig?.sections?.categories?.title || getLayoutText(storeConfig, 'sections.categories.title', 'Categories') }), _jsx(Link, { href: `/${storeConfig.slug}/categories`, className: "text-sm font-bold uppercase tracking-wider border-b border-black pb-1 hover:text-gray-600 hover:border-gray-600 transition-colors", children: layoutConfig?.sections?.categories?.viewAllLabel || getLayoutText(storeConfig, 'sections.categories.viewAll', 'View All') })] }), _jsx("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-8", children: categories.map((category) => {
|
|
63
|
+
const itemCount = countProductsInCategoryTree(category, allCategories, categoryProducts);
|
|
64
|
+
return (_jsxs(Link, { href: `/${storeConfig.slug}/categories/${category.slug}`, className: "group block cursor-pointer", children: [_jsxs("div", { className: "relative aspect-[3/4] overflow-hidden bg-[#F4F4F4] mb-4", children: [_jsx(ImageWithFallback, { src: category.image, alt: category.name, className: "w-full h-full object-cover transition-transform duration-700 group-hover:scale-110", skeletonAspectRatio: "3/4" }), _jsx("div", { className: "absolute inset-0 bg-black/0 group-hover:bg-black/10 transition-colors duration-500" }), _jsx("div", { className: "absolute top-4 right-4 bg-white rounded-full p-2 opacity-0 group-hover:opacity-100 transform translate-y-2 group-hover:translate-y-0 transition-all duration-300", children: _jsx(ArrowUpRight, { className: "h-5 w-5" }) })] }), _jsx("h3", { className: "text-xl font-medium mb-1", children: category.name }), itemCount > 0 && (_jsxs("p", { className: "text-sm text-gray-500", children: [itemCount, " ", itemCount === 1 ? 'Item' : 'Items'] }))] }, category.id));
|
|
65
|
+
}) })] }) })), layoutConfig?.sections?.featuredProducts?.show !== false && (_jsx("section", { "data-section": "featuredProducts", className: "py-16 md:py-24 bg-[#FAFAFA]", children: _jsxs("div", { className: "container mx-auto px-4 md:px-8", children: [_jsxs("div", { className: "max-w-2xl mx-auto text-center mb-10 md:mb-16", children: [_jsx("h2", { className: "text-3xl md:text-4xl font-light mb-4", children: layoutConfig?.sections?.featuredProducts?.title || 'The Essentials' }), _jsx("p", { className: "text-gray-500", children: layoutConfig?.sections?.featuredProducts?.subtitle || 'Timeless pieces designed to build the foundation of your wardrobe.' })] }), _jsx("div", { className: "grid grid-cols-2 lg:grid-cols-4 gap-x-6 gap-y-12 md:gap-8", children: products.slice(0, 4).map((product) => (_jsx("div", { className: "group", children: _jsxs(Link, { href: `/${storeConfig.slug}/products/${product.slug}`, children: [_jsxs("div", { className: "aspect-[3/4] bg-white overflow-hidden relative mb-4", children: [_jsx(ImageWithFallback, { src: product.images[0], alt: product.name, className: "w-full h-full object-cover mix-blend-multiply group-hover:scale-105 transition-transform duration-500", skeletonAspectRatio: "3/4" }), _jsx("div", { className: "hidden lg:flex absolute inset-0 bg-black/5 opacity-0 group-hover:opacity-100 transition-opacity items-end justify-center pb-6", children: _jsx("button", { onClick: (e) => {
|
|
138
66
|
e.preventDefault();
|
|
139
67
|
handleAddToCart(product);
|
|
140
68
|
}, className: "bg-white text-black px-8 py-3 rounded-full text-sm font-bold shadow-lg transform translate-y-4 group-hover:translate-y-0 transition-all duration-300 hover:bg-black hover:text-white", children: "Quick Add" }) }), _jsx("button", { onClick: (e) => {
|
|
141
69
|
e.preventDefault();
|
|
142
70
|
handleAddToCart(product);
|
|
143
|
-
}, className: "lg:hidden absolute bottom-3 right-3 bg-white text-black h-10 w-10 flex items-center justify-center rounded-full shadow-lg z-10 active:scale-95 transition-transform", children: _jsx(Plus, { className: "h-5 w-5" }) }), product.compareAtPrice && (_jsx("span", { className: "absolute top-2 left-2 text-[10px] font-bold uppercase tracking-wider bg-black text-white px-2 py-1", children: getLayoutText(storeConfig, 'common.sale', 'Sale') }))] }), _jsxs("div", { className: "flex justify-between items-start", children: [_jsxs("div", { children: [_jsx("h3", { className: "font-medium text-base mb-1 group-hover:underline decoration-1 underline-offset-4", children: product.name }), _jsx("div", { className: "flex gap-2 mb-2", children: ['#D4D4D4', '#171717', '#737373'].map((color, i) => (_jsx("div", { className: "w-3 h-3 rounded-full border border-gray-200", style: { backgroundColor: color } }, i))) })] }), _jsx("span", { className: "font-medium text-sm", children: formatCurrency(product.price, product.currency || 'USD') })] })] }) }, product.id))) })] }) })), layoutConfig?.sections?.about?.show !== false && (_jsx("section", { "data-section": "about", "
|
|
144
|
-
? renderShopTheLookBlocks(layoutConfig.sections.about, {
|
|
145
|
-
isPreview,
|
|
146
|
-
storeConfig,
|
|
147
|
-
slug: storeConfig.slug,
|
|
148
|
-
products,
|
|
149
|
-
onQuickAdd: handleAddToCart,
|
|
150
|
-
})
|
|
151
|
-
: (_jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-10 md:gap-16 items-center", children: [_jsxs("div", { className: "relative aspect-[4/5] bg-gray-100 group overflow-hidden", children: [_jsx(ImageWithFallback, { src: "https://images.unsplash.com/photo-1483985988355-763728e1935b?q=80&w=2070&auto=format&fit=crop", alt: "Shop the look", className: "w-full h-full object-cover" }), _jsxs("div", { className: "absolute top-[30%] left-[45%] group/spot", children: [_jsx("div", { className: "w-4 h-4 bg-white rounded-full animate-pulse cursor-pointer relative z-10 hover:scale-125 transition-transform" }), _jsxs("div", { className: "absolute left-6 top-1/2 -translate-y-1/2 bg-white p-3 rounded shadow-lg w-48 opacity-0 group-hover/spot:opacity-100 transition-opacity pointer-events-none group-hover/spot:pointer-events-auto", children: [_jsx("p", { className: "font-bold text-xs mb-1", children: "Oversized Wool Coat" }), _jsx("p", { className: "text-xs text-gray-500", children: "$299.00" })] })] }), _jsxs("div", { className: "absolute bottom-[25%] right-[40%] group/spot", children: [_jsx("div", { className: "w-4 h-4 bg-white rounded-full animate-pulse cursor-pointer relative z-10 hover:scale-125 transition-transform" }), _jsxs("div", { className: "absolute right-6 top-1/2 -translate-y-1/2 bg-white p-3 rounded shadow-lg w-48 opacity-0 group-hover/spot:opacity-100 transition-opacity pointer-events-none group-hover/spot:pointer-events-auto", children: [_jsx("p", { className: "font-bold text-xs mb-1", children: "Leather Ankle Boots" }), _jsx("p", { className: "text-xs text-gray-500", children: "$189.00" })] })] })] }), _jsxs("div", { className: "space-y-8", children: [_jsx("h2", { className: "text-4xl font-light", ...payazaInlineBindingProps(isPreview, 'about', ['title'], { rich: 'inline' }), children: (() => {
|
|
152
|
-
const stored = layoutConfig?.sections?.about?.title;
|
|
153
|
-
if (stored && typeof stored === 'object' && stored.sanitizedHtml) {
|
|
154
|
-
return _jsx("span", { dangerouslySetInnerHTML: { __html: stored.sanitizedHtml } });
|
|
155
|
-
}
|
|
156
|
-
const titleText = (typeof stored === 'string' ? stored : null) || 'Winter Layering';
|
|
157
|
-
if (titleText === 'Winter Layering' || titleText.includes('Layering')) {
|
|
158
|
-
const parts = titleText.split('Layering');
|
|
159
|
-
return (_jsxs(_Fragment, { children: [parts[0], _jsx("span", { className: "font-serif italic", children: "Layering" }), parts[1]] }));
|
|
160
|
-
}
|
|
161
|
-
return titleText;
|
|
162
|
-
})() }), _jsx("p", { className: "text-gray-600 leading-relaxed max-w-md", ...payazaInlineBindingProps(isPreview, 'about', ['description'], { rich: 'inline' }), dangerouslySetInnerHTML: {
|
|
163
|
-
__html: richFieldHtmlForRender(layoutConfig?.sections?.about?.description, 'Master the art of layering with our winter collection. Combining warmth with style, these pieces are designed to work together seamlessly.'),
|
|
164
|
-
} }), _jsx("div", { className: "space-y-4", children: products.slice(0, 3).map((item, i) => (_jsxs("div", { className: "flex gap-4 items-center p-2 hover:bg-gray-50 rounded-lg transition-colors group cursor-pointer", children: [_jsx("div", { className: "w-16 h-20 bg-white relative", children: _jsx(ImageWithFallback, { src: item.images[0], alt: item.name, className: "w-full h-full object-cover" }) }), _jsxs("div", { className: "flex-1", children: [_jsx("h4", { className: "font-medium text-sm mb-1", children: item.name }), _jsx("p", { className: "text-xs text-gray-500", children: formatCurrency(item.price, item.currency || storeConfig.settings?.currency || 'USD') })] }), _jsx(Button, { variant: "ghost", size: "icon", onClick: () => handleAddToCart(item), className: "opacity-0 group-hover:opacity-100 transition-opacity", children: _jsx(Plus, { className: "h-4 w-4" }) })] }, i))) }), _jsx(Link, { href: `/${storeConfig.slug}/products`, children: _jsx(Button, { className: "w-full bg-black text-white hover:bg-gray-800 h-12 rounded-none uppercase tracking-widest text-xs font-bold", children: getLayoutText(storeConfig, 'common.shopNow', 'Shop The Edit') }) })] })] })) }) })), _jsx(PromoBanner, { config: (() => {
|
|
165
|
-
const pb = layoutConfig?.sections?.promoBanner;
|
|
166
|
-
const merged = pb && Array.isArray(pb.blocks) && pb.blocks.length > 0 ? promoConfigFromBlocks(pb) : null;
|
|
167
|
-
if (merged)
|
|
168
|
-
return { ...(layoutConfig?.sections?.promoBanner || {}), ...merged };
|
|
169
|
-
return layoutConfig?.sections?.promoBanner;
|
|
170
|
-
})(), storeSlug: storeConfig.slug, layoutStyle: "clothing", sectionKey: "promoBanner", page: "home" })] }));
|
|
71
|
+
}, className: "lg:hidden absolute bottom-3 right-3 bg-white text-black h-10 w-10 flex items-center justify-center rounded-full shadow-lg z-10 active:scale-95 transition-transform", children: _jsx(Plus, { className: "h-5 w-5" }) }), product.compareAtPrice && (_jsx("span", { className: "absolute top-2 left-2 text-[10px] font-bold uppercase tracking-wider bg-black text-white px-2 py-1", children: getLayoutText(storeConfig, 'common.sale', 'Sale') }))] }), _jsxs("div", { className: "flex justify-between items-start", children: [_jsxs("div", { children: [_jsx("h3", { className: "font-medium text-base mb-1 group-hover:underline decoration-1 underline-offset-4", children: product.name }), _jsx("div", { className: "flex gap-2 mb-2", children: ['#D4D4D4', '#171717', '#737373'].map((color, i) => (_jsx("div", { className: "w-3 h-3 rounded-full border border-gray-200", style: { backgroundColor: color } }, i))) })] }), _jsx("span", { className: "font-medium text-sm", children: formatCurrency(product.price, product.currency || 'USD') })] })] }) }, product.id))) })] }) })), layoutConfig?.sections?.about?.show !== false && (_jsx("section", { "data-section": "about", className: "py-16 md:py-24 px-4 md:px-8 border-t border-gray-100", children: _jsx("div", { className: "container mx-auto", children: _jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-10 md:gap-16 items-center", children: [_jsxs("div", { className: "relative aspect-[4/5] bg-gray-100 group overflow-hidden", children: [_jsx(ImageWithFallback, { src: "https://images.unsplash.com/photo-1483985988355-763728e1935b?q=80&w=2070&auto=format&fit=crop", alt: "Shop the look", className: "w-full h-full object-cover" }), _jsxs("div", { className: "absolute top-[30%] left-[45%] group/spot", children: [_jsx("div", { className: "w-4 h-4 bg-white rounded-full animate-pulse cursor-pointer relative z-10 hover:scale-125 transition-transform" }), _jsxs("div", { className: "absolute left-6 top-1/2 -translate-y-1/2 bg-white p-3 rounded shadow-lg w-48 opacity-0 group-hover/spot:opacity-100 transition-opacity pointer-events-none group-hover/spot:pointer-events-auto", children: [_jsx("p", { className: "font-bold text-xs mb-1", children: "Oversized Wool Coat" }), _jsx("p", { className: "text-xs text-gray-500", children: "$299.00" })] })] }), _jsxs("div", { className: "absolute bottom-[25%] right-[40%] group/spot", children: [_jsx("div", { className: "w-4 h-4 bg-white rounded-full animate-pulse cursor-pointer relative z-10 hover:scale-125 transition-transform" }), _jsxs("div", { className: "absolute right-6 top-1/2 -translate-y-1/2 bg-white p-3 rounded shadow-lg w-48 opacity-0 group-hover/spot:opacity-100 transition-opacity pointer-events-none group-hover/spot:pointer-events-auto", children: [_jsx("p", { className: "font-bold text-xs mb-1", children: "Leather Ankle Boots" }), _jsx("p", { className: "text-xs text-gray-500", children: "$189.00" })] })] })] }), _jsxs("div", { className: "space-y-8", children: [_jsx("h2", { className: "text-4xl font-light", children: layoutConfig?.sections?.about?.title || (_jsxs(_Fragment, { children: ["Winter ", _jsx("span", { className: "font-serif italic", children: "Layering" })] })) }), _jsx("p", { className: "text-gray-600 leading-relaxed max-w-md", children: layoutConfig?.sections?.about?.description || 'Master the art of layering with our winter collection. Combining warmth with style, these pieces are designed to work together seamlessly.' }), _jsx("div", { className: "space-y-4", children: products.slice(0, 3).map((item, i) => (_jsxs("div", { className: "flex gap-4 items-center p-2 hover:bg-gray-50 rounded-lg transition-colors group cursor-pointer", children: [_jsx("div", { className: "w-16 h-20 bg-white relative", children: _jsx(ImageWithFallback, { src: item.images[0], alt: item.name, className: "w-full h-full object-cover" }) }), _jsxs("div", { className: "flex-1", children: [_jsx("h4", { className: "font-medium text-sm mb-1", children: item.name }), _jsx("p", { className: "text-xs text-gray-500", children: formatCurrency(item.price, item.currency || storeConfig.settings?.currency || 'USD') })] }), _jsx(Button, { variant: "ghost", size: "icon", onClick: () => handleAddToCart(item), className: "opacity-0 group-hover:opacity-100 transition-opacity", children: _jsx(Plus, { className: "h-4 w-4" }) })] }, i))) }), _jsx(Link, { href: `/${storeConfig.slug}/products`, children: _jsx(Button, { className: "w-full bg-black text-white hover:bg-gray-800 h-12 rounded-none uppercase tracking-widest text-xs font-bold", children: getLayoutText(storeConfig, 'common.shopNow', 'Shop The Edit') }) })] })] }) }) })), _jsx(PromoBanner, { config: layoutConfig?.sections?.promoBanner, layoutStyle: "clothing" })] }));
|
|
171
72
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import Link from 'next/link';
|
|
4
|
-
import { Button } from '../../../components/ui/button
|
|
5
|
-
import { ImageWithFallback } from '../../../components/ui/image-with-fallback
|
|
4
|
+
import { Button } from '../../../components/ui/button';
|
|
5
|
+
import { ImageWithFallback } from '../../../components/ui/image-with-fallback';
|
|
6
6
|
import { Plus } from 'lucide-react';
|
|
7
|
-
import { DynamicIcon } from '../../../components/ui/dynamic-icon
|
|
8
|
-
import { encodePayazaFieldKey, payazaInlineBindingProps, payazaGroupBindingProps, payazaIconBindingProps } from '../../../preview/canvas/field-key
|
|
9
|
-
import { richFieldHtmlForRender } from '../../../lib/rich-html
|
|
10
|
-
import { formatCurrency } from '../../../lib/utils
|
|
11
|
-
import { readItemIconName } from '../../../lib/compact-array-items
|
|
12
|
-
import { getPayazaBlockDefinition } from '../../../editor/blocks/registry
|
|
7
|
+
import { DynamicIcon } from '../../../components/ui/dynamic-icon';
|
|
8
|
+
import { encodePayazaFieldKey, payazaInlineBindingProps, payazaGroupBindingProps, payazaIconBindingProps } from '../../../preview/canvas/field-key';
|
|
9
|
+
import { richFieldHtmlForRender } from '../../../lib/rich-html';
|
|
10
|
+
import { formatCurrency } from '../../../lib/utils';
|
|
11
|
+
import { readItemIconName } from '../../../lib/compact-array-items';
|
|
12
|
+
import { getPayazaBlockDefinition } from '../../../editor/blocks/registry';
|
|
13
13
|
export function blkAttr(block) {
|
|
14
14
|
const a = block.attributes;
|
|
15
15
|
if (a && typeof a === 'object' && !Array.isArray(a))
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// Fashion Minimal (clothing-minimal) layout — fully sandboxed exports
|
|
2
|
-
export { ClothingHomePageMinimal } from './components/ClothingHomePageMinimal
|
|
3
|
-
export { ClothingMinimalProductsPage } from './pages/ProductsPage
|
|
4
|
-
export { ClothingMinimalProductDetailPage } from './pages/ProductDetailPage
|
|
5
|
-
export { ClothingMinimalCategoryPage } from './pages/CategoryPage
|
|
6
|
-
export { ClothingMinimalCategoriesPage } from './pages/CategoriesPage
|
|
7
|
-
export { ClothingMinimalAboutPage } from './pages/AboutPage
|
|
8
|
-
export { ClothingMinimalContactPage } from './pages/ContactPage
|
|
2
|
+
export { ClothingHomePageMinimal } from './components/ClothingHomePageMinimal';
|
|
3
|
+
export { ClothingMinimalProductsPage } from './pages/ProductsPage';
|
|
4
|
+
export { ClothingMinimalProductDetailPage } from './pages/ProductDetailPage';
|
|
5
|
+
export { ClothingMinimalCategoryPage } from './pages/CategoryPage';
|
|
6
|
+
export { ClothingMinimalCategoriesPage } from './pages/CategoriesPage';
|
|
7
|
+
export { ClothingMinimalAboutPage } from './pages/AboutPage';
|
|
8
|
+
export { ClothingMinimalContactPage } from './pages/ContactPage';
|
|
@@ -2,6 +2,6 @@ import { StoreConfig } from '../../../lib/store-types';
|
|
|
2
2
|
interface AboutPageProps {
|
|
3
3
|
storeConfig: StoreConfig;
|
|
4
4
|
}
|
|
5
|
-
export declare function
|
|
5
|
+
export declare function AboutPage({ storeConfig: initialConfig }: AboutPageProps): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export {};
|
|
7
7
|
//# sourceMappingURL=AboutPage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AboutPage.d.ts","sourceRoot":"","sources":["../../../../src/layouts/clothing-minimal/pages/AboutPage.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"AboutPage.d.ts","sourceRoot":"","sources":["../../../../src/layouts/clothing-minimal/pages/AboutPage.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAOvD,UAAU,cAAc;IACtB,WAAW,EAAE,WAAW,CAAC;CAC1B;AAED,wBAAgB,SAAS,CAAC,EAAE,WAAW,EAAE,aAAa,EAAE,EAAE,cAAc,2CA8OvE"}
|
|
@@ -1,71 +1,47 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
-
import { Heart, ArrowRight } from 'lucide-react';
|
|
4
|
-
import { Button } from '../../../components/ui/button
|
|
5
|
-
import { DotPattern } from '../../../components/ui/background-patterns
|
|
6
|
-
import {
|
|
7
|
-
import { useStore } from '../../../lib/store-context.js';
|
|
3
|
+
import { Users, Award, Heart, Leaf, MapPin, Clock, Mail, ArrowRight } from 'lucide-react';
|
|
4
|
+
import { Button } from '../../../components/ui/button';
|
|
5
|
+
import { DotPattern } from '../../../components/ui/background-patterns';
|
|
6
|
+
import { useStore } from '../../../lib/store-context';
|
|
8
7
|
import Image from 'next/image';
|
|
9
|
-
|
|
10
|
-
const DEFAULT_VALUES = [
|
|
11
|
-
{ icon: 'Award', title: 'Pure Materials', description: 'We use only the highest quality organic and sustainable fabrics.' },
|
|
12
|
-
{ icon: 'Users', title: 'Inclusive Design', description: 'Fashion designed for every body and every style.' },
|
|
13
|
-
{ icon: 'Heart', title: 'Ethical Craft', description: 'Our garments are made in ethical workshops with fair wages.' },
|
|
14
|
-
{ icon: 'Leaf', title: 'Eco-Conscious', description: 'Minimal waste production and plastic-free packaging.' },
|
|
15
|
-
];
|
|
16
|
-
const DEFAULT_STATS = [
|
|
17
|
-
{ value: '12k+', label: 'Happy Shoppers' },
|
|
18
|
-
{ value: '60+', label: 'Active Designs' },
|
|
19
|
-
{ value: '30+', label: 'Countries Served' },
|
|
20
|
-
{ value: '100%', label: 'Eco Impact' },
|
|
21
|
-
];
|
|
22
|
-
export function ClothingMinimalAboutPage({ storeConfig: initialConfig }) {
|
|
8
|
+
export function AboutPage({ storeConfig: initialConfig }) {
|
|
23
9
|
const { store } = useStore();
|
|
24
10
|
const storeConfig = store || initialConfig;
|
|
25
|
-
const isPreview = !!storeConfig.isPreview;
|
|
26
|
-
const payaza = (sectionKey, segments) => isPreview ? encodePayazaFieldKey(sectionKey, segments) : undefined;
|
|
27
11
|
const primaryColor = storeConfig.branding.primaryColor;
|
|
28
12
|
const secondaryColor = storeConfig.branding.secondaryColor || primaryColor;
|
|
29
13
|
const aboutConfig = storeConfig.layoutConfig?.pages?.about;
|
|
30
|
-
//
|
|
31
|
-
const heroImage = aboutConfig?.aboutHeader?.heroImage ||
|
|
32
|
-
|
|
33
|
-
'https://images.unsplash.com/photo-1558769132-cb1aea458c5e?q=80&w=2074&auto=format&fit=crop';
|
|
34
|
-
const pageTitle = aboutConfig?.aboutHeader?.title ||
|
|
35
|
-
aboutConfig?.title ||
|
|
36
|
-
'Crafting Experiences, Delivering Joy.';
|
|
37
|
-
const missionStatement = aboutConfig?.aboutHeader?.missionStatement ||
|
|
38
|
-
aboutConfig?.missionStatement ||
|
|
39
|
-
storeConfig.description ||
|
|
40
|
-
'We create timeless pieces built for everyday confidence.';
|
|
41
|
-
// ── aboutContent ─────────────────────────────────────────────────────────
|
|
42
|
-
const subLabel = aboutConfig?.aboutContent?.subLabel || 'Who We Are';
|
|
43
|
-
const storyHeading = aboutConfig?.aboutContent?.heading || 'Our Journey';
|
|
14
|
+
// Clothing-minimal-specific hero image
|
|
15
|
+
const heroImage = aboutConfig?.aboutHeader?.heroImage || aboutConfig?.heroImage || 'https://images.unsplash.com/photo-1558769132-cb1aea458c5e?q=80&w=2074&auto=format&fit=crop';
|
|
16
|
+
const pageTitle = aboutConfig?.aboutHeader?.title || aboutConfig?.title || "Crafting Experiences, Delivering Joy.";
|
|
44
17
|
const pageContent = aboutConfig?.aboutContent?.content || aboutConfig?.content || storeConfig.description;
|
|
45
|
-
const
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
:
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
return (_jsxs("div", { className: "min-h-screen bg-white pb-20 overflow-hidden", children: [aboutConfig?.aboutHeader?.show !== false && (_jsxs("section", { "data-section": "
|
|
69
|
-
|
|
70
|
-
|
|
18
|
+
const missionStatement = aboutConfig?.aboutHeader?.missionStatement || aboutConfig?.missionStatement || storeConfig.description;
|
|
19
|
+
const values = [
|
|
20
|
+
{
|
|
21
|
+
icon: Award,
|
|
22
|
+
title: "Pure Materials",
|
|
23
|
+
description: "We use only the highest quality organic and sustainable fabrics."
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
icon: Users,
|
|
27
|
+
title: "Inclusive Design",
|
|
28
|
+
description: "Fashion designed for every body and every style."
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
icon: Heart,
|
|
32
|
+
title: "Ethical Craft",
|
|
33
|
+
description: "Our garments are made in ethical workshops with fair wages."
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
icon: Leaf,
|
|
37
|
+
title: "Eco-Conscious",
|
|
38
|
+
description: "Minimal waste production and plastic-free packaging."
|
|
39
|
+
}
|
|
40
|
+
];
|
|
41
|
+
return (_jsxs("div", { className: "min-h-screen bg-white pb-20 overflow-hidden", children: [aboutConfig?.aboutHeader?.show !== false && (_jsxs("section", { "data-section": "hero", className: "relative h-[60vh] min-h-[500px] w-full overflow-hidden", children: [_jsxs("div", { className: "absolute inset-0", children: [_jsx(Image, { src: heroImage, alt: "About Us", fill: true, className: "w-full h-full object-cover transform scale-105 animate-pulse-slow" }), _jsx("div", { className: "absolute inset-0 bg-gradient-to-r from-black/80 via-black/50 to-transparent" })] }), _jsx("div", { className: "absolute inset-0 flex items-center", children: _jsx("div", { className: "container mx-auto px-4 sm:px-6 lg:px-8", children: _jsxs("div", { className: "max-w-3xl animate-fade-in-up", children: [_jsxs("div", { className: "inline-flex items-center gap-2 px-4 py-1.5 rounded-full bg-white/10 backdrop-blur-md border border-white/20 text-white text-sm font-medium mb-6", children: [_jsx("span", { className: "w-2 h-2 rounded-full bg-white animate-pulse" }), "Est. 2024"] }), _jsx("h1", { className: "text-5xl md:text-7xl font-bold text-white mb-6 tracking-tight leading-tight", children: pageTitle }), _jsx("p", { className: "text-xl md:text-2xl text-gray-200 max-w-2xl leading-relaxed font-light", children: missionStatement })] }) }) })] })), aboutConfig?.aboutContent?.show !== false && (_jsxs("section", { "data-section": "story", className: "py-24 px-4 sm:px-6 lg:px-8 relative", children: [_jsx("div", { className: "absolute top-0 right-0 -mt-24 -mr-24 w-96 h-96 bg-gray-50 rounded-full blur-3xl -z-10" }), _jsx("div", { className: "container mx-auto max-w-7xl", children: _jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-16 items-center", children: [_jsxs("div", { className: "relative", children: [aboutConfig?.gallerySection && aboutConfig.gallerySection.length > 0 ? (_jsx("div", { className: "grid grid-cols-2 gap-4", children: aboutConfig.gallerySection.slice(0, 4).map((img, i) => (_jsx("div", { className: `relative overflow-hidden rounded-2xl shadow-lg ${i === 0 ? 'col-span-2 aspect-[16/9]' : 'aspect-square'}`, children: _jsx(Image, { src: img.image, alt: img.caption || "Gallery Image", fill: true, className: "w-full h-full object-cover hover:scale-110 transition-transform duration-500" }) }, i))) })) : (_jsxs("div", { className: "relative aspect-[4/5] rounded-[2rem] overflow-hidden shadow-2xl", children: [_jsx(Image, { src: "https://images.unsplash.com/photo-1522202176988-66273c2fd55f?q=80&w=2071&auto=format&fit=crop", alt: "Our Team", fill: true, className: "w-full h-full object-cover" }), _jsx("div", { className: "absolute inset-0 bg-gradient-to-t from-black/60 via-transparent to-transparent opacity-60" }), _jsxs("div", { className: "absolute bottom-8 left-8 text-white", children: [_jsx("p", { className: "font-bold text-lg", children: "The Dream Team" }), _jsx("p", { className: "text-white/80 text-sm", children: "Working together to serve you better" })] })] })), _jsx("div", { className: "absolute -bottom-6 -right-6 w-24 h-24 bg-white rounded-2xl shadow-xl flex items-center justify-center p-4 animate-bounce duration-[3000ms]", children: _jsx(Heart, { className: "w-10 h-10", style: { color: primaryColor, fill: primaryColor } }) })] }), _jsxs("div", { className: "space-y-10", children: [_jsxs("div", { children: [_jsx("span", { className: "text-sm font-bold uppercase tracking-widest mb-3 block", style: { color: primaryColor }, children: "Who We Are" }), _jsx("h2", { className: "text-4xl md:text-5xl font-black text-gray-900 mb-6 tracking-tight", children: "Our Journey" }), _jsxs("div", { className: "prose prose-lg text-gray-600 leading-relaxed space-y-6", children: [pageContent?.split('\n').map((paragraph, idx) => (_jsx("p", { children: paragraph }, idx))), !pageContent && (_jsxs(_Fragment, { children: [_jsxs("p", { children: ["Founded with a bold vision to redefine excellence in the ", _jsx("span", { className: "font-semibold text-gray-900", children: storeConfig.type }), " industry, ", storeConfig.name, " has grown from a small passion project into a beloved brand. We believe in the power of quality, innovation, and community."] }), _jsx("p", { children: "Every day, we strive to bring you the best products, curated with care and delivered with a smile. Our team is dedicated to ensuring that your experience with us is nothing short of exceptional." })] }))] })] }), _jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-8", children: values.map((item, idx) => (_jsxs("div", { className: "flex gap-4 group", children: [_jsx("div", { className: "flex-shrink-0", children: _jsx("div", { className: "w-14 h-14 rounded-2xl flex items-center justify-center transition-colors group-hover:bg-gray-100", style: { backgroundColor: `${primaryColor}10` }, children: _jsx(item.icon, { className: "h-7 w-7 transition-transform group-hover:scale-110", style: { color: primaryColor } }) }) }), _jsxs("div", { children: [_jsx("h4", { className: "font-bold text-gray-900 mb-2 text-lg", children: item.title }), _jsx("p", { className: "text-gray-600 text-sm leading-relaxed", children: item.description })] })] }, idx))) })] })] }) })] })), aboutConfig?.statsSection?.show !== false && (_jsxs("section", { "data-section": "stats", className: "py-20 relative overflow-hidden", children: [_jsx("div", { className: "absolute inset-0 opacity-10", children: _jsx(DotPattern, { color: primaryColor, cx: 2, cy: 2, cr: 2, width: 30, height: 30 }) }), _jsx("div", { className: "absolute inset-0", style: { backgroundColor: `${secondaryColor}15` } }), _jsx("div", { className: "container mx-auto px-4 relative z-10", children: _jsx("div", { className: "grid grid-cols-2 md:grid-cols-4 gap-8 md:gap-12", children: [
|
|
42
|
+
{ label: "Happy Shoppers", value: "12k+" },
|
|
43
|
+
{ label: "Active Designs", value: storeConfig.products?.length ? `${storeConfig.products.length}+` : "60+" },
|
|
44
|
+
{ label: "Countries Served", value: "30+" },
|
|
45
|
+
{ label: "Eco Impact", value: "100%" }
|
|
46
|
+
].map((stat, idx) => (_jsxs("div", { className: "text-center group", children: [_jsx("div", { className: "text-5xl md:text-6xl font-black mb-2 tracking-tight transition-transform group-hover:scale-110 duration-300", style: { color: primaryColor }, children: stat.value }), _jsx("div", { className: "text-gray-600 font-bold uppercase tracking-widest text-xs md:text-sm", children: stat.label })] }, idx))) }) })] })), aboutConfig?.contactSection?.show !== false && (_jsx("section", { "data-section": "contact-info", className: "py-24 px-4 sm:px-6 lg:px-8 bg-white", children: _jsxs("div", { className: "container mx-auto max-w-6xl", children: [_jsxs("div", { className: "text-center mb-16", children: [_jsx("h2", { className: "text-3xl md:text-4xl font-bold text-gray-900 mb-4", children: "Get in Touch" }), _jsx("p", { className: "text-gray-500 max-w-xl mx-auto", children: "Have questions? We'd love to hear from you. Reach out to our team via email, phone, or visit us at our store." })] }), _jsxs("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-8", children: [_jsxs("div", { className: "group p-8 rounded-[2rem] bg-gray-50 border border-gray-100 hover:shadow-xl hover:-translate-y-2 transition-all duration-300 text-center", children: [_jsx("div", { className: "w-16 h-16 mx-auto mb-6 rounded-2xl bg-white shadow-sm flex items-center justify-center group-hover:scale-110 transition-transform", children: _jsx(MapPin, { className: "h-8 w-8 text-gray-400 group-hover:text-blue-500 transition-colors" }) }), _jsx("h3", { className: "font-bold text-xl text-gray-900 mb-3", children: "Visit Us" }), _jsxs("p", { className: "text-gray-600 leading-relaxed", children: ["123 Store Street", _jsx("br", {}), "Commerce City, ST 12345"] })] }), _jsxs("div", { className: "group p-8 rounded-[2rem] bg-gray-50 border border-gray-100 hover:shadow-xl hover:-translate-y-2 transition-all duration-300 text-center relative overflow-hidden", children: [_jsx("div", { className: "absolute inset-0 border-2 border-transparent group-hover:border-orange-100 rounded-[2rem] transition-colors pointer-events-none" }), _jsx("div", { className: "w-16 h-16 mx-auto mb-6 rounded-2xl bg-white shadow-sm flex items-center justify-center group-hover:scale-110 transition-transform", children: _jsx(Mail, { className: "h-8 w-8 text-gray-400 group-hover:text-orange-500 transition-colors" }) }), _jsx("h3", { className: "font-bold text-xl text-gray-900 mb-3", children: "Email Us" }), _jsxs("p", { className: "text-gray-600 leading-relaxed mb-4", children: ["hello@", storeConfig.slug, ".com", _jsx("br", {}), "support@", storeConfig.slug, ".com"] }), _jsxs(Button, { variant: "link", className: "text-orange-600 font-bold p-0 h-auto hover:no-underline group-hover:translate-x-1 transition-transform", children: ["Send a message ", _jsx(ArrowRight, { className: "ml-1 h-4 w-4" })] })] }), _jsxs("div", { className: "group p-8 rounded-[2rem] bg-gray-50 border border-gray-100 hover:shadow-xl hover:-translate-y-2 transition-all duration-300 text-center", children: [_jsx("div", { className: "w-16 h-16 mx-auto mb-6 rounded-2xl bg-white shadow-sm flex items-center justify-center group-hover:scale-110 transition-transform", children: _jsx(Clock, { className: "h-8 w-8 text-gray-400 group-hover:text-green-500 transition-colors" }) }), _jsx("h3", { className: "font-bold text-xl text-gray-900 mb-3", children: "Opening Hours" }), _jsxs("p", { className: "text-gray-600 leading-relaxed", children: ["Mon - Fri: 9am - 6pm", _jsx("br", {}), "Sat - Sun: 10am - 4pm"] })] })] })] }) }))] }));
|
|
71
47
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { Breadcrumbs } from '../../../components/ui/breadcrumbs
|
|
4
|
-
import { ImageWithFallback } from '../../../components/ui/image-with-fallback
|
|
5
|
-
import { useStore } from '../../../lib/store-context
|
|
6
|
-
import { isEditorPreviewMode, resolveStoreCategoriesForDisplay } from '../../../lib/utils/editor-preview
|
|
7
|
-
import { useCatalogLoader } from '../../../hooks/use-catalog-loader
|
|
8
|
-
import { encodePayazaFieldKey } from '../../../preview/canvas/field-key
|
|
9
|
-
import { CategoryMasonryGrid } from '../../../components/categories/category-masonry-grid
|
|
3
|
+
import { Breadcrumbs } from '../../../components/ui/breadcrumbs';
|
|
4
|
+
import { ImageWithFallback } from '../../../components/ui/image-with-fallback';
|
|
5
|
+
import { useStore } from '../../../lib/store-context';
|
|
6
|
+
import { isEditorPreviewMode, resolveStoreCategoriesForDisplay } from '../../../lib/utils/editor-preview';
|
|
7
|
+
import { useCatalogLoader } from '../../../hooks/use-catalog-loader';
|
|
8
|
+
import { encodePayazaFieldKey } from '../../../preview/canvas/field-key';
|
|
9
|
+
import { CategoryMasonryGrid } from '../../../components/categories/category-masonry-grid';
|
|
10
10
|
export function ClothingMinimalCategoriesPage({ storeConfig: initialConfig }) {
|
|
11
11
|
const { store } = useStore();
|
|
12
12
|
const storeConfig = store || initialConfig;
|
|
@@ -3,6 +3,6 @@ interface CategoryPageProps {
|
|
|
3
3
|
storeConfig: StoreConfig;
|
|
4
4
|
categorySlug: string;
|
|
5
5
|
}
|
|
6
|
-
export declare function
|
|
6
|
+
export declare function CategoryPage({ storeConfig: initialConfig, categorySlug }: CategoryPageProps): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export {};
|
|
8
8
|
//# sourceMappingURL=CategoryPage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CategoryPage.d.ts","sourceRoot":"","sources":["../../../../src/layouts/clothing-minimal/pages/CategoryPage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CategoryPage.d.ts","sourceRoot":"","sources":["../../../../src/layouts/clothing-minimal/pages/CategoryPage.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAA8B,MAAM,0BAA0B,CAAC;AAcnF,UAAU,iBAAiB;IACzB,WAAW,EAAE,WAAW,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,YAAY,CAAC,EAAE,WAAW,EAAE,aAAa,EAAE,YAAY,EAAE,EAAE,iBAAiB,2CAyI3F"}
|
|
@@ -1,26 +1,21 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { useCategoryProducts } from '../../../hooks/use-category-products';
|
|
4
|
+
import { Button } from '../../../components/ui/button';
|
|
5
|
+
import { ImageWithFallback } from '../../../components/ui/image-with-fallback';
|
|
6
|
+
import { useStore } from '../../../lib/store-context';
|
|
6
7
|
import { ArrowLeft, Filter } from 'lucide-react';
|
|
7
8
|
import Link from 'next/link';
|
|
8
|
-
import { useToast } from '../../../components/ui/toast
|
|
9
|
-
import { useAnalytics } from '../../../hooks/use-analytics
|
|
9
|
+
import { useToast } from '../../../components/ui/toast';
|
|
10
|
+
import { useAnalytics } from '../../../hooks/use-analytics';
|
|
10
11
|
import { useEffect } from 'react';
|
|
11
|
-
import { ProductCard } from '../../../components/ui/product-card
|
|
12
|
-
|
|
13
|
-
import { useCatalogLoader } from '../../../hooks/use-catalog-loader.js';
|
|
14
|
-
import { CategoryDescription } from '../../../components/rich-text/CategoryDescription.js';
|
|
15
|
-
export function ClothingMinimalCategoryPage({ storeConfig: initialConfig, categorySlug }) {
|
|
12
|
+
import { ProductCard } from '../../../components/ui/product-card';
|
|
13
|
+
export function CategoryPage({ storeConfig: initialConfig, categorySlug }) {
|
|
16
14
|
const { store, addToCart } = useStore();
|
|
17
15
|
const storeConfig = store || initialConfig;
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
});
|
|
22
|
-
const category = resolveCategoryBySlugForDisplay(loadedCategories, categorySlug, isPreview);
|
|
23
|
-
const products = resolveCategoryProductsForDisplay(loadedProducts, category?.id, isPreview);
|
|
16
|
+
const categories = storeConfig.categories || [];
|
|
17
|
+
const category = categories.find(c => c.slug === categorySlug);
|
|
18
|
+
const { products, isLoading, hasMore, loadMore } = useCategoryProducts(storeConfig.id, category?.id);
|
|
24
19
|
const { addToast } = useToast();
|
|
25
20
|
const { trackEvent } = useAnalytics();
|
|
26
21
|
const categoryDetailConfig = storeConfig.layoutConfig?.pages?.categoryDetail;
|
|
@@ -52,5 +47,5 @@ export function ClothingMinimalCategoryPage({ storeConfig: initialConfig, catego
|
|
|
52
47
|
const isDarkTheme = storeConfig.type === 'food-modern' || storeConfig.branding.theme === 'dark';
|
|
53
48
|
const bgColor = isDarkTheme ? 'bg-[#0F0F0F]' : 'bg-gray-50';
|
|
54
49
|
const textColor = isDarkTheme ? 'text-white' : 'text-gray-900';
|
|
55
|
-
return (_jsxs("div", { className: `min-h-screen ${bgColor} ${textColor} transition-colors duration-300`, children: [categoryDetailConfig?.showBanner !== false && (_jsxs("div", {
|
|
50
|
+
return (_jsxs("div", { className: `min-h-screen ${bgColor} ${textColor} transition-colors duration-300`, children: [categoryDetailConfig?.showBanner !== false && (_jsxs("div", { className: "relative h-[40vh] overflow-hidden", children: [_jsx(ImageWithFallback, { src: category.image, alt: category.name, className: "w-full h-full object-cover", skeletonAspectRatio: "16/9" }), _jsx("div", { className: `absolute inset-0 ${isDarkTheme ? 'bg-black/60' : 'bg-black/40'} backdrop-blur-[2px]` }), _jsxs("div", { className: "absolute inset-0 flex flex-col items-center justify-center text-center p-6 text-white", children: [_jsx("h1", { className: "text-5xl md:text-7xl font-bold tracking-tight mb-4", children: category.name }), category.description && categoryDetailConfig?.showDescription !== false && (_jsx("p", { className: "text-lg md:text-xl max-w-2xl opacity-90 font-light", children: category.description }))] })] })), categoryDetailConfig?.showBanner === false && (_jsx("div", { className: "bg-white border-b border-gray-100 py-12", children: _jsxs("div", { className: "container mx-auto max-w-7xl px-4 sm:px-6 lg:px-8", children: [_jsx("h1", { className: "text-4xl font-bold mb-4", children: category.name }), category.description && categoryDetailConfig?.showDescription !== false && (_jsx("p", { className: "text-lg text-gray-600 max-w-2xl", children: category.description }))] }) })), _jsxs("div", { className: "container mx-auto max-w-7xl px-4 sm:px-6 lg:px-8 py-12", children: [_jsxs("div", { className: "flex flex-col md:flex-row justify-between items-center mb-10 gap-4", children: [_jsxs(Link, { href: `/${storeConfig.slug}/categories`, className: `inline-flex items-center text-sm font-medium ${isDarkTheme ? 'text-gray-400 hover:text-white' : 'text-gray-600 hover:text-gray-900'}`, children: [_jsx(ArrowLeft, { className: "h-4 w-4 mr-2" }), "Back to All Categories"] }), categoryDetailConfig?.showFilters !== false && (_jsx("div", { className: "flex items-center gap-4", children: _jsxs(Button, { variant: "outline", className: `${isDarkTheme ? 'border-white/20 text-white hover:bg-white/10' : 'bg-white'}`, children: [_jsx(Filter, { className: "h-4 w-4 mr-2" }), " Filter"] }) }))] }), !hasItems ? (_jsxs("div", { className: "text-center py-20 border border-dashed border-gray-300 rounded-3xl", children: [_jsx("p", { className: "text-gray-500 text-lg", children: "No products found in this category." }), _jsx(Button, { className: "mt-4", onClick: () => window.history.back(), children: "Go Back" })] })) : (_jsxs(_Fragment, { children: [_jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-8", children: products.map((product) => (_jsx(ProductCard, { product: product, storeSlug: storeConfig.slug, onAddToCart: handleAddToCart, onQuickView: handleQuickView }, product.id))) }), hasMore && (_jsx("div", { className: "mt-10 flex justify-center", children: _jsx(Button, { onClick: loadMore, disabled: isLoading, children: "Load more" }) }))] }))] })] }));
|
|
56
51
|
}
|