@hook-sdk/template 0.26.0 → 0.28.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 +942 -266
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +329 -23
- package/dist/index.d.ts +329 -23
- package/dist/index.js +968 -309
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
2
|
import * as react from 'react';
|
|
3
3
|
import { ReactNode, ComponentType, Component } from 'react';
|
|
4
4
|
import * as _hook_sdk_sdk from '@hook-sdk/sdk';
|
|
5
|
-
import { HookContextValue, SubscribeAnonymousResult, CheckoutMethod as CheckoutMethod$1, CheckoutCycle,
|
|
5
|
+
import { HookContextValue, SubscribeAnonymousResult, CheckoutMethod as CheckoutMethod$1, CheckoutCycle, CheckoutCardData, CheckoutHolderInfo, CheckoutResult, PlanState, ReminderSlot } from '@hook-sdk/sdk';
|
|
6
6
|
export { PlanInfo, PlanState, useTrackOnboardingStep } from '@hook-sdk/sdk';
|
|
7
7
|
import { z } from 'zod';
|
|
8
8
|
|
|
@@ -609,7 +609,9 @@ interface PaywallPlanDerived {
|
|
|
609
609
|
* - `availableMethods` mirrors `methods`
|
|
610
610
|
* - `opening` mirrors `submitting`
|
|
611
611
|
* - `checkout(args)` takes legacy args + validates card/holderInfo presence
|
|
612
|
-
* - `dismissPix`
|
|
612
|
+
* - `dismissPix` clears SDK `pixPending` (template 0.24.0 + SDK 0.26.0 wire,
|
|
613
|
+
* resolves G154; was no-op pre-0.24 and apps had to maintain a local
|
|
614
|
+
* `pixActive` flag to bridge the gap).
|
|
613
615
|
* - `monthlyEquivalent(cycle)` helper
|
|
614
616
|
*/
|
|
615
617
|
declare function usePaywallState(): {
|
|
@@ -1215,30 +1217,114 @@ type PaywallProps = {
|
|
|
1215
1217
|
* Composed top-level paywall component. Apps wrap it in their `PaywallOffer.tsx`
|
|
1216
1218
|
* (or `Offer.tsx`) and pass copy + themeClasses + slots. Logic + telemetry live
|
|
1217
1219
|
* here. To customize layout entirely, drop down to the primitives.
|
|
1220
|
+
*
|
|
1221
|
+
* Internally wraps a `<PaywallProvider>` so the refactored primitives can read
|
|
1222
|
+
* state from context. Apps wanting Level 2 / Level 3 composition can use
|
|
1223
|
+
* `<PaywallProvider>` + Lego blocks directly without going through `<Paywall>`.
|
|
1218
1224
|
*/
|
|
1219
1225
|
declare function Paywall({ copy, themeClasses, slots, onBeforeCheckout, }: PaywallProps): react_jsx_runtime.JSX.Element;
|
|
1220
1226
|
|
|
1221
1227
|
type PaywallMethodTabsProps = {
|
|
1222
|
-
|
|
1223
|
-
selected: CheckoutMethod;
|
|
1224
|
-
onSelect: (m: CheckoutMethod) => void;
|
|
1228
|
+
/** Tab labels keyed by checkout method. App-provided copy (not state). */
|
|
1225
1229
|
labels: Partial<Record<CheckoutMethod, string>>;
|
|
1230
|
+
/** Wrapper className. */
|
|
1226
1231
|
className?: string;
|
|
1232
|
+
/** Individual tab className. */
|
|
1227
1233
|
tabClassName?: string;
|
|
1234
|
+
/** Individual tab className when active. */
|
|
1228
1235
|
tabActiveClassName?: string;
|
|
1229
1236
|
};
|
|
1230
|
-
declare function PaywallMethodTabs({
|
|
1237
|
+
declare function PaywallMethodTabs({ labels, className, tabClassName, tabActiveClassName, }: PaywallMethodTabsProps): react_jsx_runtime.JSX.Element | null;
|
|
1231
1238
|
|
|
1232
1239
|
type PaywallMethodContentProps = {
|
|
1233
|
-
|
|
1240
|
+
/**
|
|
1241
|
+
* App-provided copy keyed by method. `pix` covers both `pix-auto` and
|
|
1242
|
+
* `pix-once`. `cardConsumedTrial` is used when the active method is `card`
|
|
1243
|
+
* AND `hasConsumedTrial` (read from context) is true.
|
|
1244
|
+
*/
|
|
1234
1245
|
copy: Pick<PaywallCopy, 'pix' | 'card'> & {
|
|
1235
1246
|
cardConsumedTrial?: PaywallCopy['cardConsumedTrial'];
|
|
1236
1247
|
};
|
|
1237
|
-
|
|
1248
|
+
/** Tab-panel wrapper className. */
|
|
1238
1249
|
className?: string;
|
|
1250
|
+
/** Per-row className. */
|
|
1239
1251
|
rowClassName?: string;
|
|
1240
1252
|
};
|
|
1241
|
-
declare function PaywallMethodContent({
|
|
1253
|
+
declare function PaywallMethodContent({ copy, className, rowClassName }: PaywallMethodContentProps): react_jsx_runtime.JSX.Element;
|
|
1254
|
+
|
|
1255
|
+
/**
|
|
1256
|
+
* Full return shape of `usePaywallState()`. Apps consuming via
|
|
1257
|
+
* `usePaywallContext()` get the same fields they'd get from the headless
|
|
1258
|
+
* hook directly — no internal-only fields hidden.
|
|
1259
|
+
*
|
|
1260
|
+
* This is the "Level 3" escape-hatch contract: any app can drop down to raw
|
|
1261
|
+
* context and render an entirely custom paywall, with the template still
|
|
1262
|
+
* owning state + telemetry + checkout dispatch.
|
|
1263
|
+
*/
|
|
1264
|
+
type PaywallContextValue = ReturnType<typeof usePaywallState>;
|
|
1265
|
+
/**
|
|
1266
|
+
* Context that carries the full paywall state down to Lego blocks. Null
|
|
1267
|
+
* outside `<PaywallProvider>`. Consumer hook `usePaywallContext()` throws on
|
|
1268
|
+
* null to surface mis-mounted blocks early.
|
|
1269
|
+
*/
|
|
1270
|
+
declare const PaywallContext: react.Context<{
|
|
1271
|
+
status: SubscriptionStatus;
|
|
1272
|
+
hasAccess: boolean | null;
|
|
1273
|
+
daysLeftInTrial: number | null;
|
|
1274
|
+
initialLoadComplete: boolean;
|
|
1275
|
+
plan: PaywallPlanDerived | null;
|
|
1276
|
+
cycle: _hook_sdk_sdk.CheckoutCycle;
|
|
1277
|
+
setCycle: react.Dispatch<react.SetStateAction<_hook_sdk_sdk.CheckoutCycle>>;
|
|
1278
|
+
methods: readonly _hook_sdk_sdk.CheckoutMethod[];
|
|
1279
|
+
selectedMethod: _hook_sdk_sdk.CheckoutMethod;
|
|
1280
|
+
setSelectedMethod: react.Dispatch<react.SetStateAction<_hook_sdk_sdk.CheckoutMethod>>;
|
|
1281
|
+
hasConsumedTrial: boolean;
|
|
1282
|
+
currentPriceCents: number;
|
|
1283
|
+
currentMonthlyEquivCents: number;
|
|
1284
|
+
anchorPriceCents: number | null;
|
|
1285
|
+
selectMethod: (next: _hook_sdk_sdk.CheckoutMethod) => void;
|
|
1286
|
+
selectCycle: (next: _hook_sdk_sdk.CheckoutCycle) => void;
|
|
1287
|
+
isFree: boolean;
|
|
1288
|
+
trialDaysForMethod: (method: _hook_sdk_sdk.CheckoutMethod) => number;
|
|
1289
|
+
trialDaysCard: number;
|
|
1290
|
+
trialDaysPix: number;
|
|
1291
|
+
cpfState: CpfState;
|
|
1292
|
+
cardState: CardFormStateWithSetter;
|
|
1293
|
+
submit: () => Promise<_hook_sdk_sdk.CheckoutResult | undefined>;
|
|
1294
|
+
checkout: (args: PaywallCheckoutArgs) => Promise<void>;
|
|
1295
|
+
cancel: () => Promise<void>;
|
|
1296
|
+
pixPending: PixPending | null;
|
|
1297
|
+
error: PaywallError | null;
|
|
1298
|
+
submitting: boolean;
|
|
1299
|
+
opening: boolean;
|
|
1300
|
+
availableMethods: readonly _hook_sdk_sdk.CheckoutMethod[];
|
|
1301
|
+
monthlyEquivalent: (c: _hook_sdk_sdk.CheckoutCycle) => number;
|
|
1302
|
+
dismissPix: () => void;
|
|
1303
|
+
refreshPlan: () => void;
|
|
1304
|
+
} | null>;
|
|
1305
|
+
type PaywallProviderProps = {
|
|
1306
|
+
children: ReactNode;
|
|
1307
|
+
};
|
|
1308
|
+
/**
|
|
1309
|
+
* Owns the headless paywall state for one paywall surface. All Lego blocks
|
|
1310
|
+
* (PriceHeadline, AnchorPrice, FinePrint, refactored primitives) and the
|
|
1311
|
+
* composed `<Paywall>` read state via this provider.
|
|
1312
|
+
*
|
|
1313
|
+
* Multiple compositions can share state by sharing one `<PaywallProvider>`
|
|
1314
|
+
* parent (e.g. side-by-side variants on a dev/test page). Multiple
|
|
1315
|
+
* providers in the same tree get independent state.
|
|
1316
|
+
*/
|
|
1317
|
+
declare function PaywallProvider({ children }: PaywallProviderProps): react_jsx_runtime.JSX.Element;
|
|
1318
|
+
|
|
1319
|
+
/**
|
|
1320
|
+
* Consumer hook for the paywall context. Returns the non-null state object
|
|
1321
|
+
* (same shape as `usePaywallState()`) when called inside `<PaywallProvider>`.
|
|
1322
|
+
*
|
|
1323
|
+
* Throws `"usePaywallContext must be used within <PaywallProvider>"` when the
|
|
1324
|
+
* provider is missing — surfaces mis-mounted Lego blocks at render time
|
|
1325
|
+
* instead of silently rendering with stale or default state.
|
|
1326
|
+
*/
|
|
1327
|
+
declare function usePaywallContext(): PaywallContextValue;
|
|
1242
1328
|
|
|
1243
1329
|
type CycleLabels = {
|
|
1244
1330
|
annualLabel: string;
|
|
@@ -1246,37 +1332,257 @@ type CycleLabels = {
|
|
|
1246
1332
|
annualSuffix: string;
|
|
1247
1333
|
monthlySuffix: string;
|
|
1248
1334
|
};
|
|
1249
|
-
|
|
1335
|
+
/** Cycle picker visual variants. `default` preserves the current visual. */
|
|
1336
|
+
type PaywallCyclePickerVariant = 'default' | 'premium-gold' | 'pink-pill';
|
|
1337
|
+
/** State passed to the optional `render` escape hatch. */
|
|
1338
|
+
type PaywallCyclePickerRenderArgs = {
|
|
1250
1339
|
cycles: readonly Cycle[];
|
|
1251
1340
|
selected: Cycle;
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
/** Monthly-equiv for YEARLY (priceCents / 12). Same as priceCentsByCycle for MONTHLY. */
|
|
1258
|
-
monthlyEquivByCycle: Record<Cycle, number>;
|
|
1341
|
+
setCycle: (c: Cycle) => void;
|
|
1342
|
+
plan: ReturnType<typeof usePaywallContext>['plan'];
|
|
1343
|
+
anchorPriceCents: number | null;
|
|
1344
|
+
};
|
|
1345
|
+
type PaywallCyclePickerProps = {
|
|
1259
1346
|
labels: CycleLabels;
|
|
1347
|
+
/** Root wrapper className. */
|
|
1260
1348
|
className?: string;
|
|
1349
|
+
/** Per-card base className. */
|
|
1261
1350
|
cardClassName?: string;
|
|
1351
|
+
/** Applied when the card is selected (in addition to `cardClassName`). */
|
|
1262
1352
|
cardSelectedClassName?: string;
|
|
1353
|
+
/** Anchor strikethrough className inside the card. */
|
|
1263
1354
|
anchorClassName?: string;
|
|
1355
|
+
/** Visual variant. Variants are sugar for className combos. */
|
|
1356
|
+
variant?: PaywallCyclePickerVariant;
|
|
1357
|
+
/**
|
|
1358
|
+
* Render-prop escape hatch. When provided, the picker returns the prop's
|
|
1359
|
+
* output wrapped in a root element with the configured `className`. State
|
|
1360
|
+
* plumbing stays; visual is 100% the app's.
|
|
1361
|
+
*/
|
|
1362
|
+
render?: (state: PaywallCyclePickerRenderArgs) => ReactNode;
|
|
1264
1363
|
};
|
|
1265
|
-
declare function PaywallCyclePicker({
|
|
1364
|
+
declare function PaywallCyclePicker({ labels, className, cardClassName, cardSelectedClassName, anchorClassName, variant, render, }: PaywallCyclePickerProps): react_jsx_runtime.JSX.Element | null;
|
|
1266
1365
|
|
|
1267
1366
|
type PaywallCtaProps = {
|
|
1367
|
+
/** Already-interpolated CTA label (e.g. "Pagar R$ 19,90 com PIX"). */
|
|
1268
1368
|
ctaLabel: string;
|
|
1369
|
+
/** Label shown while `submitting === true`. Defaults to `ctaLabel`. */
|
|
1269
1370
|
loadingLabel?: string;
|
|
1371
|
+
/**
|
|
1372
|
+
* Switch-hint copy shown under the CTA when the other method is available.
|
|
1373
|
+
* Caller decides visibility (typically only when `methods.length > 1`).
|
|
1374
|
+
*/
|
|
1270
1375
|
switchHint?: string;
|
|
1376
|
+
/** Trust line under the CTA / switch hint. */
|
|
1271
1377
|
trustLine: string;
|
|
1272
|
-
|
|
1273
|
-
disabled?: boolean;
|
|
1274
|
-
loading?: boolean;
|
|
1378
|
+
/** Wrapper className. */
|
|
1275
1379
|
className?: string;
|
|
1380
|
+
/** Button className. */
|
|
1276
1381
|
buttonClassName?: string;
|
|
1382
|
+
/** Switch-hint paragraph className. */
|
|
1277
1383
|
switchHintClassName?: string;
|
|
1384
|
+
/** Trust-line paragraph className. */
|
|
1278
1385
|
trustClassName?: string;
|
|
1279
1386
|
};
|
|
1280
|
-
|
|
1387
|
+
/**
|
|
1388
|
+
* CTA button + switch hint + trust line. Reads `submit` + `submitting` from
|
|
1389
|
+
* context — the button dispatches the checkout on click and disables itself
|
|
1390
|
+
* while submitting. Apps wanting a different action (e.g. open a CPF modal
|
|
1391
|
+
* first) should compose via `<Paywall onBeforeCheckout>` or use raw context
|
|
1392
|
+
* with their own button.
|
|
1393
|
+
*/
|
|
1394
|
+
declare function PaywallCta({ ctaLabel, loadingLabel, switchHint, trustLine, className, buttonClassName, switchHintClassName, trustClassName, }: PaywallCtaProps): react_jsx_runtime.JSX.Element;
|
|
1395
|
+
|
|
1396
|
+
type PaywallEyebrowProps = {
|
|
1397
|
+
text: string;
|
|
1398
|
+
className?: string;
|
|
1399
|
+
};
|
|
1400
|
+
declare function PaywallEyebrow({ text, className }: PaywallEyebrowProps): react_jsx_runtime.JSX.Element;
|
|
1401
|
+
|
|
1402
|
+
type PaywallHeroRenderState = {
|
|
1403
|
+
src: string;
|
|
1404
|
+
headline?: string;
|
|
1405
|
+
};
|
|
1406
|
+
type PaywallHeroProps = {
|
|
1407
|
+
src: string;
|
|
1408
|
+
alt?: string;
|
|
1409
|
+
headline?: string;
|
|
1410
|
+
aspectRatio?: string;
|
|
1411
|
+
gradientClassName?: string;
|
|
1412
|
+
className?: string;
|
|
1413
|
+
headlineClassName?: string;
|
|
1414
|
+
imgClassName?: string;
|
|
1415
|
+
render?: (state: PaywallHeroRenderState) => ReactNode;
|
|
1416
|
+
};
|
|
1417
|
+
declare function PaywallHero({ src, alt, headline, aspectRatio, gradientClassName, className, headlineClassName, imgClassName, render, }: PaywallHeroProps): react_jsx_runtime.JSX.Element;
|
|
1418
|
+
|
|
1419
|
+
type PaywallHeadlineProps = {
|
|
1420
|
+
text: string;
|
|
1421
|
+
className?: string;
|
|
1422
|
+
as?: 'h1' | 'h2';
|
|
1423
|
+
};
|
|
1424
|
+
declare function PaywallHeadline({ text, className, as }: PaywallHeadlineProps): react_jsx_runtime.JSX.Element;
|
|
1425
|
+
|
|
1426
|
+
type PaywallPriceHeadlineProps = {
|
|
1427
|
+
/**
|
|
1428
|
+
* Copy template. Supported substitutions:
|
|
1429
|
+
* - `{pricePerDay}` → daily price formatted (BRL), derived from yearly.
|
|
1430
|
+
* - `{currentMonthlyEquiv}` → formatted monthly-equivalent BRL.
|
|
1431
|
+
* - `{cycle}` → human-readable cycle ("mensal" | "anual").
|
|
1432
|
+
*
|
|
1433
|
+
* Example: `"Comece hoje por {pricePerDay} por dia"`.
|
|
1434
|
+
*/
|
|
1435
|
+
template: string;
|
|
1436
|
+
className?: string;
|
|
1437
|
+
as?: 'h1' | 'h2' | 'h3';
|
|
1438
|
+
render?: (state: {
|
|
1439
|
+
pricePerDay: string;
|
|
1440
|
+
currentMonthlyEquivCents: number;
|
|
1441
|
+
cycle: string;
|
|
1442
|
+
}) => ReactNode;
|
|
1443
|
+
};
|
|
1444
|
+
declare function PaywallPriceHeadline({ template, className, as, render, }: PaywallPriceHeadlineProps): react_jsx_runtime.JSX.Element;
|
|
1445
|
+
|
|
1446
|
+
type PaywallCountdownRenderState = {
|
|
1447
|
+
h: number;
|
|
1448
|
+
m: number;
|
|
1449
|
+
s: number;
|
|
1450
|
+
expired: boolean;
|
|
1451
|
+
};
|
|
1452
|
+
type PaywallCountdownDeadline = Date | string | {
|
|
1453
|
+
sessionStorageKey: string;
|
|
1454
|
+
durationMs: number;
|
|
1455
|
+
};
|
|
1456
|
+
type PaywallCountdownProps = {
|
|
1457
|
+
deadline: PaywallCountdownDeadline;
|
|
1458
|
+
format?: 'h:m:s' | 'm:s';
|
|
1459
|
+
onExpire?: () => void;
|
|
1460
|
+
className?: string;
|
|
1461
|
+
render?: (state: PaywallCountdownRenderState) => ReactNode;
|
|
1462
|
+
};
|
|
1463
|
+
declare function PaywallCountdown({ deadline, format, onExpire, className, render, }: PaywallCountdownProps): react_jsx_runtime.JSX.Element;
|
|
1464
|
+
|
|
1465
|
+
type PaywallFeaturesRenderState = {
|
|
1466
|
+
items: readonly string[];
|
|
1467
|
+
};
|
|
1468
|
+
type PaywallFeaturesProps = {
|
|
1469
|
+
items: readonly string[];
|
|
1470
|
+
IconComponent?: ComponentType<{
|
|
1471
|
+
className?: string;
|
|
1472
|
+
}>;
|
|
1473
|
+
className?: string;
|
|
1474
|
+
itemClassName?: string;
|
|
1475
|
+
iconClassName?: string;
|
|
1476
|
+
render?: (state: PaywallFeaturesRenderState) => ReactNode;
|
|
1477
|
+
renderItem?: (item: string, idx: number) => ReactNode;
|
|
1478
|
+
};
|
|
1479
|
+
declare function PaywallFeatures({ items, IconComponent, className, itemClassName, iconClassName, render, renderItem, }: PaywallFeaturesProps): react_jsx_runtime.JSX.Element;
|
|
1480
|
+
|
|
1481
|
+
type PaywallFeaturesCardProps = {
|
|
1482
|
+
title?: string;
|
|
1483
|
+
items: readonly string[];
|
|
1484
|
+
className?: string;
|
|
1485
|
+
cardClassName?: string;
|
|
1486
|
+
titleClassName?: string;
|
|
1487
|
+
itemClassName?: string;
|
|
1488
|
+
renderItem?: (item: string, idx: number) => ReactNode;
|
|
1489
|
+
};
|
|
1490
|
+
declare function PaywallFeaturesCard({ title, items, className, cardClassName, titleClassName, itemClassName, renderItem, }: PaywallFeaturesCardProps): react_jsx_runtime.JSX.Element;
|
|
1491
|
+
|
|
1492
|
+
type PaywallTrophyBadgeRenderState = {
|
|
1493
|
+
text: string;
|
|
1494
|
+
};
|
|
1495
|
+
type PaywallTrophyBadgeProps = {
|
|
1496
|
+
text: string;
|
|
1497
|
+
className?: string;
|
|
1498
|
+
iconClassName?: string;
|
|
1499
|
+
floating?: boolean;
|
|
1500
|
+
render?: (state: PaywallTrophyBadgeRenderState) => ReactNode;
|
|
1501
|
+
};
|
|
1502
|
+
declare function PaywallTrophyBadge({ text, className, iconClassName, floating, render, }: PaywallTrophyBadgeProps): react_jsx_runtime.JSX.Element;
|
|
1503
|
+
|
|
1504
|
+
type PaywallAnchorPriceProps = {
|
|
1505
|
+
className?: string;
|
|
1506
|
+
render?: (state: {
|
|
1507
|
+
anchorCents: number;
|
|
1508
|
+
formatted: string;
|
|
1509
|
+
}) => ReactNode;
|
|
1510
|
+
};
|
|
1511
|
+
declare function PaywallAnchorPrice({ className, render, }: PaywallAnchorPriceProps): react_jsx_runtime.JSX.Element | null;
|
|
1512
|
+
|
|
1513
|
+
type PaywallTestimonial = {
|
|
1514
|
+
name: string;
|
|
1515
|
+
avatar?: string;
|
|
1516
|
+
stars: number;
|
|
1517
|
+
quote: string;
|
|
1518
|
+
};
|
|
1519
|
+
type PaywallTestimonialsProps = {
|
|
1520
|
+
items: readonly PaywallTestimonial[];
|
|
1521
|
+
className?: string;
|
|
1522
|
+
cardClassName?: string;
|
|
1523
|
+
avatarClassName?: string;
|
|
1524
|
+
quoteClassName?: string;
|
|
1525
|
+
nameClassName?: string;
|
|
1526
|
+
starsClassName?: string;
|
|
1527
|
+
renderItem?: (item: PaywallTestimonial, idx: number) => ReactNode;
|
|
1528
|
+
};
|
|
1529
|
+
declare function PaywallTestimonials({ items, className, cardClassName, avatarClassName, quoteClassName, nameClassName, starsClassName, renderItem, }: PaywallTestimonialsProps): react_jsx_runtime.JSX.Element;
|
|
1530
|
+
|
|
1531
|
+
type PaywallStat = {
|
|
1532
|
+
value: string;
|
|
1533
|
+
label: string;
|
|
1534
|
+
icon?: ReactNode;
|
|
1535
|
+
};
|
|
1536
|
+
type PaywallStatsRowProps = {
|
|
1537
|
+
stats: readonly PaywallStat[];
|
|
1538
|
+
className?: string;
|
|
1539
|
+
cellClassName?: string;
|
|
1540
|
+
valueClassName?: string;
|
|
1541
|
+
labelClassName?: string;
|
|
1542
|
+
renderCell?: (stat: PaywallStat, idx: number) => ReactNode;
|
|
1543
|
+
};
|
|
1544
|
+
declare function PaywallStatsRow({ stats, className, cellClassName, valueClassName, labelClassName, renderCell, }: PaywallStatsRowProps): react_jsx_runtime.JSX.Element;
|
|
1545
|
+
|
|
1546
|
+
type PaywallFinePrintProps = {
|
|
1547
|
+
/**
|
|
1548
|
+
* Copy template. Supported substitutions:
|
|
1549
|
+
* - `{price}` → formatted current price (BRL).
|
|
1550
|
+
* - `{trialDays}` → method-specific trial days (card vs pix).
|
|
1551
|
+
* - `{cycle}` → human-readable cycle ("mensal" | "anual").
|
|
1552
|
+
*/
|
|
1553
|
+
template: string;
|
|
1554
|
+
className?: string;
|
|
1555
|
+
render?: (state: {
|
|
1556
|
+
currentPriceCents: number;
|
|
1557
|
+
cycle: string;
|
|
1558
|
+
trialDays: number;
|
|
1559
|
+
selectedMethod: string;
|
|
1560
|
+
}) => ReactNode;
|
|
1561
|
+
};
|
|
1562
|
+
declare function PaywallFinePrint({ template, className, render, }: PaywallFinePrintProps): react_jsx_runtime.JSX.Element;
|
|
1563
|
+
|
|
1564
|
+
type PaywallTrustLineItem = {
|
|
1565
|
+
icon: ReactNode;
|
|
1566
|
+
text: string;
|
|
1567
|
+
};
|
|
1568
|
+
type PaywallTrustLineProps = {
|
|
1569
|
+
items: readonly PaywallTrustLineItem[];
|
|
1570
|
+
className?: string;
|
|
1571
|
+
itemClassName?: string;
|
|
1572
|
+
renderItem?: (item: PaywallTrustLineItem, idx: number) => ReactNode;
|
|
1573
|
+
};
|
|
1574
|
+
declare function PaywallTrustLine({ items, className, itemClassName, renderItem, }: PaywallTrustLineProps): react_jsx_runtime.JSX.Element;
|
|
1575
|
+
|
|
1576
|
+
type PaywallStickyFooterProps = {
|
|
1577
|
+
children: ReactNode;
|
|
1578
|
+
className?: string;
|
|
1579
|
+
/**
|
|
1580
|
+
* When true (default), appends `pb-[env(safe-area-inset-bottom)]` so the
|
|
1581
|
+
* footer clears the home-indicator on iOS. Set false for footers that
|
|
1582
|
+
* already opt into their own safe-area handling (e.g. inside a sheet).
|
|
1583
|
+
*/
|
|
1584
|
+
safeAreaInsets?: boolean;
|
|
1585
|
+
};
|
|
1586
|
+
declare function PaywallStickyFooter({ children, className, safeAreaInsets, }: PaywallStickyFooterProps): react_jsx_runtime.JSX.Element;
|
|
1281
1587
|
|
|
1282
|
-
export { type AndroidBrowser, type AppConfig, AppConfigProvider, AppConfigSchema, AppRoot, type AppRootProps, type AppRootSlots, type AuthFlowConfig, type AuthFormError, type AuthFormErrorCode, type AuthScreenProps, type CheckoutCardInput, type CheckoutFormCycle, type CheckoutFormMethod, type CheckoutMethod, CheckoutPageDefault, type Cycle, type CycleLabels, DeepLinkHandler, type DeepLinks, DevSkipOnboardingFab, EmptyState, ErrorBoundary, type I18nConfig, I18nProvider, type I18nProviderProps, type IOSBrowser, type InAppApp, type InstallActions, InstallGate, InstallSplash, type InstallState, type InstallVariant, LanguageSwitcher, type LanguageSwitcherProps, LoadingState, type OnboardingConfig, OnboardingFlow, type OnboardingFlowProps, type OnboardingStep, type OnboardingStepCtx, type OnboardingStepDef, type PaymentMethod, PaymentReturnHandler, Paywall, type PaywallConfig, type PaywallCopy, PaywallCta, type PaywallCtaProps, PaywallCyclePicker, type PaywallCyclePickerProps, PaywallMethodContent, type PaywallMethodContentProps, type PaywallMethodCopy, PaywallMethodTabs, type PaywallMethodTabsProps, type PaywallProps, type PaywallSlots, type PaywallThemeClasses, type PersistedKey, PersistenceRegistry, type PersistenceRegistryProps, type PixPending, PixWaitingPageDefault, type Platform, PreAuthShell, type PreAuthShellProps, PushPrompt, type PushPromptProps, type PushPromptTexts, type PushUiState, RouteBoundary, type RouteBoundaryProps, type SkipDefaults, type SubscriptionStatus, type ToastItem, type UseCheckoutFormArgs, type UseCheckoutFormResult, type UseLoginFormResult, type UseResetFormResult, asaasErrorMessage, computeAnchorCents, dailyFromYearly, detectAndroidBrowser, detectIOSBrowser, detectInAppApp, detectPlatform, detectStandalone, discountPercent, formatBRL, isDevToolsEnabled, monthlyFromYearly, parseAppConfig, shouldBlockInstall, shouldShowPermanentOption, skipOnboarding, useAppConfig, useAuth, useAuthPrimitives, useCheckoutForm, useFeature, useForgotForm, useInstallPrompt, useLoginForm, useOnboardingStep, usePaywallState, usePlan, usePush, useReminders, useResetForm, useSignupForm, useSubscription, useToast };
|
|
1588
|
+
export { type AndroidBrowser, type AppConfig, AppConfigProvider, AppConfigSchema, AppRoot, type AppRootProps, type AppRootSlots, type AuthFlowConfig, type AuthFormError, type AuthFormErrorCode, type AuthScreenProps, type CheckoutCardInput, type CheckoutFormCycle, type CheckoutFormMethod, type CheckoutMethod, CheckoutPageDefault, type Cycle, type CycleLabels, DeepLinkHandler, type DeepLinks, DevSkipOnboardingFab, EmptyState, ErrorBoundary, type I18nConfig, I18nProvider, type I18nProviderProps, type IOSBrowser, type InAppApp, type InstallActions, InstallGate, InstallSplash, type InstallState, type InstallVariant, LanguageSwitcher, type LanguageSwitcherProps, LoadingState, type OnboardingConfig, OnboardingFlow, type OnboardingFlowProps, type OnboardingStep, type OnboardingStepCtx, type OnboardingStepDef, type PaymentMethod, PaymentReturnHandler, Paywall, PaywallAnchorPrice, type PaywallAnchorPriceProps, type PaywallConfig, PaywallContext, type PaywallContextValue, type PaywallCopy, PaywallCountdown, type PaywallCountdownProps, PaywallCta, type PaywallCtaProps, PaywallCyclePicker, type PaywallCyclePickerProps, PaywallEyebrow, type PaywallEyebrowProps, PaywallFeatures, PaywallFeaturesCard, type PaywallFeaturesCardProps, type PaywallFeaturesProps, PaywallFinePrint, type PaywallFinePrintProps, PaywallHeadline, type PaywallHeadlineProps, PaywallHero, type PaywallHeroProps, PaywallMethodContent, type PaywallMethodContentProps, type PaywallMethodCopy, PaywallMethodTabs, type PaywallMethodTabsProps, PaywallPriceHeadline, type PaywallPriceHeadlineProps, type PaywallProps, PaywallProvider, type PaywallProviderProps, type PaywallSlots, type PaywallStat, PaywallStatsRow, type PaywallStatsRowProps, PaywallStickyFooter, type PaywallStickyFooterProps, type PaywallTestimonial, PaywallTestimonials, type PaywallTestimonialsProps, type PaywallThemeClasses, PaywallTrophyBadge, type PaywallTrophyBadgeProps, PaywallTrustLine, type PaywallTrustLineProps, type PersistedKey, PersistenceRegistry, type PersistenceRegistryProps, type PixPending, PixWaitingPageDefault, type Platform, PreAuthShell, type PreAuthShellProps, PushPrompt, type PushPromptProps, type PushPromptTexts, type PushUiState, RouteBoundary, type RouteBoundaryProps, type SkipDefaults, type SubscriptionStatus, type ToastItem, type UseCheckoutFormArgs, type UseCheckoutFormResult, type UseLoginFormResult, type UseResetFormResult, asaasErrorMessage, computeAnchorCents, dailyFromYearly, detectAndroidBrowser, detectIOSBrowser, detectInAppApp, detectPlatform, detectStandalone, discountPercent, formatBRL, isDevToolsEnabled, monthlyFromYearly, parseAppConfig, shouldBlockInstall, shouldShowPermanentOption, skipOnboarding, useAppConfig, useAuth, useAuthPrimitives, useCheckoutForm, useFeature, useForgotForm, useInstallPrompt, useLoginForm, useOnboardingStep, usePaywallContext, usePaywallState, usePlan, usePush, useReminders, useResetForm, useSignupForm, useSubscription, useToast };
|