@hook-sdk/template 0.23.3 → 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.cjs +585 -120
- 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 +566 -118
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
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, CheckoutMethod as CheckoutMethod$1, CheckoutCycle,
|
|
5
|
+
import { HookContextValue, 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
|
|
|
@@ -533,7 +533,9 @@ interface PaywallPlanDerived {
|
|
|
533
533
|
* - `availableMethods` mirrors `methods`
|
|
534
534
|
* - `opening` mirrors `submitting`
|
|
535
535
|
* - `checkout(args)` takes legacy args + validates card/holderInfo presence
|
|
536
|
-
* - `dismissPix`
|
|
536
|
+
* - `dismissPix` clears SDK `pixPending` (template 0.24.0 + SDK 0.26.0 wire,
|
|
537
|
+
* resolves G154; was no-op pre-0.24 and apps had to maintain a local
|
|
538
|
+
* `pixActive` flag to bridge the gap).
|
|
537
539
|
* - `monthlyEquivalent(cycle)` helper
|
|
538
540
|
*/
|
|
539
541
|
declare function usePaywallState(): {
|
|
@@ -1135,30 +1137,114 @@ type PaywallProps = {
|
|
|
1135
1137
|
* Composed top-level paywall component. Apps wrap it in their `PaywallOffer.tsx`
|
|
1136
1138
|
* (or `Offer.tsx`) and pass copy + themeClasses + slots. Logic + telemetry live
|
|
1137
1139
|
* here. To customize layout entirely, drop down to the primitives.
|
|
1140
|
+
*
|
|
1141
|
+
* Internally wraps a `<PaywallProvider>` so the refactored primitives can read
|
|
1142
|
+
* state from context. Apps wanting Level 2 / Level 3 composition can use
|
|
1143
|
+
* `<PaywallProvider>` + Lego blocks directly without going through `<Paywall>`.
|
|
1138
1144
|
*/
|
|
1139
1145
|
declare function Paywall({ copy, themeClasses, slots, onBeforeCheckout, }: PaywallProps): react_jsx_runtime.JSX.Element;
|
|
1140
1146
|
|
|
1141
1147
|
type PaywallMethodTabsProps = {
|
|
1142
|
-
|
|
1143
|
-
selected: CheckoutMethod;
|
|
1144
|
-
onSelect: (m: CheckoutMethod) => void;
|
|
1148
|
+
/** Tab labels keyed by checkout method. App-provided copy (not state). */
|
|
1145
1149
|
labels: Partial<Record<CheckoutMethod, string>>;
|
|
1150
|
+
/** Wrapper className. */
|
|
1146
1151
|
className?: string;
|
|
1152
|
+
/** Individual tab className. */
|
|
1147
1153
|
tabClassName?: string;
|
|
1154
|
+
/** Individual tab className when active. */
|
|
1148
1155
|
tabActiveClassName?: string;
|
|
1149
1156
|
};
|
|
1150
|
-
declare function PaywallMethodTabs({
|
|
1157
|
+
declare function PaywallMethodTabs({ labels, className, tabClassName, tabActiveClassName, }: PaywallMethodTabsProps): react_jsx_runtime.JSX.Element | null;
|
|
1151
1158
|
|
|
1152
1159
|
type PaywallMethodContentProps = {
|
|
1153
|
-
|
|
1160
|
+
/**
|
|
1161
|
+
* App-provided copy keyed by method. `pix` covers both `pix-auto` and
|
|
1162
|
+
* `pix-once`. `cardConsumedTrial` is used when the active method is `card`
|
|
1163
|
+
* AND `hasConsumedTrial` (read from context) is true.
|
|
1164
|
+
*/
|
|
1154
1165
|
copy: Pick<PaywallCopy, 'pix' | 'card'> & {
|
|
1155
1166
|
cardConsumedTrial?: PaywallCopy['cardConsumedTrial'];
|
|
1156
1167
|
};
|
|
1157
|
-
|
|
1168
|
+
/** Tab-panel wrapper className. */
|
|
1158
1169
|
className?: string;
|
|
1170
|
+
/** Per-row className. */
|
|
1159
1171
|
rowClassName?: string;
|
|
1160
1172
|
};
|
|
1161
|
-
declare function PaywallMethodContent({
|
|
1173
|
+
declare function PaywallMethodContent({ copy, className, rowClassName }: PaywallMethodContentProps): react_jsx_runtime.JSX.Element;
|
|
1174
|
+
|
|
1175
|
+
/**
|
|
1176
|
+
* Full return shape of `usePaywallState()`. Apps consuming via
|
|
1177
|
+
* `usePaywallContext()` get the same fields they'd get from the headless
|
|
1178
|
+
* hook directly — no internal-only fields hidden.
|
|
1179
|
+
*
|
|
1180
|
+
* This is the "Level 3" escape-hatch contract: any app can drop down to raw
|
|
1181
|
+
* context and render an entirely custom paywall, with the template still
|
|
1182
|
+
* owning state + telemetry + checkout dispatch.
|
|
1183
|
+
*/
|
|
1184
|
+
type PaywallContextValue = ReturnType<typeof usePaywallState>;
|
|
1185
|
+
/**
|
|
1186
|
+
* Context that carries the full paywall state down to Lego blocks. Null
|
|
1187
|
+
* outside `<PaywallProvider>`. Consumer hook `usePaywallContext()` throws on
|
|
1188
|
+
* null to surface mis-mounted blocks early.
|
|
1189
|
+
*/
|
|
1190
|
+
declare const PaywallContext: react.Context<{
|
|
1191
|
+
status: SubscriptionStatus;
|
|
1192
|
+
hasAccess: boolean | null;
|
|
1193
|
+
daysLeftInTrial: number | null;
|
|
1194
|
+
initialLoadComplete: boolean;
|
|
1195
|
+
plan: PaywallPlanDerived | null;
|
|
1196
|
+
cycle: _hook_sdk_sdk.CheckoutCycle;
|
|
1197
|
+
setCycle: react.Dispatch<react.SetStateAction<_hook_sdk_sdk.CheckoutCycle>>;
|
|
1198
|
+
methods: readonly _hook_sdk_sdk.CheckoutMethod[];
|
|
1199
|
+
selectedMethod: _hook_sdk_sdk.CheckoutMethod;
|
|
1200
|
+
setSelectedMethod: react.Dispatch<react.SetStateAction<_hook_sdk_sdk.CheckoutMethod>>;
|
|
1201
|
+
hasConsumedTrial: boolean;
|
|
1202
|
+
currentPriceCents: number;
|
|
1203
|
+
currentMonthlyEquivCents: number;
|
|
1204
|
+
anchorPriceCents: number | null;
|
|
1205
|
+
selectMethod: (next: _hook_sdk_sdk.CheckoutMethod) => void;
|
|
1206
|
+
selectCycle: (next: _hook_sdk_sdk.CheckoutCycle) => void;
|
|
1207
|
+
isFree: boolean;
|
|
1208
|
+
trialDaysForMethod: (method: _hook_sdk_sdk.CheckoutMethod) => number;
|
|
1209
|
+
trialDaysCard: number;
|
|
1210
|
+
trialDaysPix: number;
|
|
1211
|
+
cpfState: CpfState;
|
|
1212
|
+
cardState: CardFormStateWithSetter;
|
|
1213
|
+
submit: () => Promise<_hook_sdk_sdk.CheckoutResult | undefined>;
|
|
1214
|
+
checkout: (args: PaywallCheckoutArgs) => Promise<void>;
|
|
1215
|
+
cancel: () => Promise<void>;
|
|
1216
|
+
pixPending: PixPending | null;
|
|
1217
|
+
error: PaywallError | null;
|
|
1218
|
+
submitting: boolean;
|
|
1219
|
+
opening: boolean;
|
|
1220
|
+
availableMethods: readonly _hook_sdk_sdk.CheckoutMethod[];
|
|
1221
|
+
monthlyEquivalent: (c: _hook_sdk_sdk.CheckoutCycle) => number;
|
|
1222
|
+
dismissPix: () => void;
|
|
1223
|
+
refreshPlan: () => void;
|
|
1224
|
+
} | null>;
|
|
1225
|
+
type PaywallProviderProps = {
|
|
1226
|
+
children: ReactNode;
|
|
1227
|
+
};
|
|
1228
|
+
/**
|
|
1229
|
+
* Owns the headless paywall state for one paywall surface. All Lego blocks
|
|
1230
|
+
* (PriceHeadline, AnchorPrice, FinePrint, refactored primitives) and the
|
|
1231
|
+
* composed `<Paywall>` read state via this provider.
|
|
1232
|
+
*
|
|
1233
|
+
* Multiple compositions can share state by sharing one `<PaywallProvider>`
|
|
1234
|
+
* parent (e.g. side-by-side variants on a dev/test page). Multiple
|
|
1235
|
+
* providers in the same tree get independent state.
|
|
1236
|
+
*/
|
|
1237
|
+
declare function PaywallProvider({ children }: PaywallProviderProps): react_jsx_runtime.JSX.Element;
|
|
1238
|
+
|
|
1239
|
+
/**
|
|
1240
|
+
* Consumer hook for the paywall context. Returns the non-null state object
|
|
1241
|
+
* (same shape as `usePaywallState()`) when called inside `<PaywallProvider>`.
|
|
1242
|
+
*
|
|
1243
|
+
* Throws `"usePaywallContext must be used within <PaywallProvider>"` when the
|
|
1244
|
+
* provider is missing — surfaces mis-mounted Lego blocks at render time
|
|
1245
|
+
* instead of silently rendering with stale or default state.
|
|
1246
|
+
*/
|
|
1247
|
+
declare function usePaywallContext(): PaywallContextValue;
|
|
1162
1248
|
|
|
1163
1249
|
type CycleLabels = {
|
|
1164
1250
|
annualLabel: string;
|
|
@@ -1166,37 +1252,257 @@ type CycleLabels = {
|
|
|
1166
1252
|
annualSuffix: string;
|
|
1167
1253
|
monthlySuffix: string;
|
|
1168
1254
|
};
|
|
1169
|
-
|
|
1255
|
+
/** Cycle picker visual variants. `default` preserves the current visual. */
|
|
1256
|
+
type PaywallCyclePickerVariant = 'default' | 'premium-gold' | 'pink-pill';
|
|
1257
|
+
/** State passed to the optional `render` escape hatch. */
|
|
1258
|
+
type PaywallCyclePickerRenderArgs = {
|
|
1170
1259
|
cycles: readonly Cycle[];
|
|
1171
1260
|
selected: Cycle;
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
/** Monthly-equiv for YEARLY (priceCents / 12). Same as priceCentsByCycle for MONTHLY. */
|
|
1178
|
-
monthlyEquivByCycle: Record<Cycle, number>;
|
|
1261
|
+
setCycle: (c: Cycle) => void;
|
|
1262
|
+
plan: ReturnType<typeof usePaywallContext>['plan'];
|
|
1263
|
+
anchorPriceCents: number | null;
|
|
1264
|
+
};
|
|
1265
|
+
type PaywallCyclePickerProps = {
|
|
1179
1266
|
labels: CycleLabels;
|
|
1267
|
+
/** Root wrapper className. */
|
|
1180
1268
|
className?: string;
|
|
1269
|
+
/** Per-card base className. */
|
|
1181
1270
|
cardClassName?: string;
|
|
1271
|
+
/** Applied when the card is selected (in addition to `cardClassName`). */
|
|
1182
1272
|
cardSelectedClassName?: string;
|
|
1273
|
+
/** Anchor strikethrough className inside the card. */
|
|
1183
1274
|
anchorClassName?: string;
|
|
1275
|
+
/** Visual variant. Variants are sugar for className combos. */
|
|
1276
|
+
variant?: PaywallCyclePickerVariant;
|
|
1277
|
+
/**
|
|
1278
|
+
* Render-prop escape hatch. When provided, the picker returns the prop's
|
|
1279
|
+
* output wrapped in a root element with the configured `className`. State
|
|
1280
|
+
* plumbing stays; visual is 100% the app's.
|
|
1281
|
+
*/
|
|
1282
|
+
render?: (state: PaywallCyclePickerRenderArgs) => ReactNode;
|
|
1184
1283
|
};
|
|
1185
|
-
declare function PaywallCyclePicker({
|
|
1284
|
+
declare function PaywallCyclePicker({ labels, className, cardClassName, cardSelectedClassName, anchorClassName, variant, render, }: PaywallCyclePickerProps): react_jsx_runtime.JSX.Element | null;
|
|
1186
1285
|
|
|
1187
1286
|
type PaywallCtaProps = {
|
|
1287
|
+
/** Already-interpolated CTA label (e.g. "Pagar R$ 19,90 com PIX"). */
|
|
1188
1288
|
ctaLabel: string;
|
|
1289
|
+
/** Label shown while `submitting === true`. Defaults to `ctaLabel`. */
|
|
1189
1290
|
loadingLabel?: string;
|
|
1291
|
+
/**
|
|
1292
|
+
* Switch-hint copy shown under the CTA when the other method is available.
|
|
1293
|
+
* Caller decides visibility (typically only when `methods.length > 1`).
|
|
1294
|
+
*/
|
|
1190
1295
|
switchHint?: string;
|
|
1296
|
+
/** Trust line under the CTA / switch hint. */
|
|
1191
1297
|
trustLine: string;
|
|
1192
|
-
|
|
1193
|
-
disabled?: boolean;
|
|
1194
|
-
loading?: boolean;
|
|
1298
|
+
/** Wrapper className. */
|
|
1195
1299
|
className?: string;
|
|
1300
|
+
/** Button className. */
|
|
1196
1301
|
buttonClassName?: string;
|
|
1302
|
+
/** Switch-hint paragraph className. */
|
|
1197
1303
|
switchHintClassName?: string;
|
|
1304
|
+
/** Trust-line paragraph className. */
|
|
1198
1305
|
trustClassName?: string;
|
|
1199
1306
|
};
|
|
1200
|
-
|
|
1307
|
+
/**
|
|
1308
|
+
* CTA button + switch hint + trust line. Reads `submit` + `submitting` from
|
|
1309
|
+
* context — the button dispatches the checkout on click and disables itself
|
|
1310
|
+
* while submitting. Apps wanting a different action (e.g. open a CPF modal
|
|
1311
|
+
* first) should compose via `<Paywall onBeforeCheckout>` or use raw context
|
|
1312
|
+
* with their own button.
|
|
1313
|
+
*/
|
|
1314
|
+
declare function PaywallCta({ ctaLabel, loadingLabel, switchHint, trustLine, className, buttonClassName, switchHintClassName, trustClassName, }: PaywallCtaProps): react_jsx_runtime.JSX.Element;
|
|
1315
|
+
|
|
1316
|
+
type PaywallEyebrowProps = {
|
|
1317
|
+
text: string;
|
|
1318
|
+
className?: string;
|
|
1319
|
+
};
|
|
1320
|
+
declare function PaywallEyebrow({ text, className }: PaywallEyebrowProps): react_jsx_runtime.JSX.Element;
|
|
1321
|
+
|
|
1322
|
+
type PaywallHeroRenderState = {
|
|
1323
|
+
src: string;
|
|
1324
|
+
headline?: string;
|
|
1325
|
+
};
|
|
1326
|
+
type PaywallHeroProps = {
|
|
1327
|
+
src: string;
|
|
1328
|
+
alt?: string;
|
|
1329
|
+
headline?: string;
|
|
1330
|
+
aspectRatio?: string;
|
|
1331
|
+
gradientClassName?: string;
|
|
1332
|
+
className?: string;
|
|
1333
|
+
headlineClassName?: string;
|
|
1334
|
+
imgClassName?: string;
|
|
1335
|
+
render?: (state: PaywallHeroRenderState) => ReactNode;
|
|
1336
|
+
};
|
|
1337
|
+
declare function PaywallHero({ src, alt, headline, aspectRatio, gradientClassName, className, headlineClassName, imgClassName, render, }: PaywallHeroProps): react_jsx_runtime.JSX.Element;
|
|
1338
|
+
|
|
1339
|
+
type PaywallHeadlineProps = {
|
|
1340
|
+
text: string;
|
|
1341
|
+
className?: string;
|
|
1342
|
+
as?: 'h1' | 'h2';
|
|
1343
|
+
};
|
|
1344
|
+
declare function PaywallHeadline({ text, className, as }: PaywallHeadlineProps): react_jsx_runtime.JSX.Element;
|
|
1345
|
+
|
|
1346
|
+
type PaywallPriceHeadlineProps = {
|
|
1347
|
+
/**
|
|
1348
|
+
* Copy template. Supported substitutions:
|
|
1349
|
+
* - `{pricePerDay}` → daily price formatted (BRL), derived from yearly.
|
|
1350
|
+
* - `{currentMonthlyEquiv}` → formatted monthly-equivalent BRL.
|
|
1351
|
+
* - `{cycle}` → human-readable cycle ("mensal" | "anual").
|
|
1352
|
+
*
|
|
1353
|
+
* Example: `"Comece hoje por {pricePerDay} por dia"`.
|
|
1354
|
+
*/
|
|
1355
|
+
template: string;
|
|
1356
|
+
className?: string;
|
|
1357
|
+
as?: 'h1' | 'h2' | 'h3';
|
|
1358
|
+
render?: (state: {
|
|
1359
|
+
pricePerDay: string;
|
|
1360
|
+
currentMonthlyEquivCents: number;
|
|
1361
|
+
cycle: string;
|
|
1362
|
+
}) => ReactNode;
|
|
1363
|
+
};
|
|
1364
|
+
declare function PaywallPriceHeadline({ template, className, as, render, }: PaywallPriceHeadlineProps): react_jsx_runtime.JSX.Element;
|
|
1365
|
+
|
|
1366
|
+
type PaywallCountdownRenderState = {
|
|
1367
|
+
h: number;
|
|
1368
|
+
m: number;
|
|
1369
|
+
s: number;
|
|
1370
|
+
expired: boolean;
|
|
1371
|
+
};
|
|
1372
|
+
type PaywallCountdownDeadline = Date | string | {
|
|
1373
|
+
sessionStorageKey: string;
|
|
1374
|
+
durationMs: number;
|
|
1375
|
+
};
|
|
1376
|
+
type PaywallCountdownProps = {
|
|
1377
|
+
deadline: PaywallCountdownDeadline;
|
|
1378
|
+
format?: 'h:m:s' | 'm:s';
|
|
1379
|
+
onExpire?: () => void;
|
|
1380
|
+
className?: string;
|
|
1381
|
+
render?: (state: PaywallCountdownRenderState) => ReactNode;
|
|
1382
|
+
};
|
|
1383
|
+
declare function PaywallCountdown({ deadline, format, onExpire, className, render, }: PaywallCountdownProps): react_jsx_runtime.JSX.Element;
|
|
1384
|
+
|
|
1385
|
+
type PaywallFeaturesRenderState = {
|
|
1386
|
+
items: readonly string[];
|
|
1387
|
+
};
|
|
1388
|
+
type PaywallFeaturesProps = {
|
|
1389
|
+
items: readonly string[];
|
|
1390
|
+
IconComponent?: ComponentType<{
|
|
1391
|
+
className?: string;
|
|
1392
|
+
}>;
|
|
1393
|
+
className?: string;
|
|
1394
|
+
itemClassName?: string;
|
|
1395
|
+
iconClassName?: string;
|
|
1396
|
+
render?: (state: PaywallFeaturesRenderState) => ReactNode;
|
|
1397
|
+
renderItem?: (item: string, idx: number) => ReactNode;
|
|
1398
|
+
};
|
|
1399
|
+
declare function PaywallFeatures({ items, IconComponent, className, itemClassName, iconClassName, render, renderItem, }: PaywallFeaturesProps): react_jsx_runtime.JSX.Element;
|
|
1400
|
+
|
|
1401
|
+
type PaywallFeaturesCardProps = {
|
|
1402
|
+
title?: string;
|
|
1403
|
+
items: readonly string[];
|
|
1404
|
+
className?: string;
|
|
1405
|
+
cardClassName?: string;
|
|
1406
|
+
titleClassName?: string;
|
|
1407
|
+
itemClassName?: string;
|
|
1408
|
+
renderItem?: (item: string, idx: number) => ReactNode;
|
|
1409
|
+
};
|
|
1410
|
+
declare function PaywallFeaturesCard({ title, items, className, cardClassName, titleClassName, itemClassName, renderItem, }: PaywallFeaturesCardProps): react_jsx_runtime.JSX.Element;
|
|
1411
|
+
|
|
1412
|
+
type PaywallTrophyBadgeRenderState = {
|
|
1413
|
+
text: string;
|
|
1414
|
+
};
|
|
1415
|
+
type PaywallTrophyBadgeProps = {
|
|
1416
|
+
text: string;
|
|
1417
|
+
className?: string;
|
|
1418
|
+
iconClassName?: string;
|
|
1419
|
+
floating?: boolean;
|
|
1420
|
+
render?: (state: PaywallTrophyBadgeRenderState) => ReactNode;
|
|
1421
|
+
};
|
|
1422
|
+
declare function PaywallTrophyBadge({ text, className, iconClassName, floating, render, }: PaywallTrophyBadgeProps): react_jsx_runtime.JSX.Element;
|
|
1423
|
+
|
|
1424
|
+
type PaywallAnchorPriceProps = {
|
|
1425
|
+
className?: string;
|
|
1426
|
+
render?: (state: {
|
|
1427
|
+
anchorCents: number;
|
|
1428
|
+
formatted: string;
|
|
1429
|
+
}) => ReactNode;
|
|
1430
|
+
};
|
|
1431
|
+
declare function PaywallAnchorPrice({ className, render, }: PaywallAnchorPriceProps): react_jsx_runtime.JSX.Element | null;
|
|
1432
|
+
|
|
1433
|
+
type PaywallTestimonial = {
|
|
1434
|
+
name: string;
|
|
1435
|
+
avatar?: string;
|
|
1436
|
+
stars: number;
|
|
1437
|
+
quote: string;
|
|
1438
|
+
};
|
|
1439
|
+
type PaywallTestimonialsProps = {
|
|
1440
|
+
items: readonly PaywallTestimonial[];
|
|
1441
|
+
className?: string;
|
|
1442
|
+
cardClassName?: string;
|
|
1443
|
+
avatarClassName?: string;
|
|
1444
|
+
quoteClassName?: string;
|
|
1445
|
+
nameClassName?: string;
|
|
1446
|
+
starsClassName?: string;
|
|
1447
|
+
renderItem?: (item: PaywallTestimonial, idx: number) => ReactNode;
|
|
1448
|
+
};
|
|
1449
|
+
declare function PaywallTestimonials({ items, className, cardClassName, avatarClassName, quoteClassName, nameClassName, starsClassName, renderItem, }: PaywallTestimonialsProps): react_jsx_runtime.JSX.Element;
|
|
1450
|
+
|
|
1451
|
+
type PaywallStat = {
|
|
1452
|
+
value: string;
|
|
1453
|
+
label: string;
|
|
1454
|
+
icon?: ReactNode;
|
|
1455
|
+
};
|
|
1456
|
+
type PaywallStatsRowProps = {
|
|
1457
|
+
stats: readonly PaywallStat[];
|
|
1458
|
+
className?: string;
|
|
1459
|
+
cellClassName?: string;
|
|
1460
|
+
valueClassName?: string;
|
|
1461
|
+
labelClassName?: string;
|
|
1462
|
+
renderCell?: (stat: PaywallStat, idx: number) => ReactNode;
|
|
1463
|
+
};
|
|
1464
|
+
declare function PaywallStatsRow({ stats, className, cellClassName, valueClassName, labelClassName, renderCell, }: PaywallStatsRowProps): react_jsx_runtime.JSX.Element;
|
|
1465
|
+
|
|
1466
|
+
type PaywallFinePrintProps = {
|
|
1467
|
+
/**
|
|
1468
|
+
* Copy template. Supported substitutions:
|
|
1469
|
+
* - `{price}` → formatted current price (BRL).
|
|
1470
|
+
* - `{trialDays}` → method-specific trial days (card vs pix).
|
|
1471
|
+
* - `{cycle}` → human-readable cycle ("mensal" | "anual").
|
|
1472
|
+
*/
|
|
1473
|
+
template: string;
|
|
1474
|
+
className?: string;
|
|
1475
|
+
render?: (state: {
|
|
1476
|
+
currentPriceCents: number;
|
|
1477
|
+
cycle: string;
|
|
1478
|
+
trialDays: number;
|
|
1479
|
+
selectedMethod: string;
|
|
1480
|
+
}) => ReactNode;
|
|
1481
|
+
};
|
|
1482
|
+
declare function PaywallFinePrint({ template, className, render, }: PaywallFinePrintProps): react_jsx_runtime.JSX.Element;
|
|
1483
|
+
|
|
1484
|
+
type PaywallTrustLineItem = {
|
|
1485
|
+
icon: ReactNode;
|
|
1486
|
+
text: string;
|
|
1487
|
+
};
|
|
1488
|
+
type PaywallTrustLineProps = {
|
|
1489
|
+
items: readonly PaywallTrustLineItem[];
|
|
1490
|
+
className?: string;
|
|
1491
|
+
itemClassName?: string;
|
|
1492
|
+
renderItem?: (item: PaywallTrustLineItem, idx: number) => ReactNode;
|
|
1493
|
+
};
|
|
1494
|
+
declare function PaywallTrustLine({ items, className, itemClassName, renderItem, }: PaywallTrustLineProps): react_jsx_runtime.JSX.Element;
|
|
1495
|
+
|
|
1496
|
+
type PaywallStickyFooterProps = {
|
|
1497
|
+
children: ReactNode;
|
|
1498
|
+
className?: string;
|
|
1499
|
+
/**
|
|
1500
|
+
* When true (default), appends `pb-[env(safe-area-inset-bottom)]` so the
|
|
1501
|
+
* footer clears the home-indicator on iOS. Set false for footers that
|
|
1502
|
+
* already opt into their own safe-area handling (e.g. inside a sheet).
|
|
1503
|
+
*/
|
|
1504
|
+
safeAreaInsets?: boolean;
|
|
1505
|
+
};
|
|
1506
|
+
declare function PaywallStickyFooter({ children, className, safeAreaInsets, }: PaywallStickyFooterProps): react_jsx_runtime.JSX.Element;
|
|
1201
1507
|
|
|
1202
|
-
export { type AndroidBrowser, type AppConfig, AppConfigProvider, AppConfigSchema, AppRoot, type AppRootProps, type AppRootSlots, type AuthFlowConfig, type AuthFormError, type AuthFormErrorCode, type AuthScreenProps, type CheckoutMethod, 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, type Platform, PreAuthShell, type PreAuthShellProps, PushPrompt, type PushPromptProps, type PushPromptTexts, type PushUiState, RouteBoundary, type RouteBoundaryProps, type SkipDefaults, type SubscriptionStatus, type ToastItem, type UseLoginFormResult, type UseResetFormResult, asaasErrorMessage, computeAnchorCents, dailyFromYearly, detectAndroidBrowser, detectIOSBrowser, detectInAppApp, detectPlatform, detectStandalone, discountPercent, formatBRL, isDevToolsEnabled, monthlyFromYearly, parseAppConfig, shouldBlockInstall, shouldShowPermanentOption, skipOnboarding, useAppConfig, useAuth, useAuthPrimitives, useFeature, useForgotForm, useInstallPrompt, useLoginForm, useOnboardingStep, usePaywallState, usePlan, usePush, useReminders, useResetForm, useSignupForm, useSubscription, useToast };
|
|
1508
|
+
export { type AndroidBrowser, type AppConfig, AppConfigProvider, AppConfigSchema, AppRoot, type AppRootProps, type AppRootSlots, type AuthFlowConfig, type AuthFormError, type AuthFormErrorCode, type AuthScreenProps, type CheckoutMethod, 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, type Platform, PreAuthShell, type PreAuthShellProps, PushPrompt, type PushPromptProps, type PushPromptTexts, type PushUiState, RouteBoundary, type RouteBoundaryProps, type SkipDefaults, type SubscriptionStatus, type ToastItem, type UseLoginFormResult, type UseResetFormResult, asaasErrorMessage, computeAnchorCents, dailyFromYearly, detectAndroidBrowser, detectIOSBrowser, detectInAppApp, detectPlatform, detectStandalone, discountPercent, formatBRL, isDevToolsEnabled, monthlyFromYearly, parseAppConfig, shouldBlockInstall, shouldShowPermanentOption, skipOnboarding, useAppConfig, useAuth, useAuthPrimitives, useFeature, useForgotForm, useInstallPrompt, useLoginForm, useOnboardingStep, usePaywallContext, usePaywallState, usePlan, usePush, useReminders, useResetForm, useSignupForm, useSubscription, useToast };
|