@burdenoff/website-sdk 2026.516.4 → 2026.516.5

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.js CHANGED
@@ -1459,6 +1459,10 @@ function formatInterval(duration, billingIntervals) {
1459
1459
  const intervals = billingIntervals || defaultIntervals;
1460
1460
  return intervals[duration] || `/${duration}`;
1461
1461
  }
1462
+ function isEnterprisePlan(planName) {
1463
+ const name = planName.toLowerCase();
1464
+ return name.includes("team") || name.includes("business") || name.includes("enterprise");
1465
+ }
1462
1466
  function detectPlanTier(planName) {
1463
1467
  const name = planName.toLowerCase();
1464
1468
  if (name.includes("free") || name.includes("basic") || name.includes("starter") || name.includes("hobby")) {
@@ -1639,25 +1643,27 @@ function PricingSection(props) {
1639
1643
  cancelled = true;
1640
1644
  };
1641
1645
  }, [client, resolvedProductId]);
1642
- const plans = allPlans.filter(
1646
+ const individualAllPlans = allPlans.filter(
1647
+ (p) => !isEnterprisePlan(p.name)
1648
+ );
1649
+ const enterpriseApiPlans = allPlans.filter((p) => isEnterprisePlan(p.name));
1650
+ const individualPlans = individualAllPlans.filter(
1643
1651
  (plan) => billingCycle === "monthly" ? plan.duration === "monthly" : plan.duration === "yearly"
1644
1652
  );
1645
- if (!plans.some((p) => p.tier === "enterprise") && props.fallbackFeatures?.enterprise?.length) {
1646
- plans.push({
1647
- id: "enterprise-contact",
1648
- name: "Enterprise",
1649
- description: "For organizations that need more",
1650
- price: "Custom",
1651
- priceRaw: Infinity,
1652
- interval: "",
1653
- duration: billingCycle,
1654
- features: [...props.fallbackFeatures.enterprise],
1655
- popular: false,
1656
- ctaText: "Contact Sales",
1657
- ctaLink: props.contactUrl || "/contact",
1658
- tier: "enterprise"
1659
- });
1660
- }
1653
+ const enterpriseCards = enterpriseApiPlans.map((p) => {
1654
+ if (p.priceRaw === 0 && p.name.toLowerCase().includes("enterprise")) {
1655
+ return {
1656
+ ...p,
1657
+ price: "Custom",
1658
+ interval: "",
1659
+ ctaText: "Contact Sales",
1660
+ ctaLink: props.contactUrl || "/contact"
1661
+ };
1662
+ }
1663
+ return p;
1664
+ });
1665
+ const hasApiEnterprisePlans = enterpriseCards.length > 0;
1666
+ const plans = props.showAudienceTabs && audience === "enterprise" ? [] : individualPlans;
1661
1667
  if (loading) {
1662
1668
  return /* @__PURE__ */ jsxRuntime.jsx("section", { id, className: `py-12 sm:py-16 md:py-20 ${className}`, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "container mx-auto px-4 sm:px-6", children: [
1663
1669
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center mb-8 sm:mb-12", children: [
@@ -1736,74 +1742,85 @@ function PricingSection(props) {
1736
1742
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-xl sm:text-2xl font-bold text-foreground", children: props.enterpriseHeading || "Enterprise Solutions" }),
1737
1743
  /* @__PURE__ */ jsxRuntime.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." })
1738
1744
  ] }),
1739
- /* @__PURE__ */ jsxRuntime.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 ? (
1740
- /* Enterprise static cards */
1741
- props.enterprisePlans.map((ep) => /* @__PURE__ */ jsxRuntime.jsxs(
1742
- "div",
1743
- {
1744
- 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"}`,
1745
- children: [
1746
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center mb-6", children: [
1747
- ep.popular && ep.badge && /* @__PURE__ */ jsxRuntime.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 }),
1748
- /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-xl sm:text-2xl font-bold mb-2", children: ep.name }),
1749
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground text-sm", children: ep.subtitle })
1750
- ] }),
1751
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center mb-2", children: [
1752
- ep.price === "Custom" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-3xl sm:text-4xl font-bold", children: "Custom" }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-baseline justify-center gap-1", children: [
1753
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-4xl sm:text-5xl font-extrabold", children: ep.price }),
1754
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground text-lg", children: ep.period })
1745
+ /* @__PURE__ */ jsxRuntime.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) ? (
1746
+ /* Enterprise cards — from API if available, otherwise from static prop */
1747
+ (hasApiEnterprisePlans ? enterpriseCards : props.enterprisePlans || []).map((ep) => {
1748
+ const subtitle = ep.subtitle || ep.description || "";
1749
+ const btnText = ep.button || ep.ctaText || "Get Started";
1750
+ const btnLink = ep.buttonLink || ep.ctaLink || props.appLoginUrl;
1751
+ const period = ep.period || ep.interval || "";
1752
+ const note = ep.note || "";
1753
+ const badge = ep.badge || "";
1754
+ const isPopular = ep.popular;
1755
+ const features = ep.features || [];
1756
+ const price = String(ep.price);
1757
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1758
+ "div",
1759
+ {
1760
+ 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"}`,
1761
+ children: [
1762
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center mb-6", children: [
1763
+ isPopular && badge && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-block bg-primary text-primary-foreground px-4 py-1 rounded-full text-xs font-semibold mb-3", children: badge }),
1764
+ /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-xl sm:text-2xl font-bold mb-2", children: ep.name }),
1765
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground text-sm", children: subtitle })
1755
1766
  ] }),
1756
- ep.note && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-2 text-sm font-medium text-primary", children: ep.note })
1757
- ] }),
1758
- /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "space-y-3 mb-8 mt-6 flex-1", children: ep.features.map((feature) => /* @__PURE__ */ jsxRuntime.jsxs(
1759
- "li",
1760
- {
1761
- className: "text-sm flex items-start gap-2",
1762
- children: [
1763
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary mt-0.5 flex-shrink-0", children: "\u2713" }),
1764
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: feature })
1765
- ]
1766
- },
1767
- feature
1768
- )) }),
1769
- ep.buttonLink.startsWith("/") ? /* @__PURE__ */ jsxRuntime.jsx(
1770
- Button,
1771
- {
1772
- className: "w-full h-11",
1773
- variant: ep.popular ? "default" : "outline",
1774
- size: "lg",
1775
- asChild: true,
1776
- children: /* @__PURE__ */ jsxRuntime.jsx(
1777
- "a",
1778
- {
1779
- href: ep.buttonLink,
1780
- onClick: () => window.scrollTo({ top: 0, behavior: "smooth" }),
1781
- children: ep.button
1782
- }
1783
- )
1784
- }
1785
- ) : /* @__PURE__ */ jsxRuntime.jsx(
1786
- Button,
1787
- {
1788
- className: "w-full h-11",
1789
- variant: ep.popular ? "default" : "outline",
1790
- size: "lg",
1791
- asChild: true,
1792
- children: /* @__PURE__ */ jsxRuntime.jsx(
1793
- "a",
1794
- {
1795
- href: ep.buttonLink,
1796
- target: "_blank",
1797
- rel: "noopener noreferrer",
1798
- children: ep.button
1799
- }
1800
- )
1801
- }
1802
- )
1803
- ]
1804
- },
1805
- ep.name
1806
- ))
1767
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center mb-2", children: [
1768
+ price === "Custom" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-3xl sm:text-4xl font-bold", children: "Custom" }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-baseline justify-center gap-1", children: [
1769
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-4xl sm:text-5xl font-extrabold", children: price }),
1770
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground text-lg", children: period })
1771
+ ] }),
1772
+ note && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-2 text-sm font-medium text-primary", children: note })
1773
+ ] }),
1774
+ /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "space-y-3 mb-8 mt-6 flex-1", children: features.map((feature) => /* @__PURE__ */ jsxRuntime.jsxs(
1775
+ "li",
1776
+ {
1777
+ className: "text-sm flex items-start gap-2",
1778
+ children: [
1779
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary mt-0.5 flex-shrink-0", children: "\u2713" }),
1780
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: feature })
1781
+ ]
1782
+ },
1783
+ feature
1784
+ )) }),
1785
+ btnLink.startsWith("/") ? /* @__PURE__ */ jsxRuntime.jsx(
1786
+ Button,
1787
+ {
1788
+ className: "w-full h-11",
1789
+ variant: isPopular ? "default" : "outline",
1790
+ size: "lg",
1791
+ asChild: true,
1792
+ children: /* @__PURE__ */ jsxRuntime.jsx(
1793
+ "a",
1794
+ {
1795
+ href: btnLink,
1796
+ onClick: () => window.scrollTo({ top: 0, behavior: "smooth" }),
1797
+ children: btnText
1798
+ }
1799
+ )
1800
+ }
1801
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
1802
+ Button,
1803
+ {
1804
+ className: "w-full h-11",
1805
+ variant: isPopular ? "default" : "outline",
1806
+ size: "lg",
1807
+ asChild: true,
1808
+ children: /* @__PURE__ */ jsxRuntime.jsx(
1809
+ "a",
1810
+ {
1811
+ href: btnLink,
1812
+ target: "_blank",
1813
+ rel: "noopener noreferrer",
1814
+ children: btnText
1815
+ }
1816
+ )
1817
+ }
1818
+ )
1819
+ ]
1820
+ },
1821
+ ep.name
1822
+ );
1823
+ })
1807
1824
  ) : (
1808
1825
  /* Individual API-fetched cards */
1809
1826
  plans.map((plan) => /* @__PURE__ */ jsxRuntime.jsxs(