@usethrottle/auth 0.1.1 → 0.2.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.
@@ -0,0 +1,735 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ComponentType, ReactNode } from 'react';
3
+ import { ThrottleAuthConfig, ThrottleAuth } from '../index.cjs';
4
+ export { Address, AddressInput, AuthSnapshot, AuthStatus, AuthStorage, Customer, DeviceSession, Invoice, Order, Page, PaymentMethod, ProfilePatch, Resource, Session, Subscription, ThrottleAccount, ThrottleAuthError, ThrottleAuthProvider, ThrottleAuthProviderProps, UseAuthResult, createAccount, createThrottleAuth, localStorageAdapter, memoryStorage, useAddresses, useAuth, useAuthContext, useCustomer, useInvoice, useInvoices, useOrder, useOrders, useSavedCards, useSubscriptions } from '../index.cjs';
5
+
6
+ type ThrottleThemeName = 'light' | 'dark' | 'auto';
7
+ declare const VARIABLE_PROPERTY: {
8
+ readonly colorPrimary: "--throttle-color-primary";
9
+ readonly colorPrimaryForeground: "--throttle-color-primary-foreground";
10
+ readonly colorBackground: "--throttle-color-background";
11
+ readonly colorSurface: "--throttle-color-surface";
12
+ readonly colorForeground: "--throttle-color-foreground";
13
+ readonly colorMuted: "--throttle-color-muted";
14
+ readonly colorMutedForeground: "--throttle-color-muted-foreground";
15
+ readonly colorBorder: "--throttle-color-border";
16
+ readonly colorDanger: "--throttle-color-danger";
17
+ readonly colorDangerSurface: "--throttle-color-danger-surface";
18
+ readonly colorDangerBorder: "--throttle-color-danger-border";
19
+ readonly colorSuccess: "--throttle-color-success";
20
+ readonly colorSuccessSurface: "--throttle-color-success-surface";
21
+ readonly colorSuccessBorder: "--throttle-color-success-border";
22
+ readonly colorWarning: "--throttle-color-warning";
23
+ readonly colorWarningSurface: "--throttle-color-warning-surface";
24
+ readonly colorWarningBorder: "--throttle-color-warning-border";
25
+ readonly fontFamily: "--throttle-font-family";
26
+ readonly fontSize: "--throttle-font-size";
27
+ readonly borderRadius: "--throttle-radius";
28
+ readonly borderWidth: "--throttle-border-width";
29
+ readonly spacing: "--throttle-spacing";
30
+ readonly shadowCard: "--throttle-shadow-card";
31
+ readonly shadowPopover: "--throttle-shadow-popover";
32
+ readonly transition: "--throttle-transition";
33
+ readonly zModal: "--throttle-z-modal";
34
+ readonly zPopover: "--throttle-z-popover";
35
+ };
36
+ type ThrottleVariables = Partial<Record<keyof typeof VARIABLE_PROPERTY, string>>;
37
+ /**
38
+ * Every addressable part of every component. A merchant maps any of these to a
39
+ * className through `appearance.elements`. The list is the API: adding a
40
+ * rendered element without adding its key here ships something a merchant
41
+ * cannot restyle, which the drift test in Task 15 catches.
42
+ */
43
+ declare const THROTTLE_ELEMENT_KEYS: readonly ["card", "card.header", "card.title", "card.description", "card.body", "card.footer", "card.logo", "field", "field.label", "field.input", "field.hint", "field.error", "field.group", "button", "alert", "spinner", "skeleton", "avatar", "badge", "emptyState", "emptyState.title", "emptyState.description", "modal.overlay", "modal.container", "modal.closeButton", "dropdown.trigger", "dropdown.menu", "dropdown.item", "dropdown.separator", "tabs.list", "tabs.tab", "table", "table.head", "table.row", "table.cell", "signIn.root", "signIn.title", "signIn.logo", "signIn.emailField", "signIn.passwordField", "signIn.submitButton", "signIn.forgotLink", "signIn.switchLink", "signUp.root", "signUp.title", "signUp.logo", "signUp.emailField", "signUp.passwordField", "signUp.submitButton", "signUp.switchLink", "forgotPassword.root", "forgotPassword.title", "forgotPassword.logo", "forgotPassword.emailField", "forgotPassword.submitButton", "forgotPassword.backLink", "resetPassword.root", "resetPassword.title", "resetPassword.logo", "resetPassword.passwordField", "resetPassword.submitButton", "verifyEmail.root", "verifyEmail.title", "verifyEmail.logo", "verifyEmail.resendButton", "authFlow.root", "authModal.overlay", "authModal.container", "signInButton.root", "signUpButton.root", "signOutButton.root", "stepUp.root", "stepUp.title", "stepUp.passwordField", "stepUp.submitButton", "stepUp.cancelButton", "signInPage.root", "signInPage.logo", "signInPage.footer", "signUpPage.root", "signUpPage.logo", "signUpPage.footer", "userButton.root", "userButton.trigger", "userButton.menu", "userButton.identity", "userButton.email", "userButton.badge", "userButton.item", "userButton.manageButton", "userButton.signOutButton", "userButton.signOutAllButton", "accountDashboard.root", "accountDashboard.tabs", "accountDashboard.sidebar", "accountDashboard.panel", "accountModal.overlay", "accountModal.container", "accountModal.header", "accountModal.title", "accountModal.body", "verifyBanner.root", "verifyBanner.message", "verifyBanner.resendButton", "verifyBanner.dismissButton", "profilePanel.root", "profilePanel.form", "profilePanel.submitButton", "addressesPanel.root", "addressesPanel.list", "addressesPanel.item", "addressesPanel.addButton", "addressesPanel.form", "addressesPanel.defaultButton", "addressesPanel.editButton", "addressesPanel.deleteButton", "addressesPanel.table", "addressesPanel.row", "paymentMethodsPanel.root", "paymentMethodsPanel.list", "paymentMethodsPanel.item", "paymentMethodsPanel.defaultButton", "paymentMethodsPanel.deleteButton", "paymentMethodsPanel.table", "paymentMethodsPanel.row", "ordersPanel.root", "ordersPanel.table", "ordersPanel.row", "ordersPanel.list", "ordersPanel.item", "ordersPanel.viewButton", "orderDetail.root", "orderDetail.backButton", "orderDetail.lineItems", "orderDetail.lineItem", "orderDetail.totals", "invoicesPanel.root", "invoicesPanel.table", "invoicesPanel.row", "invoicesPanel.list", "invoicesPanel.item", "invoicesPanel.viewButton", "invoiceDetail.root", "invoiceDetail.backButton", "invoiceDetail.downloadButton", "invoiceDetail.totals", "subscriptionsPanel.root", "subscriptionsPanel.list", "subscriptionsPanel.item", "subscriptionsPanel.cancelButton", "subscriptionsPanel.cancelNowButton", "subscriptionsPanel.pauseButton", "subscriptionsPanel.resumeButton", "subscriptionsPanel.table", "subscriptionsPanel.row", "securityPanel.root", "securityPanel.passwordForm", "securityPanel.passwordButton", "securityPanel.sessionList", "securityPanel.sessionItem", "securityPanel.revokeButton", "securityPanel.revokeAllButton", "securityPanel.table", "securityPanel.row"];
44
+ type ThrottleElementKey = (typeof THROTTLE_ELEMENT_KEYS)[number];
45
+ interface ThrottleSlots {
46
+ Spinner?: ComponentType<{
47
+ className?: string;
48
+ }>;
49
+ Avatar?: ComponentType<{
50
+ name: string;
51
+ email: string;
52
+ className?: string;
53
+ }>;
54
+ Alert?: ComponentType<{
55
+ tone: 'error' | 'success' | 'info';
56
+ children: ReactNode;
57
+ className?: string;
58
+ }>;
59
+ EmptyState?: ComponentType<{
60
+ title: string;
61
+ description?: string;
62
+ className?: string;
63
+ }>;
64
+ Button?: ComponentType<any>;
65
+ }
66
+ interface ThrottleAppearance {
67
+ theme?: ThrottleThemeName;
68
+ variables?: ThrottleVariables;
69
+ elements?: Partial<Record<ThrottleElementKey, string>>;
70
+ components?: ThrottleSlots;
71
+ }
72
+
73
+ declare const enUS: {
74
+ locale: string;
75
+ common: {
76
+ save: string;
77
+ cancel: string;
78
+ delete: string;
79
+ edit: string;
80
+ back: string;
81
+ retry: string;
82
+ loading: string;
83
+ close: string;
84
+ confirm: string;
85
+ somethingWentWrong: string;
86
+ actions: string;
87
+ view: string;
88
+ };
89
+ signIn: {
90
+ title: string;
91
+ description: string;
92
+ email: string;
93
+ password: string;
94
+ submitButton: string;
95
+ forgotLink: string;
96
+ switchPrompt: string;
97
+ switchLink: string;
98
+ };
99
+ signUp: {
100
+ title: string;
101
+ description: string;
102
+ email: string;
103
+ password: string;
104
+ submitButton: string;
105
+ switchPrompt: string;
106
+ switchLink: string;
107
+ pendingNotice: string;
108
+ };
109
+ forgotPassword: {
110
+ title: string;
111
+ description: string;
112
+ email: string;
113
+ submitButton: string;
114
+ sentNotice: string;
115
+ backLink: string;
116
+ };
117
+ resetPassword: {
118
+ title: string;
119
+ password: string;
120
+ submitButton: string;
121
+ doneNotice: string;
122
+ missingToken: string;
123
+ };
124
+ verifyEmail: {
125
+ title: string;
126
+ verifying: string;
127
+ success: string;
128
+ resendButton: string;
129
+ resentNotice: string;
130
+ instructions: string;
131
+ };
132
+ stepUp: {
133
+ title: string;
134
+ description: string;
135
+ password: string;
136
+ submitButton: string;
137
+ cancelButton: string;
138
+ };
139
+ userButton: {
140
+ manage: string;
141
+ signOut: string;
142
+ signOutAll: string;
143
+ verified: string;
144
+ unverified: string;
145
+ openMenu: string;
146
+ };
147
+ verifyBanner: {
148
+ message: string;
149
+ resendButton: string;
150
+ dismissButton: string;
151
+ };
152
+ account: {
153
+ title: string;
154
+ tabs: {
155
+ profile: string;
156
+ addresses: string;
157
+ paymentMethods: string;
158
+ orders: string;
159
+ invoices: string;
160
+ subscriptions: string;
161
+ security: string;
162
+ };
163
+ };
164
+ profile: {
165
+ firstName: string;
166
+ lastName: string;
167
+ phone: string;
168
+ company: string;
169
+ acceptsMarketing: string;
170
+ email: string;
171
+ emailReadOnly: string;
172
+ saveButton: string;
173
+ savedNotice: string;
174
+ };
175
+ addresses: {
176
+ addButton: string;
177
+ defaultBadge: string;
178
+ makeDefault: string;
179
+ empty: string;
180
+ emptyDescription: string;
181
+ label: string;
182
+ firstName: string;
183
+ lastName: string;
184
+ company: string;
185
+ addressLine1: string;
186
+ addressLine2: string;
187
+ city: string;
188
+ stateProvince: string;
189
+ postalCode: string;
190
+ countryCode: string;
191
+ phone: string;
192
+ deleteConfirm: string;
193
+ columnAddress: string;
194
+ };
195
+ paymentMethods: {
196
+ empty: string;
197
+ emptyDescription: string;
198
+ gatedDescription: string;
199
+ defaultBadge: string;
200
+ makeDefault: string;
201
+ expires: string;
202
+ deleteConfirm: string;
203
+ columnCard: string;
204
+ };
205
+ orders: {
206
+ empty: string;
207
+ emptyDescription: string;
208
+ gatedDescription: string;
209
+ number: string;
210
+ date: string;
211
+ status: string;
212
+ total: string;
213
+ /**
214
+ * Display copy for `order.status`. Mirrors ORDER_STATUS_META in
215
+ * `@commerce/orders`, which is the server's single source of status copy —
216
+ * copied rather than imported because this package ships with no runtime
217
+ * dependencies and is a client for the wire API, not for server packages.
218
+ * If a status is added there, add it here.
219
+ */
220
+ statusLabels: {
221
+ draft: string;
222
+ pending: string;
223
+ processing: string;
224
+ partiallyFulfilled: string;
225
+ fulfilled: string;
226
+ cancelled: string;
227
+ closed: string;
228
+ };
229
+ /**
230
+ * The money half of the label, shown as a second badge beside the
231
+ * lifecycle one. `captured` is deliberately empty: paid in full is the
232
+ * assumed happy path, and announcing it on every settled order is noise.
233
+ */
234
+ paymentLabels: {
235
+ pending: string;
236
+ authorized: string;
237
+ captured: string;
238
+ partiallyPaid: string;
239
+ partiallyRefunded: string;
240
+ refunded: string;
241
+ failed: string;
242
+ voided: string;
243
+ processing: string;
244
+ disputed: string;
245
+ expired: string;
246
+ };
247
+ items: string;
248
+ subtotal: string;
249
+ discount: string;
250
+ shipping: string;
251
+ tax: string;
252
+ quantity: string;
253
+ shippingAddress: string;
254
+ billingAddress: string;
255
+ viewSubscription: string;
256
+ };
257
+ invoices: {
258
+ empty: string;
259
+ emptyDescription: string;
260
+ gatedDescription: string;
261
+ number: string;
262
+ issued: string;
263
+ due: string;
264
+ status: string;
265
+ total: string;
266
+ refunded: string;
267
+ period: string;
268
+ downloadButton: string;
269
+ /** Display copy for `invoice.status` — the wire values are paid|open|void. */
270
+ statusLabels: {
271
+ paid: string;
272
+ open: string;
273
+ void: string;
274
+ };
275
+ downloadUnavailable: string;
276
+ };
277
+ subscriptions: {
278
+ empty: string;
279
+ emptyDescription: string;
280
+ gatedDescription: string;
281
+ renewsOn: string;
282
+ endsOn: string;
283
+ cancelledOn: string;
284
+ trialEnds: string;
285
+ cancelButton: string;
286
+ cancelAtPeriodEnd: string;
287
+ cancelNow: string;
288
+ pauseButton: string;
289
+ resumeButton: string;
290
+ cancelConfirm: string;
291
+ cancelScheduled: string;
292
+ columnPlan: string;
293
+ columnPrice: string;
294
+ columnRenews: string;
295
+ columnStatus: string;
296
+ /**
297
+ * Display copy for `subscription.status`. Mirrors SubscriptionStatus in
298
+ * `@commerce/subscriptions`; copied rather than imported because this
299
+ * package has no runtime dependencies. Without it a buyer in dunning saw
300
+ * the literal pill `past_due`.
301
+ */
302
+ statusLabels: {
303
+ active: string;
304
+ paused: string;
305
+ cancelled: string;
306
+ pastDue: string;
307
+ trialing: string;
308
+ unpaid: string;
309
+ };
310
+ };
311
+ security: {
312
+ passwordTitle: string;
313
+ newPassword: string;
314
+ changeButton: string;
315
+ changedNotice: string;
316
+ sessionsTitle: string;
317
+ thisDevice: string;
318
+ lastActive: string;
319
+ revokeButton: string;
320
+ revokeAllButton: string;
321
+ sessionsEmpty: string;
322
+ columnDevice: string;
323
+ };
324
+ errors: Record<string, string>;
325
+ };
326
+ /** Every field optional, at every depth — a merchant overrides one string. */
327
+ type ThrottleLocalization = DeepPartial<typeof enUS>;
328
+ type DeepPartial<T> = {
329
+ [K in keyof T]?: T[K] extends object ? DeepPartial<T[K]> : T[K];
330
+ };
331
+
332
+ /**
333
+ * Composition of the list of records a panel renders. `'boxed'` is today's
334
+ * shipped look (each item its own bordered box, outlined action buttons) and
335
+ * must stay byte-for-byte identical to it. `'rows'` separates items with a
336
+ * hairline instead, and renders actions as plain text — the motivation is
337
+ * that the account dashboard is itself a bordered card, so a panel built from
338
+ * bordered boxes is a card inside a card with nothing establishing hierarchy.
339
+ * `'table'` is a real `<table>` with column headers, for merchants who want
340
+ * their buyer's records (especially money) in aligned tabular columns.
341
+ */
342
+ type AccountPanelVariant = 'rows' | 'boxed' | 'table';
343
+ declare function AddressesPanel(props: {
344
+ appearance?: ThrottleAppearance;
345
+ localization?: ThrottleLocalization;
346
+ variant?: AccountPanelVariant;
347
+ }): react_jsx_runtime.JSX.Element;
348
+
349
+ type AccountTab = 'profile' | 'addresses' | 'paymentMethods' | 'orders' | 'invoices' | 'subscriptions' | 'security';
350
+ declare const ACCOUNT_TABS: readonly AccountTab[];
351
+ interface AccountDashboardProps {
352
+ /** Which panels to show, in order. Defaults to all seven. */
353
+ tabs?: AccountTab[];
354
+ tab?: AccountTab;
355
+ onTabChange?(tab: AccountTab): void;
356
+ routing?: 'virtual' | 'hash';
357
+ /**
358
+ * `'sidebar'` (default) puts the seven panels in a vertical rail beside the
359
+ * content; `'tabs'` is the original horizontal strip above it. Seven is a lot
360
+ * for a strip — at narrow widths most of them sit off-screen behind a scroll
361
+ * with nothing signalling they exist — so the rail is the default. The strip
362
+ * remains for merchants whose surrounding page already has a side nav and
363
+ * would end up with two.
364
+ */
365
+ layout?: 'sidebar' | 'tabs';
366
+ /**
367
+ * Default composition for every panel rendered here. A panel's own
368
+ * `variant` prop cannot be set through the dashboard (it does not expose
369
+ * per-tab overrides), so in practice this is the only source of `variant`
370
+ * each panel receives when rendered through `AccountDashboard` — a panel
371
+ * rendered directly, outside the dashboard, keeps deciding its own default
372
+ * from its own `variant` prop rather than this one.
373
+ */
374
+ panelVariant?: AccountPanelVariant;
375
+ appearance?: ThrottleAppearance;
376
+ localization?: ThrottleLocalization;
377
+ }
378
+ declare function AccountDashboard(props: AccountDashboardProps): react_jsx_runtime.JSX.Element | null;
379
+
380
+ interface ThrottleProviderProps extends Partial<ThrottleAuthConfig> {
381
+ publishableKey: string;
382
+ appearance?: ThrottleAppearance;
383
+ localization?: ThrottleLocalization;
384
+ /** Default logo for the `branded` card variant. A card's own `logo` prop wins over this. */
385
+ logo?: ReactNode;
386
+ /** Default true. Set false and import `@usethrottle/auth/styles.css` for a flash-free SSR paint. */
387
+ injectStyles?: boolean;
388
+ /** Returns the guest cart id to attach after a successful sign-in or sign-up. */
389
+ claimCartOnSignIn?: () => string | null | undefined;
390
+ /** Inject a pre-built client. Tests use it. */
391
+ auth?: ThrottleAuth;
392
+ children: ReactNode;
393
+ /** @internal test seam — receives the step-up callback handed to the core. */
394
+ __captureStepUp?: (fn: () => Promise<string | null>) => void;
395
+ }
396
+ interface UseThrottleResult {
397
+ openSignIn(): void;
398
+ openSignUp(): void;
399
+ openAccount(): void;
400
+ close(): void;
401
+ isOpen: boolean;
402
+ }
403
+ /**
404
+ * The equivalent of Clerk's `useClerk().openSignIn()`. Lets a merchant open
405
+ * the auth/account overlay from their own UI — a pricing CTA, a gated action,
406
+ * a keyboard shortcut — driving the SAME modal `SignInButton`/`SignUpButton`
407
+ * open, rather than a second competing one.
408
+ *
409
+ * Outside a `<ThrottleProvider>` (e.g. under a plain `ThrottleAuthProvider`)
410
+ * this degrades to no-op functions and `isOpen: false`, with a one-time
411
+ * development warning, rather than throwing.
412
+ */
413
+ declare function useThrottle(): UseThrottleResult;
414
+ /**
415
+ * Composes rather than replaces. It creates the client (so it can supply
416
+ * `onStepUpRequired` at construction time, which is the only moment the core
417
+ * reads it) and hands it to the existing `<ThrottleAuthProvider>` through the
418
+ * `auth` injection prop that already exists for this purpose. Every hook —
419
+ * useAuth, useCustomer, useOrders — keeps working underneath unchanged.
420
+ *
421
+ * It also owns the ONE modal overlay (sign-in/sign-up/account) alongside the
422
+ * step-up dialog it already hosts, so a `SignInButton`/`SignUpButton` click
423
+ * and a programmatic `useThrottle().openSignIn()` call always drive the same
424
+ * dialog rather than stacking two.
425
+ */
426
+ declare function ThrottleProvider(props: ThrottleProviderProps): react_jsx_runtime.JSX.Element;
427
+
428
+ declare const THROTTLE_STYLE_ID = "throttle-auth-styles";
429
+ /**
430
+ * The whole component stylesheet, as a string, so one source feeds both the
431
+ * runtime injector and the `dist/styles.css` the build emits. There is no CSS
432
+ * pipeline in tsup — adding one would mean the file and the injected styles
433
+ * could drift.
434
+ *
435
+ * Every rule a merchant might restyle uses a SINGLE class selector. Merchant
436
+ * classNames from `appearance.elements` land on the same element, so equal
437
+ * specificity plus source order is what lets them win. A descendant selector
438
+ * here would silently outrank them.
439
+ */
440
+ declare const THROTTLE_STYLES = "\n.throttle-root {\n --throttle-color-primary: #18181b;\n --throttle-color-primary-foreground: #ffffff;\n --throttle-color-background: #ffffff;\n --throttle-color-surface: #f8fafc;\n --throttle-color-foreground: #0e1116;\n --throttle-color-muted: #eceef2;\n --throttle-color-muted-foreground: #5b6472;\n --throttle-color-border: #e2e8f0;\n --throttle-color-danger: #c2321f;\n --throttle-color-danger-surface: #fef2f2;\n --throttle-color-danger-border: #fecaca;\n --throttle-color-success: #127a4a;\n --throttle-color-success-surface: #ecfdf5;\n --throttle-color-success-border: #a7f3d0;\n --throttle-color-warning: #92400e;\n --throttle-color-warning-surface: #fffbeb;\n --throttle-color-warning-border: #fde68a;\n --throttle-font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;\n --throttle-font-size: 16px;\n --throttle-font-size-xs: 12px;\n --throttle-font-size-sm: 14px;\n --throttle-font-size-lg: 20px;\n --throttle-font-size-xl: 24px;\n --throttle-line-height: 1.5;\n --throttle-line-height-tight: 1.25;\n --throttle-radius: 12px;\n --throttle-radius-sm: 8px;\n --throttle-radius-full: 999px;\n --throttle-border-width: 1px;\n --throttle-spacing: 8px;\n --throttle-space-1: 4px;\n --throttle-space-2: var(--throttle-spacing);\n --throttle-space-3: 12px;\n --throttle-space-4: 16px;\n --throttle-space-5: 24px;\n --throttle-space-6: 32px;\n --throttle-control-height: 48px;\n --throttle-control-padding-x: 16px;\n --throttle-shadow-card: 0 1px 3px rgba(15,23,42,.08), 0 1px 2px rgba(15,23,42,.04);\n --throttle-shadow-popover: 0 10px 24px rgba(15,23,42,.12), 0 2px 6px rgba(15,23,42,.06);\n --throttle-transition: 150ms cubic-bezier(.2,0,.2,1);\n --throttle-z-modal: 2147483000;\n --throttle-z-popover: 2147482000;\n font-family: var(--throttle-font-family);\n font-size: var(--throttle-font-size);\n line-height: var(--throttle-line-height);\n color: var(--throttle-color-foreground);\n box-sizing: border-box;\n}\n.throttle-root *, .throttle-root *::before, .throttle-root *::after { box-sizing: inherit; }\n\n.throttle-root[data-throttle-theme=\"dark\"] {\n --throttle-color-primary: #e6edf3;\n --throttle-color-primary-foreground: #0d1117;\n --throttle-color-background: #0d1117;\n --throttle-color-surface: #1c2129;\n --throttle-color-foreground: #e6edf3;\n --throttle-color-muted: #21262d;\n --throttle-color-muted-foreground: #9aa4b2;\n --throttle-color-border: #30363d;\n --throttle-color-danger: #ff6b58;\n --throttle-color-danger-surface: #2a1513;\n --throttle-color-danger-border: #5c2b25;\n --throttle-color-success: #45c08a;\n --throttle-color-success-surface: #0f2419;\n --throttle-color-success-border: #1f4d36;\n --throttle-color-warning: #e0a53a;\n --throttle-color-warning-surface: #2a2113;\n --throttle-color-warning-border: #5c4a25;\n --throttle-shadow-card: 0 1px 3px rgba(0,0,0,.6), 0 1px 2px rgba(0,0,0,.4);\n --throttle-shadow-popover: 0 10px 24px rgba(0,0,0,.5), 0 2px 6px rgba(0,0,0,.35);\n}\n@media (prefers-color-scheme: dark) {\n .throttle-root[data-throttle-theme=\"auto\"] {\n --throttle-color-primary: #e6edf3;\n --throttle-color-primary-foreground: #0d1117;\n --throttle-color-background: #0d1117;\n --throttle-color-surface: #1c2129;\n --throttle-color-foreground: #e6edf3;\n --throttle-color-muted: #21262d;\n --throttle-color-muted-foreground: #9aa4b2;\n --throttle-color-border: #30363d;\n --throttle-color-danger: #ff6b58;\n --throttle-color-danger-surface: #2a1513;\n --throttle-color-danger-border: #5c2b25;\n --throttle-color-success: #45c08a;\n --throttle-color-success-surface: #0f2419;\n --throttle-color-success-border: #1f4d36;\n --throttle-color-warning: #e0a53a;\n --throttle-color-warning-surface: #2a2113;\n --throttle-color-warning-border: #5c4a25;\n --throttle-shadow-card: 0 1px 3px rgba(0,0,0,.6), 0 1px 2px rgba(0,0,0,.4);\n --throttle-shadow-popover: 0 10px 24px rgba(0,0,0,.5), 0 2px 6px rgba(0,0,0,.35);\n }\n}\n\n.throttle-card {\n background: var(--throttle-color-background);\n border: var(--throttle-border-width) solid var(--throttle-color-border);\n border-radius: var(--throttle-radius);\n box-shadow: var(--throttle-shadow-card);\n padding: var(--throttle-space-5);\n width: 100%;\n max-width: 400px;\n margin-inline: auto;\n}\n/* Inside a Modal the dialog already provides the surface \u2014 background, radius\n and elevation. A card that draws its own on top is the \"box inside a box\":\n two shadowed rounded rectangles nested, with the card's max-width stranding\n it in the middle of a much wider dialog. */\n.throttle-card--bare { border: none; box-shadow: none; background: none; max-width: none; }\n.throttle-card__header { margin-bottom: var(--throttle-space-4); }\n.throttle-card__header--branded { text-align: center; }\n.throttle-card__logo { display: flex; justify-content: center; margin-bottom: var(--throttle-space-3); }\n.throttle-card__title { font-size: var(--throttle-font-size-xl); line-height: var(--throttle-line-height-tight); font-weight: 600; letter-spacing: -0.02em; margin: 0; }\n.throttle-card__title--branded { font-size: var(--throttle-font-size-xl); }\n.throttle-card__description { color: var(--throttle-color-muted-foreground); margin: var(--throttle-space-1) 0 0; }\n.throttle-card__body { display: flex; flex-direction: column; gap: var(--throttle-space-3); }\n.throttle-card__footer { margin-top: var(--throttle-space-4); text-align: center; }\n.throttle-card__footer--ruled { border-top: var(--throttle-border-width) solid var(--throttle-color-border); padding-top: var(--throttle-space-4); }\n\n.throttle-field { display: flex; flex-direction: column; gap: var(--throttle-space-1); }\n.throttle-field__labelrow { display: flex; align-items: baseline; justify-content: space-between; gap: var(--throttle-space-2); }\n.throttle-field__label { font-weight: 500; }\n.throttle-field__input {\n font: inherit;\n font-size: var(--throttle-font-size);\n color: var(--throttle-color-foreground);\n background: var(--throttle-color-background);\n border: var(--throttle-border-width) solid var(--throttle-color-border);\n border-radius: var(--throttle-radius-sm);\n /* padding-block stays 0 so min-height alone owns the height, exactly as\n .throttle-button does. With 12px vertical padding the box computed to\n 50px against the button's 48px \u2014 a 2px mismatch, measured in a browser\n across 19 controls. An input element centres its own text vertically. */\n padding-block: 0;\n padding-inline: var(--throttle-control-padding-x);\n min-height: var(--throttle-control-height);\n width: 100%;\n transition: border-color var(--throttle-transition), box-shadow var(--throttle-transition);\n}\n.throttle-field__input:focus-visible {\n outline: none;\n border-color: var(--throttle-color-primary);\n box-shadow: 0 0 0 2px var(--throttle-color-background), 0 0 0 4px var(--throttle-color-primary);\n}\n.throttle-field__input:disabled { background: var(--throttle-color-muted); color: var(--throttle-color-muted-foreground); cursor: not-allowed; }\n.throttle-field__input::placeholder { color: var(--throttle-color-muted-foreground); opacity: 1; }\n.throttle-field__input--grouped { border: none; border-radius: 0; padding-inline: 0; }\n.throttle-field__hint { color: var(--throttle-color-muted-foreground); font-size: var(--throttle-font-size-xs); }\n/* Always mounted, so it reserves its line whether or not there is an error:\n an error appearing on submit must not push the submit button out from\n under the buyer's pointer. */\n.throttle-field__error { color: var(--throttle-color-danger); font-size: var(--throttle-font-size-xs); min-height: 1rem; line-height: 1rem; }\n\n.throttle-field-group {\n display: flex;\n flex-direction: column;\n border: var(--throttle-border-width) solid var(--throttle-color-border);\n border-radius: var(--throttle-radius-sm);\n overflow: hidden;\n}\n.throttle-field-group__item { padding: var(--throttle-space-3) var(--throttle-control-padding-x); }\n.throttle-field-group__divider { height: var(--throttle-border-width); background: var(--throttle-color-border); }\n.throttle-field-group__forgot { margin-left: auto; }\n\n.throttle-button {\n font: inherit;\n font-weight: 500;\n border-radius: var(--throttle-radius-sm);\n border: var(--throttle-border-width) solid transparent;\n padding-inline: var(--throttle-control-padding-x);\n padding-block: 0;\n min-height: var(--throttle-control-height);\n display: inline-flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n transition: opacity var(--throttle-transition), background-color var(--throttle-transition), border-color var(--throttle-transition), filter var(--throttle-transition), box-shadow var(--throttle-transition);\n}\n.throttle-button:disabled { opacity: .55; cursor: not-allowed; }\n.throttle-button:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--throttle-color-background), 0 0 0 4px var(--throttle-color-primary); }\n.throttle-button--primary { background: var(--throttle-color-primary); color: var(--throttle-color-primary-foreground); width: 100%; }\n.throttle-button--primary:hover:not(:disabled) { filter: brightness(0.92); }\n.throttle-button--secondary { background: var(--throttle-color-surface); color: var(--throttle-color-foreground); border-color: var(--throttle-color-border); }\n.throttle-button--secondary:hover:not(:disabled) { background: var(--throttle-color-muted); }\n.throttle-button--danger { background: transparent; color: var(--throttle-color-danger); border-color: var(--throttle-color-border); }\n.throttle-button--danger:hover:not(:disabled) { background: color-mix(in srgb, var(--throttle-color-danger) 10%, transparent); }\n/* Link-style actions are the rows panel default, and they carry Delete,\n Remove, Cancel and Sign out. Zero padding with min-height 0 made those\n roughly 20px tall and ~8px apart \u2014 a mis-tap on a phone lands on something\n irreversible. The target is expanded with vertical padding and pulled back\n with an equal negative margin, so the hit box clears 44px while the text\n sits exactly where it did. Collapsing this back to zero padding shrinks the\n target again. */\n.throttle-button--link { background: none; border: none; color: var(--throttle-color-primary); padding-inline: 0; padding-block: var(--throttle-space-3); margin-block: calc(var(--throttle-space-3) * -1); min-height: 0; text-decoration: underline; width: auto; }\n.throttle-button--link:hover:not(:disabled) { opacity: .8; }\n.throttle-button--linkDanger { background: none; border: none; color: var(--throttle-color-danger); padding-inline: 0; padding-block: var(--throttle-space-3); margin-block: calc(var(--throttle-space-3) * -1); min-height: 0; text-decoration: underline; width: auto; }\n.throttle-button--linkDanger:hover:not(:disabled) { opacity: .8; }\n.throttle-button--xs { font-size: var(--throttle-font-size-xs); }\n\n.throttle-alert { border-radius: var(--throttle-radius-sm); padding: var(--throttle-space-3); font-size: var(--throttle-font-size-sm); }\n.throttle-alert--error { background: var(--throttle-color-danger-surface); border: var(--throttle-border-width) solid var(--throttle-color-danger-border); color: var(--throttle-color-danger); }\n.throttle-alert--success { background: var(--throttle-color-success-surface); border: var(--throttle-border-width) solid var(--throttle-color-success-border); color: var(--throttle-color-success); }\n.throttle-alert--info { background: var(--throttle-color-surface); color: var(--throttle-color-muted-foreground); }\n\n.throttle-spinner {\n display: inline-block; width: 1em; height: 1em;\n border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;\n animation: throttle-spin 700ms linear infinite;\n}\n@keyframes throttle-spin { to { transform: rotate(360deg); } }\n@media (prefers-reduced-motion: reduce) { .throttle-spinner { animation-duration: 2.4s; } }\n\n.throttle-skeleton {\n background: var(--throttle-color-muted);\n border-radius: var(--throttle-radius-sm);\n animation: throttle-pulse 1.4s ease-in-out infinite; height: 2.5em; }\n@keyframes throttle-pulse { 50% { opacity: .5; } }\n@media (prefers-reduced-motion: reduce) { .throttle-skeleton { animation: none; } }\n\n.throttle-modal__overlay {\n position: fixed; inset: 0; z-index: var(--throttle-z-modal);\n background: rgba(14,17,22,.45);\n display: flex; align-items: center; justify-content: center;\n padding: var(--throttle-space-4);\n overflow-y: auto;\n}\n.throttle-modal__container {\n background: var(--throttle-color-background);\n border-radius: var(--throttle-radius);\n box-shadow: var(--throttle-shadow-popover);\n max-width: 720px; width: 100%; max-height: 90vh; overflow-y: auto;\n position: relative;\n}\n/* After the base rule on purpose: both are single-class, so equal specificity\n means source order decides. Declared before it, this silently lost. */\n.throttle-modal__container--compact { max-width: 440px; }\n.throttle-modal__close {\n position: absolute; top: var(--throttle-space-3); right: var(--throttle-space-3);\n background: none; border: none; cursor: pointer; font-size: var(--throttle-font-size-lg);\n color: var(--throttle-color-muted-foreground);\n transition: color var(--throttle-transition);\n}\n.throttle-modal__close:hover { color: var(--throttle-color-foreground); }\n.throttle-modal__header { padding: var(--throttle-space-4) var(--throttle-space-4) 0; }\n.throttle-modal__title { font-size: var(--throttle-font-size-lg); line-height: var(--throttle-line-height-tight); font-weight: 600; margin: 0; }\n.throttle-modal__body { padding: var(--throttle-space-4); }\n\n.throttle-dropdown__trigger { background: none; border: none; cursor: pointer; padding: 0; border-radius: var(--throttle-radius-full); transition: background-color var(--throttle-transition); }\n.throttle-dropdown__trigger:hover { background: var(--throttle-color-surface); }\n.throttle-dropdown__trigger:focus-visible { outline: 2px solid var(--throttle-color-primary); outline-offset: 2px; }\n.throttle-dropdown__menu {\n position: absolute; right: 0; top: calc(100% + var(--throttle-space-2));\n z-index: var(--throttle-z-popover);\n min-width: 260px;\n background: var(--throttle-color-background);\n border: var(--throttle-border-width) solid var(--throttle-color-border);\n border-radius: var(--throttle-radius);\n box-shadow: var(--throttle-shadow-popover);\n padding: var(--throttle-space-1);\n}\n.throttle-dropdown__item {\n display: flex; align-items: center; gap: var(--throttle-space-2);\n width: 100%; text-align: left; font: inherit; color: inherit;\n background: none; border: none; cursor: pointer;\n padding: var(--throttle-space-3);\n border-radius: var(--throttle-radius-sm);\n text-decoration: none;\n transition: background-color var(--throttle-transition);\n}\n.throttle-dropdown__item:hover { background: var(--throttle-color-surface); }\n.throttle-dropdown__item:focus-visible { outline: 2px solid var(--throttle-color-primary); outline-offset: -2px; }\n.throttle-dropdown__separator { height: 1px; background: var(--throttle-color-border); margin: var(--throttle-space-1) 0; border: 0; }\n\n.throttle-tabs__list {\n display: flex; gap: var(--throttle-space-1);\n border-bottom: var(--throttle-border-width) solid var(--throttle-color-border);\n overflow-x: auto; scrollbar-width: thin;\n}\n.throttle-tabs__tab {\n font: inherit; background: none; border: none; cursor: pointer; white-space: nowrap;\n padding: var(--throttle-space-3);\n color: var(--throttle-color-muted-foreground);\n border-bottom: 2px solid transparent;\n transition: color var(--throttle-transition), border-color var(--throttle-transition);\n}\n.throttle-tabs__tab:hover { color: var(--throttle-color-foreground); }\n.throttle-tabs__tab--active { color: var(--throttle-color-foreground); border-bottom-color: var(--throttle-color-primary); }\n.throttle-tabs__panel { padding-top: var(--throttle-space-4); }\n\n/* Paints its own ground. A UserButton in a navbar should stay transparent, but\n the dashboard is a large surface of themed text: in dark theme its foreground\n is near-white, so on a light host page it was rendering white-on-white. */\n.throttle-account-root { container-type: inline-size; background: var(--throttle-color-background); color: var(--throttle-color-foreground); }\n.throttle-account { display: flex; gap: var(--throttle-space-5); align-items: flex-start; }\n.throttle-account__content { flex: 1; min-width: 0; }\n.throttle-tabs__rail { flex: none; width: 220px; display: flex; flex-direction: column; gap: 2px; }\n.throttle-tabs__railitem {\n font: inherit;\n font-size: var(--throttle-font-size-sm);\n display: flex;\n align-items: center;\n gap: var(--throttle-space-3);\n width: 100%;\n text-align: left;\n background: none;\n border: none;\n border-radius: var(--throttle-radius-sm);\n padding: 0 var(--throttle-space-3);\n min-height: var(--throttle-control-height);\n color: var(--throttle-color-muted-foreground);\n cursor: pointer;\n transition: background var(--throttle-transition), color var(--throttle-transition);\n}\n.throttle-tabs__railitem:hover { background: var(--throttle-color-surface); color: var(--throttle-color-foreground); }\n.throttle-tabs__railitem:focus-visible { outline: 2px solid var(--throttle-color-primary); outline-offset: -2px; }\n.throttle-tabs__tab:focus-visible { outline: 2px solid var(--throttle-color-primary); outline-offset: -2px; }\n.throttle-tabs__railitem--active { background: var(--throttle-color-surface); color: var(--throttle-color-foreground); font-weight: 500; }\n.throttle-tabs__railicon { flex: none; opacity: .75; }\n\n/* A CONTAINER query, not a viewport one: these components render inside a\n merchant's page, so the viewport says nothing about how much room the\n dashboard actually has \u2014 it could sit in a 400px column on a 1920px screen.\n Below ~560px of container the rail becomes a full-width list above the\n panel: all seven still visible, each still a 44px target. */\n@container (max-width: 560px) {\n /* align-items: flex-start is right in row direction and wrong in column \u2014\n it shrinks the rail to its content width, so width:100% alone cannot make\n it span. Stretch it explicitly when stacked. */\n .throttle-account { flex-direction: column; align-items: stretch; gap: var(--throttle-space-4); }\n .throttle-tabs__rail { width: 100%; }\n}\n\n.throttle-table { width: 100%; border-collapse: collapse; text-align: left; }\n.throttle-table__head { color: var(--throttle-color-muted-foreground); font-weight: 500; font-size: var(--throttle-font-size-sm); }\n.throttle-table__row { border-top: var(--throttle-border-width) solid var(--throttle-color-border); cursor: pointer; transition: background-color var(--throttle-transition); }\n.throttle-table__row:hover { background: var(--throttle-color-surface); }\n.throttle-table__row:focus-visible { outline: 2px solid var(--throttle-color-primary); outline-offset: -2px; }\n.throttle-table__cell { padding: var(--throttle-space-3) var(--throttle-space-2); height: 56px; box-sizing: border-box; }\n.throttle-table__scroll { overflow-x: auto; }\n\n.throttle-empty { text-align: center; padding: var(--throttle-space-6) var(--throttle-space-4); }\n.throttle-empty__title { font-weight: 600; margin: 0 0 var(--throttle-space-1); }\n.throttle-empty__description { color: var(--throttle-color-muted-foreground); margin: 0; }\n\n.throttle-avatar {\n display: inline-flex; align-items: center; justify-content: center;\n width: 32px; height: 32px; border-radius: var(--throttle-radius-full);\n background: var(--throttle-color-primary); color: var(--throttle-color-primary-foreground);\n font-size: var(--throttle-font-size-xs); font-weight: 600; text-transform: uppercase;\n}\n\n.throttle-badge {\n display: inline-block; font-size: var(--throttle-font-size-xs); font-weight: 500;\n padding: 2px var(--throttle-space-2); border-radius: var(--throttle-radius-full);\n background: var(--throttle-color-muted); color: var(--throttle-color-muted-foreground);\n}\n.throttle-badge--muted { background: none; border: var(--throttle-border-width) solid var(--throttle-color-border); color: var(--throttle-color-muted-foreground); font-weight: 400; padding: 1px calc(var(--throttle-space-2) - 1px); }\n.throttle-badge--success { background: color-mix(in srgb, var(--throttle-color-success) 15%, transparent); color: var(--throttle-color-success); }\n.throttle-badge--warning { background: color-mix(in srgb, var(--throttle-color-warning) 15%, transparent); color: var(--throttle-color-warning); }\n.throttle-badge--danger { background: color-mix(in srgb, var(--throttle-color-danger) 15%, transparent); color: var(--throttle-color-danger); }\n\n.throttle-stack { display: flex; flex-direction: column; gap: var(--throttle-space-3); }\n.throttle-row { display: flex; align-items: center; justify-content: space-between; gap: var(--throttle-space-2); flex-wrap: wrap; }\n.throttle-muted { color: var(--throttle-color-muted-foreground); }\n.throttle-banner {\n display: flex; align-items: center; justify-content: space-between; gap: var(--throttle-space-2);\n flex-wrap: wrap;\n background: color-mix(in srgb, var(--throttle-color-warning) 12%, transparent);\n color: var(--throttle-color-warning);\n border-radius: var(--throttle-radius-sm);\n padding: var(--throttle-space-3);\n margin-bottom: var(--throttle-space-4);\n}\n.throttle-panel { display: flex; flex-direction: column; gap: var(--throttle-space-4); }\n/* 100dvh, not 100vh: on mobile browsers 100vh includes the space behind the\n dynamic address/toolbar, so the page would be taller than the visible\n viewport and the card would sit off-centre until the toolbar collapsed. */\n.throttle-page {\n min-height: 100dvh;\n width: 100%;\n background: var(--throttle-color-surface);\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: var(--throttle-space-5);\n padding: var(--throttle-space-5);\n}\n.throttle-page__logo { display: flex; justify-content: center; }\n.throttle-page__footer { color: var(--throttle-color-muted-foreground); text-align: center; font-size: var(--throttle-font-size-sm); }\n.throttle-listitem {\n display: flex; align-items: flex-start; justify-content: space-between; gap: var(--throttle-space-2);\n flex-wrap: wrap;\n border: var(--throttle-border-width) solid var(--throttle-color-border);\n border-radius: var(--throttle-radius-sm);\n padding: var(--throttle-space-3);\n}\n/* 'rows' variant: hairline rules between items instead of each item carrying\n its own border+radius, so a panel does not read as a card inside a card. */\n.throttle-rows { display: flex; flex-direction: column; }\n.throttle-rowitem {\n display: flex; align-items: flex-start; justify-content: space-between; gap: var(--throttle-space-2);\n flex-wrap: wrap;\n border-top: var(--throttle-border-width) solid var(--throttle-color-border);\n padding: var(--throttle-space-3) 0;\n}\n.throttle-rowitem:first-child { border-top: none; padding-top: 0; }\n.throttle-actions { display: flex; gap: var(--throttle-space-2); flex-wrap: wrap; }\n.throttle-table__money { display: block; text-align: right; font-variant-numeric: tabular-nums; }\n.throttle-lineitem { display: flex; align-items: center; gap: var(--throttle-space-3); padding: var(--throttle-space-2) 0; }\n.throttle-lineitem__image { width: 48px; height: 48px; object-fit: cover; border-radius: var(--throttle-radius-sm); flex: none; }\n.throttle-totals { display: flex; flex-direction: column; gap: var(--throttle-space-1); }\n\n@media (prefers-reduced-motion: reduce) {\n .throttle-button, .throttle-field__input, .throttle-dropdown__item, .throttle-dropdown__trigger, .throttle-tabs__tab, .throttle-table__row, .throttle-modal__close {\n transition: none;\n }\n}\n";
441
+
442
+ /**
443
+ * The only place minor units become major units. Every amount on the wire is
444
+ * an integer in the currency's smallest unit, and the exponent varies: USD and
445
+ * EUR are 2, JPY and KRW are 0, and a few are 3. `Intl` knows all of them, so
446
+ * ask it rather than hardcoding 100.
447
+ */
448
+ declare function formatMoney(minorUnits: number, currency: string, locale: string): string;
449
+ declare function formatDate(value: string | Date, locale: string): string;
450
+
451
+ type AuthCardVariant = 'quiet' | 'grouped' | 'branded';
452
+ interface SignInProps {
453
+ appearance?: ThrottleAppearance;
454
+ localization?: ThrottleLocalization;
455
+ /** Composition of the card. Default `'quiet'`. */
456
+ variant?: AuthCardVariant;
457
+ /** Rendered above the title in the `branded` variant. Falls back to `ThrottleProvider`'s `logo`. */
458
+ logo?: ReactNode;
459
+ onSuccess?(): void;
460
+ onForgotPassword?(): void;
461
+ onSignUp?(): void;
462
+ }
463
+ declare function SignIn(props: SignInProps): react_jsx_runtime.JSX.Element;
464
+
465
+ interface SignUpProps {
466
+ appearance?: ThrottleAppearance;
467
+ localization?: ThrottleLocalization;
468
+ /** Composition of the card. Default `'quiet'`. */
469
+ variant?: AuthCardVariant;
470
+ /** Rendered above the title in the `branded` variant. Falls back to `ThrottleProvider`'s `logo`. */
471
+ logo?: ReactNode;
472
+ onSuccess?(): void;
473
+ onSignIn?(): void;
474
+ }
475
+ declare function SignUp(props: SignUpProps): react_jsx_runtime.JSX.Element;
476
+
477
+ interface ForgotPasswordProps {
478
+ appearance?: ThrottleAppearance;
479
+ localization?: ThrottleLocalization;
480
+ /** Composition of the card. Default `'quiet'`. A single input, so `'grouped'` renders the same as `'quiet'`. */
481
+ variant?: AuthCardVariant;
482
+ /** Rendered above the title in the `branded` variant. Falls back to `ThrottleProvider`'s `logo`. */
483
+ logo?: ReactNode;
484
+ onBack?(): void;
485
+ }
486
+ declare function ForgotPassword(props: ForgotPasswordProps): react_jsx_runtime.JSX.Element;
487
+
488
+ interface ResetPasswordProps {
489
+ token?: string;
490
+ appearance?: ThrottleAppearance;
491
+ localization?: ThrottleLocalization;
492
+ /** Composition of the card. Default `'quiet'`. A single input, so `'grouped'` renders the same as `'quiet'`. */
493
+ variant?: AuthCardVariant;
494
+ /** Rendered above the title in the `branded` variant. Falls back to `ThrottleProvider`'s `logo`. */
495
+ logo?: ReactNode;
496
+ onSuccess?(): void;
497
+ }
498
+ declare function ResetPassword(props: ResetPasswordProps): react_jsx_runtime.JSX.Element;
499
+
500
+ interface VerifyEmailProps {
501
+ token?: string;
502
+ appearance?: ThrottleAppearance;
503
+ localization?: ThrottleLocalization;
504
+ /** Composition of the card. Default `'quiet'`. This card has no inputs, so `'grouped'` renders the same as `'quiet'`. */
505
+ variant?: AuthCardVariant;
506
+ /** Rendered above the title in the `branded` variant. Falls back to `ThrottleProvider`'s `logo`. */
507
+ logo?: ReactNode;
508
+ onSuccess?(): void;
509
+ }
510
+ declare function VerifyEmail(props: VerifyEmailProps): react_jsx_runtime.JSX.Element;
511
+
512
+ type AuthView = 'signIn' | 'signUp' | 'forgotPassword' | 'resetPassword' | 'verifyEmail';
513
+ interface AuthFlowProps {
514
+ initialView?: AuthView;
515
+ /** Controlled mode: pass both to own the value yourself. */
516
+ view?: AuthView;
517
+ onViewChange?(view: AuthView): void;
518
+ /** Wins over the token in the URL. */
519
+ token?: string;
520
+ routing?: 'virtual' | 'hash';
521
+ afterSignIn?(): void;
522
+ afterSignUp?(): void;
523
+ appearance?: ThrottleAppearance;
524
+ localization?: ThrottleLocalization;
525
+ }
526
+ declare function AuthFlow(props: AuthFlowProps): react_jsx_runtime.JSX.Element;
527
+
528
+ interface AuthModalProps {
529
+ open: boolean;
530
+ onClose(): void;
531
+ initialView?: AuthView;
532
+ afterSignIn?(): void;
533
+ afterSignUp?(): void;
534
+ appearance?: ThrottleAppearance;
535
+ localization?: ThrottleLocalization;
536
+ }
537
+ declare function AuthModal(props: AuthModalProps): react_jsx_runtime.JSX.Element;
538
+
539
+ interface SignInButtonProps {
540
+ mode?: 'modal' | 'redirect';
541
+ /** Required when mode is "redirect". */
542
+ url?: string;
543
+ initialView?: AuthView;
544
+ asChild?: boolean;
545
+ children?: ReactNode;
546
+ appearance?: ThrottleAppearance;
547
+ localization?: ThrottleLocalization;
548
+ afterSignIn?(): void;
549
+ }
550
+ declare function SignInButton(props: SignInButtonProps): react_jsx_runtime.JSX.Element;
551
+
552
+ /** The twin of `SignInButton`, opening the same flow on the sign-up view. */
553
+ interface SignUpButtonProps {
554
+ mode?: 'modal' | 'redirect';
555
+ /** Required when mode is "redirect". */
556
+ url?: string;
557
+ initialView?: AuthView;
558
+ asChild?: boolean;
559
+ children?: ReactNode;
560
+ appearance?: ThrottleAppearance;
561
+ localization?: ThrottleLocalization;
562
+ afterSignUp?(): void;
563
+ }
564
+ declare function SignUpButton(props: SignUpButtonProps): react_jsx_runtime.JSX.Element;
565
+
566
+ interface SignOutButtonProps {
567
+ /** Revokes every session, not just this device. May raise a step-up prompt. */
568
+ everywhere?: boolean;
569
+ children?: ReactNode;
570
+ localization?: ThrottleLocalization;
571
+ onSignedOut?(): void;
572
+ }
573
+ declare function SignOutButton(props: SignOutButtonProps): react_jsx_runtime.JSX.Element;
574
+
575
+ interface SignInPageProps {
576
+ /** Rendered above the card. Absent by default. */
577
+ logo?: ReactNode;
578
+ /** Rendered below the card. Absent by default. */
579
+ footer?: ReactNode;
580
+ appearance?: ThrottleAppearance;
581
+ localization?: ThrottleLocalization;
582
+ onSuccess?(): void;
583
+ onForgotPassword?(): void;
584
+ onSignUp?(): void;
585
+ }
586
+ /**
587
+ * A full-viewport, centred shell around `<SignIn/>` for merchants who drop it
588
+ * directly on a route (e.g. `/sign-in`) and would otherwise get a card stuck
589
+ * at the top of a bare page. `100dvh`, not `100vh` — see styles.ts.
590
+ */
591
+ declare function SignInPage(props: SignInPageProps): react_jsx_runtime.JSX.Element;
592
+
593
+ interface SignUpPageProps {
594
+ /** Rendered above the card. Absent by default. */
595
+ logo?: ReactNode;
596
+ /** Rendered below the card. Absent by default. */
597
+ footer?: ReactNode;
598
+ appearance?: ThrottleAppearance;
599
+ localization?: ThrottleLocalization;
600
+ onSuccess?(): void;
601
+ onSignIn?(): void;
602
+ }
603
+ /** The `<SignUp/>` twin of `SignInPage`. */
604
+ declare function SignUpPage(props: SignUpPageProps): react_jsx_runtime.JSX.Element;
605
+
606
+ /**
607
+ * All three render nothing while `status === 'loading'`. A guard that treated
608
+ * loading as signed-out would flash a "Sign in" button at a buyer whose
609
+ * session is a few milliseconds from being restored.
610
+ */
611
+ declare function SignedIn(props: {
612
+ children: ReactNode;
613
+ }): react_jsx_runtime.JSX.Element | null;
614
+ declare function SignedOut(props: {
615
+ children: ReactNode;
616
+ }): react_jsx_runtime.JSX.Element | null;
617
+ declare function Protect(props: {
618
+ requireVerified?: boolean;
619
+ fallback?: ReactNode;
620
+ children: ReactNode;
621
+ }): react_jsx_runtime.JSX.Element | null;
622
+
623
+ interface UserButtonProps {
624
+ /** "modal" opens the dashboard in an overlay; "navigate" links to accountUrl. */
625
+ mode?: 'modal' | 'navigate';
626
+ accountUrl?: string;
627
+ /** Forwarded to the dashboard in modal mode. */
628
+ tabs?: AccountTab[];
629
+ appearance?: ThrottleAppearance;
630
+ localization?: ThrottleLocalization;
631
+ afterSignOut?(): void;
632
+ children?: ReactNode;
633
+ }
634
+ declare function UserButtonRoot(props: UserButtonProps): react_jsx_runtime.JSX.Element | null;
635
+ /** `<UserButton.Link href label icon?/>` — a merchant link inside the menu. */
636
+ declare function UserButtonLink(props: {
637
+ href: string;
638
+ label: string;
639
+ icon?: ReactNode;
640
+ }): react_jsx_runtime.JSX.Element;
641
+ /** `<UserButton.Action onClick label icon?/>` — a merchant action inside the menu. */
642
+ declare function UserButtonAction(props: {
643
+ onClick(): void;
644
+ label: string;
645
+ icon?: ReactNode;
646
+ }): react_jsx_runtime.JSX.Element;
647
+ declare const UserButton: typeof UserButtonRoot & {
648
+ Link: typeof UserButtonLink;
649
+ Action: typeof UserButtonAction;
650
+ };
651
+
652
+ declare function VerifyEmailBanner(props: {
653
+ appearance?: ThrottleAppearance;
654
+ localization?: ThrottleLocalization;
655
+ }): react_jsx_runtime.JSX.Element | null;
656
+
657
+ declare function ProfilePanel(props: {
658
+ appearance?: ThrottleAppearance;
659
+ localization?: ThrottleLocalization;
660
+ }): react_jsx_runtime.JSX.Element | null;
661
+
662
+ /**
663
+ * Read-only by design. There is no buyer-plane route to add a payment method —
664
+ * the embed-token endpoint lives on the merchant plane behind a pm_client_token
665
+ * — so this panel offers no "Add card" control, not even a disabled one. The
666
+ * empty state explains where cards actually come from, which stays true if a
667
+ * buyer-plane add route is built later.
668
+ */
669
+ declare function PaymentMethodsPanel(props: {
670
+ appearance?: ThrottleAppearance;
671
+ localization?: ThrottleLocalization;
672
+ variant?: AccountPanelVariant;
673
+ }): react_jsx_runtime.JSX.Element;
674
+
675
+ declare function OrdersPanel(props: {
676
+ appearance?: ThrottleAppearance;
677
+ localization?: ThrottleLocalization;
678
+ variant?: AccountPanelVariant;
679
+ onViewSubscription?(id: string): void;
680
+ }): react_jsx_runtime.JSX.Element;
681
+
682
+ declare function OrderDetail(props: {
683
+ orderId: string;
684
+ onBack?(): void;
685
+ onViewSubscription?(id: string): void;
686
+ appearance?: ThrottleAppearance;
687
+ localization?: ThrottleLocalization;
688
+ }): react_jsx_runtime.JSX.Element;
689
+
690
+ declare function InvoicesPanel(props: {
691
+ appearance?: ThrottleAppearance;
692
+ localization?: ThrottleLocalization;
693
+ variant?: AccountPanelVariant;
694
+ }): react_jsx_runtime.JSX.Element;
695
+
696
+ declare function InvoiceDetail(props: {
697
+ invoiceId: string;
698
+ onBack?(): void;
699
+ appearance?: ThrottleAppearance;
700
+ localization?: ThrottleLocalization;
701
+ }): react_jsx_runtime.JSX.Element;
702
+
703
+ declare function SubscriptionsPanel(props: {
704
+ appearance?: ThrottleAppearance;
705
+ localization?: ThrottleLocalization;
706
+ variant?: AccountPanelVariant;
707
+ }): react_jsx_runtime.JSX.Element;
708
+
709
+ declare function SecurityPanel(props: {
710
+ appearance?: ThrottleAppearance;
711
+ localization?: ThrottleLocalization;
712
+ variant?: AccountPanelVariant;
713
+ }): react_jsx_runtime.JSX.Element;
714
+
715
+ interface AccountModalProps {
716
+ open: boolean;
717
+ onClose(): void;
718
+ tabs?: AccountTab[];
719
+ appearance?: ThrottleAppearance;
720
+ localization?: ThrottleLocalization;
721
+ /** Where focus returns on close. See `Modal`'s own doc for why a caller
722
+ * sometimes has to name this rather than let the modal capture it. */
723
+ restoreFocusTo?: Element | null;
724
+ }
725
+ /**
726
+ * The account dashboard, reachable without going through `UserButton`'s
727
+ * menu — a merchant can wire this to a "Settings" control anywhere. Mirrors
728
+ * `AuthModal`'s shape (a `Modal` hosting the existing card/dashboard), so a
729
+ * merchant who wants to own the open/close state themselves has the same
730
+ * kind of component available for the account surface that they already
731
+ * have for sign-in.
732
+ */
733
+ declare function AccountModal(props: AccountModalProps): react_jsx_runtime.JSX.Element;
734
+
735
+ export { ACCOUNT_TABS, AccountDashboard, type AccountDashboardProps, AccountModal, type AccountModalProps, type AccountPanelVariant, type AccountTab, AddressesPanel, type AuthCardVariant, AuthFlow, type AuthFlowProps, AuthModal, type AuthModalProps, type AuthView, ForgotPassword, type ForgotPasswordProps, InvoiceDetail, InvoicesPanel, OrderDetail, OrdersPanel, PaymentMethodsPanel, ProfilePanel, Protect, ResetPassword, type ResetPasswordProps, SecurityPanel, SignIn, SignInButton, type SignInButtonProps, SignInPage, type SignInPageProps, type SignInProps, SignOutButton, type SignOutButtonProps, SignUp, SignUpButton, type SignUpButtonProps, SignUpPage, type SignUpPageProps, type SignUpProps, SignedIn, SignedOut, SubscriptionsPanel, THROTTLE_ELEMENT_KEYS, THROTTLE_STYLES, THROTTLE_STYLE_ID, type ThrottleAppearance, ThrottleAuth, ThrottleAuthConfig, type ThrottleElementKey, type ThrottleLocalization, ThrottleProvider, type ThrottleProviderProps, type ThrottleSlots, type ThrottleThemeName, type ThrottleVariables, type UseThrottleResult, UserButton, type UserButtonProps, VerifyEmail, VerifyEmailBanner, type VerifyEmailProps, enUS, formatDate, formatMoney, useThrottle };