@cimplify/sdk 0.23.0 → 0.24.0

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/react.d.mts CHANGED
@@ -2,7 +2,7 @@ import React, { ReactNode } from 'react';
2
2
  import { A as AdSlot, a as AdPosition, e as AdContextValue } from './ads-BxbWrwqp.mjs';
3
3
  export { c as AdConfig, g as getVariantDisplayName } from './ads-BxbWrwqp.mjs';
4
4
  import { C as CimplifyClient, a8 as ProcessCheckoutResult, aa as CheckoutStatus, ab as CheckoutStatusContext, bK as Location, bH as Business, k as ReorderResult, aR as OrderStatus, b2 as Order, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, P as PriceQuote, g as QuoteUiMessage, bX as Service, c0 as AvailableSlot, c1 as DayAvailability, c6 as CustomerBooking, cc as CancelBookingResult, w as ActivityStateResponse, u as SessionMessage, x as ActivityRecommendation, E as DeliveryFeeResponse, cO as FxRateResponse, bR as StorefrontBootstrap, Y as ElementsOptions, d0 as AuthenticatedData, cY as AddressInfo, cZ as PaymentMethodInfo, K as CimplifyElements, d2 as ElementsCheckoutResult, a7 as ProcessCheckoutOptions, b1 as LineItem, bY as Staff, bP as Room } from './index-DIHoZUz_.mjs';
5
- import { J as Product, d as Pagination, h as CimplifyError, L as ProductWithDetails, a6 as Category, M as Money, b1 as BundleSelectionInput, aw as ComponentSelectionInput, b4 as BundleSelectionData, b7 as CompositeSelectionData, a8 as Collection, aE as ProductTaxonomy, aF as TaxonomyWithChildren, aD as ProductTimeProfile, aI as Deal, aJ as ProductDealInfo, aK as DiscountValidation, ad as BundleSummary, ax as CompositePriceResult, y as CustomAttributeDefinition, G as PropertyFacet, bJ as ProductBillingPlan, N as VariantView, X as VariantAxisWithValues, a as CurrencyCode, a2 as AddOnWithOptions, ai as BundleComponentView, ab as BundlePriceType, at as CompositeGroupView, bc as DisplayCart, Q as QuantityPricingTier } from './payment-DqiwuLma.mjs';
5
+ import { J as Product, d as Pagination, h as CimplifyError, L as ProductWithDetails, a6 as Category, M as Money, b1 as BundleSelectionInput, aw as ComponentSelectionInput, b4 as BundleSelectionData, b7 as CompositeSelectionData, a8 as Collection, aE as ProductTaxonomy, aF as TaxonomyWithChildren, aD as ProductTimeProfile, aI as Deal, aJ as ProductDealInfo, aK as DiscountValidation, ad as BundleSummary, ax as CompositePriceResult, y as CustomAttributeDefinition, G as PropertyFacet, bJ as ProductBillingPlan, N as VariantView, X as VariantAxisWithValues, a as CurrencyCode, a2 as AddOnWithOptions, ai as BundleComponentView, ab as BundlePriceType, at as CompositeGroupView, bc as DisplayCart, z as CustomAttributeValue, F as ProductProperty, Q as QuantityPricingTier } from './payment-DqiwuLma.mjs';
6
6
  import { P as ProductWithPrice } from './price-DVQrpE7j.mjs';
7
7
  import { ClassValue } from 'clsx';
8
8
 
@@ -1679,21 +1679,74 @@ interface CataloguePageProps {
1679
1679
  */
1680
1680
  declare function CataloguePage({ title, products: productsProp, categories: categoriesProp, showFilter, showSearch, showSort, showInStockFilter, showPriceRange, showTagsFilter, availableTags, defaultSort, pageSize, onProductClick, onCategoryClick, renderCard, renderImage, columns, className, classNames, }: CataloguePageProps): React.ReactElement;
1681
1681
 
1682
+ interface ProductLayoutProps {
1683
+ product: ProductWithDetails;
1684
+ onAddToCart?: (product: ProductWithDetails, quantity: number, options: AddToCartOptions) => void | Promise<void>;
1685
+ renderImage?: (props: {
1686
+ src: string;
1687
+ alt: string;
1688
+ className?: string;
1689
+ }) => React.ReactNode;
1690
+ renderBreadcrumb?: (product: ProductWithDetails) => React.ReactNode;
1691
+ relatedProducts?: Product[];
1692
+ showRelated?: boolean;
1693
+ className?: string;
1694
+ }
1695
+ declare function TwoColumnGrid({ left, right, className, }: {
1696
+ left: React.ReactNode;
1697
+ right: React.ReactNode;
1698
+ className?: string;
1699
+ }): React.ReactElement;
1700
+ declare function MetadataStringList({ items, label, icon, className, }: {
1701
+ items: string[];
1702
+ label: string;
1703
+ icon?: React.ReactNode;
1704
+ className?: string;
1705
+ }): React.ReactElement | null;
1706
+ declare function CustomAttributesTable({ attributes, className, }: {
1707
+ attributes: CustomAttributeValue[];
1708
+ className?: string;
1709
+ }): React.ReactElement | null;
1710
+ declare function PropertiesTable({ properties, className, }: {
1711
+ properties: ProductProperty[];
1712
+ className?: string;
1713
+ }): React.ReactElement | null;
1714
+ declare function TagPills({ tags, className, }: {
1715
+ tags: string[];
1716
+ className?: string;
1717
+ }): React.ReactElement | null;
1718
+ declare function InventoryBadge({ product, className, }: {
1719
+ product: Product;
1720
+ className?: string;
1721
+ }): React.ReactElement | null;
1722
+ declare function RelatedProductsSection({ products, title, renderImage, className, }: {
1723
+ products: Product[];
1724
+ title?: string;
1725
+ renderImage?: ProductLayoutProps["renderImage"];
1726
+ className?: string;
1727
+ }): React.ReactElement | null;
1728
+
1729
+ declare enum ProductTemplate {
1730
+ Default = "default",
1731
+ Food = "food",
1732
+ Wholesale = "wholesale",
1733
+ Service = "service",
1734
+ Digital = "digital",
1735
+ Physical = "physical"
1736
+ }
1682
1737
  interface ProductPageClassNames {
1683
1738
  root?: string;
1684
- main?: string;
1685
- badges?: string;
1686
- relatedSection?: string;
1687
- relatedTitle?: string;
1688
1739
  loading?: string;
1689
1740
  }
1690
1741
  interface ProductPageProps {
1691
- /** Product slug or ID to display. */
1692
- productId: string;
1742
+ /** Product slug or ID — used for client-side fetch when `product` is not provided. */
1743
+ productId?: string;
1693
1744
  /** Pre-fetched product for SSR. Skips client-side fetch when provided. */
1694
1745
  product?: ProductWithDetails;
1695
- /** Pre-fetched related products for SSR. */
1696
- relatedProducts?: Product[];
1746
+ /** Per-slug page map. Highest priority — maps a product slug to a custom component. */
1747
+ pages?: Record<string, React.ComponentType<ProductLayoutProps>>;
1748
+ /** Per-type template map. Overrides built-in layouts for specific template keys. */
1749
+ templates?: Partial<Record<ProductTemplate | string, React.ComponentType<ProductLayoutProps>>>;
1697
1750
  /** Override add-to-cart behavior. */
1698
1751
  onAddToCart?: (product: ProductWithDetails, quantity: number, options: AddToCartOptions) => void | Promise<void>;
1699
1752
  /** Custom image renderer (e.g. Next.js Image). */
@@ -1702,24 +1755,26 @@ interface ProductPageProps {
1702
1755
  alt: string;
1703
1756
  className?: string;
1704
1757
  }) => React.ReactNode;
1705
- /** Show availability badge. Default: true. */
1706
- showAvailability?: boolean;
1707
- /** Show sale badge. Default: true. */
1708
- showSaleBadge?: boolean;
1758
+ /** Breadcrumb renderer. Receives the product for context. */
1759
+ renderBreadcrumb?: (product: ProductWithDetails) => React.ReactNode;
1760
+ /** Pre-fetched related products. */
1761
+ relatedProducts?: Product[];
1709
1762
  /** Show related products section. Default: true. */
1710
1763
  showRelated?: boolean;
1711
- /** Related section title. */
1712
- relatedTitle?: string;
1713
1764
  className?: string;
1714
1765
  classNames?: ProductPageClassNames;
1715
1766
  }
