@cimplify/sdk 0.48.2 → 0.49.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 +79 -1
- package/dist/react.d.ts +79 -1
- package/dist/react.js +288 -2
- package/dist/react.mjs +286 -3
- package/dist/server.d.mts +28 -1
- package/dist/server.d.ts +28 -1
- package/dist/server.js +125 -0
- package/dist/server.mjs +116 -1
- package/package.json +1 -1
- package/registry/index.json +24 -0
- package/registry/media-gallery.json +16 -0
- package/registry/product-model-3d.json +13 -0
- package/registry/store-video.json +13 -0
package/dist/react.d.mts
CHANGED
|
@@ -997,6 +997,84 @@ interface ProductImageGalleryProps {
|
|
|
997
997
|
*/
|
|
998
998
|
declare function ProductImageGallery({ images, productName, aspectRatio, className, }: ProductImageGalleryProps): React$1.ReactElement | null;
|
|
999
999
|
|
|
1000
|
+
interface StoreVideoProps {
|
|
1001
|
+
src: string;
|
|
1002
|
+
/** Poster shown before play + as the fallback if `<video>` isn't supported. */
|
|
1003
|
+
poster?: string;
|
|
1004
|
+
/** Accessible label; also the alt of the fallback `<img>`. */
|
|
1005
|
+
alt?: string;
|
|
1006
|
+
aspectRatio?: "square" | "4/3" | "16/9" | "16/10" | "3/4";
|
|
1007
|
+
/** Show native browser controls. Default off for autoplay-friendly hero clips. */
|
|
1008
|
+
controls?: boolean;
|
|
1009
|
+
/** Default `true` — muted is the only way mobile browsers allow autoplay. */
|
|
1010
|
+
autoplay?: boolean;
|
|
1011
|
+
loop?: boolean;
|
|
1012
|
+
muted?: boolean;
|
|
1013
|
+
/** Lazy-load: defer the src until the player scrolls into view. Default `true`. */
|
|
1014
|
+
lazy?: boolean;
|
|
1015
|
+
className?: string;
|
|
1016
|
+
}
|
|
1017
|
+
/**
|
|
1018
|
+
* StoreVideo — `<video>` with mobile-safe defaults (muted + playsInline + loop),
|
|
1019
|
+
* IntersectionObserver-driven lazy load, and a poster `<img>` fallback for
|
|
1020
|
+
* browsers without video support. Drop-in replacement for a static hero image.
|
|
1021
|
+
*/
|
|
1022
|
+
declare function StoreVideo({ src, poster, alt, aspectRatio, controls, autoplay, loop, muted, lazy, className, }: StoreVideoProps): React$1.ReactElement;
|
|
1023
|
+
|
|
1024
|
+
interface ProductModel3DProps {
|
|
1025
|
+
/** glTF or GLB URL. */
|
|
1026
|
+
src: string;
|
|
1027
|
+
/** Optional USDZ URL for iOS AR Quick Look (Safari/WebKit). */
|
|
1028
|
+
iosSrc?: string;
|
|
1029
|
+
/** Poster image shown while the model loads (and as a fallback). */
|
|
1030
|
+
poster?: string;
|
|
1031
|
+
alt?: string;
|
|
1032
|
+
aspectRatio?: "square" | "4/3" | "16/9" | "3/4";
|
|
1033
|
+
/** Enable AR mode. Lights up on iOS (Quick Look) + Android (Scene Viewer). Default `true`. */
|
|
1034
|
+
ar?: boolean;
|
|
1035
|
+
autoRotate?: boolean;
|
|
1036
|
+
cameraControls?: boolean;
|
|
1037
|
+
className?: string;
|
|
1038
|
+
}
|
|
1039
|
+
/**
|
|
1040
|
+
* ProductModel3D — interactive 3D product viewer wrapping Google's
|
|
1041
|
+
* `<model-viewer>` web component. Script loads on demand (one tag per page,
|
|
1042
|
+
* cached). AR mode auto-resolves the right OS surface: USDZ Quick Look on iOS,
|
|
1043
|
+
* Scene Viewer on Android, WebXR where available. Poster image shows during
|
|
1044
|
+
* load and as a fallback if the script can't load.
|
|
1045
|
+
*/
|
|
1046
|
+
declare function ProductModel3D({ src, iosSrc, poster, alt, aspectRatio, ar, autoRotate, cameraControls, className, }: ProductModel3DProps): React$1.ReactElement;
|
|
1047
|
+
|
|
1048
|
+
type MediaItem = {
|
|
1049
|
+
type: "image";
|
|
1050
|
+
src: string;
|
|
1051
|
+
alt?: string;
|
|
1052
|
+
} | {
|
|
1053
|
+
type: "video";
|
|
1054
|
+
src: string;
|
|
1055
|
+
poster?: string;
|
|
1056
|
+
alt?: string;
|
|
1057
|
+
} | {
|
|
1058
|
+
type: "model";
|
|
1059
|
+
src: string;
|
|
1060
|
+
iosSrc?: string;
|
|
1061
|
+
poster?: string;
|
|
1062
|
+
alt?: string;
|
|
1063
|
+
};
|
|
1064
|
+
interface MediaGalleryProps {
|
|
1065
|
+
items: MediaItem[];
|
|
1066
|
+
productName: string;
|
|
1067
|
+
aspectRatio?: "square" | "4/3" | "16/10" | "3/4";
|
|
1068
|
+
className?: string;
|
|
1069
|
+
}
|
|
1070
|
+
/**
|
|
1071
|
+
* MediaGallery — like ProductImageGallery, but accepts mixed image/video/3D
|
|
1072
|
+
* items in one carousel. The active item renders via the matching SDK
|
|
1073
|
+
* component (img / StoreVideo / ProductModel3D); thumbnails show a poster
|
|
1074
|
+
* (or the image itself) with a small overlay icon for video/3D.
|
|
1075
|
+
*/
|
|
1076
|
+
declare function MediaGallery({ items, productName, aspectRatio, className, }: MediaGalleryProps): React$1.ReactElement | null;
|
|
1077
|
+
|
|
1000
1078
|
interface CartSummaryClassNames {
|
|
1001
1079
|
root?: string;
|
|
1002
1080
|
item?: string;
|
|
@@ -2861,4 +2939,4 @@ interface ChatWidgetProps {
|
|
|
2861
2939
|
}
|
|
2862
2940
|
declare function ChatWidget({ client: clientProp, businessName, greeting, subtitle, starters, placeholder, position, defaultOpen, pollInterval, className, classNames, }: ChatWidgetProps): react_jsx_runtime.JSX.Element;
|
|
2863
2941
|
|
|
2864
|
-
export { AccommodationCard, 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, BundleProductCard, BundleProductLayout, BundleSelector, type BundleSelectorClassNames, type BundleSelectorProps, CardImage, type CardLayoutProps, CardShell, CardVariant, type CartAddOnOptionSelection, CartDrawer, type CartDrawerProps, CartDrawerProvider, type CartLayoutProps, CartPage, type CartPageClassNames, type CartPageProps, CartSummary, type CartSummaryClassNames, type CartSummaryProps, CartTemplate, type CartVariantSelection, CatalogueCollectionLayout, type CatalogueLayoutProps, CataloguePage, type CataloguePageClassNames, type CataloguePageProps, CatalogueTemplate, CategoryFilter, type CategoryFilterClassNames, type CategoryFilterProps, CategoryGrid, type CategoryGridClassNames, type CategoryGridProps, ChatWidget, type ChatWidgetClassNames, type ChatWidgetProps, CheckoutPage, type CheckoutPageClassNames, type CheckoutPageProps, CimplifyAccount, type CimplifyAccountProps, CimplifyCheckout, type CimplifyCheckoutProps, type CimplifyClientContextValue, type CimplifyContextValue, CimplifyProvider, type CimplifyProviderProps, type CollectionLayoutProps, CollectionPage, type CollectionPageClassNames, type CollectionPageProps, CollectionTemplate, CompactCartLayout, CompactCatalogueLayout, CompactSearchLayout, CompactServiceCard, CompositeProductCard, CompositeProductLayout, CompositeSelector, type CompositeSelectorClassNames, type CompositeSelectorProps, CurrencySelector, type CurrencySelectorClassNames, type CurrencySelectorProps, CustomAttributesTable, CustomerInputFields, type CustomerInputFieldsClassNames, type CustomerInputFieldsProps, DatePicker, type DatePickerClassNames, type DatePickerProps, DateSlotPicker, type DateSlotPickerClassNames, type DateSlotPickerProps, DealBanner, type DealBannerClassNames, type DealBannerProps, DealsPage, type DealsPageClassNames, type DealsPageProps, DefaultCartLayout, DefaultCatalogueLayout, DefaultCollectionLayout, DefaultProductLayout, DefaultSearchLayout, DeliveryEstimate, type DeliveryEstimateClassNames, type DeliveryEstimateProps, DigitalProductCard, DigitalProductLayout, DiscountInput, type DiscountInputClassNames, type DiscountInputProps, ElementsProvider, FeaturedCollectionLayout, FoodProductCard, FoodProductLayout, InventoryBadge, LeaseServiceCard, 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, QuickAddButton, RecentlyViewed, type RecentlyViewedClassNames, type RecentlyViewedProps, RecommendationCarousel, type RecommendationCarouselClassNames, type RecommendationCarouselProps, RelatedProductsSection, RentalServiceCard, type Resource, ResourcePicker, type ResourcePickerClassNames, type ResourcePickerProps, RetailProductCard, SaleBadge, type SaleBadgeClassNames, type SaleBadgeProps, ScheduleServiceCard, SearchInput, type SearchInputClassNames, type SearchInputProps, type SearchLayoutProps, SearchPage, type SearchPageClassNames, type SearchPageProps, SearchTemplate, type ServiceCardLayoutProps, ServiceProductLayout, SessionMessageBanner, type SessionMessageBannerClassNames, type SessionMessageBannerProps, SlotPicker, type SlotPickerClassNames, type SlotPickerProps, SoldOutOverlay, StaffPicker, type StaffPickerClassNames, type StaffPickerProps, StandardServiceCard, StoreNav, type StoreNavClassNames, type StoreNavProps, SubscriptionCard, TagPills, TimePicker, type TimePickerClassNames, type TimePickerProps, 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 UseChatOptions, type UseChatResult, 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, WholesaleProductCard, WholesaleProductLayout, WishlistButton, cn, roomToResource, useActivityState, useAds, useAttributeDefinitions, useAvailableSlots, useBillingPlans, useBookings, useBootstrap, useBundles, useCart, useCartDrawer, useCategories, useChat, 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, useSubscription, useSubscriptions, useTaxonomies, useTaxonomy, useTaxonomyPath, useValidateDiscount, useVariantSelector };
|
|
2942
|
+
export { AccommodationCard, 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, BundleProductCard, BundleProductLayout, BundleSelector, type BundleSelectorClassNames, type BundleSelectorProps, CardImage, type CardLayoutProps, CardShell, CardVariant, type CartAddOnOptionSelection, CartDrawer, type CartDrawerProps, CartDrawerProvider, type CartLayoutProps, CartPage, type CartPageClassNames, type CartPageProps, CartSummary, type CartSummaryClassNames, type CartSummaryProps, CartTemplate, type CartVariantSelection, CatalogueCollectionLayout, type CatalogueLayoutProps, CataloguePage, type CataloguePageClassNames, type CataloguePageProps, CatalogueTemplate, CategoryFilter, type CategoryFilterClassNames, type CategoryFilterProps, CategoryGrid, type CategoryGridClassNames, type CategoryGridProps, ChatWidget, type ChatWidgetClassNames, type ChatWidgetProps, CheckoutPage, type CheckoutPageClassNames, type CheckoutPageProps, CimplifyAccount, type CimplifyAccountProps, CimplifyCheckout, type CimplifyCheckoutProps, type CimplifyClientContextValue, type CimplifyContextValue, CimplifyProvider, type CimplifyProviderProps, type CollectionLayoutProps, CollectionPage, type CollectionPageClassNames, type CollectionPageProps, CollectionTemplate, CompactCartLayout, CompactCatalogueLayout, CompactSearchLayout, CompactServiceCard, CompositeProductCard, CompositeProductLayout, CompositeSelector, type CompositeSelectorClassNames, type CompositeSelectorProps, CurrencySelector, type CurrencySelectorClassNames, type CurrencySelectorProps, CustomAttributesTable, CustomerInputFields, type CustomerInputFieldsClassNames, type CustomerInputFieldsProps, DatePicker, type DatePickerClassNames, type DatePickerProps, DateSlotPicker, type DateSlotPickerClassNames, type DateSlotPickerProps, DealBanner, type DealBannerClassNames, type DealBannerProps, DealsPage, type DealsPageClassNames, type DealsPageProps, DefaultCartLayout, DefaultCatalogueLayout, DefaultCollectionLayout, DefaultProductLayout, DefaultSearchLayout, DeliveryEstimate, type DeliveryEstimateClassNames, type DeliveryEstimateProps, DigitalProductCard, DigitalProductLayout, DiscountInput, type DiscountInputClassNames, type DiscountInputProps, ElementsProvider, FeaturedCollectionLayout, FoodProductCard, FoodProductLayout, InventoryBadge, LeaseServiceCard, LocationPicker, type LocationPickerClassNames, type LocationPickerProps, MediaGallery, type MediaGalleryProps, type MediaItem, 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, ProductModel3D, type ProductModel3DProps, ProductPage, type ProductPageClassNames, type ProductPageProps, ProductSheet, type ProductSheetClassNames, type ProductSheetProps, ProductTemplate, PropertiesTable, QuantitySelector, type QuantitySelectorClassNames, type QuantitySelectorProps, QuickAddButton, RecentlyViewed, type RecentlyViewedClassNames, type RecentlyViewedProps, RecommendationCarousel, type RecommendationCarouselClassNames, type RecommendationCarouselProps, RelatedProductsSection, RentalServiceCard, type Resource, ResourcePicker, type ResourcePickerClassNames, type ResourcePickerProps, RetailProductCard, SaleBadge, type SaleBadgeClassNames, type SaleBadgeProps, ScheduleServiceCard, SearchInput, type SearchInputClassNames, type SearchInputProps, type SearchLayoutProps, SearchPage, type SearchPageClassNames, type SearchPageProps, SearchTemplate, type ServiceCardLayoutProps, ServiceProductLayout, SessionMessageBanner, type SessionMessageBannerClassNames, type SessionMessageBannerProps, SlotPicker, type SlotPickerClassNames, type SlotPickerProps, SoldOutOverlay, StaffPicker, type StaffPickerClassNames, type StaffPickerProps, StandardServiceCard, StoreNav, type StoreNavClassNames, type StoreNavProps, StoreVideo, type StoreVideoProps, SubscriptionCard, TagPills, TimePicker, type TimePickerClassNames, type TimePickerProps, 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 UseChatOptions, type UseChatResult, 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, WholesaleProductCard, WholesaleProductLayout, WishlistButton, cn, roomToResource, useActivityState, useAds, useAttributeDefinitions, useAvailableSlots, useBillingPlans, useBookings, useBootstrap, useBundles, useCart, useCartDrawer, useCategories, useChat, 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, useSubscription, useSubscriptions, useTaxonomies, useTaxonomy, useTaxonomyPath, useValidateDiscount, useVariantSelector };
|
package/dist/react.d.ts
CHANGED
|
@@ -997,6 +997,84 @@ interface ProductImageGalleryProps {
|
|
|
997
997
|
*/
|
|
998
998
|
declare function ProductImageGallery({ images, productName, aspectRatio, className, }: ProductImageGalleryProps): React$1.ReactElement | null;
|
|
999
999
|
|
|
1000
|
+
interface StoreVideoProps {
|
|
1001
|
+
src: string;
|
|
1002
|
+
/** Poster shown before play + as the fallback if `<video>` isn't supported. */
|
|
1003
|
+
poster?: string;
|
|
1004
|
+
/** Accessible label; also the alt of the fallback `<img>`. */
|
|
1005
|
+
alt?: string;
|
|
1006
|
+
aspectRatio?: "square" | "4/3" | "16/9" | "16/10" | "3/4";
|
|
1007
|
+
/** Show native browser controls. Default off for autoplay-friendly hero clips. */
|
|
1008
|
+
controls?: boolean;
|
|
1009
|
+
/** Default `true` — muted is the only way mobile browsers allow autoplay. */
|
|
1010
|
+
autoplay?: boolean;
|
|
1011
|
+
loop?: boolean;
|
|
1012
|
+
muted?: boolean;
|
|
1013
|
+
/** Lazy-load: defer the src until the player scrolls into view. Default `true`. */
|
|
1014
|
+
lazy?: boolean;
|
|
1015
|
+
className?: string;
|
|
1016
|
+
}
|
|
1017
|
+
/**
|
|
1018
|
+
* StoreVideo — `<video>` with mobile-safe defaults (muted + playsInline + loop),
|
|
1019
|
+
* IntersectionObserver-driven lazy load, and a poster `<img>` fallback for
|
|
1020
|
+
* browsers without video support. Drop-in replacement for a static hero image.
|
|
1021
|
+
*/
|
|
1022
|
+
declare function StoreVideo({ src, poster, alt, aspectRatio, controls, autoplay, loop, muted, lazy, className, }: StoreVideoProps): React$1.ReactElement;
|
|
1023
|
+
|
|
1024
|
+
interface ProductModel3DProps {
|
|
1025
|
+
/** glTF or GLB URL. */
|
|
1026
|
+
src: string;
|
|
1027
|
+
/** Optional USDZ URL for iOS AR Quick Look (Safari/WebKit). */
|
|
1028
|
+
iosSrc?: string;
|
|
1029
|
+
/** Poster image shown while the model loads (and as a fallback). */
|
|
1030
|
+
poster?: string;
|
|
1031
|
+
alt?: string;
|
|
1032
|
+
aspectRatio?: "square" | "4/3" | "16/9" | "3/4";
|
|
1033
|
+
/** Enable AR mode. Lights up on iOS (Quick Look) + Android (Scene Viewer). Default `true`. */
|
|
1034
|
+
ar?: boolean;
|
|
1035
|
+
autoRotate?: boolean;
|
|
1036
|
+
cameraControls?: boolean;
|
|
1037
|
+
className?: string;
|
|
1038
|
+
}
|
|
1039
|
+
/**
|
|
1040
|
+
* ProductModel3D — interactive 3D product viewer wrapping Google's
|
|
1041
|
+
* `<model-viewer>` web component. Script loads on demand (one tag per page,
|
|
1042
|
+
* cached). AR mode auto-resolves the right OS surface: USDZ Quick Look on iOS,
|
|
1043
|
+
* Scene Viewer on Android, WebXR where available. Poster image shows during
|
|
1044
|
+
* load and as a fallback if the script can't load.
|
|
1045
|
+
*/
|
|
1046
|
+
declare function ProductModel3D({ src, iosSrc, poster, alt, aspectRatio, ar, autoRotate, cameraControls, className, }: ProductModel3DProps): React$1.ReactElement;
|
|
1047
|
+
|
|
1048
|
+
type MediaItem = {
|
|
1049
|
+
type: "image";
|
|
1050
|
+
src: string;
|
|
1051
|
+
alt?: string;
|
|
1052
|
+
} | {
|
|
1053
|
+
type: "video";
|
|
1054
|
+
src: string;
|
|
1055
|
+
poster?: string;
|
|
1056
|
+
alt?: string;
|
|
1057
|
+
} | {
|
|
1058
|
+
type: "model";
|
|
1059
|
+
src: string;
|
|
1060
|
+
iosSrc?: string;
|
|
1061
|
+
poster?: string;
|
|
1062
|
+
alt?: string;
|
|
1063
|
+
};
|
|
1064
|
+
interface MediaGalleryProps {
|
|
1065
|
+
items: MediaItem[];
|
|
1066
|
+
productName: string;
|
|
1067
|
+
aspectRatio?: "square" | "4/3" | "16/10" | "3/4";
|
|
1068
|
+
className?: string;
|
|
1069
|
+
}
|
|
1070
|
+
/**
|
|
1071
|
+
* MediaGallery — like ProductImageGallery, but accepts mixed image/video/3D
|
|
1072
|
+
* items in one carousel. The active item renders via the matching SDK
|
|
1073
|
+
* component (img / StoreVideo / ProductModel3D); thumbnails show a poster
|
|
1074
|
+
* (or the image itself) with a small overlay icon for video/3D.
|
|
1075
|
+
*/
|
|
1076
|
+
declare function MediaGallery({ items, productName, aspectRatio, className, }: MediaGalleryProps): React$1.ReactElement | null;
|
|
1077
|
+
|
|
1000
1078
|
interface CartSummaryClassNames {
|
|
1001
1079
|
root?: string;
|
|
1002
1080
|
item?: string;
|
|
@@ -2861,4 +2939,4 @@ interface ChatWidgetProps {
|
|
|
2861
2939
|
}
|
|
2862
2940
|
declare function ChatWidget({ client: clientProp, businessName, greeting, subtitle, starters, placeholder, position, defaultOpen, pollInterval, className, classNames, }: ChatWidgetProps): react_jsx_runtime.JSX.Element;
|
|
2863
2941
|
|
|
2864
|
-
export { AccommodationCard, 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, BundleProductCard, BundleProductLayout, BundleSelector, type BundleSelectorClassNames, type BundleSelectorProps, CardImage, type CardLayoutProps, CardShell, CardVariant, type CartAddOnOptionSelection, CartDrawer, type CartDrawerProps, CartDrawerProvider, type CartLayoutProps, CartPage, type CartPageClassNames, type CartPageProps, CartSummary, type CartSummaryClassNames, type CartSummaryProps, CartTemplate, type CartVariantSelection, CatalogueCollectionLayout, type CatalogueLayoutProps, CataloguePage, type CataloguePageClassNames, type CataloguePageProps, CatalogueTemplate, CategoryFilter, type CategoryFilterClassNames, type CategoryFilterProps, CategoryGrid, type CategoryGridClassNames, type CategoryGridProps, ChatWidget, type ChatWidgetClassNames, type ChatWidgetProps, CheckoutPage, type CheckoutPageClassNames, type CheckoutPageProps, CimplifyAccount, type CimplifyAccountProps, CimplifyCheckout, type CimplifyCheckoutProps, type CimplifyClientContextValue, type CimplifyContextValue, CimplifyProvider, type CimplifyProviderProps, type CollectionLayoutProps, CollectionPage, type CollectionPageClassNames, type CollectionPageProps, CollectionTemplate, CompactCartLayout, CompactCatalogueLayout, CompactSearchLayout, CompactServiceCard, CompositeProductCard, CompositeProductLayout, CompositeSelector, type CompositeSelectorClassNames, type CompositeSelectorProps, CurrencySelector, type CurrencySelectorClassNames, type CurrencySelectorProps, CustomAttributesTable, CustomerInputFields, type CustomerInputFieldsClassNames, type CustomerInputFieldsProps, DatePicker, type DatePickerClassNames, type DatePickerProps, DateSlotPicker, type DateSlotPickerClassNames, type DateSlotPickerProps, DealBanner, type DealBannerClassNames, type DealBannerProps, DealsPage, type DealsPageClassNames, type DealsPageProps, DefaultCartLayout, DefaultCatalogueLayout, DefaultCollectionLayout, DefaultProductLayout, DefaultSearchLayout, DeliveryEstimate, type DeliveryEstimateClassNames, type DeliveryEstimateProps, DigitalProductCard, DigitalProductLayout, DiscountInput, type DiscountInputClassNames, type DiscountInputProps, ElementsProvider, FeaturedCollectionLayout, FoodProductCard, FoodProductLayout, InventoryBadge, LeaseServiceCard, 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, QuickAddButton, RecentlyViewed, type RecentlyViewedClassNames, type RecentlyViewedProps, RecommendationCarousel, type RecommendationCarouselClassNames, type RecommendationCarouselProps, RelatedProductsSection, RentalServiceCard, type Resource, ResourcePicker, type ResourcePickerClassNames, type ResourcePickerProps, RetailProductCard, SaleBadge, type SaleBadgeClassNames, type SaleBadgeProps, ScheduleServiceCard, SearchInput, type SearchInputClassNames, type SearchInputProps, type SearchLayoutProps, SearchPage, type SearchPageClassNames, type SearchPageProps, SearchTemplate, type ServiceCardLayoutProps, ServiceProductLayout, SessionMessageBanner, type SessionMessageBannerClassNames, type SessionMessageBannerProps, SlotPicker, type SlotPickerClassNames, type SlotPickerProps, SoldOutOverlay, StaffPicker, type StaffPickerClassNames, type StaffPickerProps, StandardServiceCard, StoreNav, type StoreNavClassNames, type StoreNavProps, SubscriptionCard, TagPills, TimePicker, type TimePickerClassNames, type TimePickerProps, 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 UseChatOptions, type UseChatResult, 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, WholesaleProductCard, WholesaleProductLayout, WishlistButton, cn, roomToResource, useActivityState, useAds, useAttributeDefinitions, useAvailableSlots, useBillingPlans, useBookings, useBootstrap, useBundles, useCart, useCartDrawer, useCategories, useChat, 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, useSubscription, useSubscriptions, useTaxonomies, useTaxonomy, useTaxonomyPath, useValidateDiscount, useVariantSelector };
|
|
2942
|
+
export { AccommodationCard, 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, BundleProductCard, BundleProductLayout, BundleSelector, type BundleSelectorClassNames, type BundleSelectorProps, CardImage, type CardLayoutProps, CardShell, CardVariant, type CartAddOnOptionSelection, CartDrawer, type CartDrawerProps, CartDrawerProvider, type CartLayoutProps, CartPage, type CartPageClassNames, type CartPageProps, CartSummary, type CartSummaryClassNames, type CartSummaryProps, CartTemplate, type CartVariantSelection, CatalogueCollectionLayout, type CatalogueLayoutProps, CataloguePage, type CataloguePageClassNames, type CataloguePageProps, CatalogueTemplate, CategoryFilter, type CategoryFilterClassNames, type CategoryFilterProps, CategoryGrid, type CategoryGridClassNames, type CategoryGridProps, ChatWidget, type ChatWidgetClassNames, type ChatWidgetProps, CheckoutPage, type CheckoutPageClassNames, type CheckoutPageProps, CimplifyAccount, type CimplifyAccountProps, CimplifyCheckout, type CimplifyCheckoutProps, type CimplifyClientContextValue, type CimplifyContextValue, CimplifyProvider, type CimplifyProviderProps, type CollectionLayoutProps, CollectionPage, type CollectionPageClassNames, type CollectionPageProps, CollectionTemplate, CompactCartLayout, CompactCatalogueLayout, CompactSearchLayout, CompactServiceCard, CompositeProductCard, CompositeProductLayout, CompositeSelector, type CompositeSelectorClassNames, type CompositeSelectorProps, CurrencySelector, type CurrencySelectorClassNames, type CurrencySelectorProps, CustomAttributesTable, CustomerInputFields, type CustomerInputFieldsClassNames, type CustomerInputFieldsProps, DatePicker, type DatePickerClassNames, type DatePickerProps, DateSlotPicker, type DateSlotPickerClassNames, type DateSlotPickerProps, DealBanner, type DealBannerClassNames, type DealBannerProps, DealsPage, type DealsPageClassNames, type DealsPageProps, DefaultCartLayout, DefaultCatalogueLayout, DefaultCollectionLayout, DefaultProductLayout, DefaultSearchLayout, DeliveryEstimate, type DeliveryEstimateClassNames, type DeliveryEstimateProps, DigitalProductCard, DigitalProductLayout, DiscountInput, type DiscountInputClassNames, type DiscountInputProps, ElementsProvider, FeaturedCollectionLayout, FoodProductCard, FoodProductLayout, InventoryBadge, LeaseServiceCard, LocationPicker, type LocationPickerClassNames, type LocationPickerProps, MediaGallery, type MediaGalleryProps, type MediaItem, 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, ProductModel3D, type ProductModel3DProps, ProductPage, type ProductPageClassNames, type ProductPageProps, ProductSheet, type ProductSheetClassNames, type ProductSheetProps, ProductTemplate, PropertiesTable, QuantitySelector, type QuantitySelectorClassNames, type QuantitySelectorProps, QuickAddButton, RecentlyViewed, type RecentlyViewedClassNames, type RecentlyViewedProps, RecommendationCarousel, type RecommendationCarouselClassNames, type RecommendationCarouselProps, RelatedProductsSection, RentalServiceCard, type Resource, ResourcePicker, type ResourcePickerClassNames, type ResourcePickerProps, RetailProductCard, SaleBadge, type SaleBadgeClassNames, type SaleBadgeProps, ScheduleServiceCard, SearchInput, type SearchInputClassNames, type SearchInputProps, type SearchLayoutProps, SearchPage, type SearchPageClassNames, type SearchPageProps, SearchTemplate, type ServiceCardLayoutProps, ServiceProductLayout, SessionMessageBanner, type SessionMessageBannerClassNames, type SessionMessageBannerProps, SlotPicker, type SlotPickerClassNames, type SlotPickerProps, SoldOutOverlay, StaffPicker, type StaffPickerClassNames, type StaffPickerProps, StandardServiceCard, StoreNav, type StoreNavClassNames, type StoreNavProps, StoreVideo, type StoreVideoProps, SubscriptionCard, TagPills, TimePicker, type TimePickerClassNames, type TimePickerProps, 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 UseChatOptions, type UseChatResult, 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, WholesaleProductCard, WholesaleProductLayout, WishlistButton, cn, roomToResource, useActivityState, useAds, useAttributeDefinitions, useAvailableSlots, useBillingPlans, useBookings, useBootstrap, useBundles, useCart, useCartDrawer, useCategories, useChat, 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, useSubscription, useSubscriptions, useTaxonomies, useTaxonomy, useTaxonomyPath, useValidateDiscount, useVariantSelector };
|
package/dist/react.js
CHANGED
|
@@ -6980,6 +6980,289 @@ function ProductImageGallery({
|
|
|
6980
6980
|
)
|
|
6981
6981
|
] });
|
|
6982
6982
|
}
|
|
6983
|
+
var ASPECT_STYLES2 = {
|
|
6984
|
+
square: { aspectRatio: "1/1" },
|
|
6985
|
+
"4/3": { aspectRatio: "4/3" },
|
|
6986
|
+
"16/9": { aspectRatio: "16/9" },
|
|
6987
|
+
"16/10": { aspectRatio: "16/10" },
|
|
6988
|
+
"3/4": { aspectRatio: "3/4" }
|
|
6989
|
+
};
|
|
6990
|
+
function StoreVideo({
|
|
6991
|
+
src,
|
|
6992
|
+
poster,
|
|
6993
|
+
alt,
|
|
6994
|
+
aspectRatio = "16/9",
|
|
6995
|
+
controls = false,
|
|
6996
|
+
autoplay = true,
|
|
6997
|
+
loop = true,
|
|
6998
|
+
muted = true,
|
|
6999
|
+
lazy = true,
|
|
7000
|
+
className
|
|
7001
|
+
}) {
|
|
7002
|
+
const ref = React10.useRef(null);
|
|
7003
|
+
const [inView, setInView] = React10.useState(!lazy);
|
|
7004
|
+
React10.useEffect(() => {
|
|
7005
|
+
if (!lazy || inView) return;
|
|
7006
|
+
const node = ref.current;
|
|
7007
|
+
if (!node || typeof IntersectionObserver === "undefined") {
|
|
7008
|
+
setInView(true);
|
|
7009
|
+
return;
|
|
7010
|
+
}
|
|
7011
|
+
const observer = new IntersectionObserver(
|
|
7012
|
+
(entries) => {
|
|
7013
|
+
if (entries.some((e) => e.isIntersecting)) {
|
|
7014
|
+
setInView(true);
|
|
7015
|
+
observer.disconnect();
|
|
7016
|
+
}
|
|
7017
|
+
},
|
|
7018
|
+
{ rootMargin: "200px" }
|
|
7019
|
+
);
|
|
7020
|
+
observer.observe(node);
|
|
7021
|
+
return () => observer.disconnect();
|
|
7022
|
+
}, [lazy, inView]);
|
|
7023
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7024
|
+
"div",
|
|
7025
|
+
{
|
|
7026
|
+
"data-cimplify-store-video": true,
|
|
7027
|
+
className,
|
|
7028
|
+
style: { position: "relative", overflow: "hidden", ...ASPECT_STYLES2[aspectRatio] },
|
|
7029
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7030
|
+
"video",
|
|
7031
|
+
{
|
|
7032
|
+
ref,
|
|
7033
|
+
src: inView ? src : void 0,
|
|
7034
|
+
poster,
|
|
7035
|
+
autoPlay: autoplay,
|
|
7036
|
+
loop,
|
|
7037
|
+
muted,
|
|
7038
|
+
playsInline: true,
|
|
7039
|
+
controls,
|
|
7040
|
+
preload: lazy ? "metadata" : "auto",
|
|
7041
|
+
"aria-label": alt,
|
|
7042
|
+
style: { width: "100%", height: "100%", objectFit: "cover", display: "block" },
|
|
7043
|
+
children: poster ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
7044
|
+
"img",
|
|
7045
|
+
{
|
|
7046
|
+
src: poster,
|
|
7047
|
+
alt: alt ?? "",
|
|
7048
|
+
style: { width: "100%", height: "100%", objectFit: "cover" }
|
|
7049
|
+
}
|
|
7050
|
+
) : null
|
|
7051
|
+
}
|
|
7052
|
+
)
|
|
7053
|
+
}
|
|
7054
|
+
);
|
|
7055
|
+
}
|
|
7056
|
+
var ASPECT_STYLES3 = {
|
|
7057
|
+
square: { aspectRatio: "1/1" },
|
|
7058
|
+
"4/3": { aspectRatio: "4/3" },
|
|
7059
|
+
"16/9": { aspectRatio: "16/9" },
|
|
7060
|
+
"3/4": { aspectRatio: "3/4" }
|
|
7061
|
+
};
|
|
7062
|
+
var MODEL_VIEWER_CDN = "https://unpkg.com/@google/model-viewer@4.0.0/dist/model-viewer.min.js";
|
|
7063
|
+
var modelViewerLoadPromise = null;
|
|
7064
|
+
function ensureModelViewer() {
|
|
7065
|
+
if (typeof window === "undefined") return Promise.resolve();
|
|
7066
|
+
if (modelViewerLoadPromise) return modelViewerLoadPromise;
|
|
7067
|
+
if (window.customElements?.get("model-viewer")) {
|
|
7068
|
+
modelViewerLoadPromise = Promise.resolve();
|
|
7069
|
+
return modelViewerLoadPromise;
|
|
7070
|
+
}
|
|
7071
|
+
modelViewerLoadPromise = new Promise((resolve, reject) => {
|
|
7072
|
+
const script = document.createElement("script");
|
|
7073
|
+
script.type = "module";
|
|
7074
|
+
script.src = MODEL_VIEWER_CDN;
|
|
7075
|
+
script.onload = () => resolve();
|
|
7076
|
+
script.onerror = () => reject(new Error("Failed to load model-viewer"));
|
|
7077
|
+
document.head.appendChild(script);
|
|
7078
|
+
});
|
|
7079
|
+
return modelViewerLoadPromise;
|
|
7080
|
+
}
|
|
7081
|
+
function ProductModel3D({
|
|
7082
|
+
src,
|
|
7083
|
+
iosSrc,
|
|
7084
|
+
poster,
|
|
7085
|
+
alt,
|
|
7086
|
+
aspectRatio = "square",
|
|
7087
|
+
ar = true,
|
|
7088
|
+
autoRotate = true,
|
|
7089
|
+
cameraControls = true,
|
|
7090
|
+
className
|
|
7091
|
+
}) {
|
|
7092
|
+
const [ready, setReady] = React10.useState(false);
|
|
7093
|
+
React10.useEffect(() => {
|
|
7094
|
+
let cancelled = false;
|
|
7095
|
+
ensureModelViewer().then(
|
|
7096
|
+
() => {
|
|
7097
|
+
if (!cancelled) setReady(true);
|
|
7098
|
+
},
|
|
7099
|
+
() => {
|
|
7100
|
+
}
|
|
7101
|
+
);
|
|
7102
|
+
return () => {
|
|
7103
|
+
cancelled = true;
|
|
7104
|
+
};
|
|
7105
|
+
}, []);
|
|
7106
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7107
|
+
"div",
|
|
7108
|
+
{
|
|
7109
|
+
"data-cimplify-product-model-3d": true,
|
|
7110
|
+
className,
|
|
7111
|
+
style: { position: "relative", overflow: "hidden", ...ASPECT_STYLES3[aspectRatio] },
|
|
7112
|
+
children: ready ? React10__default.default.createElement("model-viewer", {
|
|
7113
|
+
src,
|
|
7114
|
+
"ios-src": iosSrc,
|
|
7115
|
+
alt,
|
|
7116
|
+
poster,
|
|
7117
|
+
ar: ar || void 0,
|
|
7118
|
+
"ar-modes": ar ? "webxr scene-viewer quick-look" : void 0,
|
|
7119
|
+
"camera-controls": cameraControls || void 0,
|
|
7120
|
+
"auto-rotate": autoRotate || void 0,
|
|
7121
|
+
"shadow-intensity": "1",
|
|
7122
|
+
style: { width: "100%", height: "100%", backgroundColor: "transparent" }
|
|
7123
|
+
}) : poster ? React10__default.default.createElement("img", {
|
|
7124
|
+
src: poster,
|
|
7125
|
+
alt: alt ?? "",
|
|
7126
|
+
"data-cimplify-product-model-3d-loading": true,
|
|
7127
|
+
style: { width: "100%", height: "100%", objectFit: "cover" }
|
|
7128
|
+
}) : React10__default.default.createElement("div", {
|
|
7129
|
+
"data-cimplify-product-model-3d-loading": true,
|
|
7130
|
+
style: { width: "100%", height: "100%", backgroundColor: "var(--muted, #f3f4f6)" }
|
|
7131
|
+
})
|
|
7132
|
+
}
|
|
7133
|
+
);
|
|
7134
|
+
}
|
|
7135
|
+
var ASPECT_STYLES4 = {
|
|
7136
|
+
square: { aspectRatio: "1/1" },
|
|
7137
|
+
"4/3": { aspectRatio: "4/3" },
|
|
7138
|
+
"16/10": { aspectRatio: "16/10" },
|
|
7139
|
+
"3/4": { aspectRatio: "3/4" }
|
|
7140
|
+
};
|
|
7141
|
+
function thumbnailFor(item) {
|
|
7142
|
+
if (item.type === "image") return item.src;
|
|
7143
|
+
return item.poster ?? null;
|
|
7144
|
+
}
|
|
7145
|
+
function thumbIcon(item) {
|
|
7146
|
+
if (item.type === "video") return "\u25B6";
|
|
7147
|
+
if (item.type === "model") return "\u25C6";
|
|
7148
|
+
return null;
|
|
7149
|
+
}
|
|
7150
|
+
function MediaGallery({
|
|
7151
|
+
items,
|
|
7152
|
+
productName,
|
|
7153
|
+
aspectRatio = "4/3",
|
|
7154
|
+
className
|
|
7155
|
+
}) {
|
|
7156
|
+
const validItems = React10.useMemo(
|
|
7157
|
+
() => items.filter((i) => typeof i.src === "string" && i.src.trim().length > 0),
|
|
7158
|
+
[items]
|
|
7159
|
+
);
|
|
7160
|
+
const [selected, setSelected] = React10.useState(0);
|
|
7161
|
+
React10.useEffect(() => {
|
|
7162
|
+
setSelected(0);
|
|
7163
|
+
}, [validItems.length, productName]);
|
|
7164
|
+
if (validItems.length === 0) return null;
|
|
7165
|
+
const active = validItems[selected] ?? validItems[0];
|
|
7166
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-media-gallery": true, className, children: [
|
|
7167
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7168
|
+
"div",
|
|
7169
|
+
{
|
|
7170
|
+
"data-cimplify-media-gallery-main": true,
|
|
7171
|
+
style: { position: "relative", overflow: "hidden", ...ASPECT_STYLES4[aspectRatio] },
|
|
7172
|
+
children: active.type === "image" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
7173
|
+
"img",
|
|
7174
|
+
{
|
|
7175
|
+
src: active.src,
|
|
7176
|
+
alt: active.alt ?? productName,
|
|
7177
|
+
style: { width: "100%", height: "100%", objectFit: "cover" },
|
|
7178
|
+
"data-cimplify-media-gallery-active": true
|
|
7179
|
+
}
|
|
7180
|
+
) : active.type === "video" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
7181
|
+
StoreVideo,
|
|
7182
|
+
{
|
|
7183
|
+
src: active.src,
|
|
7184
|
+
poster: active.poster,
|
|
7185
|
+
alt: active.alt ?? productName,
|
|
7186
|
+
aspectRatio: "square",
|
|
7187
|
+
lazy: false
|
|
7188
|
+
}
|
|
7189
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
7190
|
+
ProductModel3D,
|
|
7191
|
+
{
|
|
7192
|
+
src: active.src,
|
|
7193
|
+
iosSrc: active.iosSrc,
|
|
7194
|
+
poster: active.poster,
|
|
7195
|
+
alt: active.alt ?? productName,
|
|
7196
|
+
aspectRatio: "square"
|
|
7197
|
+
}
|
|
7198
|
+
)
|
|
7199
|
+
}
|
|
7200
|
+
),
|
|
7201
|
+
validItems.length > 1 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7202
|
+
radioGroup.RadioGroup,
|
|
7203
|
+
{
|
|
7204
|
+
"aria-label": `${productName} media thumbnails`,
|
|
7205
|
+
value: String(selected),
|
|
7206
|
+
onValueChange: (v) => setSelected(Number(v)),
|
|
7207
|
+
"data-cimplify-media-gallery-thumbnails": true,
|
|
7208
|
+
style: { display: "flex", gap: "0.5rem", marginTop: "0.75rem" },
|
|
7209
|
+
children: validItems.map((item, index) => {
|
|
7210
|
+
const thumb = thumbnailFor(item);
|
|
7211
|
+
const icon = thumbIcon(item);
|
|
7212
|
+
const isSelected = selected === index;
|
|
7213
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7214
|
+
radio.Radio.Root,
|
|
7215
|
+
{
|
|
7216
|
+
value: String(index),
|
|
7217
|
+
"data-cimplify-media-gallery-thumb": true,
|
|
7218
|
+
"data-selected": isSelected || void 0,
|
|
7219
|
+
"data-type": item.type,
|
|
7220
|
+
style: {
|
|
7221
|
+
position: "relative",
|
|
7222
|
+
width: "4rem",
|
|
7223
|
+
height: "4rem",
|
|
7224
|
+
overflow: "hidden",
|
|
7225
|
+
padding: 0,
|
|
7226
|
+
border: "none",
|
|
7227
|
+
cursor: "pointer",
|
|
7228
|
+
backgroundColor: "var(--muted, #f3f4f6)"
|
|
7229
|
+
},
|
|
7230
|
+
children: [
|
|
7231
|
+
thumb ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
7232
|
+
"img",
|
|
7233
|
+
{
|
|
7234
|
+
src: thumb,
|
|
7235
|
+
alt: "",
|
|
7236
|
+
style: { width: "100%", height: "100%", objectFit: "cover" }
|
|
7237
|
+
}
|
|
7238
|
+
) : null,
|
|
7239
|
+
icon ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
7240
|
+
"span",
|
|
7241
|
+
{
|
|
7242
|
+
"aria-hidden": true,
|
|
7243
|
+
style: {
|
|
7244
|
+
position: "absolute",
|
|
7245
|
+
inset: 0,
|
|
7246
|
+
display: "flex",
|
|
7247
|
+
alignItems: "center",
|
|
7248
|
+
justifyContent: "center",
|
|
7249
|
+
color: "white",
|
|
7250
|
+
fontSize: "0.875rem",
|
|
7251
|
+
textShadow: "0 1px 2px rgba(0,0,0,0.6)",
|
|
7252
|
+
pointerEvents: "none"
|
|
7253
|
+
},
|
|
7254
|
+
children: icon
|
|
7255
|
+
}
|
|
7256
|
+
) : null
|
|
7257
|
+
]
|
|
7258
|
+
},
|
|
7259
|
+
`${item.src}-${index}`
|
|
7260
|
+
);
|
|
7261
|
+
})
|
|
7262
|
+
}
|
|
7263
|
+
)
|
|
7264
|
+
] });
|
|
7265
|
+
}
|
|
6983
7266
|
function CartLineItemRow({
|
|
6984
7267
|
item,
|
|
6985
7268
|
onRemove,
|
|
@@ -8386,7 +8669,7 @@ var CardVariant = /* @__PURE__ */ ((CardVariant2) => {
|
|
|
8386
8669
|
CardVariant2["Subscription"] = "subscription";
|
|
8387
8670
|
return CardVariant2;
|
|
8388
8671
|
})(CardVariant || {});
|
|
8389
|
-
var
|
|
8672
|
+
var ASPECT_STYLES5 = {
|
|
8390
8673
|
square: { aspectRatio: "1/1" },
|
|
8391
8674
|
"4/3": { aspectRatio: "4/3" },
|
|
8392
8675
|
"16/10": { aspectRatio: "16/10" },
|
|
@@ -8495,7 +8778,7 @@ function ProductCard({
|
|
|
8495
8778
|
{
|
|
8496
8779
|
"data-cimplify-product-card-image-container": true,
|
|
8497
8780
|
className: cn("overflow-hidden rounded-t-xl", classNames?.imageContainer),
|
|
8498
|
-
style:
|
|
8781
|
+
style: ASPECT_STYLES5[aspectRatio],
|
|
8499
8782
|
children: renderImage ? renderImage({ src: imageUrl, alt: product.name, className: classNames?.image }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
8500
8783
|
"img",
|
|
8501
8784
|
{
|
|
@@ -13689,6 +13972,7 @@ exports.FoodProductLayout = FoodProductLayout;
|
|
|
13689
13972
|
exports.InventoryBadge = InventoryBadge;
|
|
13690
13973
|
exports.LeaseServiceCard = LeaseServiceCard;
|
|
13691
13974
|
exports.LocationPicker = LocationPicker;
|
|
13975
|
+
exports.MediaGallery = MediaGallery;
|
|
13692
13976
|
exports.MetadataStringList = MetadataStringList;
|
|
13693
13977
|
exports.OrderDetailPage = OrderDetailPage;
|
|
13694
13978
|
exports.OrderHistory = OrderHistory;
|
|
@@ -13701,6 +13985,7 @@ exports.ProductCard = ProductCard;
|
|
|
13701
13985
|
exports.ProductCustomizer = ProductCustomizer;
|
|
13702
13986
|
exports.ProductGrid = ProductGrid;
|
|
13703
13987
|
exports.ProductImageGallery = ProductImageGallery;
|
|
13988
|
+
exports.ProductModel3D = ProductModel3D;
|
|
13704
13989
|
exports.ProductPage = ProductPage;
|
|
13705
13990
|
exports.ProductSheet = ProductSheet;
|
|
13706
13991
|
exports.ProductTemplate = ProductTemplate;
|
|
@@ -13725,6 +14010,7 @@ exports.SoldOutOverlay = SoldOutOverlay;
|
|
|
13725
14010
|
exports.StaffPicker = StaffPicker;
|
|
13726
14011
|
exports.StandardServiceCard = StandardServiceCard;
|
|
13727
14012
|
exports.StoreNav = StoreNav;
|
|
14013
|
+
exports.StoreVideo = StoreVideo;
|
|
13728
14014
|
exports.SubscriptionCard = SubscriptionCard;
|
|
13729
14015
|
exports.TagPills = TagPills;
|
|
13730
14016
|
exports.TimePicker = TimePicker;
|