@pollar/react 0.11.2 → 0.11.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { pollarPaths, PollarClient, PollarClientConfig, PollarAdapters, OnStorageDegrade, WalletInfo, PollarLoginOptions, SessionsState, TransactionState, TxBuildBody, BuildOutcome, SubmitOutcome, SignOutcome, SendPaymentParams, StellarNetwork, WalletBalanceState, EnabledAssetsState, TrustlineOutcome, TxHistoryState, SwapVenue, SwapToken, SwapQuoteParams, SwapQuote, EarnProviderId, EarnOpportunity, EarnPositionParams, EarnPosition, EarnTxParams, PollarAdapter, WalletId, WalletChain, KycStatus as KycStatus$1, RampQuote, AuthState, KycProvider, KycStartResponse, RampDirection, RampCountry, RampTxStatus, EnabledAssetRecord, WalletBalanceRecord, SwapProvider, DistributionRulesState, DistributionRule } from '@pollar/core';
2
+ import { pollarPaths, PollarClient, PollarClientConfig, PollarAdapters, OnStorageDegrade, WalletInfo, PollarLoginOptions, SessionsState, TransactionState, TxBuildBody, BuildOutcome, SubmitOutcome, SignOutcome, SendPaymentParams, StellarNetwork, WalletBalanceState, EnabledAssetsState, TrustlineOutcome, TxHistoryState, SwapVenue, SwapToken, SwapQuoteParams, SwapQuote, EarnProviderId, EarnOpportunity, EarnPositionParams, EarnPosition, EarnTxParams, PollarAdapter, PasskeyCeremony, PasskeySigner, WalletChain, KycStatus as KycStatus$1, RampQuote, WalletId, AuthState, KycProvider, KycStartResponse, RampDirection, RampCountry, RampTxStatus, RampDepositInstructions, EnabledAssetRecord, WalletBalanceRecord, SwapProvider, DistributionRulesState, DistributionRule } from '@pollar/core';
3
3
  export { AuthProviderContext, PollarAuthProvider, SessionsState } from '@pollar/core';
4
- import { ReactNode } from 'react';
4
+ import { ReactNode, CSSProperties } from 'react';
5
5
 
6
6
  type ConfigResponse = pollarPaths['/applications/config']['get']['responses'][200]['content']['application/json'];
7
7
  type PollarConfig = ConfigResponse['content'];
