@burdenoff/website-sdk 2026.731.3 → 2026.802.1

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
@@ -2524,13 +2524,22 @@ function isEnterprisePlan(planName) {
2524
2524
  const name = planName.toLowerCase();
2525
2525
  return name.includes("team") || name.includes("business") || name.includes("enterprise");
2526
2526
  }
2527
+ function isEnterpriseAudiencePlan(plan) {
2528
+ if (!isEnterprisePlan(plan.name)) {
2529
+ return false;
2530
+ }
2531
+ if (typeof plan.priceRaw === "number") {
2532
+ return plan.priceRaw === 0;
2533
+ }
2534
+ return true;
2535
+ }
2527
2536
  function splitPlansByAudience(plans, showAudienceTabs) {
2528
2537
  if (!showAudienceTabs) {
2529
2538
  return { individualPlans: plans, enterprisePlans: [] };
2530
2539
  }
2531
2540
  return {
2532
- individualPlans: plans.filter((p) => !isEnterprisePlan(p.name)),
2533
- enterprisePlans: plans.filter((p) => isEnterprisePlan(p.name))
2541
+ individualPlans: plans.filter((p) => !isEnterpriseAudiencePlan(p)),
2542
+ enterprisePlans: plans.filter((p) => isEnterpriseAudiencePlan(p))
2534
2543
  };
2535
2544
  }
2536
2545
  function resolveEnterprisePlans(apiEnterprisePlans, staticEnterprisePlans, defaultEnterpriseCard) {
@@ -2558,7 +2567,7 @@ function detectPlanTier(planName) {
2558
2567
  function getFallbackFeaturesForTier(tier, fallbackFeatures) {
2559
2568
  return [...fallbackFeatures?.[tier] || []];
2560
2569
  }
2561
- function getMetadataForPlan(planName, planMetadata) {
2570
+ function getMetadataForPlan(planName, priceRaw, planMetadata) {
2562
2571
  const normalizedName = planName.toLowerCase();
2563
2572
  if (planMetadata?.[normalizedName]) {
2564
2573
  const meta = planMetadata[normalizedName];
@@ -2574,6 +2583,17 @@ function getMetadataForPlan(planName, planMetadata) {
2574
2583
  }
2575
2584
  const tier = detectPlanTier(planName);
2576
2585
  if (tier) {
2586
+ const isPaidEnterpriseName = tier === "enterprise" && typeof priceRaw === "number" && priceRaw > 0;
2587
+ if (isPaidEnterpriseName) {
2588
+ return {
2589
+ tier: "professional",
2590
+ displayName: planName,
2591
+ defaultDescription: "Choose this plan",
2592
+ popular: false,
2593
+ ctaText: "Get Started",
2594
+ ctaType: "signup"
2595
+ };
2596
+ }
2577
2597
  return {
2578
2598
  tier,
2579
2599
  displayName: planName,
@@ -2643,7 +2663,11 @@ function extractDisplayFeatures(features, planName, fallbackFeatures) {
2643
2663
  return [];
2644
2664
  }
2645
2665
  function transformToDisplayCard(plan, props) {
2646
- const metadata = getMetadataForPlan(plan.name, props.planMetadata);
2666
+ const metadata = getMetadataForPlan(
2667
+ plan.name,
2668
+ plan.price,
2669
+ props.planMetadata
2670
+ );
2647
2671
  const formattedPrice = formatPrice(
2648
2672
  plan.price,
2649
2673
  plan.currency,