@burdenoff/website-sdk 2026.802.1 → 2026.7203.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/components/pricing.d.mts +1 -91
- package/dist/components/pricing.d.ts +1 -91
- package/dist/components/pricing.js +19 -72
- package/dist/components/pricing.js.map +1 -1
- package/dist/components/pricing.mjs +20 -70
- package/dist/components/pricing.mjs.map +1 -1
- package/dist/content/index.js +7 -190
- package/dist/content/index.js.map +1 -1
- package/dist/content/index.mjs +7 -190
- package/dist/content/index.mjs.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +38 -302
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +38 -302
- package/dist/index.mjs.map +1 -1
- package/dist/store/index.js +12 -219
- package/dist/store/index.js.map +1 -1
- package/dist/store/index.mjs +12 -219
- package/dist/store/index.mjs.map +1 -1
- package/package.json +3 -5
|
@@ -313,7 +313,6 @@ var GET_PLANS_QUERY = `
|
|
|
313
313
|
features {
|
|
314
314
|
id
|
|
315
315
|
quotaId
|
|
316
|
-
context
|
|
317
316
|
quota {
|
|
318
317
|
id
|
|
319
318
|
name
|
|
@@ -353,35 +352,6 @@ function isEnterprisePlan(planName) {
|
|
|
353
352
|
const name = planName.toLowerCase();
|
|
354
353
|
return name.includes("team") || name.includes("business") || name.includes("enterprise");
|
|
355
354
|
}
|
|
356
|
-
function isEnterpriseAudiencePlan(plan) {
|
|
357
|
-
if (!isEnterprisePlan(plan.name)) {
|
|
358
|
-
return false;
|
|
359
|
-
}
|
|
360
|
-
if (typeof plan.priceRaw === "number") {
|
|
361
|
-
return plan.priceRaw === 0;
|
|
362
|
-
}
|
|
363
|
-
return true;
|
|
364
|
-
}
|
|
365
|
-
function splitPlansByAudience(plans, showAudienceTabs) {
|
|
366
|
-
if (!showAudienceTabs) {
|
|
367
|
-
return { individualPlans: plans, enterprisePlans: [] };
|
|
368
|
-
}
|
|
369
|
-
return {
|
|
370
|
-
individualPlans: plans.filter((p) => !isEnterpriseAudiencePlan(p)),
|
|
371
|
-
enterprisePlans: plans.filter((p) => isEnterpriseAudiencePlan(p))
|
|
372
|
-
};
|
|
373
|
-
}
|
|
374
|
-
function resolveEnterprisePlans(apiEnterprisePlans, staticEnterprisePlans, defaultEnterpriseCard) {
|
|
375
|
-
const staticPlans = staticEnterprisePlans || [];
|
|
376
|
-
if (apiEnterprisePlans.length === 0 && staticPlans.length === 0) {
|
|
377
|
-
return [defaultEnterpriseCard];
|
|
378
|
-
}
|
|
379
|
-
const apiNames = new Set(apiEnterprisePlans.map((p) => p.name.toLowerCase()));
|
|
380
|
-
const dedupedStaticPlans = staticPlans.filter(
|
|
381
|
-
(p) => !apiNames.has(p.name.toLowerCase())
|
|
382
|
-
);
|
|
383
|
-
return [...apiEnterprisePlans, ...dedupedStaticPlans];
|
|
384
|
-
}
|
|
385
355
|
function detectPlanTier(planName) {
|
|
386
356
|
const name = planName.toLowerCase();
|
|
387
357
|
if (name.includes("free") || name.includes("basic") || name.includes("starter") || name.includes("hobby")) {
|
|
@@ -396,7 +366,7 @@ function detectPlanTier(planName) {
|
|
|
396
366
|
function getFallbackFeaturesForTier(tier, fallbackFeatures) {
|
|
397
367
|
return [...fallbackFeatures?.[tier] || []];
|
|
398
368
|
}
|
|
399
|
-
function getMetadataForPlan(planName,
|
|
369
|
+
function getMetadataForPlan(planName, planMetadata) {
|
|
400
370
|
const normalizedName = planName.toLowerCase();
|
|
401
371
|
if (planMetadata?.[normalizedName]) {
|
|
402
372
|
const meta = planMetadata[normalizedName];
|
|
@@ -412,17 +382,6 @@ function getMetadataForPlan(planName, priceRaw, planMetadata) {
|
|
|
412
382
|
}
|
|
413
383
|
const tier = detectPlanTier(planName);
|
|
414
384
|
if (tier) {
|
|
415
|
-
const isPaidEnterpriseName = tier === "enterprise" && typeof priceRaw === "number" && priceRaw > 0;
|
|
416
|
-
if (isPaidEnterpriseName) {
|
|
417
|
-
return {
|
|
418
|
-
tier: "professional",
|
|
419
|
-
displayName: planName,
|
|
420
|
-
defaultDescription: "Choose this plan",
|
|
421
|
-
popular: false,
|
|
422
|
-
ctaText: "Get Started",
|
|
423
|
-
ctaType: "signup"
|
|
424
|
-
};
|
|
425
|
-
}
|
|
426
385
|
return {
|
|
427
386
|
tier,
|
|
428
387
|
displayName: planName,
|
|
@@ -446,27 +405,27 @@ function humanizeQuotaName(name) {
|
|
|
446
405
|
const resource = parts.length >= 3 ? parts[parts.length - 2] : parts[parts.length - 1];
|
|
447
406
|
return resource.replace(/[-_]/g, " ").replace(/\b\w/g, (c) => c.toUpperCase());
|
|
448
407
|
}
|
|
449
|
-
function
|
|
450
|
-
const quota = feature.quota;
|
|
451
|
-
if (!quota) return "";
|
|
408
|
+
function transformQuotaToFeature(quota) {
|
|
452
409
|
const { name, limits } = quota;
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
const
|
|
457
|
-
const
|
|
458
|
-
const
|
|
459
|
-
|
|
410
|
+
if (!limits || typeof limits !== "object") {
|
|
411
|
+
return humanizeQuotaName(name);
|
|
412
|
+
}
|
|
413
|
+
const limitsObj = limits;
|
|
414
|
+
const value = limitsObj.value;
|
|
415
|
+
const unit = limitsObj.unit;
|
|
416
|
+
const type = limitsObj.type;
|
|
417
|
+
const description = limitsObj.description;
|
|
418
|
+
if (typeof description === "string" && description) {
|
|
460
419
|
if (type === "number" && typeof value === "number") {
|
|
461
420
|
return `${value.toLocaleString()} ${description}`;
|
|
462
421
|
}
|
|
463
422
|
return description;
|
|
464
423
|
}
|
|
465
|
-
if (unit) {
|
|
424
|
+
if (typeof unit === "string" && unit) {
|
|
466
425
|
if (typeof value === "number") {
|
|
467
426
|
return `${value.toLocaleString()} ${unit}`;
|
|
468
427
|
}
|
|
469
|
-
return unit
|
|
428
|
+
return `${unit}`;
|
|
470
429
|
}
|
|
471
430
|
const label = humanizeQuotaName(name);
|
|
472
431
|
if (type === "boolean") {
|
|
@@ -485,18 +444,14 @@ function extractDisplayFeatures(features, planName, fallbackFeatures) {
|
|
|
485
444
|
return tierFeatures;
|
|
486
445
|
}
|
|
487
446
|
}
|
|
488
|
-
const quotaFeatures = features.filter((f) => f.quota).map((f) =>
|
|
447
|
+
const quotaFeatures = features.filter((f) => f.quota).map((f) => transformQuotaToFeature(f.quota));
|
|
489
448
|
if (quotaFeatures.length > 0) {
|
|
490
449
|
return quotaFeatures;
|
|
491
450
|
}
|
|
492
451
|
return [];
|
|
493
452
|
}
|
|
494
453
|
function transformToDisplayCard(plan, props) {
|
|
495
|
-
const metadata = getMetadataForPlan(
|
|
496
|
-
plan.name,
|
|
497
|
-
plan.price,
|
|
498
|
-
props.planMetadata
|
|
499
|
-
);
|
|
454
|
+
const metadata = getMetadataForPlan(plan.name, props.planMetadata);
|
|
500
455
|
const formattedPrice = formatPrice(
|
|
501
456
|
plan.price,
|
|
502
457
|
plan.currency,
|
|
@@ -577,10 +532,8 @@ function PricingSection(props) {
|
|
|
577
532
|
cancelled = true;
|
|
578
533
|
};
|
|
579
534
|
}, [client, resolvedProductId]);
|
|
580
|
-
const
|
|
581
|
-
|
|
582
|
-
enterprisePlans: enterpriseApiPlans
|
|
583
|
-
} = splitPlansByAudience(allPlans, props.showAudienceTabs);
|
|
535
|
+
const individualAllPlans = allPlans.filter((p) => !isEnterprisePlan(p.name));
|
|
536
|
+
const enterpriseApiPlans = allPlans.filter((p) => isEnterprisePlan(p.name));
|
|
584
537
|
const individualPlans = individualAllPlans.filter(
|
|
585
538
|
(plan) => billingCycle === "monthly" ? plan.duration === "monthly" : plan.duration === "yearly"
|
|
586
539
|
);
|
|
@@ -596,6 +549,7 @@ function PricingSection(props) {
|
|
|
596
549
|
}
|
|
597
550
|
return p;
|
|
598
551
|
});
|
|
552
|
+
const hasApiEnterprisePlans = enterpriseCards.length > 0;
|
|
599
553
|
const defaultEnterpriseCard = {
|
|
600
554
|
name: "Enterprise",
|
|
601
555
|
subtitle: "For organizations that need more",
|
|
@@ -616,11 +570,7 @@ function PricingSection(props) {
|
|
|
616
570
|
"Self-hosted option"
|
|
617
571
|
]
|
|
618
572
|
};
|
|
619
|
-
const resolvedEnterprisePlans =
|
|
620
|
-
enterpriseCards,
|
|
621
|
-
props.enterprisePlans,
|
|
622
|
-
defaultEnterpriseCard
|
|
623
|
-
);
|
|
573
|
+
const resolvedEnterprisePlans = hasApiEnterprisePlans ? enterpriseCards : props.enterprisePlans ? props.enterprisePlans : [defaultEnterpriseCard];
|
|
624
574
|
const plans = props.showAudienceTabs && audience === "enterprise" ? [] : individualPlans;
|
|
625
575
|
if (loading) {
|
|
626
576
|
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: [
|
|
@@ -884,6 +834,6 @@ function PricingPage(props) {
|
|
|
884
834
|
] });
|
|
885
835
|
}
|
|
886
836
|
|
|
887
|
-
export { PricingPage, PricingSection
|
|
837
|
+
export { PricingPage, PricingSection };
|
|
888
838
|
//# sourceMappingURL=pricing.mjs.map
|
|
889
839
|
//# sourceMappingURL=pricing.mjs.map
|