@bpinternal/billing-ui 0.23.0 → 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.
package/dist/index.d.ts CHANGED
@@ -29,11 +29,11 @@ export declare type Addon = Awaited<ReturnType<BillingClient['listAddons']>>[num
29
29
  export declare function addonDisplayName(name: string): string;
30
30
 
31
31
  /**
32
- * "Now → New" resource totals once the selected add-on quantities are applied.
33
- * new = plan base feature + Σ (quantity × add-on increment) across add-ons that grant it.
34
- * Only returns rows that actually change, so the preview stays focused.
32
+ * "Now → New" resource totals: plan base + add-ons owned now (`currentQuantities`) vs. plan base +
33
+ * the selected add-on quantities (`quantities`). One row per resource an add-on grants, even when
34
+ * unchanged (e.g. reverting a scheduled downgrade).
35
35
  */
36
- export declare function addonLimitsPreview(plan: Plan, addons: Addon[] | undefined, quantities: Record<string, number>): LimitPreviewRow[];
36
+ export declare function addonLimitsPreview(plan: Plan, addons: Addon[] | undefined, quantities: Record<string, number>, currentQuantities?: Record<string, number>): LimitPreviewRow[];
37
37
 
38
38
  /**
39
39
  * Add-on price for a given plan. Smaug keys add-on prices by plan id