@cimplify/sdk 0.22.5 → 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.
Files changed (34) hide show
  1. package/dist/advanced.d.mts +2 -2
  2. package/dist/advanced.d.ts +2 -2
  3. package/dist/advanced.js +21 -21
  4. package/dist/advanced.mjs +2 -2
  5. package/dist/{chunk-4Z74TIJP.mjs → chunk-E3HC2YAE.mjs} +32 -1
  6. package/dist/{chunk-Y2BD2XFJ.mjs → chunk-H34GSEGR.mjs} +2 -2
  7. package/dist/{chunk-YMXFVI3N.js → chunk-I4F4Y3D4.js} +20 -20
  8. package/dist/{chunk-KLRTWBDF.js → chunk-IYQGGFVQ.js} +39 -39
  9. package/dist/{chunk-5FK7MDHS.js → chunk-PEDLCL72.js} +34 -0
  10. package/dist/{chunk-DNN5VN64.mjs → chunk-TBZLJPM4.mjs} +1 -1
  11. package/dist/{index-uvCOGdBp.d.ts → index-CJZMsbDi.d.ts} +1 -1
  12. package/dist/index-DCoxHrmr.d.mts +70 -0
  13. package/dist/{index-v1NFqZFG.d.mts → index-DIHoZUz_.d.mts} +1 -1
  14. package/dist/index-DT0Mzy8v.d.ts +70 -0
  15. package/dist/index.d.mts +5 -5
  16. package/dist/index.d.ts +5 -5
  17. package/dist/index.js +110 -98
  18. package/dist/index.mjs +3 -3
  19. package/dist/{payment-DazihbCY.d.mts → payment-DqiwuLma.d.mts} +9 -1
  20. package/dist/{payment-DazihbCY.d.ts → payment-DqiwuLma.d.ts} +9 -1
  21. package/dist/{price-5_L8WK6Q.d.ts → price-BZlddg1A.d.ts} +1 -1
  22. package/dist/{price-BcHVTqqu.d.mts → price-DVQrpE7j.d.mts} +1 -1
  23. package/dist/react.d.mts +106 -25
  24. package/dist/react.d.ts +106 -25
  25. package/dist/react.js +1063 -240
  26. package/dist/react.mjs +990 -182
  27. package/dist/styles.css +1 -1
  28. package/dist/utils.d.mts +4 -64
  29. package/dist/utils.d.ts +4 -64
  30. package/dist/utils.js +28 -28
  31. package/dist/utils.mjs +1 -1
  32. package/package.json +1 -1
  33. package/registry/product-customizer.json +1 -1
  34. package/registry/product-page.json +1 -1
package/dist/react.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  "use client";
2
- import { getVariantDisplayName, createCimplifyClient } from './chunk-Y2BD2XFJ.mjs';
3
- export { getVariantDisplayName } from './chunk-Y2BD2XFJ.mjs';
4
- import { ELEMENT_TYPES, EVENT_TYPES } from './chunk-DNN5VN64.mjs';
5
- import { isSupportedCurrency, formatPrice, parsePrice, isOnSale, getDiscountPercentage, getBasePrice } from './chunk-4Z74TIJP.mjs';
2
+ import { getVariantDisplayName, createCimplifyClient } from './chunk-H34GSEGR.mjs';
3
+ export { getVariantDisplayName } from './chunk-H34GSEGR.mjs';
4
+ import { ELEMENT_TYPES, EVENT_TYPES } from './chunk-TBZLJPM4.mjs';
5
+ import { isSupportedCurrency, formatPrice, parsePrice, getUnitPriceAtQuantity, isOnSale, getDiscountPercentage, getBasePrice, getPriceRange, formatPriceRange } from './chunk-E3HC2YAE.mjs';
6
6
  import React3, { createContext, useRef, useState, useCallback, useEffect, useContext, useMemo, useSyncExternalStore, useId } from 'react';
7
7
  import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
8
8
  import { NumberField } from '@base-ui/react/number-field';
@@ -4486,6 +4486,195 @@ function CompositeSelector({
4486
4486
  )
4487
4487
  ] });
4488
4488
  }
