@monetizekit/react 0.2.0 → 0.4.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.cjs +469 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +106 -8
- package/dist/index.d.ts +106 -8
- package/dist/index.js +465 -10
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -162,13 +162,31 @@ interface CreditBalance {
|
|
|
162
162
|
balance: number;
|
|
163
163
|
currency?: string;
|
|
164
164
|
}
|
|
165
|
+
interface TeamMember {
|
|
166
|
+
name: string;
|
|
167
|
+
email: string;
|
|
168
|
+
role: string;
|
|
169
|
+
avatarUrl?: string;
|
|
170
|
+
}
|
|
171
|
+
interface Invoice {
|
|
172
|
+
id: string;
|
|
173
|
+
/** ISO date string. */
|
|
174
|
+
date: string;
|
|
175
|
+
/** Amount in major currency units (e.g. dollars). */
|
|
176
|
+
amount: number;
|
|
177
|
+
currency: string;
|
|
178
|
+
status: "paid" | "pending" | "overdue";
|
|
179
|
+
}
|
|
165
180
|
|
|
166
181
|
interface PricingTableProps {
|
|
167
182
|
/** Plans to render; if omitted, fetched live from the publishable-key API. */
|
|
168
183
|
plans?: Plan[];
|
|
169
184
|
/** Plan name to highlight as "Most Popular". */
|
|
170
185
|
highlightPlan?: string;
|
|
186
|
+
/** Active billing cycle (controlled). With `showBillingToggle`, also the initial value. */
|
|
171
187
|
billingCycle?: "monthly" | "annually";
|
|
188
|
+
/** Render an interactive Monthly/Yearly toggle above the cards. */
|
|
189
|
+
showBillingToggle?: boolean;
|
|
172
190
|
locale?: string;
|
|
173
191
|
onSelectPlan?: (planId: string) => void;
|
|
174
192
|
/** Where the Contact Sales CTA links (defaults to no-op). */
|
|
@@ -181,7 +199,47 @@ interface PricingTableProps {
|
|
|
181
199
|
/** Override the sample-data disclaimer copy. */
|
|
182
200
|
disclaimer?: ReactNode;
|
|
183
201
|
}
|
|
184
|
-
declare function PricingTable({ plans: plansProp, highlightPlan, locale, onSelectPlan, onContactSales, sampleWhenEmpty, disclaimer, }: PricingTableProps): react.JSX.Element;
|
|
202
|
+
declare function PricingTable({ plans: plansProp, highlightPlan, billingCycle, showBillingToggle, locale, onSelectPlan, onContactSales, sampleWhenEmpty, disclaimer, }: PricingTableProps): react.JSX.Element;
|
|
203
|
+
|
|
204
|
+
/** A labelled group of feature keys to compare across plans. */
|
|
205
|
+
interface ComparisonFeatureGroup {
|
|
206
|
+
title: string;
|
|
207
|
+
features: {
|
|
208
|
+
key: string;
|
|
209
|
+
label: string;
|
|
210
|
+
}[];
|
|
211
|
+
}
|
|
212
|
+
interface PricingComparisonProps {
|
|
213
|
+
/** Plans to compare; if omitted, fetched live from the publishable-key API. */
|
|
214
|
+
plans?: Plan[];
|
|
215
|
+
/**
|
|
216
|
+
* Feature groups (rows) to show. When omitted, a single "Features" group is
|
|
217
|
+
* derived from the union of the plans' entitlements.
|
|
218
|
+
*/
|
|
219
|
+
groups?: ComparisonFeatureGroup[];
|
|
220
|
+
highlightPlan?: string;
|
|
221
|
+
billingCycle?: "monthly" | "annually";
|
|
222
|
+
locale?: string;
|
|
223
|
+
sampleWhenEmpty?: boolean;
|
|
224
|
+
disclaimer?: ReactNode;
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* A feature-comparison table across plans (à la a "Compare plans" section).
|
|
228
|
+
* Reads live plans via the publishable key when `plans` is omitted, and falls
|
|
229
|
+
* back to illustrative sample plans (behind a disclaimer) when empty.
|
|
230
|
+
*/
|
|
231
|
+
declare function PricingComparison({ plans: plansProp, groups, highlightPlan, billingCycle, locale, sampleWhenEmpty, disclaimer, }: PricingComparisonProps): react.JSX.Element;
|
|
232
|
+
|
|
233
|
+
interface BillingCycleToggleProps {
|
|
234
|
+
value: "monthly" | "annually";
|
|
235
|
+
onChange: (value: "monthly" | "annually") => void;
|
|
236
|
+
/** When > 0, shows a "Save N%" hint on the Yearly option. */
|
|
237
|
+
savingsPercent?: number;
|
|
238
|
+
monthlyLabel?: string;
|
|
239
|
+
annuallyLabel?: string;
|
|
240
|
+
}
|
|
241
|
+
/** Monthly/Yearly billing switch used above pricing cards. */
|
|
242
|
+
declare function BillingCycleToggle({ value, onChange, savingsPercent, monthlyLabel, annuallyLabel, }: BillingCycleToggleProps): react.JSX.Element;
|
|
185
243
|
|
|
186
244
|
interface PaywallProps {
|
|
187
245
|
/** Feature key gating the content. */
|
|
@@ -192,9 +250,11 @@ interface PaywallProps {
|
|
|
192
250
|
description?: string;
|
|
193
251
|
ctaLabel?: string;
|
|
194
252
|
onUpgrade?: () => void;
|
|
253
|
+
/** Always render the locked upgrade prompt (for previews, no live customer). */
|
|
254
|
+
sample?: boolean;
|
|
195
255
|
}
|
|
196
256
|
/** Gate content behind an entitlement, showing an upgrade prompt when locked. */
|
|
197
|
-
declare function Paywall({ feature, children, title, description, ctaLabel, onUpgrade, }: PaywallProps): react.JSX.Element;
|
|
257
|
+
declare function Paywall({ feature, children, title, description, ctaLabel, onUpgrade, sample, }: PaywallProps): react.JSX.Element;
|
|
198
258
|
|
|
199
259
|
interface UsageBannerProps {
|
|
200
260
|
/** Meter to display usage for. */
|
|
@@ -207,6 +267,28 @@ interface UsageBannerProps {
|
|
|
207
267
|
/** Show current usage vs allotment for a capacity meter, with overage hint. */
|
|
208
268
|
declare function UsageBanner({ meterId, label, locale, warnAt, }: UsageBannerProps): react.JSX.Element;
|
|
209
269
|
|
|
270
|
+
type AlertBannerVariant = "info" | "warning" | "danger" | "neutral";
|
|
271
|
+
interface BannerAction {
|
|
272
|
+
label: string;
|
|
273
|
+
onClick?: () => void;
|
|
274
|
+
variant?: "primary" | "ghost";
|
|
275
|
+
}
|
|
276
|
+
interface AlertBannerProps {
|
|
277
|
+
variant?: AlertBannerVariant;
|
|
278
|
+
title: string;
|
|
279
|
+
description?: ReactNode;
|
|
280
|
+
/** Optional progress fraction (0–1) rendered as a colored bar. */
|
|
281
|
+
progress?: number;
|
|
282
|
+
actions?: BannerAction[];
|
|
283
|
+
/** Optional leading icon/emoji. */
|
|
284
|
+
icon?: ReactNode;
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* A flexible in-app notification banner (usage warnings, budget reached, low
|
|
288
|
+
* credits, trial ending, …). Presentational + fully themeable via tokens.
|
|
289
|
+
*/
|
|
290
|
+
declare function AlertBanner({ variant, title, description, progress, actions, icon, }: AlertBannerProps): react.JSX.Element;
|
|
291
|
+
|
|
210
292
|
interface CustomerPortalProps {
|
|
211
293
|
/** Current plan name to display. */
|
|
212
294
|
planName?: string;
|
|
@@ -214,9 +296,19 @@ interface CustomerPortalProps {
|
|
|
214
296
|
meterIds?: string[];
|
|
215
297
|
/** Whether to show the credit balance card. */
|
|
216
298
|
showCredits?: boolean;
|
|
299
|
+
/** Show a team/seats section. Defaults to on in `sample` mode. */
|
|
300
|
+
showTeam?: boolean;
|
|
301
|
+
teamMembers?: TeamMember[];
|
|
302
|
+
seats?: {
|
|
303
|
+
used: number;
|
|
304
|
+
max: number;
|
|
305
|
+
};
|
|
306
|
+
/** Show a billing-history (invoices) section. Defaults to on in `sample` mode. */
|
|
307
|
+
showInvoices?: boolean;
|
|
308
|
+
invoices?: Invoice[];
|
|
217
309
|
/**
|
|
218
|
-
* Render illustrative sample plan/usage/credit data behind a clear
|
|
219
|
-
* Use for previews or a fresh workspace with no plans/products
|
|
310
|
+
* Render illustrative sample plan/usage/credit/team/invoice data behind a clear
|
|
311
|
+
* disclaimer. Use for previews or a fresh workspace with no plans/products yet.
|
|
220
312
|
*/
|
|
221
313
|
sample?: boolean;
|
|
222
314
|
/** Override the sample-data disclaimer copy. */
|
|
@@ -227,8 +319,8 @@ interface CustomerPortalProps {
|
|
|
227
319
|
currency?: string;
|
|
228
320
|
onManageBilling?: () => void;
|
|
229
321
|
}
|
|
230
|
-
/** A self-service portal:
|
|
231
|
-
declare function CustomerPortal({ planName, meterIds, showCredits, sample, disclaimer, showBranding, locale, currency, onManageBilling, }: CustomerPortalProps): react.JSX.Element;
|
|
322
|
+
/** A self-service portal: plan, usage, credits, team, and invoices. */
|
|
323
|
+
declare function CustomerPortal({ planName, meterIds, showCredits, showTeam, teamMembers, seats, showInvoices, invoices, sample, disclaimer, showBranding, locale, currency, onManageBilling, }: CustomerPortalProps): react.JSX.Element;
|
|
232
324
|
|
|
233
325
|
interface EntitlementGateProps {
|
|
234
326
|
/** Feature key to check for the provider's customer. */
|
|
@@ -263,6 +355,12 @@ declare function SampleNotice({ children }: SampleNoticeProps): react.JSX.Elemen
|
|
|
263
355
|
declare const SAMPLE_PLANS: Plan[];
|
|
264
356
|
declare const SAMPLE_USAGE: Record<string, UsageResult>;
|
|
265
357
|
declare const SAMPLE_CREDITS: CreditBalance;
|
|
358
|
+
declare const SAMPLE_TEAM: {
|
|
359
|
+
members: TeamMember[];
|
|
360
|
+
seats: number;
|
|
361
|
+
maxSeats: number;
|
|
362
|
+
};
|
|
363
|
+
declare const SAMPLE_INVOICES: Invoice[];
|
|
266
364
|
declare const SAMPLE_PORTAL: {
|
|
267
365
|
readonly planName: "Growth";
|
|
268
366
|
readonly meterIds: readonly ["api_calls", "seats"];
|
|
@@ -286,8 +384,8 @@ interface PriceDisplay {
|
|
|
286
384
|
* when the plan is tagged `contact_sales` or has no public price; renders a
|
|
287
385
|
* "from $base + usage" headline when metered usage terms are present.
|
|
288
386
|
*/
|
|
289
|
-
declare function describePlanPrice(plan: Plan, locale?: string): PriceDisplay;
|
|
387
|
+
declare function describePlanPrice(plan: Plan, locale?: string, billingCycle?: "monthly" | "annually"): PriceDisplay;
|
|
290
388
|
/** Human-readable description of a usage term's metered tiers. */
|
|
291
389
|
declare function describeUsageTerm(term: PricingTerm, locale?: string): string;
|
|
292
390
|
|
|
293
|
-
export { type Appearance, type CreditBalance, CustomerPortal, type CustomerPortalProps, EntitlementGate, type EntitlementGateProps, type EntitlementResult, MonetizeKitClient, type MonetizeKitClientConfig, type MonetizeKitContextValue, MonetizeKitProvider, type MonetizeKitProviderProps, Paywall, type PaywallProps, type Plan, type PlanEntitlement, type PriceDisplay, PricingTable, type PricingTableProps, type PricingTerm, type PricingTier, SAMPLE_CREDITS, SAMPLE_NOTICE_TEXT, SAMPLE_PLANS, SAMPLE_PORTAL, SAMPLE_USAGE, SampleNotice, type SampleNoticeProps, THEME_PRESETS, THEME_PRESET_NAMES, type ThemePresetName, type ThemeTokens, UsageBanner, type UsageBannerProps, type UsageResult, describePlanPrice, describeUsageTerm, formatMoney, formatUnits, resolveTokens, tokensToStyle, useCredits, useEntitlement, useMonetizeKit, useUsage };
|
|
391
|
+
export { AlertBanner, type AlertBannerProps, type AlertBannerVariant, type Appearance, type BannerAction, BillingCycleToggle, type BillingCycleToggleProps, type ComparisonFeatureGroup, type CreditBalance, CustomerPortal, type CustomerPortalProps, EntitlementGate, type EntitlementGateProps, type EntitlementResult, type Invoice, MonetizeKitClient, type MonetizeKitClientConfig, type MonetizeKitContextValue, MonetizeKitProvider, type MonetizeKitProviderProps, Paywall, type PaywallProps, type Plan, type PlanEntitlement, type PriceDisplay, PricingComparison, type PricingComparisonProps, PricingTable, type PricingTableProps, type PricingTerm, type PricingTier, SAMPLE_CREDITS, SAMPLE_INVOICES, SAMPLE_NOTICE_TEXT, SAMPLE_PLANS, SAMPLE_PORTAL, SAMPLE_TEAM, SAMPLE_USAGE, SampleNotice, type SampleNoticeProps, THEME_PRESETS, THEME_PRESET_NAMES, type TeamMember, type ThemePresetName, type ThemeTokens, UsageBanner, type UsageBannerProps, type UsageResult, describePlanPrice, describeUsageTerm, formatMoney, formatUnits, resolveTokens, tokensToStyle, useCredits, useEntitlement, useMonetizeKit, useUsage };
|
package/dist/index.d.ts
CHANGED
|
@@ -162,13 +162,31 @@ interface CreditBalance {
|
|
|
162
162
|
balance: number;
|
|
163
163
|
currency?: string;
|
|
164
164
|
}
|
|
165
|
+
interface TeamMember {
|
|
166
|
+
name: string;
|
|
167
|
+
email: string;
|
|
168
|
+
role: string;
|
|
169
|
+
avatarUrl?: string;
|
|
170
|
+
}
|
|
171
|
+
interface Invoice {
|
|
172
|
+
id: string;
|
|
173
|
+
/** ISO date string. */
|
|
174
|
+
date: string;
|
|
175
|
+
/** Amount in major currency units (e.g. dollars). */
|
|
176
|
+
amount: number;
|
|
177
|
+
currency: string;
|
|
178
|
+
status: "paid" | "pending" | "overdue";
|
|
179
|
+
}
|
|
165
180
|
|
|
166
181
|
interface PricingTableProps {
|
|
167
182
|
/** Plans to render; if omitted, fetched live from the publishable-key API. */
|
|
168
183
|
plans?: Plan[];
|
|
169
184
|
/** Plan name to highlight as "Most Popular". */
|
|
170
185
|
highlightPlan?: string;
|
|
186
|
+
/** Active billing cycle (controlled). With `showBillingToggle`, also the initial value. */
|
|
171
187
|
billingCycle?: "monthly" | "annually";
|
|
188
|
+
/** Render an interactive Monthly/Yearly toggle above the cards. */
|
|
189
|
+
showBillingToggle?: boolean;
|
|
172
190
|
locale?: string;
|
|
173
191
|
onSelectPlan?: (planId: string) => void;
|
|
174
192
|
/** Where the Contact Sales CTA links (defaults to no-op). */
|
|
@@ -181,7 +199,47 @@ interface PricingTableProps {
|
|
|
181
199
|
/** Override the sample-data disclaimer copy. */
|
|
182
200
|
disclaimer?: ReactNode;
|
|
183
201
|
}
|
|
184
|
-
declare function PricingTable({ plans: plansProp, highlightPlan, locale, onSelectPlan, onContactSales, sampleWhenEmpty, disclaimer, }: PricingTableProps): react.JSX.Element;
|
|
202
|
+
declare function PricingTable({ plans: plansProp, highlightPlan, billingCycle, showBillingToggle, locale, onSelectPlan, onContactSales, sampleWhenEmpty, disclaimer, }: PricingTableProps): react.JSX.Element;
|
|
203
|
+
|
|
204
|
+
/** A labelled group of feature keys to compare across plans. */
|
|
205
|
+
interface ComparisonFeatureGroup {
|
|
206
|
+
title: string;
|
|
207
|
+
features: {
|
|
208
|
+
key: string;
|
|
209
|
+
label: string;
|
|
210
|
+
}[];
|
|
211
|
+
}
|
|
212
|
+
interface PricingComparisonProps {
|
|
213
|
+
/** Plans to compare; if omitted, fetched live from the publishable-key API. */
|
|
214
|
+
plans?: Plan[];
|
|
215
|
+
/**
|
|
216
|
+
* Feature groups (rows) to show. When omitted, a single "Features" group is
|
|
217
|
+
* derived from the union of the plans' entitlements.
|
|
218
|
+
*/
|
|
219
|
+
groups?: ComparisonFeatureGroup[];
|
|
220
|
+
highlightPlan?: string;
|
|
221
|
+
billingCycle?: "monthly" | "annually";
|
|
222
|
+
locale?: string;
|
|
223
|
+
sampleWhenEmpty?: boolean;
|
|
224
|
+
disclaimer?: ReactNode;
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* A feature-comparison table across plans (à la a "Compare plans" section).
|
|
228
|
+
* Reads live plans via the publishable key when `plans` is omitted, and falls
|
|
229
|
+
* back to illustrative sample plans (behind a disclaimer) when empty.
|
|
230
|
+
*/
|
|
231
|
+
declare function PricingComparison({ plans: plansProp, groups, highlightPlan, billingCycle, locale, sampleWhenEmpty, disclaimer, }: PricingComparisonProps): react.JSX.Element;
|
|
232
|
+
|
|
233
|
+
interface BillingCycleToggleProps {
|
|
234
|
+
value: "monthly" | "annually";
|
|
235
|
+
onChange: (value: "monthly" | "annually") => void;
|
|
236
|
+
/** When > 0, shows a "Save N%" hint on the Yearly option. */
|
|
237
|
+
savingsPercent?: number;
|
|
238
|
+
monthlyLabel?: string;
|
|
239
|
+
annuallyLabel?: string;
|
|
240
|
+
}
|
|
241
|
+
/** Monthly/Yearly billing switch used above pricing cards. */
|
|
242
|
+
declare function BillingCycleToggle({ value, onChange, savingsPercent, monthlyLabel, annuallyLabel, }: BillingCycleToggleProps): react.JSX.Element;
|
|
185
243
|
|
|
186
244
|
interface PaywallProps {
|
|
187
245
|
/** Feature key gating the content. */
|
|
@@ -192,9 +250,11 @@ interface PaywallProps {
|
|
|
192
250
|
description?: string;
|
|
193
251
|
ctaLabel?: string;
|
|
194
252
|
onUpgrade?: () => void;
|
|
253
|
+
/** Always render the locked upgrade prompt (for previews, no live customer). */
|
|
254
|
+
sample?: boolean;
|
|
195
255
|
}
|
|
196
256
|
/** Gate content behind an entitlement, showing an upgrade prompt when locked. */
|
|
197
|
-
declare function Paywall({ feature, children, title, description, ctaLabel, onUpgrade, }: PaywallProps): react.JSX.Element;
|
|
257
|
+
declare function Paywall({ feature, children, title, description, ctaLabel, onUpgrade, sample, }: PaywallProps): react.JSX.Element;
|
|
198
258
|
|
|
199
259
|
interface UsageBannerProps {
|
|
200
260
|
/** Meter to display usage for. */
|
|
@@ -207,6 +267,28 @@ interface UsageBannerProps {
|
|
|
207
267
|
/** Show current usage vs allotment for a capacity meter, with overage hint. */
|
|
208
268
|
declare function UsageBanner({ meterId, label, locale, warnAt, }: UsageBannerProps): react.JSX.Element;
|
|
209
269
|
|
|
270
|
+
type AlertBannerVariant = "info" | "warning" | "danger" | "neutral";
|
|
271
|
+
interface BannerAction {
|
|
272
|
+
label: string;
|
|
273
|
+
onClick?: () => void;
|
|
274
|
+
variant?: "primary" | "ghost";
|
|
275
|
+
}
|
|
276
|
+
interface AlertBannerProps {
|
|
277
|
+
variant?: AlertBannerVariant;
|
|
278
|
+
title: string;
|
|
279
|
+
description?: ReactNode;
|
|
280
|
+
/** Optional progress fraction (0–1) rendered as a colored bar. */
|
|
281
|
+
progress?: number;
|
|
282
|
+
actions?: BannerAction[];
|
|
283
|
+
/** Optional leading icon/emoji. */
|
|
284
|
+
icon?: ReactNode;
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* A flexible in-app notification banner (usage warnings, budget reached, low
|
|
288
|
+
* credits, trial ending, …). Presentational + fully themeable via tokens.
|
|
289
|
+
*/
|
|
290
|
+
declare function AlertBanner({ variant, title, description, progress, actions, icon, }: AlertBannerProps): react.JSX.Element;
|
|
291
|
+
|
|
210
292
|
interface CustomerPortalProps {
|
|
211
293
|
/** Current plan name to display. */
|
|
212
294
|
planName?: string;
|
|
@@ -214,9 +296,19 @@ interface CustomerPortalProps {
|
|
|
214
296
|
meterIds?: string[];
|
|
215
297
|
/** Whether to show the credit balance card. */
|
|
216
298
|
showCredits?: boolean;
|
|
299
|
+
/** Show a team/seats section. Defaults to on in `sample` mode. */
|
|
300
|
+
showTeam?: boolean;
|
|
301
|
+
teamMembers?: TeamMember[];
|
|
302
|
+
seats?: {
|
|
303
|
+
used: number;
|
|
304
|
+
max: number;
|
|
305
|
+
};
|
|
306
|
+
/** Show a billing-history (invoices) section. Defaults to on in `sample` mode. */
|
|
307
|
+
showInvoices?: boolean;
|
|
308
|
+
invoices?: Invoice[];
|
|
217
309
|
/**
|
|
218
|
-
* Render illustrative sample plan/usage/credit data behind a clear
|
|
219
|
-
* Use for previews or a fresh workspace with no plans/products
|
|
310
|
+
* Render illustrative sample plan/usage/credit/team/invoice data behind a clear
|
|
311
|
+
* disclaimer. Use for previews or a fresh workspace with no plans/products yet.
|
|
220
312
|
*/
|
|
221
313
|
sample?: boolean;
|
|
222
314
|
/** Override the sample-data disclaimer copy. */
|
|
@@ -227,8 +319,8 @@ interface CustomerPortalProps {
|
|
|
227
319
|
currency?: string;
|
|
228
320
|
onManageBilling?: () => void;
|
|
229
321
|
}
|
|
230
|
-
/** A self-service portal:
|
|
231
|
-
declare function CustomerPortal({ planName, meterIds, showCredits, sample, disclaimer, showBranding, locale, currency, onManageBilling, }: CustomerPortalProps): react.JSX.Element;
|
|
322
|
+
/** A self-service portal: plan, usage, credits, team, and invoices. */
|
|
323
|
+
declare function CustomerPortal({ planName, meterIds, showCredits, showTeam, teamMembers, seats, showInvoices, invoices, sample, disclaimer, showBranding, locale, currency, onManageBilling, }: CustomerPortalProps): react.JSX.Element;
|
|
232
324
|
|
|
233
325
|
interface EntitlementGateProps {
|
|
234
326
|
/** Feature key to check for the provider's customer. */
|
|
@@ -263,6 +355,12 @@ declare function SampleNotice({ children }: SampleNoticeProps): react.JSX.Elemen
|
|
|
263
355
|
declare const SAMPLE_PLANS: Plan[];
|
|
264
356
|
declare const SAMPLE_USAGE: Record<string, UsageResult>;
|
|
265
357
|
declare const SAMPLE_CREDITS: CreditBalance;
|
|
358
|
+
declare const SAMPLE_TEAM: {
|
|
359
|
+
members: TeamMember[];
|
|
360
|
+
seats: number;
|
|
361
|
+
maxSeats: number;
|
|
362
|
+
};
|
|
363
|
+
declare const SAMPLE_INVOICES: Invoice[];
|
|
266
364
|
declare const SAMPLE_PORTAL: {
|
|
267
365
|
readonly planName: "Growth";
|
|
268
366
|
readonly meterIds: readonly ["api_calls", "seats"];
|
|
@@ -286,8 +384,8 @@ interface PriceDisplay {
|
|
|
286
384
|
* when the plan is tagged `contact_sales` or has no public price; renders a
|
|
287
385
|
* "from $base + usage" headline when metered usage terms are present.
|
|
288
386
|
*/
|
|
289
|
-
declare function describePlanPrice(plan: Plan, locale?: string): PriceDisplay;
|
|
387
|
+
declare function describePlanPrice(plan: Plan, locale?: string, billingCycle?: "monthly" | "annually"): PriceDisplay;
|
|
290
388
|
/** Human-readable description of a usage term's metered tiers. */
|
|
291
389
|
declare function describeUsageTerm(term: PricingTerm, locale?: string): string;
|
|
292
390
|
|
|
293
|
-
export { type Appearance, type CreditBalance, CustomerPortal, type CustomerPortalProps, EntitlementGate, type EntitlementGateProps, type EntitlementResult, MonetizeKitClient, type MonetizeKitClientConfig, type MonetizeKitContextValue, MonetizeKitProvider, type MonetizeKitProviderProps, Paywall, type PaywallProps, type Plan, type PlanEntitlement, type PriceDisplay, PricingTable, type PricingTableProps, type PricingTerm, type PricingTier, SAMPLE_CREDITS, SAMPLE_NOTICE_TEXT, SAMPLE_PLANS, SAMPLE_PORTAL, SAMPLE_USAGE, SampleNotice, type SampleNoticeProps, THEME_PRESETS, THEME_PRESET_NAMES, type ThemePresetName, type ThemeTokens, UsageBanner, type UsageBannerProps, type UsageResult, describePlanPrice, describeUsageTerm, formatMoney, formatUnits, resolveTokens, tokensToStyle, useCredits, useEntitlement, useMonetizeKit, useUsage };
|
|
391
|
+
export { AlertBanner, type AlertBannerProps, type AlertBannerVariant, type Appearance, type BannerAction, BillingCycleToggle, type BillingCycleToggleProps, type ComparisonFeatureGroup, type CreditBalance, CustomerPortal, type CustomerPortalProps, EntitlementGate, type EntitlementGateProps, type EntitlementResult, type Invoice, MonetizeKitClient, type MonetizeKitClientConfig, type MonetizeKitContextValue, MonetizeKitProvider, type MonetizeKitProviderProps, Paywall, type PaywallProps, type Plan, type PlanEntitlement, type PriceDisplay, PricingComparison, type PricingComparisonProps, PricingTable, type PricingTableProps, type PricingTerm, type PricingTier, SAMPLE_CREDITS, SAMPLE_INVOICES, SAMPLE_NOTICE_TEXT, SAMPLE_PLANS, SAMPLE_PORTAL, SAMPLE_TEAM, SAMPLE_USAGE, SampleNotice, type SampleNoticeProps, THEME_PRESETS, THEME_PRESET_NAMES, type TeamMember, type ThemePresetName, type ThemeTokens, UsageBanner, type UsageBannerProps, type UsageResult, describePlanPrice, describeUsageTerm, formatMoney, formatUnits, resolveTokens, tokensToStyle, useCredits, useEntitlement, useMonetizeKit, useUsage };
|