1716
- /**
1717
- * ProductPage — full product detail page with badges and related products.
1718
- *
1719
- * SSR-friendly: pass `product` prop for server rendering.
1720
- * Composes ProductSheet, AvailabilityBadge, SaleBadge, and a related products grid.
1721
- */
1722
- declare function ProductPage({ productId, product: productProp, relatedProducts, onAddToCart, renderImage, showAvailability, showSaleBadge, showRelated, relatedTitle, className, classNames, }: ProductPageProps): React.ReactElement;
1767
+ declare function ProductPage({ productId, product: productProp, pages, templates, onAddToCart, renderImage, renderBreadcrumb, relatedProducts, showRelated, className, classNames, }: ProductPageProps): React.ReactElement;
1768
+
1769
+ declare function DefaultProductLayout({ product, onAddToCart, renderBreadcrumb, relatedProducts, showRelated, className, }: ProductLayoutProps): React.ReactElement;
1770
+
1771
+ declare function FoodProductLayout({ product, onAddToCart, renderBreadcrumb, relatedProducts, showRelated, className, }: ProductLayoutProps): React.ReactElement;
1772
+
1773
+ declare function WholesaleProductLayout({ product, onAddToCart, renderBreadcrumb, relatedProducts, showRelated, className, }: ProductLayoutProps): React.ReactElement;
1774
+
1775
+ declare function ServiceProductLayout({ product, onAddToCart, renderBreadcrumb, relatedProducts, showRelated, className, }: ProductLayoutProps): React.ReactElement;
1776
+
1777
+ declare function DigitalProductLayout({ product, onAddToCart, renderBreadcrumb, relatedProducts, showRelated, className, }: ProductLayoutProps): React.ReactElement;
1723
1778
 