4489
+ var FREQUENCY_LABELS = {
4490
+ weekly: "Weekly",
4491
+ monthly: "Monthly",
4492
+ quarterly: "Quarterly",
4493
+ annually: "Annually"
4494
+ };
4495
+ function formatMarkup(plan) {
4496
+ if (!plan.markup_type || plan.markup_amount == null) return null;
4497
+ if (plan.markup_type === "percentage") return `+${plan.markup_amount}%`;
4498
+ return null;
4499
+ }
4500
+ function BillingPlanSelector({
4501
+ productId,
4502
+ plans: plansProp,
4503
+ onPlanSelect,
4504
+ selectedPlanId,
4505
+ showOneTimePurchase = false,
4506
+ oneTimePurchaseLabel = "One-time purchase",
4507
+ renderPlan,
4508
+ className,
4509
+ classNames
4510
+ }) {
4511
+ const { plans: fetched, isLoading } = useBillingPlans(productId, {
4512
+ enabled: plansProp === void 0
4513
+ });
4514
+ const plans = plansProp ?? fetched;
4515
+ if (isLoading && plans.length === 0) {
4516
+ return /* @__PURE__ */ jsx(
4517
+ "div",
4518
+ {
4519
+ "data-cimplify-billing-plan-selector": true,
4520
+ "aria-busy": "true",
4521
+ className: cn(className, classNames?.root, classNames?.loading)
4522
+ }
4523
+ );
4524
+ }
4525
+ if (plans.length === 0 && !showOneTimePurchase) {
4526
+ return null;
4527
+ }
4528
+ const isOneTimePurchaseSelected = selectedPlanId === null;
4529
+ return /* @__PURE__ */ jsxs("div", { "data-cimplify-billing-plan-selector": true, className: cn(className, classNames?.root), children: [
4530
+ showOneTimePurchase && /* @__PURE__ */ jsx(
4531
+ "button",
4532
+ {
4533
+ type: "button",
4534
+ onClick: () => onPlanSelect?.(null),
4535
+ "data-cimplify-billing-plan": true,
4536
+ "data-plan-type": "one-time",
4537
+ "data-active": isOneTimePurchaseSelected || void 0,
4538
+ "aria-pressed": isOneTimePurchaseSelected,
4539
+ className: cn(
4540
+ classNames?.plan,
4541
+ isOneTimePurchaseSelected && classNames?.activePlan
4542
+ ),
4543
+ children: /* @__PURE__ */ jsx("span", { "data-cimplify-billing-frequency": true, className: classNames?.frequency, children: oneTimePurchaseLabel })
4544
+ }
4545
+ ),
4546
+ plans.map((plan) => {
4547
+ const isActive = selectedPlanId === plan.id;
4548
+ const markup = formatMarkup(plan);
4549
+ return /* @__PURE__ */ jsx(
4550
+ "button",
4551
+ {
4552
+ type: "button",
4553
+ onClick: () => onPlanSelect?.(plan),
4554
+ "data-cimplify-billing-plan": true,
4555
+ "data-plan-type": plan.plan_type,
4556
+ "data-active": isActive || void 0,
4557
+ "aria-pressed": isActive,
4558
+ className: cn(classNames?.plan, isActive && classNames?.activePlan),
4559
+ children: renderPlan ? renderPlan(plan, isActive) : /* @__PURE__ */ jsxs(Fragment, { children: [
4560
+ /* @__PURE__ */ jsx("span", { "data-cimplify-billing-frequency": true, className: classNames?.frequency, children: FREQUENCY_LABELS[plan.frequency] }),
4561
+ markup && /* @__PURE__ */ jsx("span", { "data-cimplify-billing-markup": true, className: classNames?.price, children: markup }),
4562
+ plan.markup_type === "fixed" && plan.markup_amount != null && /* @__PURE__ */ jsxs("span", { "data-cimplify-billing-markup": true, className: classNames?.price, children: [
4563
+ "+",
4564
+ /* @__PURE__ */ jsx(Price, { amount: plan.markup_amount })
4565
+ ] }),
4566
+ plan.trial_days > 0 && /* @__PURE__ */ jsxs("span", { "data-cimplify-billing-trial": true, className: classNames?.trialBadge, children: [
4567
+ plan.trial_days,
4568
+ "-day trial"
4569
+ ] }),
4570
+ plan.setup_fee > 0 && /* @__PURE__ */ jsxs("span", { "data-cimplify-billing-setup-fee": true, className: classNames?.setupFee, children: [
4571
+ "Setup fee: ",
4572
+ /* @__PURE__ */ jsx(Price, { amount: plan.setup_fee })
4573
+ ] }),
4574
+ plan.plan_type === "installment" && plan.installment_periods != null && /* @__PURE__ */ jsxs("span", { "data-cimplify-billing-periods": true, children: [
4575
+ plan.installment_periods,
4576
+ " payments"
4577
+ ] })
4578
+ ] })
4579
+ },
4580
+ plan.id
4581
+ );
4582
+ })
4583
+ ] });
4584
+ }
4585
+ function formatRange(tier) {
4586
+ if (tier.max_quantity != null) {
4587
+ return `${tier.min_quantity}\u2013${tier.max_quantity} units`;
4588
+ }
4589
+ return `${tier.min_quantity}+ units`;
4590
+ }
4591
+ function isActiveTier(tier, quantity) {
4592
+ if (quantity < tier.min_quantity) return false;
4593
+ if (tier.max_quantity != null && quantity > tier.max_quantity) return false;
4594
+ return true;
4595
+ }
4596
+ function VolumePricing({
4597
+ tiers,
4598
+ currentQuantity,
4599
+ defaultOpen = false,
4600
+ className,
4601
+ classNames
4602
+ }) {
4603
+ if (tiers.length < 2) return null;
4604
+ const sorted = [...tiers].sort((a, b) => a.min_quantity - b.min_quantity);
4605
+ return /* @__PURE__ */ jsxs(
4606
+ "details",
4607
+ {
4608
+ open: defaultOpen || void 0,
4609
+ "data-cimplify-volume-pricing": true,
4610
+ className: cn("border border-border", className, classNames?.root),
4611
+ children: [
4612
+ /* @__PURE__ */ jsxs(
4613
+ "summary",
4614
+ {
4615
+ "data-cimplify-volume-pricing-trigger": true,
4616
+ className: cn(
4617
+ "flex items-center justify-between px-4 py-3 cursor-pointer select-none text-sm font-medium list-none [&::-webkit-details-marker]:hidden",
4618
+ classNames?.trigger
4619
+ ),
4620
+ children: [
4621
+ "Volume pricing",
4622
+ /* @__PURE__ */ jsx(
4623
+ "svg",
4624
+ {
4625
+ viewBox: "0 0 12 12",
4626
+ fill: "none",
4627
+ "aria-hidden": "true",
4628
+ className: cn(
4629
+ "w-3.5 h-3.5 text-muted-foreground transition-transform [[open]>&]:rotate-180",
4630
+ classNames?.triggerIcon
4631
+ ),
4632
+ children: /* @__PURE__ */ jsx("path", { d: "M2 4.5l4 4 4-4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
4633
+ }
4634
+ )
4635
+ ]
4636
+ }
4637
+ ),
4638
+ /* @__PURE__ */ jsx(
4639
+ "div",
4640
+ {
4641
+ "data-cimplify-volume-pricing-panel": true,
4642
+ className: cn("border-t border-border divide-y divide-border", classNames?.panel),
4643
+ children: sorted.map((tier, i) => {
4644
+ const active = currentQuantity != null && isActiveTier(tier, currentQuantity);
4645
+ return /* @__PURE__ */ jsxs(
4646
+ "div",
4647
+ {
4648
+ "data-cimplify-volume-pricing-tier": true,
4649
+ "data-active": active || void 0,
4650
+ className: cn(
4651
+ "flex items-center justify-between px-4 py-2.5 text-sm",
4652
+ active ? cn("bg-primary/5 font-medium", classNames?.tierActive) : classNames?.tier
4653
+ ),
4654
+ children: [
4655
+ /* @__PURE__ */ jsx(
4656
+ "span",
4657
+ {
4658
+ "data-cimplify-volume-pricing-range": true,
4659
+ className: cn("text-muted-foreground", classNames?.tierRange),
4660
+ children: formatRange(tier)
4661
+ }
4662
+ ),
4663
+ /* @__PURE__ */ jsxs("span", { "data-cimplify-volume-pricing-price": true, className: classNames?.tierPrice, children: [
4664
+ /* @__PURE__ */ jsx(Price, { amount: tier.unit_price, prefix: "" }),
4665
+ " /ea"
4666
+ ] })
4667
+ ]
4668
+ },
4669
+ i
4670
+ );
4671
+ })
4672
+ }
4673
+ )
4674
+ ]
4675
+ }
4676
+ );
4677
+ }
4489
4678
  function ProductCustomizer({
4490
4679
  product,
4491
4680
  onAddToCart,
@@ -4493,7 +4682,7 @@ function ProductCustomizer({
4493
4682
  className,
4494
4683
  classNames
4495
4684
  }) {
4496
- const [quantity, setQuantity] = useState(1);
4685
+ const [quantity, setQuantity] = useState(product.min_order_quantity ?? 1);
4497
4686
  const [isAdded, setIsAdded] = useState(false);
4498
4687
  const [isSubmitting, setIsSubmitting] = useState(false);
4499
4688
  const [selectedVariantId, setSelectedVariantId] = useState();
@@ -4505,6 +4694,7 @@ function ProductCustomizer({
4505
4694
  const [bundleSelections, setBundleSelections] = useState([]);
4506
4695
  const [bundleTotalPrice, setBundleTotalPrice] = useState(null);
4507
4696
  const [bundleReady, setBundleReady] = useState(false);
4697
+ const [selectedBillingPlan, setSelectedBillingPlan] = useState(null);
4508
4698
  const [specialInstructions, setSpecialInstructions] = useState("");
4509
4699
  const cart = useCart();
4510
4700
  const productType = product.type || "product";
@@ -4516,7 +4706,7 @@ function ProductCustomizer({
4516
4706
  const hasVariants = isStandard && product.variants && product.variants.length > 0;
4517
4707
  const hasAddOns = isStandard && product.add_ons && product.add_ons.length > 0;
4518
4708
  useEffect(() => {
4519
- setQuantity(1);
4709
+ setQuantity(product.min_order_quantity ?? 1);
4520
4710
  setIsAdded(false);
4521
4711
  setIsSubmitting(false);
4522
4712
  setSelectedVariantId(void 0);
@@ -4528,8 +4718,9 @@ function ProductCustomizer({
4528
4718
  setBundleSelections([]);
4529
4719
  setBundleTotalPrice(null);
4530
4720
  setBundleReady(false);
4721
+ setSelectedBillingPlan(null);
4531
4722
  setSpecialInstructions("");
4532
- }, [product.id]);
4723
+ }, [product.id, product.min_order_quantity]);
4533
4724
  const selectedAddOnOptions = useMemo(() => {
4534
4725
  if (!product.add_ons) return [];
4535
4726
  const options = [];
@@ -4626,6 +4817,7 @@ function ProductCustomizer({
4626
4817
  })) : void 0,
4627
4818
  compositeSelections: isComposite && compositeSelections.length > 0 ? compositeSelections : void 0,
4628
4819
  bundleSelections: isBundle && bundleSelections.length > 0 ? bundleSelections : void 0,
4820
+ billingPlanId: selectedBillingPlan?.id,
4629
4821
  specialInstructions: specialInstructions.trim() || void 0
4630
4822
  };
4631
4823
  try {
@@ -4687,6 +4879,23 @@ function ProductCustomizer({
4687
4879
  onOptionsChange: setSelectedAddOnOptionIds
4688
4880
  }
4689
4881
  ),
4882
+ product.billing_plans && product.billing_plans.length > 0 && /* @__PURE__ */ jsx(
4883
+ BillingPlanSelector,
4884
+ {
4885
+ productId: product.id,
4886
+ plans: product.billing_plans,
4887
+ onPlanSelect: setSelectedBillingPlan,
4888
+ selectedPlanId: selectedBillingPlan?.id ?? null,
4889
+ showOneTimePurchase: true
4890
+ }
4891
+ ),
4892
+ product.quantity_pricing && product.quantity_pricing.length > 1 && /* @__PURE__ */ jsx(
4893
+ VolumePricing,
4894
+ {
4895
+ tiers: product.quantity_pricing,
4896
+ currentQuantity: quantity
4897
+ }
4898
+ ),
4690
4899
  product.deposit_type && product.deposit_type !== "none" && product.deposit_amount && /* @__PURE__ */ jsx("div", { "data-cimplify-customizer-deposit": true, className: cn("text-sm text-muted-foreground", classNames?.depositInfo), children: product.deposit_type === "fixed" ? /* @__PURE__ */ jsxs("span", { children: [
4691
4900
  "Deposit required: ",
4692
4901
  /* @__PURE__ */ jsx(Price, { amount: product.deposit_amount })
@@ -4740,14 +4949,24 @@ function ProductCustomizer({
4740
4949
  }
4741
4950
  ),
4742
4951
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4", children: [
4743
- /* @__PURE__ */ jsx(
4744
- QuantitySelector,
4745
- {
4746
- value: quantity,
4747
- onChange: setQuantity,
4748
- min: 1
4749
- }
4750
- ),
4952
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", children: [
4953
+ /* @__PURE__ */ jsx(
4954
+ QuantitySelector,
4955
+ {
4956
+ value: quantity,
4957
+ onChange: setQuantity,
4958
+ min: product.min_order_quantity ?? 1
4959
+ }
4960
+ ),
4961
+ product.min_order_quantity && product.min_order_quantity > 1 && /* @__PURE__ */ jsxs("span", { "data-cimplify-customizer-min-hint": true, className: "text-xs text-muted-foreground text-center", children: [
4962
+ "Min. ",
4963
+ product.min_order_quantity
4964
+ ] })
4965
+ ] }),
4966
+ product.quantity_pricing && product.quantity_pricing.length > 0 && /* @__PURE__ */ jsxs("div", { "data-cimplify-customizer-unit-price": true, className: "text-sm text-muted-foreground text-right shrink-0", children: [
4967
+ /* @__PURE__ */ jsx(Price, { amount: getUnitPriceAtQuantity(product.quantity_pricing, quantity, parsePrice(product.default_price)), className: "font-medium text-foreground" }),
4968
+ " ea."
4969
+ ] }),
4751
4970
  /* @__PURE__ */ jsx(
4752
4971
  Button,
4753
4972
  {
@@ -7263,84 +7482,769 @@ function useDebounce(value, delay) {
7263
7482
  }, [value, delay]);
7264
7483
  return debounced;
7265
7484
  }
7266
- function ProductPage({
7267
- productId,
7268
- product: productProp,
7269
- relatedProducts,
7270
- onAddToCart,
7271
- renderImage,
7272
- showAvailability = true,
7273
- showSaleBadge = true,
7274
- showRelated = true,
7275
- relatedTitle = "You might also like",
7276
- className,
7277
- classNames
7485
+ function TwoColumnGrid({
7486
+ left,
7487
+ right,
7488
+ className
7278
7489
  }) {
7279
- const { product: fetched, isLoading } = useProduct(productId, {
7280
- enabled: !productProp
7281
- });
7282
- const product = productProp ?? fetched;
7283
- if (isLoading && !product) {
7284
- return /* @__PURE__ */ jsx(
7285
- "div",
7490
+ return /* @__PURE__ */ jsxs(
7491
+ "div",
7492
+ {
7493
+ "data-cimplify-product-layout-grid": true,
7494
+ className: cn("grid lg:grid-cols-2 gap-8 lg:gap-12", className),
7495
+ children: [
7496
+ /* @__PURE__ */ jsx("div", { "data-cimplify-product-layout-media": true, children: left }),
7497
+ /* @__PURE__ */ jsx("div", { "data-cimplify-product-layout-info": true, children: right })
7498
+ ]
7499
+ }
7500
+ );
7501
+ }
7502
+ function MetadataStringList({
7503
+ items,
7504
+ label,
7505
+ icon,
7506
+ className
7507
+ }) {
7508
+ if (items.length === 0) return null;
7509
+ return /* @__PURE__ */ jsxs("div", { "data-cimplify-metadata-list": true, className: cn("space-y-2", className), children: [
7510
+ /* @__PURE__ */ jsxs("h3", { className: "flex items-center gap-2 text-sm font-medium", children: [
7511
+ icon,
7512
+ label
7513
+ ] }),
7514
+ /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1.5", children: items.map((item, i) => /* @__PURE__ */ jsx(
7515
+ "span",
7286
7516
  {
7287
- "data-cimplify-product-page": true,
7288
- "aria-busy": "true",
7289
- className: cn(className, classNames?.root, classNames?.loading),
7290
- children: /* @__PURE__ */ jsxs("div", { "data-cimplify-product-page-skeleton": true, style: { display: "flex", flexDirection: "column", gap: "1rem" }, children: [
7291
- /* @__PURE__ */ jsx("div", { style: { aspectRatio: "4/3", backgroundColor: "rgba(0,0,0,0.06)", borderRadius: "0.5rem" } }),
7292
- /* @__PURE__ */ jsx("div", { style: { height: "2rem", width: "60%", backgroundColor: "rgba(0,0,0,0.06)", borderRadius: "0.25rem" } }),
7293
- /* @__PURE__ */ jsx("div", { style: { height: "1rem", width: "30%", backgroundColor: "rgba(0,0,0,0.06)", borderRadius: "0.25rem" } })
7294
- ] })
7295
- }
7296
- );
7297
- }
7298
- if (!product) {
7299
- return /* @__PURE__ */ jsx("div", { "data-cimplify-product-page": true, className: cn(className, classNames?.root), children: /* @__PURE__ */ jsx("p", { children: "Product not found." }) });
7300
- }
7301
- return /* @__PURE__ */ jsxs("div", { "data-cimplify-product-page": true, className: cn(className, classNames?.root), children: [
7302
- (showAvailability || showSaleBadge) && /* @__PURE__ */ jsxs("div", { "data-cimplify-product-page-badges": true, className: classNames?.badges, children: [
7303
- showAvailability && /* @__PURE__ */ jsx(AvailabilityBadge, { product }),
7304
- showSaleBadge && /* @__PURE__ */ jsx(SaleBadge, { product })
7517
+ className: "text-xs text-muted-foreground px-2.5 py-1 bg-muted",
7518
+ children: item
7519
+ },
7520
+ `${item}-${i}`
7521
+ )) })
7522
+ ] });
7523
+ }
7524
+ function CustomAttributesTable({
7525
+ attributes,
7526
+ className
7527
+ }) {
7528
+ if (!attributes || attributes.length === 0) return null;
7529
+ const groups = /* @__PURE__ */ new Map();
7530
+ for (const attr of attributes) {
7531
+ const group = attr.group_name || "Details";
7532
+ if (!groups.has(group)) groups.set(group, []);
7533
+ groups.get(group).push(attr);
7534
+ }
7535
+ return /* @__PURE__ */ jsx("div", { "data-cimplify-custom-attributes": true, className: cn("space-y-4", className), children: Array.from(groups.entries()).map(([groupName, attrs]) => /* @__PURE__ */ jsxs("div", { children: [
7536
+ /* @__PURE__ */ jsx("h3", { "data-cimplify-attribute-group": true, className: "text-sm font-semibold mb-2", children: groupName }),
7537
+ /* @__PURE__ */ jsx("div", { className: "border border-border divide-y divide-border", children: attrs.map((attr) => /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-4 py-2.5 text-sm", children: [
7538
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: attr.name }),
7539
+ /* @__PURE__ */ jsx("span", { className: "font-medium", children: formatAttributeValue(attr) })
7540
+ ] }, attr.definition_id)) })
7541
+ ] }, groupName)) });
7542
+ }
7543
+ function formatAttributeValue(attr) {
7544
+ if (attr.value === null || attr.value === void 0) return "\u2014";
7545
+ if (typeof attr.value === "boolean") return attr.value ? "Yes" : "No";
7546
+ if (Array.isArray(attr.value)) return attr.value.join(", ");
7547
+ if (typeof attr.value === "object" && "value" in attr.value) {
7548
+ return `${attr.value.value}${attr.unit ? ` ${attr.unit}` : ""}`;
7549
+ }
7550
+ const str = String(attr.value);
7551
+ return attr.unit ? `${str} ${attr.unit}` : str;
7552
+ }
7553
+ function PropertiesTable({
7554
+ properties,
7555
+ className
7556
+ }) {
7557
+ if (!properties || properties.length === 0) return null;
7558
+ return /* @__PURE__ */ jsx("div", { "data-cimplify-properties": true, className, children: /* @__PURE__ */ jsx("div", { className: "border border-border divide-y divide-border", children: properties.map((prop) => /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-4 py-2.5 text-sm", children: [
7559
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: prop.name }),
7560
+ /* @__PURE__ */ jsxs("span", { className: "font-medium", children: [
7561
+ prop.values.filter(Boolean).join(", "),
7562
+ prop.unit ? ` ${prop.unit}` : ""
7563
+ ] })
7564
+ ] }, prop.slug)) }) });
7565
+ }
7566
+ function TagPills({
7567
+ tags,
7568
+ className
7569
+ }) {
7570
+ if (!tags || tags.length === 0) return null;
7571
+ return /* @__PURE__ */ jsx("div", { "data-cimplify-tags": true, className: cn("flex flex-wrap gap-1.5", className), children: tags.map((tag) => /* @__PURE__ */ jsx(
7572
+ "span",
7573
+ {
7574
+ className: "text-xs font-medium text-muted-foreground px-2.5 py-1 bg-muted rounded-full",
7575
+ children: tag
7576
+ },
7577
+ tag
7578
+ )) });
7579
+ }
7580
+ function InventoryBadge({
7581
+ product,
7582
+ className
7583
+ }) {
7584
+ const status = product.inventory_status;
7585
+ if (!status) return null;
7586
+ return /* @__PURE__ */ jsxs("div", { "data-cimplify-inventory-badge": true, className: cn("flex items-center gap-2 text-sm", className), children: [
7587
+ /* @__PURE__ */ jsx("span", { className: cn(
7588
+ "w-2 h-2 rounded-full",
7589
+ status.in_stock ? "bg-green-500" : "bg-red-500"
7590
+ ) }),
7591
+ /* @__PURE__ */ jsx("span", { className: status.in_stock ? "text-green-700 font-medium" : "text-red-700 font-medium", children: status.in_stock ? "In stock" : "Out of stock" }),
7592
+ status.in_stock && status.stock_level != null && /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground", children: [
7593
+ "\xB7 ",
7594
+ status.stock_level.toLocaleString(),
7595
+ " available"
7305
7596
  ] }),
7306
- /* @__PURE__ */ jsx("div", { "data-cimplify-product-page-main": true, className: classNames?.main, children: /* @__PURE__ */ jsx(
7307
- ProductSheet,
7597
+ status.low_stock && /* @__PURE__ */ jsx("span", { className: "text-amber-600 font-medium", children: "\xB7 Low stock" })
7598
+ ] });
7599
+ }
7600
+ function RelatedProductsSection({
7601
+ products,
7602
+ title = "You might also like",
7603
+ renderImage,
7604
+ className
7605
+ }) {
7606
+ if (products.length === 0) return null;
7607
+ return /* @__PURE__ */ jsxs("div", { "data-cimplify-product-layout-related": true, className: cn("mt-12 pt-8 border-t border-border", className), children: [
7608
+ /* @__PURE__ */ jsx(
7609
+ "h2",
7308
7610
  {
7309
- product,
7310
- onAddToCart,
7311
- renderImage
7611
+ "data-cimplify-product-layout-related-title": true,
7612
+ className: "text-xl font-semibold mb-6",
7613
+ children: title
7312
7614
  }
7313
- ) }),
7314
- showRelated && relatedProducts && relatedProducts.length > 0 && /* @__PURE__ */ jsxs("div", { "data-cimplify-product-page-related": true, className: classNames?.relatedSection, children: [
7315
- /* @__PURE__ */ jsx("h2", { "data-cimplify-product-page-related-title": true, className: classNames?.relatedTitle, children: relatedTitle }),
7316
- /* @__PURE__ */ jsx(
7317
- ProductGrid,
7318
- {
7319
- products: relatedProducts,
7320
- renderImage
7321
- }
7322
- )
7323
- ] })
7615
+ ),
7616
+ /* @__PURE__ */ jsx(ProductGrid, { products, renderImage })
7324
7617
  ] });
7325
7618
  }
7326
- function CartPage({
7327
- title = "Your Cart",
7328
- onCheckout,
7329
- onContinueShopping,
7330
- onDiscountApply,
7331
- onDiscountClear,
7332
- showDiscount = true,
7333
- showContinueShopping = true,
7334
- checkoutLabel = "Proceed to Checkout",
7335
- className,
7336
- classNames
7619
+ function getMetadataStringList(metadata, key) {
7620
+ const value = metadata?.[key];
7621
+ if (!Array.isArray(value)) return [];
7622
+ return value.filter((item) => typeof item === "string");
7623
+ }
7624
+ function PriceRange({ product, className }) {
7625
+ const { displayCurrency } = useCimplify();
7626
+ const range = getPriceRange(product);
7627
+ if (!range) return null;
7628
+ return /* @__PURE__ */ jsx("span", { "data-cimplify-price-range": true, className, children: formatPriceRange(range.min, range.max, displayCurrency) });
7629
+ }
7630
+ function DefaultProductLayout({
7631
+ product,
7632
+ onAddToCart,
7633
+ renderBreadcrumb,
7634
+ relatedProducts,
7635
+ showRelated = true,
7636
+ className
7337
7637
  }) {
7338
- const { isEmpty, subtotal } = useCart();
7339
- return /* @__PURE__ */ jsxs("div", { "data-cimplify-cart-page": true, className: cn(className, classNames?.root), children: [
7340
- /* @__PURE__ */ jsxs("div", { "data-cimplify-cart-page-header": true, className: classNames?.header, children: [
7341
- /* @__PURE__ */ jsx("h1", { "data-cimplify-cart-page-title": true, className: classNames?.title, children: title }),
7342
- showContinueShopping && /* @__PURE__ */ jsx(
7343
- "button",
7638
+ const images = product.images || (product.image_url ? [product.image_url] : []);
7639
+ const hasRange = product.quantity_pricing && product.quantity_pricing.length > 1 || product.variants && product.variants.length > 1;
7640
+ const onSale = isOnSale(product);
7641
+ const hasPhysicalDetails = product.sku || product.vendor || product.material;
7642
+ return /* @__PURE__ */ jsxs("div", { "data-cimplify-product-layout": "default", className: cn("space-y-8", className), children: [
7643
+ renderBreadcrumb?.(product),
7644
+ /* @__PURE__ */ jsx(
7645
+ TwoColumnGrid,
7646
+ {
7647
+ left: /* @__PURE__ */ jsx(
7648
+ ProductImageGallery,
7649
+ {
7650
+ images,
7651
+ productName: product.name
7652
+ }
7653
+ ),
7654
+ right: /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
7655
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
7656
+ product.vendor && /* @__PURE__ */ jsx("span", { className: "text-xs font-semibold text-muted-foreground uppercase tracking-widest", children: product.vendor }),
7657
+ /* @__PURE__ */ jsx(TagPills, { tags: product.tags || [] })
7658
+ ] }),
7659
+ /* @__PURE__ */ jsx("h1", { "data-cimplify-product-layout-name": true, className: "text-3xl lg:text-4xl font-extrabold tracking-tight", children: product.name }),
7660
+ /* @__PURE__ */ jsx("div", { className: "flex items-baseline gap-3", children: hasRange ? /* @__PURE__ */ jsx(PriceRange, { product, className: "text-2xl font-extrabold" }) : onSale ? /* @__PURE__ */ jsxs(Fragment, { children: [
7661
+ /* @__PURE__ */ jsx(Price, { amount: product.default_price, className: "text-2xl font-extrabold" }),
7662
+ /* @__PURE__ */ jsx(Price, { amount: getBasePrice(product), className: "text-lg text-muted-foreground line-through" }),
7663
+ /* @__PURE__ */ jsxs("span", { className: "text-sm font-bold text-destructive bg-destructive/10 px-2 py-0.5", children: [
7664
+ "Save ",
7665
+ getDiscountPercentage(product),
7666
+ "%"
7667
+ ] })
7668
+ ] }) : /* @__PURE__ */ jsx(Price, { amount: product.default_price, className: "text-2xl font-semibold" }) }),
7669
+ /* @__PURE__ */ jsx(InventoryBadge, { product }),
7670
+ product.description && /* @__PURE__ */ jsx("p", { "data-cimplify-product-layout-description": true, className: "text-muted-foreground leading-relaxed", children: product.description }),
7671
+ hasPhysicalDetails && /* @__PURE__ */ jsxs("div", { "data-cimplify-product-layout-details": true, className: "space-y-1 text-sm text-muted-foreground", children: [
7672
+ product.sku && /* @__PURE__ */ jsxs("p", { children: [
7673
+ "SKU: ",
7674
+ /* @__PURE__ */ jsx("span", { className: "font-mono text-foreground", children: product.sku })
7675
+ ] }),
7676
+ product.barcode && /* @__PURE__ */ jsxs("p", { children: [
7677
+ "Barcode: ",
7678
+ /* @__PURE__ */ jsx("span", { className: "font-mono text-foreground", children: product.barcode })
7679
+ ] }),
7680
+ product.material && /* @__PURE__ */ jsxs("p", { children: [
7681
+ "Material: ",
7682
+ /* @__PURE__ */ jsx("span", { className: "text-foreground", children: product.material })
7683
+ ] }),
7684
+ product.vendor && /* @__PURE__ */ jsxs("p", { children: [
7685
+ "Brand: ",
7686
+ /* @__PURE__ */ jsx("span", { className: "text-foreground", children: product.vendor })
7687
+ ] }),
7688
+ (product.length_mm || product.width_mm || product.height_mm) && /* @__PURE__ */ jsxs("p", { children: [
7689
+ "Dimensions: ",
7690
+ /* @__PURE__ */ jsx("span", { className: "text-foreground", children: [product.length_mm, product.width_mm, product.height_mm].filter(Boolean).map((d) => `${(d / 10).toFixed(1)} cm`).join(" x ") })
7691
+ ] }),
7692
+ product.item_condition && product.item_condition !== "new" && /* @__PURE__ */ jsxs("p", { children: [
7693
+ "Condition: ",
7694
+ /* @__PURE__ */ jsx("span", { className: "text-foreground capitalize", children: product.item_condition })
7695
+ ] })
7696
+ ] }),
7697
+ /* @__PURE__ */ jsx(CustomAttributesTable, { attributes: product.custom_attributes || [] }),
7698
+ /* @__PURE__ */ jsx(PropertiesTable, { properties: product.properties || [] }),
7699
+ /* @__PURE__ */ jsx(
7700
+ ProductCustomizer,
7701
+ {
7702
+ product,
7703
+ onAddToCart
7704
+ }
7705
+ )
7706
+ ] })
7707
+ }
7708
+ ),
7709
+ showRelated && relatedProducts && relatedProducts.length > 0 && /* @__PURE__ */ jsx(
7710
+ RelatedProductsSection,
7711
+ {
7712
+ products: relatedProducts
7713
+ }
7714
+ )
7715
+ ] });
7716
+ }
7717
+ var DIETARY_TAGS = /* @__PURE__ */ new Set([
7718
+ "vegetarian",
7719
+ "vegan",
7720
+ "gluten-free",
7721
+ "dairy-free",
7722
+ "nut-free",
7723
+ "spicy",
7724
+ "halal",
7725
+ "kosher",
7726
+ "organic",
7727
+ "sugar-free"
7728
+ ]);
7729
+ function FoodProductLayout({
7730
+ product,
7731
+ onAddToCart,
7732
+ renderBreadcrumb,
7733
+ relatedProducts,
7734
+ showRelated = true,
7735
+ className
7736
+ }) {
7737
+ const images = product.images || (product.image_url ? [product.image_url] : []);
7738
+ const allTags = product.tags || [];
7739
+ const dietaryTags = allTags.filter((t) => DIETARY_TAGS.has(t));
7740
+ const otherTags = allTags.filter((t) => !DIETARY_TAGS.has(t));
7741
+ const ingredients = getMetadataStringList(product.metadata, "ingredients");
7742
+ const pairings = getMetadataStringList(product.metadata, "pairings");
7743
+ return /* @__PURE__ */ jsxs("div", { "data-cimplify-product-layout": "food", className: cn("space-y-8", className), children: [
7744
+ renderBreadcrumb?.(product),
7745
+ /* @__PURE__ */ jsx(
7746
+ TwoColumnGrid,
7747
+ {
7748
+ left: /* @__PURE__ */ jsx(
7749
+ ProductImageGallery,
7750
+ {
7751
+ images,
7752
+ productName: product.name
7753
+ }
7754
+ ),
7755
+ right: /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
7756
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-1.5", children: [
7757
+ dietaryTags.map((tag) => /* @__PURE__ */ jsx("span", { className: "inline-flex items-center gap-1 px-2.5 py-1 bg-green-100 text-green-800 text-xs font-medium rounded-full", children: tag }, tag)),
7758
+ product.allergies && product.allergies.map((allergy) => /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1 px-2.5 py-1 bg-amber-100 text-amber-800 text-xs font-medium rounded-full", children: [
7759
+ "Contains ",
7760
+ allergy
7761
+ ] }, allergy))
7762
+ ] }),
7763
+ /* @__PURE__ */ jsx(TagPills, { tags: otherTags }),
7764
+ /* @__PURE__ */ jsxs("div", { children: [
7765
+ /* @__PURE__ */ jsx("h1", { "data-cimplify-product-layout-name": true, className: "text-3xl lg:text-4xl font-bold tracking-tight", children: product.name }),
7766
+ /* @__PURE__ */ jsx(Price, { amount: product.default_price, className: "text-2xl font-semibold mt-2 block" })
7767
+ ] }),
7768
+ (product.calories != null || product.preparation_time_minutes != null) && /* @__PURE__ */ jsxs("div", { "data-cimplify-product-layout-stats": true, className: "flex flex-wrap gap-4 py-3 border-y border-border", children: [
7769
+ product.preparation_time_minutes != null && /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1.5 text-sm text-muted-foreground", children: [
7770
+ /* @__PURE__ */ jsxs("strong", { className: "text-foreground", children: [
7771
+ product.preparation_time_minutes,
7772
+ " min"
7773
+ ] }),
7774
+ " prep time"
7775
+ ] }),
7776
+ product.calories != null && /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1.5 text-sm text-muted-foreground", children: [
7777
+ /* @__PURE__ */ jsx("strong", { className: "text-foreground", children: product.calories }),
7778
+ " calories"
7779
+ ] })
7780
+ ] }),
7781
+ product.description && /* @__PURE__ */ jsx("p", { "data-cimplify-product-layout-description": true, className: "text-muted-foreground leading-relaxed", children: product.description }),
7782
+ (ingredients.length > 0 || pairings.length > 0) && /* @__PURE__ */ jsxs("div", { className: "grid sm:grid-cols-2 gap-4", children: [
7783
+ /* @__PURE__ */ jsx(MetadataStringList, { items: ingredients, label: "Key Ingredients" }),
7784
+ /* @__PURE__ */ jsx(MetadataStringList, { items: pairings, label: "Pairings" })
7785
+ ] }),
7786
+ /* @__PURE__ */ jsx(CustomAttributesTable, { attributes: product.custom_attributes || [] }),
7787
+ /* @__PURE__ */ jsx(
7788
+ ProductCustomizer,
7789
+ {
7790
+ product,
7791
+ onAddToCart
7792
+ }
7793
+ )
7794
+ ] })
7795
+ }
7796
+ ),
7797
+ showRelated && relatedProducts && relatedProducts.length > 0 && /* @__PURE__ */ jsx(
7798
+ RelatedProductsSection,
7799
+ {
7800
+ products: relatedProducts,
7801
+ title: "You may also enjoy"
7802
+ }
7803
+ )
7804
+ ] });
7805
+ }
7806
+ function WholesaleProductLayout({
7807
+ product,
7808
+ onAddToCart,
7809
+ renderBreadcrumb,
7810
+ relatedProducts,
7811
+ showRelated = true,
7812
+ className
7813
+ }) {
7814
+ const images = product.images || (product.image_url ? [product.image_url] : []);
7815
+ const hasTiers = product.quantity_pricing && product.quantity_pricing.length > 1;
7816
+ return /* @__PURE__ */ jsxs("div", { "data-cimplify-product-layout": "wholesale", className: cn("space-y-8", className), children: [
7817
+ renderBreadcrumb?.(product),
7818
+ /* @__PURE__ */ jsx(
7819
+ TwoColumnGrid,
7820
+ {
7821
+ left: /* @__PURE__ */ jsx(
7822
+ ProductImageGallery,
7823
+ {
7824
+ images,
7825
+ productName: product.name
7826
+ }
7827
+ ),
7828
+ right: /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
7829
+ /* @__PURE__ */ jsx(TagPills, { tags: product.tags || [] }),
7830
+ /* @__PURE__ */ jsxs("div", { children: [
7831
+ product.sku && /* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground font-medium uppercase tracking-wider mb-1", children: [
7832
+ "SKU: ",
7833
+ product.sku
7834
+ ] }),
7835
+ /* @__PURE__ */ jsx("h1", { "data-cimplify-product-layout-name": true, className: "text-3xl lg:text-4xl font-extrabold tracking-tight", children: product.name })
7836
+ ] }),
7837
+ /* @__PURE__ */ jsx("div", { children: hasTiers ? /* @__PURE__ */ jsx(PriceRange, { product, className: "text-2xl font-extrabold" }) : /* @__PURE__ */ jsx(Price, { amount: product.default_price, className: "text-2xl font-semibold" }) }),
7838
+ /* @__PURE__ */ jsx(InventoryBadge, { product }),
7839
+ product.min_order_quantity != null && product.min_order_quantity > 1 && /* @__PURE__ */ jsxs("div", { "data-cimplify-product-layout-moq": true, className: "flex items-center gap-3 p-3 bg-amber-50 border border-amber-200 text-sm text-amber-800", children: [
7840
+ "Minimum order quantity: ",
7841
+ /* @__PURE__ */ jsxs("strong", { children: [
7842
+ product.min_order_quantity,
7843
+ " units"
7844
+ ] })
7845
+ ] }),
7846
+ product.description && /* @__PURE__ */ jsx("p", { "data-cimplify-product-layout-description": true, className: "text-muted-foreground leading-relaxed", children: product.description }),
7847
+ hasTiers && /* @__PURE__ */ jsx(
7848
+ VolumePricing,
7849
+ {
7850
+ tiers: product.quantity_pricing,
7851
+ defaultOpen: true
7852
+ }
7853
+ ),
7854
+ (product.sku || product.barcode || product.vendor) && /* @__PURE__ */ jsxs("div", { "data-cimplify-product-layout-details": true, className: "space-y-1 text-sm text-muted-foreground", children: [
7855
+ product.barcode && /* @__PURE__ */ jsxs("p", { children: [
7856
+ "Barcode: ",
7857
+ /* @__PURE__ */ jsx("span", { className: "font-mono text-foreground", children: product.barcode })
7858
+ ] }),
7859
+ product.vendor && /* @__PURE__ */ jsxs("p", { children: [
7860
+ "Supplier: ",
7861
+ /* @__PURE__ */ jsx("span", { className: "text-foreground", children: product.vendor })
7862
+ ] }),
7863
+ product.hs_code && /* @__PURE__ */ jsxs("p", { children: [
7864
+ "HS Code: ",
7865
+ /* @__PURE__ */ jsx("span", { className: "font-mono text-foreground", children: product.hs_code })
7866
+ ] })
7867
+ ] }),
7868
+ /* @__PURE__ */ jsx(CustomAttributesTable, { attributes: product.custom_attributes || [] }),
7869
+ /* @__PURE__ */ jsx(PropertiesTable, { properties: product.properties || [] }),
7870
+ /* @__PURE__ */ jsx(
7871
+ ProductCustomizer,
7872
+ {
7873
+ product,
7874
+ onAddToCart
7875
+ }
7876
+ )
7877
+ ] })
7878
+ }
7879
+ ),
7880
+ showRelated && relatedProducts && relatedProducts.length > 0 && /* @__PURE__ */ jsx(
7881
+ RelatedProductsSection,
7882
+ {
7883
+ products: relatedProducts,
7884
+ title: "Related products"
7885
+ }
7886
+ )
7887
+ ] });
7888
+ }
7889
+ function formatMinutes(minutes) {
7890
+ if (minutes >= 1440) return `${Math.floor(minutes / 1440)} day${minutes >= 2880 ? "s" : ""}`;
7891
+ if (minutes >= 60) {
7892
+ const h = Math.floor(minutes / 60);
7893
+ const m = minutes % 60;
7894
+ return m > 0 ? `${h}h ${m}min` : `${h} hour${h > 1 ? "s" : ""}`;
7895
+ }
7896
+ return `${minutes} min`;
7897
+ }
7898
+ function ServiceProductLayout({
7899
+ product,
7900
+ onAddToCart,
7901
+ renderBreadcrumb,
7902
+ relatedProducts,
7903
+ showRelated = true,
7904
+ className
7905
+ }) {
7906
+ const images = product.images || (product.image_url ? [product.image_url] : []);
7907
+ const hasDeposit = product.deposit_type && product.deposit_type !== "none" && product.deposit_amount;
7908
+ const depositAmount = hasDeposit ? parsePrice(product.deposit_amount) : 0;
7909
+ const cancellationHours = product.cancellation_window_minutes ? Math.floor(product.cancellation_window_minutes / 60) : null;
7910
+ return /* @__PURE__ */ jsxs("div", { "data-cimplify-product-layout": "service", className: cn("space-y-8", className), children: [
7911
+ renderBreadcrumb?.(product),
7912
+ /* @__PURE__ */ jsx(
7913
+ TwoColumnGrid,
7914
+ {
7915
+ left: /* @__PURE__ */ jsx(
7916
+ ProductImageGallery,
7917
+ {
7918
+ images,
7919
+ productName: product.name
7920
+ }
7921
+ ),
7922
+ right: /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
7923
+ /* @__PURE__ */ jsx(TagPills, { tags: product.tags || [] }),
7924
+ /* @__PURE__ */ jsxs("div", { children: [
7925
+ /* @__PURE__ */ jsx("h1", { "data-cimplify-product-layout-name": true, className: "text-3xl lg:text-4xl font-extrabold tracking-tight", children: product.name }),
7926
+ /* @__PURE__ */ jsx(Price, { amount: product.default_price, className: "text-2xl font-bold text-primary mt-2 block" })
7927
+ ] }),
7928
+ /* @__PURE__ */ jsxs("div", { "data-cimplify-product-layout-service-info": true, className: "flex flex-wrap gap-2", children: [
7929
+ product.duration_minutes != null && /* @__PURE__ */ jsx("span", { className: "inline-flex items-center gap-1.5 px-3 py-1.5 bg-muted text-sm text-muted-foreground rounded-full", children: formatMinutes(product.duration_minutes) }),
7930
+ hasDeposit && /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1.5 px-3 py-1.5 bg-muted text-sm text-muted-foreground rounded-full", children: [
7931
+ /* @__PURE__ */ jsx(Price, { amount: depositAmount }),
7932
+ " deposit"
7933
+ ] }),
7934
+ product.general_service_capacity != null && product.general_service_capacity > 1 && /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1.5 px-3 py-1.5 bg-muted text-sm text-muted-foreground rounded-full", children: [
7935
+ "Up to ",
7936
+ product.general_service_capacity,
7937
+ " people"
7938
+ ] }),
7939
+ product.buffer_before_minutes != null && product.buffer_before_minutes > 0 && /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1.5 px-3 py-1.5 bg-muted text-sm text-muted-foreground rounded-full", children: [
7940
+ product.buffer_before_minutes,
7941
+ " min buffer"
7942
+ ] })
7943
+ ] }),
7944
+ product.description && /* @__PURE__ */ jsx("p", { "data-cimplify-product-layout-description": true, className: "text-muted-foreground leading-relaxed", children: product.description }),
7945
+ (product.requires_specific_staff || product.requires_specific_resource) && /* @__PURE__ */ jsxs("div", { "data-cimplify-product-layout-requirements": true, className: "text-sm text-muted-foreground space-y-1", children: [
7946
+ product.requires_specific_staff && /* @__PURE__ */ jsx("p", { children: "Staff selection required" }),
7947
+ product.requires_specific_resource && /* @__PURE__ */ jsx("p", { children: "Resource selection required" })
7948
+ ] }),
7949
+ /* @__PURE__ */ jsx(CustomAttributesTable, { attributes: product.custom_attributes || [] }),
7950
+ /* @__PURE__ */ jsx(
7951
+ ProductCustomizer,
7952
+ {
7953
+ product,
7954
+ onAddToCart,
7955
+ showSpecialInstructions: false
7956
+ }
7957
+ ),
7958
+ (cancellationHours != null || product.no_show_fee) && /* @__PURE__ */ jsxs("div", { "data-cimplify-product-layout-cancellation": true, className: "border border-border p-4 space-y-2 text-sm", children: [
7959
+ /* @__PURE__ */ jsx("h3", { className: "font-semibold", children: "Cancellation Policy" }),
7960
+ cancellationHours != null && /* @__PURE__ */ jsxs("p", { className: "text-muted-foreground", children: [
7961
+ "Free cancellation up to ",
7962
+ /* @__PURE__ */ jsxs("strong", { className: "text-foreground", children: [
7963
+ cancellationHours,
7964
+ " hours"
7965
+ ] }),
7966
+ " before the appointment"
7967
+ ] }),
7968
+ product.no_show_fee && /* @__PURE__ */ jsxs("p", { className: "text-muted-foreground", children: [
7969
+ "No-show fee: ",
7970
+ /* @__PURE__ */ jsx(Price, { amount: product.no_show_fee, className: "font-medium text-foreground" })
7971
+ ] }),
7972
+ hasDeposit && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: product.deposit_type === "fixed" ? /* @__PURE__ */ jsxs(Fragment, { children: [
7973
+ /* @__PURE__ */ jsx(Price, { amount: depositAmount, className: "font-medium text-foreground" }),
7974
+ " deposit charged at booking"
7975
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
7976
+ parsePrice(product.deposit_amount),
7977
+ "% deposit charged at booking"
7978
+ ] }) })
7979
+ ] })
7980
+ ] })
7981
+ }
7982
+ ),
7983
+ showRelated && relatedProducts && relatedProducts.length > 0 && /* @__PURE__ */ jsx(
7984
+ RelatedProductsSection,
7985
+ {
7986
+ products: relatedProducts,
7987
+ title: "Other services"
7988
+ }
7989
+ )
7990
+ ] });
7991
+ }
7992
+ var DIGITAL_TYPE_LABELS = {
7993
+ download: "Digital download",
7994
+ license: "Software license",
7995
+ event_ticket: "Event ticket",
7996
+ access_pass: "Access pass",
7997
+ gift_card: "Gift card"
7998
+ };
7999
+ function DigitalProductLayout({
8000
+ product,
8001
+ onAddToCart,
8002
+ renderBreadcrumb,
8003
+ relatedProducts,
8004
+ showRelated = true,
8005
+ className
8006
+ }) {
8007
+ const images = product.images || (product.image_url ? [product.image_url] : []);
8008
+ const typeLabel = product.digital_type ? DIGITAL_TYPE_LABELS[product.digital_type] || product.digital_type : "Digital product";
8009
+ const isTicket = product.digital_type === "event_ticket";
8010
+ const isAccessPass = product.digital_type === "access_pass";
8011
+ const isDownload = product.digital_type === "download" || product.digital_type === "license";
8012
+ return /* @__PURE__ */ jsxs("div", { "data-cimplify-product-layout": "digital", className: cn("space-y-8", className), children: [
8013
+ renderBreadcrumb?.(product),
8014
+ /* @__PURE__ */ jsx(
8015
+ TwoColumnGrid,
8016
+ {
8017
+ left: /* @__PURE__ */ jsx(
8018
+ ProductImageGallery,
8019
+ {
8020
+ images,
8021
+ productName: product.name
8022
+ }
8023
+ ),
8024
+ right: /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
8025
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
8026
+ /* @__PURE__ */ jsx("span", { "data-cimplify-product-layout-badge": true, className: "text-xs font-semibold uppercase tracking-wider text-primary bg-primary/10 px-2.5 py-1 rounded-full", children: typeLabel }),
8027
+ /* @__PURE__ */ jsx(TagPills, { tags: product.tags || [] })
8028
+ ] }),
8029
+ /* @__PURE__ */ jsxs("div", { children: [
8030
+ /* @__PURE__ */ jsx("h1", { "data-cimplify-product-layout-name": true, className: "text-3xl lg:text-4xl font-extrabold tracking-tight", children: product.name }),
8031
+ /* @__PURE__ */ jsx(Price, { amount: product.default_price, className: "text-2xl font-bold mt-2 block" })
8032
+ ] }),
8033
+ product.description && /* @__PURE__ */ jsx("p", { "data-cimplify-product-layout-description": true, className: "text-muted-foreground leading-relaxed", children: product.description }),
8034
+ isDownload && /* @__PURE__ */ jsxs("div", { "data-cimplify-product-layout-delivery": true, className: "flex items-center gap-3 px-4 py-3 bg-muted rounded-lg", children: [
8035
+ /* @__PURE__ */ jsx("svg", { className: "w-5 h-5 text-primary shrink-0", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M13 10V3L4 14h7v7l9-11h-7z" }) }),
8036
+ /* @__PURE__ */ jsxs("div", { children: [
8037
+ /* @__PURE__ */ jsx("p", { className: "text-sm font-medium", children: "Instant delivery" }),
8038
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: "Download immediately after purchase" })
8039
+ ] })
8040
+ ] }),
8041
+ isTicket && (product.event_date || product.venue) && /* @__PURE__ */ jsxs("div", { "data-cimplify-product-layout-event": true, className: "border border-border p-4 space-y-2", children: [
8042
+ product.event_date && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-sm", children: [
8043
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Date:" }),
8044
+ /* @__PURE__ */ jsx("span", { className: "font-medium", children: new Date(product.event_date).toLocaleDateString(void 0, { weekday: "long", year: "numeric", month: "long", day: "numeric" }) })
8045
+ ] }),
8046
+ product.venue && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-sm", children: [
8047
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Venue:" }),
8048
+ /* @__PURE__ */ jsx("span", { className: "font-medium", children: product.venue })
8049
+ ] }),
8050
+ product.ticket_type && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-sm", children: [
8051
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Type:" }),
8052
+ /* @__PURE__ */ jsx("span", { className: "font-medium capitalize", children: product.ticket_type })
8053
+ ] })
8054
+ ] }),
8055
+ isAccessPass && (product.access_type || product.access_duration_days) && /* @__PURE__ */ jsxs("div", { "data-cimplify-product-layout-access": true, className: "border border-border p-4 space-y-2", children: [
8056
+ product.access_type && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-sm", children: [
8057
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Access:" }),
8058
+ /* @__PURE__ */ jsx("span", { className: "font-medium capitalize", children: product.access_type })
8059
+ ] }),
8060
+ product.access_level && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-sm", children: [
8061
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Level:" }),
8062
+ /* @__PURE__ */ jsx("span", { className: "font-medium capitalize", children: product.access_level })
8063
+ ] }),
8064
+ product.access_duration_days && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-sm", children: [
8065
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Duration:" }),
8066
+ /* @__PURE__ */ jsxs("span", { className: "font-medium", children: [
8067
+ product.access_duration_days,
8068
+ " days"
8069
+ ] })
8070
+ ] })
8071
+ ] }),
8072
+ isDownload && (product.file_size_mb || product.file_type || product.version || product.max_downloads) && /* @__PURE__ */ jsxs("div", { "data-cimplify-product-layout-file-details": true, className: "grid grid-cols-2 gap-3", children: [
8073
+ product.file_type && /* @__PURE__ */ jsxs("div", { className: "px-3 py-2 bg-muted text-center", children: [
8074
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: "Format" }),
8075
+ /* @__PURE__ */ jsx("p", { className: "text-sm font-semibold", children: product.file_type.toUpperCase() })
8076
+ ] }),
8077
+ product.file_size_mb != null && /* @__PURE__ */ jsxs("div", { className: "px-3 py-2 bg-muted text-center", children: [
8078
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: "Size" }),
8079
+ /* @__PURE__ */ jsx("p", { className: "text-sm font-semibold", children: product.file_size_mb >= 1024 ? `${(product.file_size_mb / 1024).toFixed(1)} GB` : `${product.file_size_mb} MB` })
8080
+ ] }),
8081
+ product.max_downloads != null && /* @__PURE__ */ jsxs("div", { className: "px-3 py-2 bg-muted text-center", children: [
8082
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: "Downloads" }),
8083
+ /* @__PURE__ */ jsx("p", { className: "text-sm font-semibold", children: product.max_downloads })
8084
+ ] }),
8085
+ product.version && /* @__PURE__ */ jsxs("div", { className: "px-3 py-2 bg-muted text-center", children: [
8086
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: "Version" }),
8087
+ /* @__PURE__ */ jsxs("p", { className: "text-sm font-semibold", children: [
8088
+ "v",
8089
+ product.version
8090
+ ] })
8091
+ ] }),
8092
+ product.download_expires_days != null && /* @__PURE__ */ jsxs("div", { className: "px-3 py-2 bg-muted text-center", children: [
8093
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: "Expires" }),
8094
+ /* @__PURE__ */ jsxs("p", { className: "text-sm font-semibold", children: [
8095
+ product.download_expires_days,
8096
+ " days"
8097
+ ] })
8098
+ ] }),
8099
+ product.max_activations != null && /* @__PURE__ */ jsxs("div", { className: "px-3 py-2 bg-muted text-center", children: [
8100
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: "Activations" }),
8101
+ /* @__PURE__ */ jsx("p", { className: "text-sm font-semibold", children: product.max_activations })
8102
+ ] })
8103
+ ] }),
8104
+ /* @__PURE__ */ jsx(CustomAttributesTable, { attributes: product.custom_attributes || [] }),
8105
+ /* @__PURE__ */ jsx(
8106
+ ProductCustomizer,
8107
+ {
8108
+ product,
8109
+ onAddToCart,
8110
+ showSpecialInstructions: false
8111
+ }
8112
+ )
8113
+ ] })
8114
+ }
8115
+ ),
8116
+ showRelated && relatedProducts && relatedProducts.length > 0 && /* @__PURE__ */ jsx(
8117
+ RelatedProductsSection,
8118
+ {
8119
+ products: relatedProducts,
8120
+ title: "More digital products"
8121
+ }
8122
+ )
8123
+ ] });
8124
+ }
8125
+ var ProductTemplate = /* @__PURE__ */ ((ProductTemplate2) => {
8126
+ ProductTemplate2["Default"] = "default";
8127
+ ProductTemplate2["Food"] = "food";
8128
+ ProductTemplate2["Wholesale"] = "wholesale";
8129
+ ProductTemplate2["Service"] = "service";
8130
+ ProductTemplate2["Digital"] = "digital";
8131
+ ProductTemplate2["Physical"] = "physical";
8132
+ return ProductTemplate2;
8133
+ })(ProductTemplate || {});
8134
+ var BUILT_IN_LAYOUTS = {
8135
+ ["food" /* Food */]: FoodProductLayout,
8136
+ ["wholesale" /* Wholesale */]: WholesaleProductLayout,
8137
+ ["service" /* Service */]: ServiceProductLayout,
8138
+ ["digital" /* Digital */]: DigitalProductLayout,
8139
+ ["default" /* Default */]: DefaultProductLayout
8140
+ };
8141
+ function resolveTemplateKey(product) {
8142
+ const metaTemplate = product.metadata?.page_template;
8143
+ if (typeof metaTemplate === "string" && metaTemplate.trim()) {
8144
+ return metaTemplate.trim();
8145
+ }
8146
+ if (product.quantity_pricing && product.quantity_pricing.length > 1) {
8147
+ return "wholesale" /* Wholesale */;
8148
+ }
8149
+ if (product.type === "service") {
8150
+ return "service" /* Service */;
8151
+ }
8152
+ if (product.type === "digital") {
8153
+ return "digital" /* Digital */;
8154
+ }
8155
+ if (product.render_hint === "food") {
8156
+ return "food" /* Food */;
8157
+ }
8158
+ if (product.render_hint === "physical") {
8159
+ return "physical" /* Physical */;
8160
+ }
8161
+ return "default" /* Default */;
8162
+ }
8163
+ function resolveLayout(product, pages, templates) {
8164
+ if (pages?.[product.slug]) {
8165
+ return pages[product.slug];
8166
+ }
8167
+ const key = resolveTemplateKey(product);
8168
+ if (templates?.[key]) {
8169
+ return templates[key];
8170
+ }
8171
+ if (BUILT_IN_LAYOUTS[key]) {
8172
+ return BUILT_IN_LAYOUTS[key];
8173
+ }
8174
+ return DefaultProductLayout;
8175
+ }
8176
+ function ProductPage({
8177
+ productId,
8178
+ product: productProp,
8179
+ pages,
8180
+ templates,
8181
+ onAddToCart,
8182
+ renderImage,
8183
+ renderBreadcrumb,
8184
+ relatedProducts,
8185
+ showRelated = true,
8186
+ className,
8187
+ classNames
8188
+ }) {
8189
+ const resolvedId = productId || productProp?.slug || productProp?.id || "";
8190
+ const { product: fetched, isLoading } = useProduct(resolvedId, {
8191
+ enabled: !productProp && resolvedId.length > 0
8192
+ });
8193
+ const product = productProp ?? fetched;
8194
+ if (isLoading && !product) {
8195
+ return /* @__PURE__ */ jsx(
8196
+ "div",
8197
+ {
8198
+ "data-cimplify-product-page": true,
8199
+ "aria-busy": "true",
8200
+ className: cn(className, classNames?.root, classNames?.loading),
8201
+ children: /* @__PURE__ */ jsxs("div", { className: "grid lg:grid-cols-2 gap-8 lg:gap-12 animate-pulse", children: [
8202
+ /* @__PURE__ */ jsx("div", { className: "aspect-square bg-muted" }),
8203
+ /* @__PURE__ */ jsxs("div", { className: "space-y-4 py-4", children: [
8204
+ /* @__PURE__ */ jsx("div", { className: "h-8 w-3/5 bg-muted" }),
8205
+ /* @__PURE__ */ jsx("div", { className: "h-6 w-2/5 bg-muted" }),
8206
+ /* @__PURE__ */ jsx("div", { className: "h-4 w-4/5 bg-muted" }),
8207
+ /* @__PURE__ */ jsx("div", { className: "h-4 w-3/5 bg-muted" }),
8208
+ /* @__PURE__ */ jsx("div", { className: "h-14 w-full bg-muted mt-8" })
8209
+ ] })
8210
+ ] })
8211
+ }
8212
+ );
8213
+ }
8214
+ if (!product) {
8215
+ return /* @__PURE__ */ jsx("div", { "data-cimplify-product-page": true, className: cn(className, classNames?.root), children: /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: "Product not found." }) });
8216
+ }
8217
+ const Layout = resolveLayout(product, pages, templates);
8218
+ return /* @__PURE__ */ jsx("div", { "data-cimplify-product-page": true, className: cn(className, classNames?.root), children: /* @__PURE__ */ jsx(
8219
+ Layout,
8220
+ {
8221
+ product,
8222
+ onAddToCart,
8223
+ renderImage,
8224
+ renderBreadcrumb,
8225
+ relatedProducts,
8226
+ showRelated
8227
+ }
8228
+ ) });
8229
+ }
8230
+ function CartPage({
8231
+ title = "Your Cart",
8232
+ onCheckout,
8233
+ onContinueShopping,
8234
+ onDiscountApply,
8235
+ onDiscountClear,
8236
+ showDiscount = true,
8237
+ showContinueShopping = true,
8238
+ checkoutLabel = "Proceed to Checkout",
8239
+ className,
8240
+ classNames
8241
+ }) {
8242
+ const { isEmpty, subtotal } = useCart();
8243
+ return /* @__PURE__ */ jsxs("div", { "data-cimplify-cart-page": true, className: cn(className, classNames?.root), children: [
8244
+ /* @__PURE__ */ jsxs("div", { "data-cimplify-cart-page-header": true, className: classNames?.header, children: [
8245
+ /* @__PURE__ */ jsx("h1", { "data-cimplify-cart-page-title": true, className: classNames?.title, children: title }),
8246
+ showContinueShopping && /* @__PURE__ */ jsx(
8247
+ "button",
7344
8248
  {
7345
8249
  type: "button",
7346
8250
  onClick: onContinueShopping,
@@ -8351,102 +9255,6 @@ function RecentlyViewed({
8351
9255
  product.product_id
8352
9256
  )) });
8353
9257
  }
8354
- var FREQUENCY_LABELS = {
8355
- weekly: "Weekly",
8356
- monthly: "Monthly",
8357
- quarterly: "Quarterly",
8358
- annually: "Annually"
8359
- };
8360
- function formatMarkup(plan) {
8361
- if (!plan.markup_type || plan.markup_amount == null) return null;
8362
- if (plan.markup_type === "percentage") return `+${plan.markup_amount}%`;
8363
- return null;
8364
- }
8365
- function BillingPlanSelector({
8366
- productId,
8367
- plans: plansProp,
8368
- onPlanSelect,
8369
- selectedPlanId,
8370
- showOneTimePurchase = false,
8371
- oneTimePurchaseLabel = "One-time purchase",
8372
- renderPlan,
8373
- className,
8374
- classNames
8375
- }) {
8376
- const { plans: fetched, isLoading } = useBillingPlans(productId, {
8377
- enabled: plansProp === void 0
8378
- });
8379
- const plans = plansProp ?? fetched;
8380
- if (isLoading && plans.length === 0) {
8381
- return /* @__PURE__ */ jsx(
8382
- "div",
8383
- {
8384
- "data-cimplify-billing-plan-selector": true,
8385
- "aria-busy": "true",
8386
- className: cn(className, classNames?.root, classNames?.loading)
8387
- }
8388
- );
8389
- }
8390
- if (plans.length === 0 && !showOneTimePurchase) {
8391
- return null;
8392
- }
8393
- const isOneTimePurchaseSelected = selectedPlanId === null;
8394
- return /* @__PURE__ */ jsxs("div", { "data-cimplify-billing-plan-selector": true, className: cn(className, classNames?.root), children: [
8395
- showOneTimePurchase && /* @__PURE__ */ jsx(
8396
- "button",
8397
- {
8398
- type: "button",
8399
- onClick: () => onPlanSelect?.(null),
8400
- "data-cimplify-billing-plan": true,
8401
- "data-plan-type": "one-time",
8402
- "data-active": isOneTimePurchaseSelected || void 0,
8403
- "aria-pressed": isOneTimePurchaseSelected,
8404
- className: cn(
8405
- classNames?.plan,
8406
- isOneTimePurchaseSelected && classNames?.activePlan
8407
- ),
8408
- children: /* @__PURE__ */ jsx("span", { "data-cimplify-billing-frequency": true, className: classNames?.frequency, children: oneTimePurchaseLabel })
8409
- }
8410
- ),
8411
- plans.map((plan) => {
8412
- const isActive = selectedPlanId === plan.id;
8413
- const markup = formatMarkup(plan);
8414
- return /* @__PURE__ */ jsx(
8415
- "button",
8416
- {
8417
- type: "button",
8418
- onClick: () => onPlanSelect?.(plan),
8419
- "data-cimplify-billing-plan": true,
8420
- "data-plan-type": plan.plan_type,
8421
- "data-active": isActive || void 0,
8422
- "aria-pressed": isActive,
8423
- className: cn(classNames?.plan, isActive && classNames?.activePlan),
8424
- children: renderPlan ? renderPlan(plan, isActive) : /* @__PURE__ */ jsxs(Fragment, { children: [
8425
- /* @__PURE__ */ jsx("span", { "data-cimplify-billing-frequency": true, className: classNames?.frequency, children: FREQUENCY_LABELS[plan.frequency] }),
8426
- markup && /* @__PURE__ */ jsx("span", { "data-cimplify-billing-markup": true, className: classNames?.price, children: markup }),
8427
- plan.markup_type === "fixed" && plan.markup_amount != null && /* @__PURE__ */ jsxs("span", { "data-cimplify-billing-markup": true, className: classNames?.price, children: [
8428
- "+",
8429
- /* @__PURE__ */ jsx(Price, { amount: plan.markup_amount })
8430
- ] }),
8431
- plan.trial_days > 0 && /* @__PURE__ */ jsxs("span", { "data-cimplify-billing-trial": true, className: classNames?.trialBadge, children: [
8432
- plan.trial_days,
8433
- "-day trial"
8434
- ] }),
8435
- plan.setup_fee > 0 && /* @__PURE__ */ jsxs("span", { "data-cimplify-billing-setup-fee": true, className: classNames?.setupFee, children: [
8436
- "Setup fee: ",
8437
- /* @__PURE__ */ jsx(Price, { amount: plan.setup_fee })
8438
- ] }),
8439
- plan.plan_type === "installment" && plan.installment_periods != null && /* @__PURE__ */ jsxs("span", { "data-cimplify-billing-periods": true, children: [
8440
- plan.installment_periods,
8441
- " payments"
8442
- ] })
8443
- ] })
8444
- },
8445
- plan.id
8446
- );
8447
- })
8448
- ] });
8449
- }
8450
9258
  function DeliveryEstimate({
8451
9259
  latitude,
8452
9260
  longitude,
@@ -8594,4 +9402,4 @@ function CurrencySelector({
8594
9402
  }) });
8595
9403
  }
8596
9404
 
8597
- export { Ad, AdProvider, AddOnSelector, AddressElement, AuthElement, AvailabilityBadge, BillingPlanSelector, BookingCard, BookingList, BookingPage, BookingsPage, BundleSelector, CartPage, CartSummary, CataloguePage, CategoryFilter, CategoryGrid, CheckoutPage, CimplifyCheckout, CimplifyProvider, CollectionPage, CompositeSelector, CurrencySelector, DateSlotPicker, DealBanner, DealsPage, DeliveryEstimate, DiscountInput, ElementsProvider, LocationPicker, OrderDetailPage, OrderHistory, OrderHistoryPage, OrderSummary, PaymentElement, Price, ProductCard, ProductCustomizer, ProductGrid, ProductImageGallery, ProductPage, ProductSheet, QuantitySelector, RecentlyViewed, RecommendationCarousel, ResourcePicker, SaleBadge, SearchInput, SearchPage, ServiceCard, ServiceGrid, SessionMessageBanner, SlotPicker, StaffPicker, StoreNav, VariantSelector, 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 };
9405
+ export { Ad, AdProvider, AddOnSelector, AddressElement, AuthElement, AvailabilityBadge, BillingPlanSelector, BookingCard, BookingList, BookingPage, BookingsPage, BundleSelector, CartPage, CartSummary, CataloguePage, CategoryFilter, CategoryGrid, CheckoutPage, CimplifyCheckout, CimplifyProvider, CollectionPage, CompositeSelector, CurrencySelector, CustomAttributesTable, DateSlotPicker, DealBanner, DealsPage, DefaultProductLayout, DeliveryEstimate, DigitalProductLayout, DiscountInput, ElementsProvider, FoodProductLayout, InventoryBadge, LocationPicker, MetadataStringList, OrderDetailPage, OrderHistory, OrderHistoryPage, OrderSummary, PaymentElement, Price, PriceRange, ProductCard, ProductCustomizer, ProductGrid, ProductImageGallery, ProductPage, ProductSheet, ProductTemplate, PropertiesTable, QuantitySelector, RecentlyViewed, RecommendationCarousel, RelatedProductsSection, ResourcePicker, SaleBadge, SearchInput, SearchPage, ServiceCard, ServiceGrid, ServiceProductLayout, SessionMessageBanner, SlotPicker, StaffPicker, StoreNav, TagPills, TwoColumnGrid, VariantSelector, VolumePricing, 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 };