@@ -22,13 +22,13 @@ interface PollarContextValue {
22
22
  /**
23
23
  * The authenticated user's wallet as a discriminated union over `custody`
24
24
  * (`internal` | `smart` | `external`), or `null` when unauthenticated. Every
25
- * field is meaningful for any login method — `custody` is always present and
25
+ * field is meaningful for any login method - `custody` is always present and
26
26
  * strictly determines the shape of `provider`. Use `wallet.address` for the
27
27
  * on-chain address and `wallet.provider` for the wallet/login provider.
28
28
  */
29
29
  wallet: WalletInfo | null;
30
30
  /**
31
- * Every wallet the user holds, one per chain — a superset of {@link wallet},
31
+ * Every wallet the user holds, one per chain - a superset of {@link wallet},
32
32
  * with `chain` populated. `[]` when unauthenticated. Drives the network
33
33
  * selector in the Send / Wallet Balance / Assets modals: each entry is a
34
34
  * network the user can switch to, and the first one is the default.
@@ -40,7 +40,7 @@ interface PollarContextValue {
40
40
  /**
41
41
  * `true` once the server has confirmed the session (login / refresh /
42
42
  * `/auth/session/resume`). `false` while a cold-start session is still
43
- * optimistic — gate sensitive actions (e.g. signing) on this.
43
+ * optimistic - gate sensitive actions (e.g. signing) on this.
44
44
  */
45
45
  verified: boolean;
46
46
  login: (options: PollarLoginOptions) => void;
@@ -52,7 +52,7 @@ interface PollarContextValue {
52
52
  styles: PollarStyles;
53
53
  /** Remote app-config load state. 'loading' while the initial fetch is in
54
54
  * flight, 'error' if it failed (styles fall back to empty defaults), 'ready'
55
- * once resolved — or immediately 'ready' when `appConfig` is passed as a prop.
55
+ * once resolved - or immediately 'ready' when `appConfig` is passed as a prop.
56
56
  * The login modal shows a spinner/retry instead of an empty shell until this
57
57
  * is 'ready'. */
58
58
  configStatus: 'loading' | 'ready' | 'error';
@@ -66,7 +66,7 @@ interface PollarContextValue {
66
66
  /** External-wallet only. Custodial flows should use `signAndSubmitTx`. */
67
67
  signTx: (unsignedXdr: string) => Promise<SignOutcome>;
68
68
  submitTx: (signedXdr: string) => Promise<SubmitOutcome>;
69
- /** One-shot: build → sign → submit. Drives the same TransactionState flow as the split calls. */
69
+ /** One-shot: build -> sign -> submit. Drives the same TransactionState flow as the split calls. */
70
70
  buildAndSignAndSubmitTx: (operation: TxBuildBody['operation'], params: TxBuildBody['params'], options?: TxBuildBody['options']) => Promise<SubmitOutcome>;
71
71
  /** Alias of `buildAndSignAndSubmitTx`. */
72
72
  runTx: (operation: TxBuildBody['operation'], params: TxBuildBody['params'], options?: TxBuildBody['options']) => Promise<SubmitOutcome>;
@@ -176,6 +176,11 @@ interface PollarProviderProps {
176
176
  *
177
177
  * The client is locked at first render: changing this prop afterwards is
178
178
  * ignored. To swap clients, unmount and remount the provider.
179
+ *
180
+ * Either form gets the web passkey ceremony installed (a pre-built instance
181
+ * is filled in via `setPasskeyDefaults`), so the "Smart Wallet" login works
182
+ * without the consumer wiring WebAuthn. A ceremony you configured yourself is
183
+ * always kept.
179
184
  */
180
185
  client: PollarClient | PollarClientConfig;
181
186
  /**
@@ -189,13 +194,13 @@ interface PollarProviderProps {
189
194
  * bypass the type anyway (plain JS, or a cast), each missing field lands on a
190
195
  * default scattered across the components rather than on anything central:
191
196
  *
192
- * chains absent → the chain order/filter falls back to the order the
197
+ * chains absent -> the chain order/filter falls back to the order the
193
198
  * session listed the user's wallets in (see useChains)
194
- * name absent → 'Pollar'
195
- * theme absent → 'light'
196
- * accentColor absent → '#005DB4'
199
+ * name absent -> 'Pollar'
200
+ * theme absent -> 'light'
201
+ * accentColor absent -> '#005DB4'
197
202
  * emailEnabled, providers, embeddedWallets, smartWallet
198
- * absent → false. NOTE: that means EVERY login method is off
203
+ * absent -> false. NOTE: that means EVERY login method is off
199
204
  * and the login modal renders with no way in.
200
205
  *
201
206
  * Leave this `undefined` to have the SDK fetch `/applications/config` on
@@ -225,6 +230,32 @@ type WrappedAdapter<T extends PollarAdapter> = {
225
230
  };
226
231
  declare function createPollarAdapterHook<T extends PollarAdapter>(key: string): () => WrappedAdapter<T>;
227
232
 
233
+ /**
234
+ * Browser passkey ceremony for the smart-wallet flow.
235
+ *
236
+ * `mode` is set explicitly by the caller's button, so there's no ambiguous
237
+ * autodetect:
238
+ * - `'login'` -> `get()` only (returning user - the OS shows the account
239
+ * picker for discoverable credentials on this domain). A
240
+ * failure here is surfaced as-is; it never falls through to
241
+ * registration, so cancelling the prompt can't accidentally
242
+ * create a second wallet.
243
+ * - `'register'` -> `create()` only (new user -> the server deploys the
244
+ * C-address).
245
+ *
246
+ * rpId = the current page's hostname (the customer app's domain), which is what
247
+ * the passkey is bound to - the anti-phishing guarantee.
248
+ */
249
+ declare const browserPasskeyCeremony: PasskeyCeremony;
250
+ /**
251
+ * Browser passkey signer for smart-wallet transactions. Runs a WebAuthn `get()`
252
+ * whose challenge is the raw auth digest (the on-chain verifier checks
253
+ * clientDataJSON.challenge === base64url(digest)), and returns the public
254
+ * assertion fields (base64url) for the server to assemble into the Soroban auth
255
+ * entry. The secp256r1 key never leaves the device.
256
+ */
257
+ declare const browserPasskeySigner: PasskeySigner;
258
+
228
259
  declare function WalletButton(): react_jsx_runtime.JSX.Element;
229
260
 
230
261
  interface WalletButtonTemplateProps {
@@ -237,7 +268,6 @@ interface WalletButtonTemplateProps {
237
268
  itemColor: string;
238
269
  wrapperRef: React.RefObject<HTMLDivElement>;
239
270
  isInProgress: boolean;
240
- walletType: WalletId | null;
241
271
  /** Show the "Create account" action (external wallet not yet on-chain, IMMEDIATE funding). */
242
272
  showCreateAccount: boolean;
243
273
  creatingAccount: boolean;
@@ -264,7 +294,7 @@ declare function WalletButtonTemplate({ walletAddress, accentColor, open, copied
264
294
  */
265
295
  declare function resolveChain(chain: WalletChain | undefined): WalletChain;
266
296
  /**
267
- * The selectable chains — the first is the default everywhere (network picker,
297
+ * The selectable chains - the first is the default everywhere (network picker,
268
298
  * the address the wallet button shows). De-duplicated because two wallets on one
269
299
  * chain (e.g. a custodial and a linked external Stellar wallet) are still one
270
300
  * network choice.
@@ -339,9 +369,13 @@ declare function RampWidget({ onClose }: RampWidgetProps): react_jsx_runtime.JSX
339
369
 
340
370
  interface RouteDisplayProps {
341
371
  quote: RampQuote;
372
+ /** This route is the one being started - it owns the in-flight request. */
373
+ busy?: boolean;
374
+ /** Another route is starting, so this one is not selectable meanwhile. */
375
+ disabled?: boolean;
342
376
  onSelect: (quote: RampQuote) => void;
343
377
  }
344
- declare function RouteDisplay({ quote, onSelect }: RouteDisplayProps): react_jsx_runtime.JSX.Element;
378
+ declare function RouteDisplay({ quote, busy, disabled, onSelect }: RouteDisplayProps): react_jsx_runtime.JSX.Element;
345
379
 
346
380
  interface WalletBalanceModalProps {
347
381
  onClose: () => void;
@@ -383,6 +417,52 @@ interface DistributionRulesModalProps {
383
417
  }
384
418
  declare function DistributionRulesModal({ onClose }: DistributionRulesModalProps): react_jsx_runtime.JSX.Element;
385
419
 
420
+ /** Per-app overrides for the modal chrome, configured in the dashboard's
421
+ * Branding screen. Every field is optional: absent means "use the value the
422
+ * theme derives", which is what every modal rendered before these existed. */
423
+ interface ModalStyleOverrides {
424
+ /** Card background. Overrides the theme's white / #1a1a1a. */
425
+ backgroundColor?: string | null | undefined;
426
+ /** Body text. Overrides the theme's #111827 / white. Secondary ("muted") text
427
+ * keeps its theme color, so the two stay distinguishable. */
428
+ textColor?: string | null | undefined;
429
+ /** Fill of the SECONDARY buttons (the wallet / social / provider entries, the
430
+ * retry button). The primary button is the accent's job. Unset => the theme's
431
+ * own surface color, which is what these buttons always used. */
432
+ buttonColor?: string | null | undefined;
433
+ /** Radius of the modal card itself, in px. */
434
+ modalBorderRadius?: number | null | undefined;
435
+ /** Radius of the buttons inside the modal, in px. Independent of the card's. */
436
+ buttonBorderRadius?: number | null | undefined;
437
+ }
438
+ /** Text color that stays legible on `background`. The primary button's label was
439
+ * hardcoded white, which a light fill (the Amber accent preset, say) turns
440
+ * invisible - so it follows the fill's luminance instead. Unparseable colors
441
+ * keep white, the pre-existing behavior. */
442
+ declare function readableTextOn(background: string): string;
443
+ /** How much room a modal gives its header. 'hero' is the identity-forward set
444
+ * (login, KYC, ramp, the Privy sub-modal): roomier padding and a larger
445
+ * centered heading. 'compact' is every utility modal (send, balance, history,
446
+ * ...), which keeps the card's own 1.75rem padding. */
447
+ type ModalVariant = 'hero' | 'compact';
448
+ /** Theme-derived CSS custom properties shared by every Pollar modal, plus the
449
+ * per-app overrides on top. One definition so the whole modal family stays
450
+ * visually in lockstep - a var added here reaches all of them at once. */
451
+ declare function buildModalCssVars(theme: string, accentColor: string, overrides?: ModalStyleOverrides, variant?: ModalVariant): CSSProperties;
452
+ /** Everything a modal wrapper needs to dress itself from the app's branding:
453
+ * the theme pair its template already took, the overrides to forward to that
454
+ * template, and the inline style for the fixed overlay behind it. */
455
+ interface ModalChrome {
456
+ theme: string;
457
+ accentColor: string;
458
+ styleOverrides: ModalStyleOverrides;
459
+ overlayStyle: CSSProperties;
460
+ }
461
+ /** Resolve the branding config into the props/styles a modal wrapper applies.
462
+ * Called by every `.pollar-overlay` renderer so the z-index and the card
463
+ * overrides can't drift apart between modals. */
464
+ declare function modalChrome(styles: PollarStyles): ModalChrome;
465
+
386
466
  type WalletAdapterEntry = {
387
467
  id: WalletId;
388
468
  meta: {
@@ -394,6 +474,8 @@ type WalletAdapterEntry = {
394
474
  interface LoginModalTemplateProps {
395
475
  theme: string;
396
476
  accentColor: string;
477
+ /** Per-app modal chrome overrides (background, card + button radius). */
478
+ styleOverrides?: ModalStyleOverrides;
397
479
  logoUrl: string | null;
398
480
  emailEnabled: boolean;
399
481
  embeddedWallets: boolean;
@@ -407,7 +489,7 @@ interface LoginModalTemplateProps {
407
489
  github: boolean;
408
490
  apple: boolean;
409
491
  };
410
- /** Registered wallet adapters to render as buttons (Freighter, Albedo, Privy, …). */
492
+ /** Registered wallet adapters to render as buttons (Freighter, Albedo, Privy, ...). */
411
493
  walletAdapters: WalletAdapterEntry[];
412
494
  appName: string;
413
495
  email?: string;
@@ -426,12 +508,14 @@ interface LoginModalTemplateProps {
426
508
  onCancel: () => void;
427
509
  onRetry: () => void;
428
510
  }
429
- declare function LoginModalTemplate({ theme, accentColor, logoUrl, emailEnabled, embeddedWallets, smartWallet, providers, walletAdapters, appName, email, onEmailChange, onEmailSubmit, onSocialLogin, onWalletConnect, onLoginSmartWallet, onCreateSmartWallet, authState, codeInputKey, onCodeSubmit, onBack, onCancel, onRetry, }: LoginModalTemplateProps): react_jsx_runtime.JSX.Element;
511
+ declare function LoginModalTemplate({ theme, accentColor, styleOverrides, logoUrl, emailEnabled, embeddedWallets, smartWallet, providers, walletAdapters, appName, email, onEmailChange, onEmailSubmit, onSocialLogin, onWalletConnect, onLoginSmartWallet, onCreateSmartWallet, authState, codeInputKey, onCodeSubmit, onBack, onCancel, onRetry, }: LoginModalTemplateProps): react_jsx_runtime.JSX.Element;
430
512
 
431
513
  type KycStep = 'select_provider' | 'verifying' | 'polling' | 'done';
432
514
  interface KycModalTemplateProps {
433
515
  theme: string;
434
516
  accentColor: string;
517
+ /** Per-app modal chrome overrides (background, card + button radius). */
518
+ styleOverrides?: ModalStyleOverrides;
435
519
  step: KycStep;
436
520
  providers: KycProvider[];
437
521
  selectedProvider: KycProvider | null;
@@ -443,7 +527,7 @@ interface KycModalTemplateProps {
443
527
  onRefresh: () => void;
444
528
  onClose: () => void;
445
529
  }
446
- declare function KycModalTemplate({ theme, accentColor, step, providers, selectedProvider, session, kycStatus, isLoading, onSelectProvider, onDoneVerifying, onRefresh, onClose, }: KycModalTemplateProps): react_jsx_runtime.JSX.Element;
530
+ declare function KycModalTemplate({ theme, accentColor, styleOverrides, step, providers, selectedProvider, session, kycStatus, isLoading, onSelectProvider, onDoneVerifying, onRefresh, onClose, }: KycModalTemplateProps): react_jsx_runtime.JSX.Element;
447
531
 
448
532
  type RampStep = 'input' | 'loading_quote' | 'select_route' | 'contact' | 'status' | 'error';
449
533
  /** A field a provider declares (via the quote) that the client must collect. */
@@ -452,16 +536,39 @@ interface RampFieldSpec {
452
536
  label: string;
453
537
  type: 'text' | 'email' | 'tel' | 'select';
454
538
  bankType?: 'CLABE' | 'PIX' | 'PSE' | 'ACH' | 'BREB';
455
- /** For `type: 'select'` — dropdown choices (e.g. Stereum's Bolivian banks). */
539
+ /** For `type: 'select'` - dropdown choices (e.g. Stereum's Bolivian banks). */
456
540
  options?: {
457
541
  value: string;
458
542
  label: string;
543
+ placeholder?: string;
459
544
  }[];
545
+ /** Declared but not mandatory (Abroad's tax id). Blank must not block Continue. */
546
+ optional?: boolean;
547
+ /** Example of the expected shape, for formats a user cannot guess. */
548
+ placeholder?: string;
549
+ /**
550
+ * Key of a sibling `select` whose chosen option supplies the placeholder. One
551
+ * Pix field can then show a CPF mask, an email or a +55 number as the user
552
+ * switches kind, without this component knowing what a Pix key is.
553
+ */
554
+ placeholderFrom?: string;
555
+ /** Secondary line under the field, for a rule the label has no room for. */
556
+ hint?: string;
460
557
  }
461
558
  interface RampWidgetTemplateProps {
462
559
  theme: string;
463
560
  accentColor: string;
561
+ /** Per-app modal chrome overrides (background, card + button radius). */
562
+ styleOverrides?: ModalStyleOverrides;
464
563
  step: RampStep;
564
+ /** Labels of the steps this run goes through. Length varies by route: only
565
+ * providers that collect fields add a 'Details' step. */
566
+ flowSteps: string[];
567
+ /** Index into `flowSteps`, or -1 when the current step is outside the flow
568
+ * (the error step) and the progress bar should be hidden. */
569
+ flowStepIndex: number;
570
+ /** Quote whose start request is in flight, so its row can show it. */
571
+ startingQuoteId: string | null;
465
572
  direction: RampDirection;
466
573
  amount: string;
467
574
  currency: string;
@@ -477,10 +584,14 @@ interface RampWidgetTemplateProps {
477
584
  txStatus: RampTxStatus | null;
478
585
  kycUrl: string | null;
479
586
  tosUrl: string | null;
587
+ /** Provider gated the flow on KYC and published no link; nothing was signed. */
588
+ kycBlocking: boolean;
589
+ /** The gate has since cleared - the user needs a fresh quote to continue. */
590
+ kycJustApproved: boolean;
480
591
  stellarTxHash: string | null;
481
592
  /** Stellar Expert URL for `stellarTxHash` (network-aware); null when unknown. */
482
593
  explorerUrl: string | null;
483
- depositInstructions: Record<string, unknown> | null;
594
+ depositInstructions: RampDepositInstructions | null;
484
595
  canComplete: boolean;
485
596
  completing: boolean;
486
597
  errorMsg: string | null;
@@ -494,15 +605,20 @@ interface RampWidgetTemplateProps {
494
605
  onOpenKyc: () => void;
495
606
  onOpenTos: () => void;
496
607
  onCompleteWithdraw: () => void;
608
+ /** Step back to the amount, keeping what was entered. Distinct from `onRetry`
609
+ * (which restarts a failed flow) so a "Back" button reads as navigation. */
610
+ onBack: () => void;
497
611
  onRetry: () => void;
498
612
  onRefresh: () => void;
499
613
  onClose: () => void;
500
614
  }
501
- declare function RampWidgetTemplate({ theme, accentColor, step, direction, amount, currency, country, requiredFields, fieldValues, countries, countriesLoading, refreshing, quotes, isLoading, provider, txStatus, kycUrl, tosUrl, stellarTxHash, explorerUrl, depositInstructions, canComplete, completing, errorMsg, onDirectionChange, onAmountChange, onFieldChange, onCountryChange, onFindRoute, onSelectQuote, onContactContinue, onOpenKyc, onOpenTos, onCompleteWithdraw, onRetry, onRefresh, onClose, }: RampWidgetTemplateProps): react_jsx_runtime.JSX.Element;
615
+ declare function RampWidgetTemplate({ theme, accentColor, styleOverrides, step, flowSteps, flowStepIndex, startingQuoteId, direction, amount, currency, country, requiredFields, fieldValues, countries, countriesLoading, refreshing, quotes, isLoading, provider, txStatus, kycUrl, tosUrl, kycBlocking, kycJustApproved, stellarTxHash, explorerUrl, depositInstructions, canComplete, completing, errorMsg, onDirectionChange, onAmountChange, onFieldChange, onCountryChange, onFindRoute, onSelectQuote, onContactContinue, onOpenKyc, onOpenTos, onCompleteWithdraw, onBack, onRetry, onRefresh, onClose, }: RampWidgetTemplateProps): react_jsx_runtime.JSX.Element;
502
616
 
503
617
  interface TransactionModalTemplateProps {
504
618
  theme: string;
505
619
  accentColor: string;
620
+ /** Per-app modal chrome overrides (background, card + button radius). */
621
+ styleOverrides?: ModalStyleOverrides;
506
622
  transaction: TransactionState;
507
623
  showXdr: boolean;
508
624
  copied: boolean;
@@ -514,7 +630,7 @@ interface TransactionModalTemplateProps {
514
630
  onCopyHash: () => void;
515
631
  onRetry?: () => void;
516
632
  }
517
- declare function TransactionModalTemplate({ theme, accentColor, transaction, showXdr, copied, explorerUrl, walletType, onClose, onSignAndSend, onToggleXdr, onCopyHash, onRetry, }: TransactionModalTemplateProps): react_jsx_runtime.JSX.Element;
633
+ declare function TransactionModalTemplate({ theme, accentColor, styleOverrides, transaction, showXdr, copied, explorerUrl, walletType, onClose, onSignAndSend, onToggleXdr, onCopyHash, onRetry, }: TransactionModalTemplateProps): react_jsx_runtime.JSX.Element;
518
634
 
519
635
  interface TxStatusViewProps {
520
636
  transaction: TransactionState;
@@ -533,6 +649,8 @@ declare function TxStatusView({ transaction, showXdr, copied, explorerUrl, walle
533
649
  interface TxHistoryModalTemplateProps {
534
650
  theme: string;
535
651
  accentColor: string;
652
+ /** Per-app modal chrome overrides (background, card + button radius). */
653
+ styleOverrides?: ModalStyleOverrides;
536
654
  txHistory: TxHistoryState;
537
655
  offset: number;
538
656
  /** Networks the user holds a wallet on; the first one is the default. */
@@ -546,28 +664,32 @@ interface TxHistoryModalTemplateProps {
546
664
  onNext: () => void;
547
665
  onClose: () => void;
548
666
  }
549
- declare function TxHistoryModalTemplate({ theme, accentColor, txHistory, offset, chains, selectedChain, walletAddress, onSelectChain, onRefresh, onPrev, onNext, onClose, }: TxHistoryModalTemplateProps): react_jsx_runtime.JSX.Element;
667
+ declare function TxHistoryModalTemplate({ theme, accentColor, styleOverrides, txHistory, offset, chains, selectedChain, walletAddress, onSelectChain, onRefresh, onPrev, onNext, onClose, }: TxHistoryModalTemplateProps): react_jsx_runtime.JSX.Element;
550
668
 
551
669
  interface WalletBalanceModalTemplateProps {
552
670
  theme: string;
553
671
  accentColor: string;
672
+ /** Per-app modal chrome overrides (background, card + button radius). */
673
+ styleOverrides?: ModalStyleOverrides;
554
674
  walletBalance: WalletBalanceState;
555
675
  /** Address of the wallet on {@link selectedChain}. */
556
676
  walletAddress: string;
557
677
  /** Networks the user holds a wallet on; the first one is the default. */
558
678
  chains: WalletChain[];
559
679
  selectedChain: WalletChain | null;
560
- /** testnet vs mainnet — gates the Solana devnet faucet hint. */
680
+ /** testnet vs mainnet - gates the Solana devnet faucet hint. */
561
681
  network: StellarNetwork;
562
682
  onSelectChain: (chain: WalletChain) => void;
563
683
  onRefresh: () => void;
564
684
  onClose: () => void;
565
685
  }
566
- declare function WalletBalanceModalTemplate({ theme, accentColor, walletBalance, walletAddress, chains, selectedChain, network, onSelectChain, onRefresh, onClose, }: WalletBalanceModalTemplateProps): react_jsx_runtime.JSX.Element;
686
+ declare function WalletBalanceModalTemplate({ theme, accentColor, styleOverrides, walletBalance, walletAddress, chains, selectedChain, network, onSelectChain, onRefresh, onClose, }: WalletBalanceModalTemplateProps): react_jsx_runtime.JSX.Element;
567
687
 
568
688
  interface EnabledAssetsModalTemplateProps {
569
689
  theme: string;
570
690
  accentColor: string;
691
+ /** Per-app modal chrome overrides (background, card + button radius). */
692
+ styleOverrides?: ModalStyleOverrides;
571
693
  enabledAssets: EnabledAssetsState;
572
694
  /** Address of the wallet on {@link selectedChain}. */
573
695
  walletAddress: string;
@@ -583,10 +705,12 @@ interface EnabledAssetsModalTemplateProps {
583
705
  onToggleTrustline: (record: EnabledAssetRecord) => void;
584
706
  onAddCustom: () => void;
585
707
  }
586
- declare function EnabledAssetsModalTemplate({ theme, accentColor, enabledAssets, walletAddress, chains, selectedChain, onSelectChain, busyKey, actionError, onRefresh, onClose, onToggleTrustline, onAddCustom, }: EnabledAssetsModalTemplateProps): react_jsx_runtime.JSX.Element;
708
+ declare function EnabledAssetsModalTemplate({ theme, accentColor, styleOverrides, enabledAssets, walletAddress, chains, selectedChain, onSelectChain, busyKey, actionError, onRefresh, onClose, onToggleTrustline, onAddCustom, }: EnabledAssetsModalTemplateProps): react_jsx_runtime.JSX.Element;
587
709
  interface CustomTrustlineModalTemplateProps {
588
710
  theme: string;
589
711
  accentColor: string;
712
+ /** Per-app modal chrome overrides (background, card + button radius). */
713
+ styleOverrides?: ModalStyleOverrides;
590
714
  busy: boolean;
591
715
  actionError: string | null;
592
716
  onBack: () => void;
@@ -601,6 +725,8 @@ interface CustomTrustlineModalTemplateProps {
601
725
  interface SendModalTemplateProps {
602
726
  theme: string;
603
727
  accentColor: string;
728
+ /** Per-app modal chrome overrides (background, card + button radius). */
729
+ styleOverrides?: ModalStyleOverrides;
604
730
  step: 'form' | 'tx';
605
731
  txTitle: string;
606
732
  assets: WalletBalanceRecord[];
@@ -637,7 +763,7 @@ interface SendModalTemplateProps {
637
763
  onRetry: () => void;
638
764
  onDone: () => void;
639
765
  }
640
- declare function SendModalTemplate({ theme, accentColor, step, txTitle, assets, selectedAsset, chains, selectedChain, walletAddress, canSendOnChain, onSelectChain, amount, destination, formError, isLoadingBalance, transaction, showXdr, copied, explorerUrl, walletType, showBack, isInProgress, onClose, onBack, onRefresh, onSelectAsset, onAmountChange, onDestinationChange, onSubmit, onSignAndSend, onToggleXdr, onCopyHash, onRetry, onDone, }: SendModalTemplateProps): react_jsx_runtime.JSX.Element;
766
+ declare function SendModalTemplate({ theme, accentColor, styleOverrides, step, txTitle, assets, selectedAsset, chains, selectedChain, walletAddress, canSendOnChain, onSelectChain, amount, destination, formError, isLoadingBalance, transaction, showXdr, copied, explorerUrl, walletType, showBack, isInProgress, onClose, onBack, onRefresh, onSelectAsset, onAmountChange, onDestinationChange, onSubmit, onSignAndSend, onToggleXdr, onCopyHash, onRetry, onDone, }: SendModalTemplateProps): react_jsx_runtime.JSX.Element;
641
767
 
642
768
  /** A selectable asset in the sell/buy pickers, normalized across balance/enabled records. */
643
769
  interface SwapAssetOption {
@@ -650,6 +776,8 @@ interface SwapAssetOption {
650
776
  interface SwapModalTemplateProps {
651
777
  theme: string;
652
778
  accentColor: string;
779
+ /** Per-app modal chrome overrides (background, card + button radius). */
780
+ styleOverrides?: ModalStyleOverrides;
653
781
  step: 'form' | 'tx';
654
782
  txTitle: string;
655
783
  sellOptions: SwapAssetOption[];
@@ -667,7 +795,7 @@ interface SwapModalTemplateProps {
667
795
  smartUnsupported: boolean;
668
796
  /** Swap config is still loading. */
669
797
  configLoading: boolean;
670
- /** Config loaded and this app exposes no swap venues — swap is disabled. */
798
+ /** Config loaded and this app exposes no swap venues - swap is disabled. */
671
799
  swapUnavailable: boolean;
672
800
  /** Buying the selected asset will create a trustline first (~0.5 XLM reserve). */
673
801
  buyNeedsTrustline: boolean;
@@ -693,11 +821,13 @@ interface SwapModalTemplateProps {
693
821
  onRetry: () => void;
694
822
  onDone: () => void;
695
823
  }
696
- declare function SwapModalTemplate({ theme, accentColor, step, txTitle, sellOptions, buyOptions, selectedSell, selectedBuy, amount, provider, providers, quote, quoteLoading, quoteError, formError, isLoadingData, smartUnsupported, configLoading, swapUnavailable, buyNeedsTrustline, transaction, showXdr, copied, explorerUrl, walletType, showBack, isInProgress, onClose, onBack, onRefresh, onSelectSell, onSelectBuy, onAddCustomToken, onAmountChange, onProviderChange, onSwap, onToggleXdr, onCopyHash, onRetry, onDone, }: SwapModalTemplateProps): react_jsx_runtime.JSX.Element;
824
+ declare function SwapModalTemplate({ theme, accentColor, styleOverrides, step, txTitle, sellOptions, buyOptions, selectedSell, selectedBuy, amount, provider, providers, quote, quoteLoading, quoteError, formError, isLoadingData, smartUnsupported, configLoading, swapUnavailable, buyNeedsTrustline, transaction, showXdr, copied, explorerUrl, walletType, showBack, isInProgress, onClose, onBack, onRefresh, onSelectSell, onSelectBuy, onAddCustomToken, onAmountChange, onProviderChange, onSwap, onToggleXdr, onCopyHash, onRetry, onDone, }: SwapModalTemplateProps): react_jsx_runtime.JSX.Element;
697
825
 
698
826
  interface ReceiveModalTemplateProps {
699
827
  theme: string;
700
828
  accentColor: string;
829
+ /** Per-app modal chrome overrides (background, card + button radius). */
830
+ styleOverrides?: ModalStyleOverrides;
701
831
  /** Address of the wallet on {@link selectedChain}. */
702
832
  walletAddress: string;
703
833
  /** Networks the user holds a wallet on; the first one is the default. */
@@ -708,11 +838,13 @@ interface ReceiveModalTemplateProps {
708
838
  onCopy: () => void;
709
839
  onClose: () => void;
710
840
  }
711
- declare function ReceiveModalTemplate({ theme, accentColor, walletAddress, chains, selectedChain, onSelectChain, copied, onCopy, onClose, }: ReceiveModalTemplateProps): react_jsx_runtime.JSX.Element;
841
+ declare function ReceiveModalTemplate({ theme, accentColor, styleOverrides, walletAddress, chains, selectedChain, onSelectChain, copied, onCopy, onClose, }: ReceiveModalTemplateProps): react_jsx_runtime.JSX.Element;
712
842
 
713
843
  interface SessionsModalTemplateProps {
714
844
  theme: string;
715
845
  accentColor: string;
846
+ /** Per-app modal chrome overrides (background, card + button radius). */
847
+ styleOverrides?: ModalStyleOverrides;
716
848
  state: SessionsState;
717
849
  revokingFamilyId: string | null;
718
850
  signingOutEverywhere: boolean;
@@ -721,11 +853,13 @@ interface SessionsModalTemplateProps {
721
853
  onLogoutEverywhere: () => void;
722
854
  onClose: () => void;
723
855
  }
724
- declare function SessionsModalTemplate({ theme, accentColor, state, revokingFamilyId, signingOutEverywhere, onRefresh, onRevoke, onLogoutEverywhere, onClose, }: SessionsModalTemplateProps): react_jsx_runtime.JSX.Element;
856
+ declare function SessionsModalTemplate({ theme, accentColor, styleOverrides, state, revokingFamilyId, signingOutEverywhere, onRefresh, onRevoke, onLogoutEverywhere, onClose, }: SessionsModalTemplateProps): react_jsx_runtime.JSX.Element;
725
857
 
726
858
  interface DistributionRulesModalTemplateProps {
727
859
  theme: string;
728
860
  accentColor: string;
861
+ /** Per-app modal chrome overrides (background, card + button radius). */
862
+ styleOverrides?: ModalStyleOverrides;
729
863
  state: DistributionRulesState;
730
864
  claimingId: string | null;
731
865
  claimErrors: Record<string, string>;
@@ -734,6 +868,6 @@ interface DistributionRulesModalTemplateProps {
734
868
  onClaim: (rule: DistributionRule) => void;
735
869
  onClose: () => void;
736
870
  }
737
- declare function DistributionRulesModalTemplate({ theme, accentColor, state, claimingId, claimErrors, claimedIds, onRefresh, onClaim, onClose, }: DistributionRulesModalTemplateProps): react_jsx_runtime.JSX.Element;
871
+ declare function DistributionRulesModalTemplate({ theme, accentColor, styleOverrides, state, claimingId, claimErrors, claimedIds, onRefresh, onClaim, onClose, }: DistributionRulesModalTemplateProps): react_jsx_runtime.JSX.Element;
738
872
 
739
- export { type AuthModalProps, ChainSelect, type ChainSelectProps, type CustomTrustlineModalTemplateProps, DistributionRulesModal, DistributionRulesModalTemplate, EarnModal, EnabledAssetsModal, EnabledAssetsModalTemplate, type EnabledAssetsModalTemplateProps, KycModal, KycModalTemplate, KycStatus, type KycStep, type LoginButtonProps, LoginModalTemplate, type PollarConfig, PollarProvider, type PollarStyles, type RampStep, RampWidget, RampWidgetTemplate, ReceiveModal, ReceiveModalTemplate, type ReceiveModalTemplateProps, RouteDisplay, SendModal, SendModalTemplate, type SendModalTemplateProps, SessionsModal, SessionsModalTemplate, type SessionsModalTemplateProps, type SwapAssetOption, SwapModal, SwapModalTemplate, type SwapModalTemplateProps, TransactionModalTemplate, type TransactionModalTemplateProps, TxHistoryModalTemplate, TxStatusView, type TxStatusViewProps, type UseChainsResult, WalletBalanceModal, WalletBalanceModalTemplate, type WalletBalanceModalTemplateProps, WalletButton, WalletButtonTemplate, type WalletButtonTemplateProps, addressForChain, chainsOf, createPollarAdapterHook, resolveChain, useChains, usePollar };
873
+ export { type AuthModalProps, ChainSelect, type ChainSelectProps, type CustomTrustlineModalTemplateProps, DistributionRulesModal, DistributionRulesModalTemplate, EarnModal, EnabledAssetsModal, EnabledAssetsModalTemplate, type EnabledAssetsModalTemplateProps, KycModal, KycModalTemplate, KycStatus, type KycStep, type LoginButtonProps, LoginModalTemplate, type ModalChrome, type ModalStyleOverrides, type ModalVariant, type PollarConfig, PollarProvider, type PollarStyles, type RampStep, RampWidget, RampWidgetTemplate, ReceiveModal, ReceiveModalTemplate, type ReceiveModalTemplateProps, RouteDisplay, SendModal, SendModalTemplate, type SendModalTemplateProps, SessionsModal, SessionsModalTemplate, type SessionsModalTemplateProps, type SwapAssetOption, SwapModal, SwapModalTemplate, type SwapModalTemplateProps, TransactionModalTemplate, type TransactionModalTemplateProps, TxHistoryModalTemplate, TxStatusView, type TxStatusViewProps, type UseChainsResult, WalletBalanceModal, WalletBalanceModalTemplate, type WalletBalanceModalTemplateProps, WalletButton, WalletButtonTemplate, type WalletButtonTemplateProps, addressForChain, browserPasskeyCeremony, browserPasskeySigner, buildModalCssVars, chainsOf, createPollarAdapterHook, modalChrome, readableTextOn, resolveChain, useChains, usePollar };