1724
1779
  interface CartPageClassNames {
1725
1780
  root?: string;
@@ -2347,4 +2402,4 @@ interface CurrencySelectorProps {
2347
2402
  */
2348
2403
  declare function CurrencySelector({ currencies, currentCurrency, onCurrencyChange, showRate, baseCurrency, renderCurrency, className, classNames, }: CurrencySelectorProps): React.ReactElement | null;
2349
2404
 
2350
- export { Ad, AdPosition, type AdProps, AdProvider, AdSlot, AddOnSelector, type AddOnSelectorClassNames, type AddOnSelectorProps, type AddToCartOptions, AddressElement, AuthElement, AvailabilityBadge, type AvailabilityBadgeClassNames, type AvailabilityBadgeProps, BillingPlanSelector, type BillingPlanSelectorClassNames, type BillingPlanSelectorProps, BookingCard, type BookingCardClassNames, type BookingCardProps, BookingList, type BookingListClassNames, type BookingListProps, BookingPage, type BookingPageClassNames, type BookingPageProps, BookingsPage, type BookingsPageClassNames, type BookingsPageProps, BundleSelector, type BundleSelectorClassNames, type BundleSelectorProps, type CartAddOnOptionSelection, CartPage, type CartPageClassNames, type CartPageProps, CartSummary, type CartSummaryClassNames, type CartSummaryProps, type CartVariantSelection, CataloguePage, type CataloguePageClassNames, type CataloguePageProps, CategoryFilter, type CategoryFilterClassNames, type CategoryFilterProps, CategoryGrid, type CategoryGridClassNames, type CategoryGridProps, CheckoutPage, type CheckoutPageClassNames, type CheckoutPageProps, CimplifyCheckout, type CimplifyCheckoutProps, type CimplifyClientContextValue, type CimplifyContextValue, CimplifyProvider, type CimplifyProviderProps, CollectionPage, type CollectionPageClassNames, type CollectionPageProps, CompositeSelector, type CompositeSelectorClassNames, type CompositeSelectorProps, CurrencySelector, type CurrencySelectorClassNames, type CurrencySelectorProps, DateSlotPicker, type DateSlotPickerClassNames, type DateSlotPickerProps, DealBanner, type DealBannerClassNames, type DealBannerProps, DealsPage, type DealsPageClassNames, type DealsPageProps, DeliveryEstimate, type DeliveryEstimateClassNames, type DeliveryEstimateProps, DiscountInput, type DiscountInputClassNames, type DiscountInputProps, ElementsProvider, LocationPicker, type LocationPickerClassNames, type LocationPickerProps, OrderDetailPage, type OrderDetailPageClassNames, type OrderDetailPageProps, OrderHistory, type OrderHistoryClassNames, OrderHistoryPage, type OrderHistoryPageClassNames, type OrderHistoryPageProps, type OrderHistoryProps, OrderSummary, type OrderSummaryClassNames, type OrderSummaryProps, PaymentElement, Price, type PriceProps, PriceRange, type PriceRangeProps, ProductCard, type ProductCardClassNames, type ProductCardProps, ProductCustomizer, type ProductCustomizerClassNames, type ProductCustomizerProps, ProductGrid, type ProductGridClassNames, type ProductGridProps, ProductImageGallery, type ProductImageGalleryProps, ProductPage, type ProductPageClassNames, type ProductPageProps, ProductSheet, type ProductSheetClassNames, type ProductSheetProps, QuantitySelector, type QuantitySelectorClassNames, type QuantitySelectorProps, RecentlyViewed, type RecentlyViewedClassNames, type RecentlyViewedProps, RecommendationCarousel, type RecommendationCarouselClassNames, type RecommendationCarouselProps, type Resource, ResourcePicker, type ResourcePickerClassNames, type ResourcePickerProps, SaleBadge, type SaleBadgeClassNames, type SaleBadgeProps, SearchInput, type SearchInputClassNames, type SearchInputProps, SearchPage, type SearchPageClassNames, type SearchPageProps, ServiceCard, type ServiceCardClassNames, type ServiceCardProps, ServiceGrid, type ServiceGridClassNames, type ServiceGridProps, SessionMessageBanner, type SessionMessageBannerClassNames, type SessionMessageBannerProps, SlotPicker, type SlotPickerClassNames, type SlotPickerProps, StaffPicker, type StaffPickerClassNames, type StaffPickerProps, StoreNav, type StoreNavClassNames, type StoreNavProps, type UseActivityStateOptions, type UseActivityStateResult, type UseAttributeDefinitionsOptions, type UseAttributeDefinitionsResult, type UseAvailableSlotsOptions, type UseAvailableSlotsResult, type UseBillingPlansOptions, type UseBillingPlansResult, type UseBookingsOptions, type UseBookingsResult, type UseBootstrapOptions, type UseBootstrapResult, type UseBundlesOptions, type UseBundlesResult, type UseCartItem, type UseCartOptions, type UseCartResult, type UseCategoriesOptions, type UseCategoriesResult, type UseCollectionOptions, type UseCollectionResult, type UseCollectionsOptions, type UseCollectionsResult, type UseDealsOptions, type UseDealsResult, type UseDeliveryFeeOptions, type UseDeliveryFeeResult, type UseFxRateOptions, type UseFxRateResult, type UseLocationsOptions, type UseLocationsResult, type UseOrderOptions, type UseOrderResult, type UseOrdersOptions, type UseOrdersResult, type UseProductAvailabilityOptions, type UseProductAvailabilityResult, type UseProductDealsOptions, type UseProductDealsResult, type UseProductOptions, type UseProductPriceInput, type UseProductPriceResult, type UseProductResult, type UseProductSchedulesOptions, type UseProductSchedulesResult, type UseProductsOnSaleOptions, type UseProductsOnSaleResult, type UseProductsOptions, type UseProductsResult, type UsePropertyFacetsOptions, type UsePropertyFacetsResult, type UseQuoteInput, type UseQuoteOptions, type UseQuoteResult, type UseRecommendationsOptions, type UseRecommendationsResult, type UseSearchOptions, type UseSearchResult, type UseServiceAvailabilityOptions, type UseServiceAvailabilityResult, type UseServicesOptions, type UseServicesResult, type UseTaxonomiesOptions, type UseTaxonomiesResult, type UseTaxonomyOptions, type UseTaxonomyPathOptions, type UseTaxonomyPathResult, type UseTaxonomyResult, type UseValidateDiscountOptions, type UseValidateDiscountResult, type UseVariantSelectorOptions, type UseVariantSelectorResult, VariantSelector, type VariantSelectorClassNames, type VariantSelectorProps, VolumePricing, type VolumePricingClassNames, type VolumePricingProps, cn, roomToResource, useActivityState, useAds, useAttributeDefinitions, useAvailableSlots, useBillingPlans, useBookings, useBootstrap, useBundles, useCart, useCategories, useCheckout, useCimplify, useCimplifyClient, useCollection, useCollections, useDeals, useDeliveryFee, useElements, useElementsReady, useFxRate, useLocations, useOptionalCimplify, useOrder, useOrders, useProduct, useProductAvailability, useProductDeals, useProductPrice, useProductSchedules, useProducts, useProductsOnSale, usePropertyFacets, useQuote, useRecommendations, useSearch, useServiceAvailability, useServices, useTaxonomies, useTaxonomy, useTaxonomyPath, useValidateDiscount, useVariantSelector };
2405
+ export { Ad, AdPosition, type AdProps, AdProvider, AdSlot, AddOnSelector, type AddOnSelectorClassNames, type AddOnSelectorProps, type AddToCartOptions, AddressElement, AuthElement, AvailabilityBadge, type AvailabilityBadgeClassNames, type AvailabilityBadgeProps, BillingPlanSelector, type BillingPlanSelectorClassNames, type BillingPlanSelectorProps, BookingCard, type BookingCardClassNames, type BookingCardProps, BookingList, type BookingListClassNames, type BookingListProps, BookingPage, type BookingPageClassNames, type BookingPageProps, BookingsPage, type BookingsPageClassNames, type BookingsPageProps, BundleSelector, type BundleSelectorClassNames, type BundleSelectorProps, type CartAddOnOptionSelection, CartPage, type CartPageClassNames, type CartPageProps, CartSummary, type CartSummaryClassNames, type CartSummaryProps, type CartVariantSelection, CataloguePage, type CataloguePageClassNames, type CataloguePageProps, CategoryFilter, type CategoryFilterClassNames, type CategoryFilterProps, CategoryGrid, type CategoryGridClassNames, type CategoryGridProps, CheckoutPage, type CheckoutPageClassNames, type CheckoutPageProps, CimplifyCheckout, type CimplifyCheckoutProps, type CimplifyClientContextValue, type CimplifyContextValue, CimplifyProvider, type CimplifyProviderProps, CollectionPage, type CollectionPageClassNames, type CollectionPageProps, CompositeSelector, type CompositeSelectorClassNames, type CompositeSelectorProps, CurrencySelector, type CurrencySelectorClassNames, type CurrencySelectorProps, CustomAttributesTable, DateSlotPicker, type DateSlotPickerClassNames, type DateSlotPickerProps, DealBanner, type DealBannerClassNames, type DealBannerProps, DealsPage, type DealsPageClassNames, type DealsPageProps, DefaultProductLayout, DeliveryEstimate, type DeliveryEstimateClassNames, type DeliveryEstimateProps, DigitalProductLayout, DiscountInput, type DiscountInputClassNames, type DiscountInputProps, ElementsProvider, FoodProductLayout, InventoryBadge, LocationPicker, type LocationPickerClassNames, type LocationPickerProps, MetadataStringList, OrderDetailPage, type OrderDetailPageClassNames, type OrderDetailPageProps, OrderHistory, type OrderHistoryClassNames, OrderHistoryPage, type OrderHistoryPageClassNames, type OrderHistoryPageProps, type OrderHistoryProps, OrderSummary, type OrderSummaryClassNames, type OrderSummaryProps, PaymentElement, Price, type PriceProps, PriceRange, type PriceRangeProps, ProductCard, type ProductCardClassNames, type ProductCardProps, ProductCustomizer, type ProductCustomizerClassNames, type ProductCustomizerProps, ProductGrid, type ProductGridClassNames, type ProductGridProps, ProductImageGallery, type ProductImageGalleryProps, type ProductLayoutProps, ProductPage, type ProductPageClassNames, type ProductPageProps, ProductSheet, type ProductSheetClassNames, type ProductSheetProps, ProductTemplate, PropertiesTable, QuantitySelector, type QuantitySelectorClassNames, type QuantitySelectorProps, RecentlyViewed, type RecentlyViewedClassNames, type RecentlyViewedProps, RecommendationCarousel, type RecommendationCarouselClassNames, type RecommendationCarouselProps, RelatedProductsSection, type Resource, ResourcePicker, type ResourcePickerClassNames, type ResourcePickerProps, SaleBadge, type SaleBadgeClassNames, type SaleBadgeProps, SearchInput, type SearchInputClassNames, type SearchInputProps, SearchPage, type SearchPageClassNames, type SearchPageProps, ServiceCard, type ServiceCardClassNames, type ServiceCardProps, ServiceGrid, type ServiceGridClassNames, type ServiceGridProps, ServiceProductLayout, SessionMessageBanner, type SessionMessageBannerClassNames, type SessionMessageBannerProps, SlotPicker, type SlotPickerClassNames, type SlotPickerProps, StaffPicker, type StaffPickerClassNames, type StaffPickerProps, StoreNav, type StoreNavClassNames, type StoreNavProps, TagPills, TwoColumnGrid, type UseActivityStateOptions, type UseActivityStateResult, type UseAttributeDefinitionsOptions, type UseAttributeDefinitionsResult, type UseAvailableSlotsOptions, type UseAvailableSlotsResult, type UseBillingPlansOptions, type UseBillingPlansResult, type UseBookingsOptions, type UseBookingsResult, type UseBootstrapOptions, type UseBootstrapResult, type UseBundlesOptions, type UseBundlesResult, type UseCartItem, type UseCartOptions, type UseCartResult, type UseCategoriesOptions, type UseCategoriesResult, type UseCollectionOptions, type UseCollectionResult, type UseCollectionsOptions, type UseCollectionsResult, type UseDealsOptions, type UseDealsResult, type UseDeliveryFeeOptions, type UseDeliveryFeeResult, type UseFxRateOptions, type UseFxRateResult, type UseLocationsOptions, type UseLocationsResult, type UseOrderOptions, type UseOrderResult, type UseOrdersOptions, type UseOrdersResult, type UseProductAvailabilityOptions, type UseProductAvailabilityResult, type UseProductDealsOptions, type UseProductDealsResult, type UseProductOptions, type UseProductPriceInput, type UseProductPriceResult, type UseProductResult, type UseProductSchedulesOptions, type UseProductSchedulesResult, type UseProductsOnSaleOptions, type UseProductsOnSaleResult, type UseProductsOptions, type UseProductsResult, type UsePropertyFacetsOptions, type UsePropertyFacetsResult, type UseQuoteInput, type UseQuoteOptions, type UseQuoteResult, type UseRecommendationsOptions, type UseRecommendationsResult, type UseSearchOptions, type UseSearchResult, type UseServiceAvailabilityOptions, type UseServiceAvailabilityResult, type UseServicesOptions, type UseServicesResult, type UseTaxonomiesOptions, type UseTaxonomiesResult, type UseTaxonomyOptions, type UseTaxonomyPathOptions, type UseTaxonomyPathResult, type UseTaxonomyResult, type UseValidateDiscountOptions, type UseValidateDiscountResult, type UseVariantSelectorOptions, type UseVariantSelectorResult, VariantSelector, type VariantSelectorClassNames, type VariantSelectorProps, VolumePricing, type VolumePricingClassNames, type VolumePricingProps, WholesaleProductLayout, cn, roomToResource, useActivityState, useAds, useAttributeDefinitions, useAvailableSlots, useBillingPlans, useBookings, useBootstrap, useBundles, useCart, useCategories, useCheckout, useCimplify, useCimplifyClient, useCollection, useCollections, useDeals, useDeliveryFee, useElements, useElementsReady, useFxRate, useLocations, useOptionalCimplify, useOrder, useOrders, useProduct, useProductAvailability, useProductDeals, useProductPrice, useProductSchedules, useProducts, useProductsOnSale, usePropertyFacets, useQuote, useRecommendations, useSearch, useServiceAvailability, useServices, useTaxonomies, useTaxonomy, useTaxonomyPath, useValidateDiscount, useVariantSelector };
package/dist/react.d.ts CHANGED
@@ -2,7 +2,7 @@ import React, { ReactNode } from 'react';
2
2
  import { A as AdSlot, a as AdPosition, e as AdContextValue } from './ads-BxbWrwqp.js';
3
3
  export { c as AdConfig, g as getVariantDisplayName } from './ads-BxbWrwqp.js';
4
4
  import { C as CimplifyClient, a8 as ProcessCheckoutResult, aa as CheckoutStatus, ab as CheckoutStatusContext, bK as Location, bH as Business, k as ReorderResult, aR as OrderStatus, b2 as Order, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, P as PriceQuote, g as QuoteUiMessage, bX as Service, c0 as AvailableSlot, c1 as DayAvailability, c6 as CustomerBooking, cc as CancelBookingResult, w as ActivityStateResponse, u as SessionMessage, x as ActivityRecommendation, E as DeliveryFeeResponse, cO as FxRateResponse, bR as StorefrontBootstrap, Y as ElementsOptions, d0 as AuthenticatedData, cY as AddressInfo, cZ as PaymentMethodInfo, K as CimplifyElements, d2 as ElementsCheckoutResult, a7 as ProcessCheckoutOptions, b1 as LineItem, bY as Staff, bP as Room } from './index-CJZMsbDi.js';
5
- import { J as Product, d as Pagination, h as CimplifyError, L as ProductWithDetails, a6 as Category, M as Money, b1 as BundleSelectionInput, aw as ComponentSelectionInput, b4 as BundleSelectionData, b7 as CompositeSelectionData, a8 as Collection, aE as ProductTaxonomy, aF as TaxonomyWithChildren, aD as ProductTimeProfile, aI as Deal, aJ as ProductDealInfo, aK as DiscountValidation, ad as BundleSummary, ax as CompositePriceResult, y as CustomAttributeDefinition, G as PropertyFacet, bJ as ProductBillingPlan, N as VariantView, X as VariantAxisWithValues, a as CurrencyCode, a2 as AddOnWithOptions, ai as BundleComponentView, ab as BundlePriceType, at as CompositeGroupView, bc as DisplayCart, Q as QuantityPricingTier } from './payment-DqiwuLma.js';
5
+ import { J as Product, d as Pagination, h as CimplifyError, L as ProductWithDetails, a6 as Category, M as Money, b1 as BundleSelectionInput, aw as ComponentSelectionInput, b4 as BundleSelectionData, b7 as CompositeSelectionData, a8 as Collection, aE as ProductTaxonomy, aF as TaxonomyWithChildren, aD as ProductTimeProfile, aI as Deal, aJ as ProductDealInfo, aK as DiscountValidation, ad as BundleSummary, ax as CompositePriceResult, y as CustomAttributeDefinition, G as PropertyFacet, bJ as ProductBillingPlan, N as VariantView, X as VariantAxisWithValues, a as CurrencyCode, a2 as AddOnWithOptions, ai as BundleComponentView, ab as BundlePriceType, at as CompositeGroupView, bc as DisplayCart, z as CustomAttributeValue, F as ProductProperty, Q as QuantityPricingTier } from './payment-DqiwuLma.js';
6
6
  import { P as ProductWithPrice } from './price-BZlddg1A.js';
7
7
  import { ClassValue } from 'clsx';
8
8
 
@@ -1679,21 +1679,74 @@ interface CataloguePageProps {
1679
1679
  */
1680
1680
  declare function CataloguePage({ title, products: productsProp, categories: categoriesProp, showFilter, showSearch, showSort, showInStockFilter, showPriceRange, showTagsFilter, availableTags, defaultSort, pageSize, onProductClick, onCategoryClick, renderCard, renderImage, columns, className, classNames, }: CataloguePageProps): React.ReactElement;
1681
1681
 
1682
+ interface ProductLayoutProps {
1683
+ product: ProductWithDetails;
1684
+ onAddToCart?: (product: ProductWithDetails, quantity: number, options: AddToCartOptions) => void | Promise<void>;
1685
+ renderImage?: (props: {
1686
+ src: string;
1687
+ alt: string;
1688
+ className?: string;
1689
+ }) => React.ReactNode;
1690
+ renderBreadcrumb?: (product: ProductWithDetails) => React.ReactNode;
1691
+ relatedProducts?: Product[];
1692
+ showRelated?: boolean;
1693
+ className?: string;
1694
+ }
1695
+ declare function TwoColumnGrid({ left, right, className, }: {
1696
+ left: React.ReactNode;
1697
+ right: React.ReactNode;
1698
+ className?: string;
1699
+ }): React.ReactElement;
1700
+ declare function MetadataStringList({ items, label, icon, className, }: {
1701
+ items: string[];
1702
+ label: string;
1703
+ icon?: React.ReactNode;
1704
+ className?: string;
1705
+ }): React.ReactElement | null;
1706
+ declare function CustomAttributesTable({ attributes, className, }: {
1707
+ attributes: CustomAttributeValue[];
1708
+ className?: string;
1709
+ }): React.ReactElement | null;
1710
+ declare function PropertiesTable({ properties, className, }: {
1711
+ properties: ProductProperty[];
1712
+ className?: string;
1713
+ }): React.ReactElement | null;
1714
+ declare function TagPills({ tags, className, }: {
1715
+ tags: string[];
1716
+ className?: string;
1717
+ }): React.ReactElement | null;
1718
+ declare function InventoryBadge({ product, className, }: {
1719
+ product: Product;
1720
+ className?: string;
1721
+ }): React.ReactElement | null;
1722
+ declare function RelatedProductsSection({ products, title, renderImage, className, }: {
1723
+ products: Product[];
1724
+ title?: string;
1725
+ renderImage?: ProductLayoutProps["renderImage"];
1726
+ className?: string;
1727
+ }): React.ReactElement | null;
1728
+
1729
+ declare enum ProductTemplate {
1730
+ Default = "default",
1731
+ Food = "food",
1732
+ Wholesale = "wholesale",
1733
+ Service = "service",
1734
+ Digital = "digital",
1735
+ Physical = "physical"
1736
+ }
1682
1737
  interface ProductPageClassNames {
1683
1738
  root?: string;
1684
- main?: string;
1685
- badges?: string;
1686
- relatedSection?: string;
1687
- relatedTitle?: string;
1688
1739
  loading?: string;
1689
1740
  }
1690
1741
  interface ProductPageProps {
1691
- /** Product slug or ID to display. */
1692
- productId: string;
1742
+ /** Product slug or ID — used for client-side fetch when `product` is not provided. */
1743
+ productId?: string;
1693
1744
  /** Pre-fetched product for SSR. Skips client-side fetch when provided. */
1694
1745
  product?: ProductWithDetails;
1695
- /** Pre-fetched related products for SSR. */
1696
- relatedProducts?: Product[];
1746
+ /** Per-slug page map. Highest priority — maps a product slug to a custom component. */
1747
+ pages?: Record<string, React.ComponentType<ProductLayoutProps>>;
1748
+ /** Per-type template map. Overrides built-in layouts for specific template keys. */
1749
+ templates?: Partial<Record<ProductTemplate | string, React.ComponentType<ProductLayoutProps>>>;
1697
1750
  /** Override add-to-cart behavior. */
1698
1751
  onAddToCart?: (product: ProductWithDetails, quantity: number, options: AddToCartOptions) => void | Promise<void>;
1699
1752
  /** Custom image renderer (e.g. Next.js Image). */
@@ -1702,24 +1755,26 @@ interface ProductPageProps {
1702
1755
  alt: string;
1703
1756
  className?: string;
1704
1757
  }) => React.ReactNode;
1705
- /** Show availability badge. Default: true. */
1706
- showAvailability?: boolean;
1707
- /** Show sale badge. Default: true. */
1708
- showSaleBadge?: boolean;
1758
+ /** Breadcrumb renderer. Receives the product for context. */
1759
+ renderBreadcrumb?: (product: ProductWithDetails) => React.ReactNode;
1760
+ /** Pre-fetched related products. */
1761
+ relatedProducts?: Product[];
1709
1762
  /** Show related products section. Default: true. */
1710
1763
  showRelated?: boolean;
1711
- /** Related section title. */
1712
- relatedTitle?: string;
1713
1764
  className?: string;
1714
1765
  classNames?: ProductPageClassNames;
1715
1766
  }
1716
- /**
1717
- * ProductPage — full product detail page with badges and related products.
1718
- *
1719
- * SSR-friendly: pass `product` prop for server rendering.
1720
- * Composes ProductSheet, AvailabilityBadge, SaleBadge, and a related products grid.
1721
- */
1722
- declare function ProductPage({ productId, product: productProp, relatedProducts, onAddToCart, renderImage, showAvailability, showSaleBadge, showRelated, relatedTitle, className, classNames, }: ProductPageProps): React.ReactElement;
1767
+ declare function ProductPage({ productId, product: productProp, pages, templates, onAddToCart, renderImage, renderBreadcrumb, relatedProducts, showRelated, className, classNames, }: ProductPageProps): React.ReactElement;
1768
+
1769
+ declare function DefaultProductLayout({ product, onAddToCart, renderBreadcrumb, relatedProducts, showRelated, className, }: ProductLayoutProps): React.ReactElement;
1770
+
1771
+ declare function FoodProductLayout({ product, onAddToCart, renderBreadcrumb, relatedProducts, showRelated, className, }: ProductLayoutProps): React.ReactElement;
1772
+
1773
+ declare function WholesaleProductLayout({ product, onAddToCart, renderBreadcrumb, relatedProducts, showRelated, className, }: ProductLayoutProps): React.ReactElement;
1774
+
1775
+ declare function ServiceProductLayout({ product, onAddToCart, renderBreadcrumb, relatedProducts, showRelated, className, }: ProductLayoutProps): React.ReactElement;
1776
+
1777
+ declare function DigitalProductLayout({ product, onAddToCart, renderBreadcrumb, relatedProducts, showRelated, className, }: ProductLayoutProps): React.ReactElement;
1723
1778
 
1724
1779
  interface CartPageClassNames {
1725
1780
  root?: string;
@@ -2347,4 +2402,4 @@ interface CurrencySelectorProps {
2347
2402
  */
2348
2403
  declare function CurrencySelector({ currencies, currentCurrency, onCurrencyChange, showRate, baseCurrency, renderCurrency, className, classNames, }: CurrencySelectorProps): React.ReactElement | null;
2349
2404
 
2350
- export { Ad, AdPosition, type AdProps, AdProvider, AdSlot, AddOnSelector, type AddOnSelectorClassNames, type AddOnSelectorProps, type AddToCartOptions, AddressElement, AuthElement, AvailabilityBadge, type AvailabilityBadgeClassNames, type AvailabilityBadgeProps, BillingPlanSelector, type BillingPlanSelectorClassNames, type BillingPlanSelectorProps, BookingCard, type BookingCardClassNames, type BookingCardProps, BookingList, type BookingListClassNames, type BookingListProps, BookingPage, type BookingPageClassNames, type BookingPageProps, BookingsPage, type BookingsPageClassNames, type BookingsPageProps, BundleSelector, type BundleSelectorClassNames, type BundleSelectorProps, type CartAddOnOptionSelection, CartPage, type CartPageClassNames, type CartPageProps, CartSummary, type CartSummaryClassNames, type CartSummaryProps, type CartVariantSelection, CataloguePage, type CataloguePageClassNames, type CataloguePageProps, CategoryFilter, type CategoryFilterClassNames, type CategoryFilterProps, CategoryGrid, type CategoryGridClassNames, type CategoryGridProps, CheckoutPage, type CheckoutPageClassNames, type CheckoutPageProps, CimplifyCheckout, type CimplifyCheckoutProps, type CimplifyClientContextValue, type CimplifyContextValue, CimplifyProvider, type CimplifyProviderProps, CollectionPage, type CollectionPageClassNames, type CollectionPageProps, CompositeSelector, type CompositeSelectorClassNames, type CompositeSelectorProps, CurrencySelector, type CurrencySelectorClassNames, type CurrencySelectorProps, DateSlotPicker, type DateSlotPickerClassNames, type DateSlotPickerProps, DealBanner, type DealBannerClassNames, type DealBannerProps, DealsPage, type DealsPageClassNames, type DealsPageProps, DeliveryEstimate, type DeliveryEstimateClassNames, type DeliveryEstimateProps, DiscountInput, type DiscountInputClassNames, type DiscountInputProps, ElementsProvider, LocationPicker, type LocationPickerClassNames, type LocationPickerProps, OrderDetailPage, type OrderDetailPageClassNames, type OrderDetailPageProps, OrderHistory, type OrderHistoryClassNames, OrderHistoryPage, type OrderHistoryPageClassNames, type OrderHistoryPageProps, type OrderHistoryProps, OrderSummary, type OrderSummaryClassNames, type OrderSummaryProps, PaymentElement, Price, type PriceProps, PriceRange, type PriceRangeProps, ProductCard, type ProductCardClassNames, type ProductCardProps, ProductCustomizer, type ProductCustomizerClassNames, type ProductCustomizerProps, ProductGrid, type ProductGridClassNames, type ProductGridProps, ProductImageGallery, type ProductImageGalleryProps, ProductPage, type ProductPageClassNames, type ProductPageProps, ProductSheet, type ProductSheetClassNames, type ProductSheetProps, QuantitySelector, type QuantitySelectorClassNames, type QuantitySelectorProps, RecentlyViewed, type RecentlyViewedClassNames, type RecentlyViewedProps, RecommendationCarousel, type RecommendationCarouselClassNames, type RecommendationCarouselProps, type Resource, ResourcePicker, type ResourcePickerClassNames, type ResourcePickerProps, SaleBadge, type SaleBadgeClassNames, type SaleBadgeProps, SearchInput, type SearchInputClassNames, type SearchInputProps, SearchPage, type SearchPageClassNames, type SearchPageProps, ServiceCard, type ServiceCardClassNames, type ServiceCardProps, ServiceGrid, type ServiceGridClassNames, type ServiceGridProps, SessionMessageBanner, type SessionMessageBannerClassNames, type SessionMessageBannerProps, SlotPicker, type SlotPickerClassNames, type SlotPickerProps, StaffPicker, type StaffPickerClassNames, type StaffPickerProps, StoreNav, type StoreNavClassNames, type StoreNavProps, type UseActivityStateOptions, type UseActivityStateResult, type UseAttributeDefinitionsOptions, type UseAttributeDefinitionsResult, type UseAvailableSlotsOptions, type UseAvailableSlotsResult, type UseBillingPlansOptions, type UseBillingPlansResult, type UseBookingsOptions, type UseBookingsResult, type UseBootstrapOptions, type UseBootstrapResult, type UseBundlesOptions, type UseBundlesResult, type UseCartItem, type UseCartOptions, type UseCartResult, type UseCategoriesOptions, type UseCategoriesResult, type UseCollectionOptions, type UseCollectionResult, type UseCollectionsOptions, type UseCollectionsResult, type UseDealsOptions, type UseDealsResult, type UseDeliveryFeeOptions, type UseDeliveryFeeResult, type UseFxRateOptions, type UseFxRateResult, type UseLocationsOptions, type UseLocationsResult, type UseOrderOptions, type UseOrderResult, type UseOrdersOptions, type UseOrdersResult, type UseProductAvailabilityOptions, type UseProductAvailabilityResult, type UseProductDealsOptions, type UseProductDealsResult, type UseProductOptions, type UseProductPriceInput, type UseProductPriceResult, type UseProductResult, type UseProductSchedulesOptions, type UseProductSchedulesResult, type UseProductsOnSaleOptions, type UseProductsOnSaleResult, type UseProductsOptions, type UseProductsResult, type UsePropertyFacetsOptions, type UsePropertyFacetsResult, type UseQuoteInput, type UseQuoteOptions, type UseQuoteResult, type UseRecommendationsOptions, type UseRecommendationsResult, type UseSearchOptions, type UseSearchResult, type UseServiceAvailabilityOptions, type UseServiceAvailabilityResult, type UseServicesOptions, type UseServicesResult, type UseTaxonomiesOptions, type UseTaxonomiesResult, type UseTaxonomyOptions, type UseTaxonomyPathOptions, type UseTaxonomyPathResult, type UseTaxonomyResult, type UseValidateDiscountOptions, type UseValidateDiscountResult, type UseVariantSelectorOptions, type UseVariantSelectorResult, VariantSelector, type VariantSelectorClassNames, type VariantSelectorProps, VolumePricing, type VolumePricingClassNames, type VolumePricingProps, cn, roomToResource, useActivityState, useAds, useAttributeDefinitions, useAvailableSlots, useBillingPlans, useBookings, useBootstrap, useBundles, useCart, useCategories, useCheckout, useCimplify, useCimplifyClient, useCollection, useCollections, useDeals, useDeliveryFee, useElements, useElementsReady, useFxRate, useLocations, useOptionalCimplify, useOrder, useOrders, useProduct, useProductAvailability, useProductDeals, useProductPrice, useProductSchedules, useProducts, useProductsOnSale, usePropertyFacets, useQuote, useRecommendations, useSearch, useServiceAvailability, useServices, useTaxonomies, useTaxonomy, useTaxonomyPath, useValidateDiscount, useVariantSelector };
2405
+ export { Ad, AdPosition, type AdProps, AdProvider, AdSlot, AddOnSelector, type AddOnSelectorClassNames, type AddOnSelectorProps, type AddToCartOptions, AddressElement, AuthElement, AvailabilityBadge, type AvailabilityBadgeClassNames, type AvailabilityBadgeProps, BillingPlanSelector, type BillingPlanSelectorClassNames, type BillingPlanSelectorProps, BookingCard, type BookingCardClassNames, type BookingCardProps, BookingList, type BookingListClassNames, type BookingListProps, BookingPage, type BookingPageClassNames, type BookingPageProps, BookingsPage, type BookingsPageClassNames, type BookingsPageProps, BundleSelector, type BundleSelectorClassNames, type BundleSelectorProps, type CartAddOnOptionSelection, CartPage, type CartPageClassNames, type CartPageProps, CartSummary, type CartSummaryClassNames, type CartSummaryProps, type CartVariantSelection, CataloguePage, type CataloguePageClassNames, type CataloguePageProps, CategoryFilter, type CategoryFilterClassNames, type CategoryFilterProps, CategoryGrid, type CategoryGridClassNames, type CategoryGridProps, CheckoutPage, type CheckoutPageClassNames, type CheckoutPageProps, CimplifyCheckout, type CimplifyCheckoutProps, type CimplifyClientContextValue, type CimplifyContextValue, CimplifyProvider, type CimplifyProviderProps, CollectionPage, type CollectionPageClassNames, type CollectionPageProps, CompositeSelector, type CompositeSelectorClassNames, type CompositeSelectorProps, CurrencySelector, type CurrencySelectorClassNames, type CurrencySelectorProps, CustomAttributesTable, DateSlotPicker, type DateSlotPickerClassNames, type DateSlotPickerProps, DealBanner, type DealBannerClassNames, type DealBannerProps, DealsPage, type DealsPageClassNames, type DealsPageProps, DefaultProductLayout, DeliveryEstimate, type DeliveryEstimateClassNames, type DeliveryEstimateProps, DigitalProductLayout, DiscountInput, type DiscountInputClassNames, type DiscountInputProps, ElementsProvider, FoodProductLayout, InventoryBadge, LocationPicker, type LocationPickerClassNames, type LocationPickerProps, MetadataStringList, OrderDetailPage, type OrderDetailPageClassNames, type OrderDetailPageProps, OrderHistory, type OrderHistoryClassNames, OrderHistoryPage, type OrderHistoryPageClassNames, type OrderHistoryPageProps, type OrderHistoryProps, OrderSummary, type OrderSummaryClassNames, type OrderSummaryProps, PaymentElement, Price, type PriceProps, PriceRange, type PriceRangeProps, ProductCard, type ProductCardClassNames, type ProductCardProps, ProductCustomizer, type ProductCustomizerClassNames, type ProductCustomizerProps, ProductGrid, type ProductGridClassNames, type ProductGridProps, ProductImageGallery, type ProductImageGalleryProps, type ProductLayoutProps, ProductPage, type ProductPageClassNames, type ProductPageProps, ProductSheet, type ProductSheetClassNames, type ProductSheetProps, ProductTemplate, PropertiesTable, QuantitySelector, type QuantitySelectorClassNames, type QuantitySelectorProps, RecentlyViewed, type RecentlyViewedClassNames, type RecentlyViewedProps, RecommendationCarousel, type RecommendationCarouselClassNames, type RecommendationCarouselProps, RelatedProductsSection, type Resource, ResourcePicker, type ResourcePickerClassNames, type ResourcePickerProps, SaleBadge, type SaleBadgeClassNames, type SaleBadgeProps, SearchInput, type SearchInputClassNames, type SearchInputProps, SearchPage, type SearchPageClassNames, type SearchPageProps, ServiceCard, type ServiceCardClassNames, type ServiceCardProps, ServiceGrid, type ServiceGridClassNames, type ServiceGridProps, ServiceProductLayout, SessionMessageBanner, type SessionMessageBannerClassNames, type SessionMessageBannerProps, SlotPicker, type SlotPickerClassNames, type SlotPickerProps, StaffPicker, type StaffPickerClassNames, type StaffPickerProps, StoreNav, type StoreNavClassNames, type StoreNavProps, TagPills, TwoColumnGrid, type UseActivityStateOptions, type UseActivityStateResult, type UseAttributeDefinitionsOptions, type UseAttributeDefinitionsResult, type UseAvailableSlotsOptions, type UseAvailableSlotsResult, type UseBillingPlansOptions, type UseBillingPlansResult, type UseBookingsOptions, type UseBookingsResult, type UseBootstrapOptions, type UseBootstrapResult, type UseBundlesOptions, type UseBundlesResult, type UseCartItem, type UseCartOptions, type UseCartResult, type UseCategoriesOptions, type UseCategoriesResult, type UseCollectionOptions, type UseCollectionResult, type UseCollectionsOptions, type UseCollectionsResult, type UseDealsOptions, type UseDealsResult, type UseDeliveryFeeOptions, type UseDeliveryFeeResult, type UseFxRateOptions, type UseFxRateResult, type UseLocationsOptions, type UseLocationsResult, type UseOrderOptions, type UseOrderResult, type UseOrdersOptions, type UseOrdersResult, type UseProductAvailabilityOptions, type UseProductAvailabilityResult, type UseProductDealsOptions, type UseProductDealsResult, type UseProductOptions, type UseProductPriceInput, type UseProductPriceResult, type UseProductResult, type UseProductSchedulesOptions, type UseProductSchedulesResult, type UseProductsOnSaleOptions, type UseProductsOnSaleResult, type UseProductsOptions, type UseProductsResult, type UsePropertyFacetsOptions, type UsePropertyFacetsResult, type UseQuoteInput, type UseQuoteOptions, type UseQuoteResult, type UseRecommendationsOptions, type UseRecommendationsResult, type UseSearchOptions, type UseSearchResult, type UseServiceAvailabilityOptions, type UseServiceAvailabilityResult, type UseServicesOptions, type UseServicesResult, type UseTaxonomiesOptions, type UseTaxonomiesResult, type UseTaxonomyOptions, type UseTaxonomyPathOptions, type UseTaxonomyPathResult, type UseTaxonomyResult, type UseValidateDiscountOptions, type UseValidateDiscountResult, type UseVariantSelectorOptions, type UseVariantSelectorResult, VariantSelector, type VariantSelectorClassNames, type VariantSelectorProps, VolumePricing, type VolumePricingClassNames, type VolumePricingProps, WholesaleProductLayout, cn, roomToResource, useActivityState, useAds, useAttributeDefinitions, useAvailableSlots, useBillingPlans, useBookings, useBootstrap, useBundles, useCart, useCategories, useCheckout, useCimplify, useCimplifyClient, useCollection, useCollections, useDeals, useDeliveryFee, useElements, useElementsReady, useFxRate, useLocations, useOptionalCimplify, useOrder, useOrders, useProduct, useProductAvailability, useProductDeals, useProductPrice, useProductSchedules, useProducts, useProductsOnSale, usePropertyFacets, useQuote, useRecommendations, useSearch, useServiceAvailability, useServices, useTaxonomies, useTaxonomy, useTaxonomyPath, useValidateDiscount, useVariantSelector };