@burdenoff/website-sdk 2026.516.4 → 2026.516.6

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/index.mjs CHANGED
@@ -1434,6 +1434,10 @@ function formatInterval(duration, billingIntervals) {
1434
1434
  const intervals = billingIntervals || defaultIntervals;
1435
1435
  return intervals[duration] || `/${duration}`;
1436
1436
  }
1437
+ function isEnterprisePlan(planName) {
1438
+ const name = planName.toLowerCase();
1439
+ return name.includes("team") || name.includes("business") || name.includes("enterprise");
1440
+ }
1437
1441
  function detectPlanTier(planName) {
1438
1442
  const name = planName.toLowerCase();
1439
1443
  if (name.includes("free") || name.includes("basic") || name.includes("starter") || name.includes("hobby")) {
@@ -1614,25 +1618,27 @@ function PricingSection(props) {
1614
1618
  cancelled = true;
1615
1619
  };
1616
1620
  }, [client, resolvedProductId]);
1617
- const plans = allPlans.filter(
1621
+ const individualAllPlans = allPlans.filter(
1622
+ (p) => !isEnterprisePlan(p.name)
1623
+ );
1624
+ const enterpriseApiPlans = allPlans.filter((p) => isEnterprisePlan(p.name));
1625
+ const individualPlans = individualAllPlans.filter(
1618
1626
  (plan) => billingCycle === "monthly" ? plan.duration === "monthly" : plan.duration === "yearly"
1619
1627
  );
1620
- if (!plans.some((p) => p.tier === "enterprise") && props.fallbackFeatures?.enterprise?.length) {
1621
- plans.push({
1622
- id: "enterprise-contact",
1623
- name: "Enterprise",
1624
- description: "For organizations that need more",
1625
- price: "Custom",
1626
- priceRaw: Infinity,
1627
- interval: "",
1628
- duration: billingCycle,
1629
- features: [...props.fallbackFeatures.enterprise],
1630
- popular: false,
1631
- ctaText: "Contact Sales",
1632
- ctaLink: props.contactUrl || "/contact",
1633
- tier: "enterprise"
1634
- });
1635
- }
1628
+ const enterpriseCards = enterpriseApiPlans.map((p) => {
1629
+ if (p.priceRaw === 0 && p.name.toLowerCase().includes("enterprise")) {
1630
+ return {
1631
+ ...p,
1632
+ price: "Custom",
1633
+ interval: "",
1634
+ ctaText: "Contact Sales",
1635
+ ctaLink: props.contactUrl || "/contact"
1636
+ };
1637
+ }
1638
+ return p;
1639
+ });
1640
+ const hasApiEnterprisePlans = enterpriseCards.length > 0;
1641
+ const plans = props.showAudienceTabs && audience === "enterprise" ? [] : individualPlans;
1636
1642
  if (loading) {
1637
1643
  return /* @__PURE__ */ jsx("section", { id, className: `py-12 sm:py-16 md:py-20 ${className}`, children: /* @__PURE__ */ jsxs("div", { className: "container mx-auto px-4 sm:px-6", children: [
1638
1644
  /* @__PURE__ */ jsxs("div", { className: "text-center mb-8 sm:mb-12", children: [
@@ -1711,74 +1717,85 @@ function PricingSection(props) {
1711
1717
  /* @__PURE__ */ jsx("h3", { className: "text-xl sm:text-2xl font-bold text-foreground", children: props.enterpriseHeading || "Enterprise Solutions" }),
1712
1718
  /* @__PURE__ */ jsx("p", { className: "mt-3 text-muted-foreground", children: props.enterpriseSubtitle || "Built for teams, agencies, and organizations that need advanced collaboration, security, support, and scale." })
1713
1719
  ] }),
1714
- /* @__PURE__ */ jsx("div", { className: "grid md:grid-cols-3 gap-6 sm:gap-8 max-w-6xl mx-auto items-stretch", children: props.showAudienceTabs && audience === "enterprise" && props.enterprisePlans ? (
1715
- /* Enterprise static cards */
1716
- props.enterprisePlans.map((ep) => /* @__PURE__ */ jsxs(
1717
- "div",
1718
- {
1719
- className: `bg-card rounded-xl p-6 sm:p-8 transition-all duration-300 flex flex-col ${ep.popular ? "border-2 border-primary shadow-xl ring-1 ring-primary/20" : "border hover:shadow-lg hover:border-primary/50"}`,
1720
- children: [
1721
- /* @__PURE__ */ jsxs("div", { className: "text-center mb-6", children: [
1722
- ep.popular && ep.badge && /* @__PURE__ */ jsx("span", { className: "inline-block bg-primary text-primary-foreground px-4 py-1 rounded-full text-xs font-semibold mb-3", children: ep.badge }),
1723
- /* @__PURE__ */ jsx("h3", { className: "text-xl sm:text-2xl font-bold mb-2", children: ep.name }),
1724
- /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm", children: ep.subtitle })
1725
- ] }),
1726
- /* @__PURE__ */ jsxs("div", { className: "text-center mb-2", children: [
1727
- ep.price === "Custom" ? /* @__PURE__ */ jsx("span", { className: "text-3xl sm:text-4xl font-bold", children: "Custom" }) : /* @__PURE__ */ jsxs("div", { className: "flex items-baseline justify-center gap-1", children: [
1728
- /* @__PURE__ */ jsx("span", { className: "text-4xl sm:text-5xl font-extrabold", children: ep.price }),
1729
- /* @__PURE__ */ jsx("span", { className: "text-muted-foreground text-lg", children: ep.period })
1720
+ /* @__PURE__ */ jsx("div", { className: "grid md:grid-cols-3 gap-6 sm:gap-8 max-w-6xl mx-auto items-stretch", children: props.showAudienceTabs && audience === "enterprise" && (hasApiEnterprisePlans || props.enterprisePlans) ? (
1721
+ /* Enterprise cards — from API if available, otherwise from static prop */
1722
+ (hasApiEnterprisePlans ? enterpriseCards : props.enterprisePlans || []).map((ep) => {
1723
+ const subtitle = ep.subtitle || ep.description || "";
1724
+ const btnText = ep.button || ep.ctaText || "Get Started";
1725
+ const btnLink = ep.buttonLink || ep.ctaLink || props.appLoginUrl;
1726
+ const period = ep.period || ep.interval || "";
1727
+ const note = ep.note || "";
1728
+ const badge = ep.badge || "";
1729
+ const isPopular = ep.popular;
1730
+ const features = ep.features || [];
1731
+ const price = String(ep.price);
1732
+ return /* @__PURE__ */ jsxs(
1733
+ "div",
1734
+ {
1735
+ className: `bg-card rounded-xl p-6 sm:p-8 transition-all duration-300 flex flex-col ${isPopular ? "border-2 border-primary shadow-xl ring-1 ring-primary/20" : "border hover:shadow-lg hover:border-primary/50"}`,
1736
+ children: [
1737
+ /* @__PURE__ */ jsxs("div", { className: "text-center mb-6", children: [
1738
+ isPopular && badge && /* @__PURE__ */ jsx("span", { className: "inline-block bg-primary text-primary-foreground px-4 py-1 rounded-full text-xs font-semibold mb-3", children: badge }),
1739
+ /* @__PURE__ */ jsx("h3", { className: "text-xl sm:text-2xl font-bold mb-2", children: ep.name }),
1740
+ /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm", children: subtitle })
1730
1741
  ] }),
1731
- ep.note && /* @__PURE__ */ jsx("p", { className: "mt-2 text-sm font-medium text-primary", children: ep.note })
1732
- ] }),
1733
- /* @__PURE__ */ jsx("ul", { className: "space-y-3 mb-8 mt-6 flex-1", children: ep.features.map((feature) => /* @__PURE__ */ jsxs(
1734
- "li",
1735
- {
1736
- className: "text-sm flex items-start gap-2",
1737
- children: [
1738
- /* @__PURE__ */ jsx("span", { className: "text-primary mt-0.5 flex-shrink-0", children: "\u2713" }),
1739
- /* @__PURE__ */ jsx("span", { children: feature })
1740
- ]
1741
- },
1742
- feature
1743
- )) }),
1744
- ep.buttonLink.startsWith("/") ? /* @__PURE__ */ jsx(
1745
- Button,
1746
- {
1747
- className: "w-full h-11",
1748
- variant: ep.popular ? "default" : "outline",
1749
- size: "lg",
1750
- asChild: true,
1751
- children: /* @__PURE__ */ jsx(
1752
- "a",
1753
- {
1754
- href: ep.buttonLink,
1755
- onClick: () => window.scrollTo({ top: 0, behavior: "smooth" }),
1756
- children: ep.button
1757
- }
1758
- )
1759
- }
1760
- ) : /* @__PURE__ */ jsx(
1761
- Button,
1762
- {
1763
- className: "w-full h-11",
1764
- variant: ep.popular ? "default" : "outline",
1765
- size: "lg",
1766
- asChild: true,
1767
- children: /* @__PURE__ */ jsx(
1768
- "a",
1769
- {
1770
- href: ep.buttonLink,
1771
- target: "_blank",
1772
- rel: "noopener noreferrer",
1773
- children: ep.button
1774
- }
1775
- )
1776
- }
1777
- )
1778
- ]
1779
- },
1780
- ep.name
1781
- ))
1742
+ /* @__PURE__ */ jsxs("div", { className: "text-center mb-2", children: [
1743
+ price === "Custom" ? /* @__PURE__ */ jsx("span", { className: "text-3xl sm:text-4xl font-bold", children: "Custom" }) : /* @__PURE__ */ jsxs("div", { className: "flex items-baseline justify-center gap-1", children: [
1744
+ /* @__PURE__ */ jsx("span", { className: "text-4xl sm:text-5xl font-extrabold", children: price }),
1745
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground text-lg", children: period })
1746
+ ] }),
1747
+ note && /* @__PURE__ */ jsx("p", { className: "mt-2 text-sm font-medium text-primary", children: note })
1748
+ ] }),
1749
+ /* @__PURE__ */ jsx("ul", { className: "space-y-3 mb-8 mt-6 flex-1", children: features.map((feature) => /* @__PURE__ */ jsxs(
1750
+ "li",
1751
+ {
1752
+ className: "text-sm flex items-start gap-2",
1753
+ children: [
1754
+ /* @__PURE__ */ jsx("span", { className: "text-primary mt-0.5 flex-shrink-0", children: "\u2713" }),
1755
+ /* @__PURE__ */ jsx("span", { children: feature })
1756
+ ]
1757
+ },
1758
+ feature
1759
+ )) }),
1760
+ btnLink.startsWith("/") ? /* @__PURE__ */ jsx(
1761
+ Button,
1762
+ {
1763
+ className: "w-full h-11",
1764
+ variant: isPopular ? "default" : "outline",
1765
+ size: "lg",
1766
+ asChild: true,
1767
+ children: /* @__PURE__ */ jsx(
1768
+ "a",
1769
+ {
1770
+ href: btnLink,
1771
+ onClick: () => window.scrollTo({ top: 0, behavior: "smooth" }),
1772
+ children: btnText
1773
+ }
1774
+ )
1775
+ }
1776
+ ) : /* @__PURE__ */ jsx(
1777
+ Button,
1778
+ {
1779
+ className: "w-full h-11",
1780
+ variant: isPopular ? "default" : "outline",
1781
+ size: "lg",
1782
+ asChild: true,
1783
+ children: /* @__PURE__ */ jsx(
1784
+ "a",
1785
+ {
1786
+ href: btnLink,
1787
+ target: "_blank",
1788
+ rel: "noopener noreferrer",
1789
+ children: btnText
1790
+ }
1791
+ )
1792
+ }
1793
+ )
1794
+ ]
1795
+ },
1796
+ ep.name
1797
+ );
1798
+ })
1782
1799
  ) : (
1783
1800
  /* Individual API-fetched cards */
1784
1801
  plans.map((plan) => /* @__PURE__ */ jsxs(