@unifold/connect-react-native 0.1.22 → 0.1.24

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.mts CHANGED
@@ -1,355 +1,385 @@
1
- // Generated by dts-bundle-generator v9.5.1
2
-
3
- import React$1 from 'react';
4
- import { ReactNode } from 'react';
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import React$1, { ReactNode } from 'react';
5
3
 
4
+ /**
5
+ * Unifold color palette for React Native
6
+ * Matches the web theme colors
7
+ */
6
8
  declare const defaultColors: {
7
- light: {
8
- background: string;
9
- card: string;
10
- cardHover: string;
11
- foreground: string;
12
- foregroundMuted: string;
13
- foregroundSubtle: string;
14
- border: string;
15
- borderSecondary: string;
16
- primary: string;
17
- primaryForeground: string;
18
- success: string;
19
- successBackground: string;
20
- warning: string;
21
- warningBackground: string;
22
- error: string;
23
- errorBackground: string;
24
- overlay: string;
25
- };
26
- dark: {
27
- background: string;
28
- card: string;
29
- cardHover: string;
30
- foreground: string;
31
- foregroundMuted: string;
32
- foregroundSubtle: string;
33
- border: string;
34
- borderSecondary: string;
35
- primary: string;
36
- primaryForeground: string;
37
- success: string;
38
- successBackground: string;
39
- warning: string;
40
- warningBackground: string;
41
- error: string;
42
- errorBackground: string;
43
- overlay: string;
44
- };
9
+ light: {
10
+ background: string;
11
+ card: string;
12
+ cardHover: string;
13
+ foreground: string;
14
+ foregroundMuted: string;
15
+ foregroundSubtle: string;
16
+ border: string;
17
+ borderSecondary: string;
18
+ primary: string;
19
+ primaryForeground: string;
20
+ success: string;
21
+ successBackground: string;
22
+ warning: string;
23
+ warningBackground: string;
24
+ error: string;
25
+ errorBackground: string;
26
+ overlay: string;
27
+ };
28
+ dark: {
29
+ background: string;
30
+ card: string;
31
+ cardHover: string;
32
+ foreground: string;
33
+ foregroundMuted: string;
34
+ foregroundSubtle: string;
35
+ border: string;
36
+ borderSecondary: string;
37
+ primary: string;
38
+ primaryForeground: string;
39
+ success: string;
40
+ successBackground: string;
41
+ warning: string;
42
+ warningBackground: string;
43
+ error: string;
44
+ errorBackground: string;
45
+ overlay: string;
46
+ };
45
47
  };
46
- export type ThemeColors = typeof defaultColors.light;
47
- export type ThemeMode = "light" | "dark";
48
+ type ThemeColors = typeof defaultColors.light;
49
+ type ThemeMode = "light" | "dark";
48
50
  /** Partial theme colors for customization */
49
- export type CustomThemeColors = Partial<ThemeColors>;
51
+ type CustomThemeColors = Partial<ThemeColors>;
50
52
  /** Theme customization options */
51
- export interface ThemeConfig {
52
- /** Override colors for light mode */
53
- light?: CustomThemeColors;
54
- /** Override colors for dark mode */
55
- dark?: CustomThemeColors;
53
+ interface ThemeConfig {
54
+ /** Override colors for light mode */
55
+ light?: CustomThemeColors;
56
+ /** Override colors for dark mode */
57
+ dark?: CustomThemeColors;
56
58
  }
57
59
  /** Font configuration */
58
- export interface FontConfig {
59
- /** Regular weight font family */
60
- regular?: string;
61
- /** Medium weight font family */
62
- medium?: string;
63
- /** Semi-bold weight font family */
64
- semibold?: string;
65
- /** Bold weight font family */
66
- bold?: string;
60
+ interface FontConfig {
61
+ /** Regular weight font family */
62
+ regular?: string;
63
+ /** Medium weight font family */
64
+ medium?: string;
65
+ /** Semi-bold weight font family */
66
+ semibold?: string;
67
+ /** Bold weight font family */
68
+ bold?: string;
67
69
  }
68
70
  /** Header component tokens */
69
- export interface HeaderTokens {
70
- titleColor: string;
71
- buttonColor: string;
71
+ interface HeaderTokens {
72
+ titleColor: string;
73
+ buttonColor: string;
72
74
  }
73
75
  /** Shadow style for card/sheet */
74
- export interface ThemeShadowStyle {
75
- width: number;
76
- height: number;
76
+ interface ThemeShadowStyle {
77
+ width: number;
78
+ height: number;
77
79
  }
78
80
  /** Back shadow offset (absolute inset values for the view behind the card) */
79
- export interface ThemeBackShadowOffset {
80
- top: number;
81
- left: number;
82
- right: number;
83
- bottom: number;
81
+ interface ThemeBackShadowOffset {
82
+ top: number;
83
+ left: number;
84
+ right: number;
85
+ bottom: number;
84
86
  }
85
87
  /** Card/row component tokens (colors + optional border/shadow) */
86
- export interface CardTokens {
87
- backgroundColor: string;
88
- titleColor: string;
89
- subtitleColor: string;
90
- labelColor: string;
91
- headerColor: string;
92
- labelRightColor: string;
93
- labelHighlightRightColor: string;
94
- textRightColor: string;
95
- subtextRightColor: string;
96
- rowLeftLabel: string;
97
- rowRightLabel: string;
98
- iconColor: string;
99
- iconBackgroundColor: string;
100
- actionColor: string;
101
- actionIcon: string;
102
- descriptionColor: string;
103
- /** Card/row border radius (default 12) */
104
- borderRadius: number;
105
- /** Card border width (default 0) */
106
- borderWidth: number;
107
- /** Card border color */
108
- borderColor: string;
109
- /** Card shadow color */
110
- shadowColor: string;
111
- /** Card shadow offset */
112
- shadowOffset: ThemeShadowStyle;
113
- /** Card shadow opacity (0 = no shadow) */
114
- shadowOpacity: number;
115
- /** Card shadow radius */
116
- shadowRadius: number;
117
- /** Android elevation */
118
- elevation: number;
119
- /** Icon container (e.g. detail icon) border radius (default 12) */
120
- iconContainerBorderRadius: number;
121
- /** Back shadow: color of the view behind the card (default 'transparent' = no back shadow) */
122
- backShadowColor: string;
123
- /** Back shadow: offset of the view behind the card (default { top: 4, left: 4, right: -4, bottom: -4 }) */
124
- backShadowOffset: ThemeBackShadowOffset;
125
- /** Extra vertical spacing below the card when back shadow is used (default 8) */
126
- backShadowSpacing: number;
88
+ interface CardTokens {
89
+ backgroundColor: string;
90
+ titleColor: string;
91
+ subtitleColor: string;
92
+ labelColor: string;
93
+ headerColor: string;
94
+ labelRightColor: string;
95
+ labelHighlightRightColor: string;
96
+ textRightColor: string;
97
+ subtextRightColor: string;
98
+ rowLeftLabel: string;
99
+ rowRightLabel: string;
100
+ iconColor: string;
101
+ iconBackgroundColor: string;
102
+ actionColor: string;
103
+ actionIcon: string;
104
+ descriptionColor: string;
105
+ /** Card/row border radius (default 12) */
106
+ borderRadius: number;
107
+ /** Card border width (default 0) */
108
+ borderWidth: number;
109
+ /** Card border color */
110
+ borderColor: string;
111
+ /** Card shadow color */
112
+ shadowColor: string;
113
+ /** Card shadow offset */
114
+ shadowOffset: ThemeShadowStyle;
115
+ /** Card shadow opacity (0 = no shadow) */
116
+ shadowOpacity: number;
117
+ /** Card shadow radius */
118
+ shadowRadius: number;
119
+ /** Android elevation */
120
+ elevation: number;
121
+ /** Icon container (e.g. detail icon) border radius (default 12) */
122
+ iconContainerBorderRadius: number;
123
+ /** Back shadow: color of the view behind the card (default 'transparent' = no back shadow) */
124
+ backShadowColor: string;
125
+ /** Back shadow: offset of the view behind the card (default { top: 4, left: 4, right: -4, bottom: -4 }) */
126
+ backShadowOffset: ThemeBackShadowOffset;
127
+ /** Extra vertical spacing below the card when back shadow is used (default 8) */
128
+ backShadowSpacing: number;
127
129
  }
128
130
  /** Input component tokens */
129
- export interface InputTokens {
130
- backgroundColor: string;
131
- textColor: string;
132
- placeholderColor: string;
133
- borderColor: string;
134
- /** Input border radius (default 8) */
135
- borderRadius: number;
136
- /** Input border width (default 1) */
137
- borderWidth: number;
131
+ interface InputTokens {
132
+ backgroundColor: string;
133
+ textColor: string;
134
+ placeholderColor: string;
135
+ borderColor: string;
136
+ /** Input border radius (default 8) */
137
+ borderRadius: number;
138
+ /** Input border width (default 1) */
139
+ borderWidth: number;
138
140
  }
139
141
  /** Button component tokens */
140
- export interface ButtonTokens {
141
- primaryBackground: string;
142
- primaryText: string;
143
- secondaryBackground: string;
144
- secondaryText: string;
145
- /** Button border radius (default 12) */
146
- borderRadius: number;
147
- /** Button border width (default 0) */
148
- borderWidth: number;
149
- /** Button border color (outline/secondary) */
150
- borderColor: string;
142
+ interface ButtonTokens {
143
+ primaryBackground: string;
144
+ primaryText: string;
145
+ secondaryBackground: string;
146
+ secondaryText: string;
147
+ /** Button border radius (default 12) */
148
+ borderRadius: number;
149
+ /** Button border width (default 0) */
150
+ borderWidth: number;
151
+ /** Button border color (outline/secondary) */
152
+ borderColor: string;
151
153
  }
152
154
  /** Badge/tag component tokens */
153
- export interface BadgeTokens {
154
- /** Badge border radius (default 8) */
155
- borderRadius: number;
155
+ interface BadgeTokens {
156
+ /** Badge border radius (default 8) */
157
+ borderRadius: number;
156
158
  }
157
159
  /** Container/status display component tokens */
158
- export interface ContainerTokens {
159
- titleColor: string;
160
- subtitleColor: string;
161
- actionColor: string;
162
- actionTitle: string;
163
- buttonColor: string;
164
- buttonTitleColor: string;
165
- iconBackgroundColor: string;
166
- iconColor: string;
160
+ interface ContainerTokens {
161
+ titleColor: string;
162
+ subtitleColor: string;
163
+ actionColor: string;
164
+ actionTitle: string;
165
+ buttonColor: string;
166
+ buttonTitleColor: string;
167
+ iconBackgroundColor: string;
168
+ iconColor: string;
167
169
  }
168
170
  /** Search component tokens */
169
- export interface SearchTokens {
170
- backgroundColor: string;
171
- inputColor: string;
172
- placeholderColor: string;
173
- /** Search container border radius (default 8) */
174
- borderRadius: number;
171
+ interface SearchTokens {
172
+ backgroundColor: string;
173
+ inputColor: string;
174
+ placeholderColor: string;
175
+ /** Search container border radius (default 8) */
176
+ borderRadius: number;
175
177
  }
176
178
  /** Sheet (modal) shadow tokens – e.g. BottomSheet */
177
- export interface SheetTokens {
178
- shadowColor: string;
179
- shadowOffset: ThemeShadowStyle;
180
- shadowOpacity: number;
181
- shadowRadius: number;
182
- elevation: number;
179
+ interface SheetTokens {
180
+ shadowColor: string;
181
+ shadowOffset: ThemeShadowStyle;
182
+ shadowOpacity: number;
183
+ shadowRadius: number;
184
+ elevation: number;
183
185
  }
184
186
  /** List component tokens */
185
- export interface ListTokens {
186
- titleSectionColor: string;
187
- /** List row border radius (default 12) */
188
- rowBorderRadius: number;
187
+ interface ListTokens {
188
+ titleSectionColor: string;
189
+ /** List row border radius (default 12) */
190
+ rowBorderRadius: number;
189
191
  }
190
192
  /** Per-surface card overrides (config input) */
191
- export interface DepositMenuOverrides {
192
- card?: Partial<CardTokens>;
193
+ interface DepositMenuOverrides {
194
+ card?: Partial<CardTokens>;
193
195
  }
194
- export interface TransferCryptoOverrides {
195
- depositAddress?: {
196
- card?: Partial<CardTokens>;
197
- };
196
+ interface TransferCryptoOverrides {
197
+ depositAddress?: {
198
+ card?: Partial<CardTokens>;
199
+ };
198
200
  }
199
- export interface DepositCardOverrides {
200
- quoteProvider?: {
201
- card?: Partial<CardTokens>;
202
- };
201
+ interface DepositCardOverrides {
202
+ quoteProvider?: {
203
+ card?: Partial<CardTokens>;
204
+ };
203
205
  }
204
- export interface DepositTrackerOverrides {
205
- executionRow?: {
206
- card?: Partial<CardTokens>;
207
- };
206
+ interface DepositTrackerOverrides {
207
+ executionRow?: {
208
+ card?: Partial<CardTokens>;
209
+ };
208
210
  }
209
211
  /** Per-mode overrides including per-surface card overrides */
210
- export interface ComponentOverridesWithSurfaces {
211
- depositMenu?: DepositMenuOverrides;
212
- transferCrypto?: TransferCryptoOverrides;
213
- depositCard?: DepositCardOverrides;
214
- depositTracker?: DepositTrackerOverrides;
212
+ interface ComponentOverridesWithSurfaces {
213
+ depositMenu?: DepositMenuOverrides;
214
+ transferCrypto?: TransferCryptoOverrides;
215
+ depositCard?: DepositCardOverrides;
216
+ depositTracker?: DepositTrackerOverrides;
215
217
  }
216
218
  /** Per-component overrides structure */
217
- export interface ComponentOverrides {
218
- header?: Partial<HeaderTokens>;
219
- card?: Partial<CardTokens>;
220
- input?: Partial<InputTokens>;
221
- button?: Partial<ButtonTokens>;
222
- container?: Partial<ContainerTokens>;
223
- search?: Partial<SearchTokens>;
224
- list?: Partial<ListTokens>;
225
- badge?: Partial<BadgeTokens>;
226
- sheet?: Partial<SheetTokens>;
219
+ interface ComponentOverrides {
220
+ header?: Partial<HeaderTokens>;
221
+ card?: Partial<CardTokens>;
222
+ input?: Partial<InputTokens>;
223
+ button?: Partial<ButtonTokens>;
224
+ container?: Partial<ContainerTokens>;
225
+ search?: Partial<SearchTokens>;
226
+ list?: Partial<ListTokens>;
227
+ badge?: Partial<BadgeTokens>;
228
+ sheet?: Partial<SheetTokens>;
227
229
  }
228
230
  /**
229
231
  * User-provided component overrides (all optional).
230
232
  * Use flat keys (card, button, ...) for global tokens, or per-surface keys to style
231
233
  * specific card surfaces (deposit menu, transfer crypto address box, quote provider, tracker rows).
232
234
  */
233
- export interface ComponentConfig extends ComponentOverrides, ComponentOverridesWithSurfaces {
234
- /** Light mode specific overrides */
235
- light?: ComponentOverrides & ComponentOverridesWithSurfaces;
236
- /** Dark mode specific overrides */
237
- dark?: ComponentOverrides & ComponentOverridesWithSurfaces;
235
+ interface ComponentConfig extends ComponentOverrides, ComponentOverridesWithSurfaces {
236
+ /** Light mode specific overrides */
237
+ light?: ComponentOverrides & ComponentOverridesWithSurfaces;
238
+ /** Dark mode specific overrides */
239
+ dark?: ComponentOverrides & ComponentOverridesWithSurfaces;
238
240
  }
239
- export interface BorderRadiusConfig {
240
- borderTopLeftRadius?: number;
241
- borderTopRightRadius?: number;
241
+
242
+ interface ThemeProviderProps {
243
+ children: React$1.ReactNode;
244
+ /** Force a specific theme mode, or 'auto' to use system preference */
245
+ mode?: ThemeMode | "auto";
246
+ /** Simple accent/primary color override (applies to both light and dark) */
247
+ accentColor?: string;
248
+ /** Full theme customization per mode */
249
+ theme?: ThemeConfig;
250
+ /** Single font family for all weights */
251
+ fontFamily?: string;
252
+ /** Granular font family configuration */
253
+ fonts?: FontConfig;
254
+ /** Component-specific token overrides (optional, falls back to base colors) */
255
+ components?: ComponentConfig;
256
+ }
257
+ /** Same props as ThemeProvider without children — for re-wrapping subtrees (e.g. nested modals). */
258
+ type ThemeProviderConfig = Omit<ThemeProviderProps, "children">;
259
+
260
+ interface BorderRadiusConfig {
261
+ borderTopLeftRadius?: number;
262
+ borderTopRightRadius?: number;
242
263
  }
264
+
243
265
  /** Controls which transfer crypto input variant is rendered */
244
- export type TransferInputVariant = "single_input" | "double_input";
245
- export interface DepositModalProps {
246
- /** Whether the modal is visible */
247
- visible: boolean;
248
- /** Callback when the modal should close */
249
- onClose: () => void;
250
- /** User ID for the deposit */
251
- externalUserId: string;
252
- /** Publishable API key */
253
- publishableKey: string;
254
- /** Custom modal title */
255
- modalTitle?: string;
256
- /** Target token symbol (e.g., "USDC") */
257
- destinationTokenSymbol?: string;
258
- /** Recipient wallet address */
259
- recipientAddress?: string;
260
- /** Target chain type */
261
- destinationChainType?: "ethereum" | "solana" | "bitcoin";
262
- /** Target chain ID (e.g., "137" for Polygon) */
263
- destinationChainId?: string;
264
- /** Target token contract address */
265
- destinationTokenAddress?: string;
266
- /** Default source chain type to pre-select in UI */
267
- defaultChainType?: "ethereum" | "solana" | "bitcoin";
268
- /** Default source chain ID to pre-select in UI (e.g., "137" for Polygon) */
269
- defaultChainId?: string;
270
- /** Default source token address to pre-select in UI */
271
- defaultTokenAddress?: string;
272
- /** Show recipient's destination token balance in the header */
273
- showBalance?: boolean;
274
- /** Hide the deposit tracker button */
275
- hideDepositTracker?: boolean;
276
- /** Show "Pay with Link" (Stripe) option in the deposit menu */
277
- enableStripeLinkPay?: boolean;
278
- /** Injected StripeOnramp component — avoids bundling Stripe into the main entry */
279
- StripeOnrampComponent?: React$1.ComponentType<any>;
280
- /** Pre-fills Stripe Link Pay email — set via `beginDeposit({ stripeOnrampEmail })` (forwarded as `email` on `StripeOnramp`) */
281
- stripeOnrampEmail?: string;
282
- /** Pre-fills Stripe Link Pay phone — set via `beginDeposit({ stripeOnrampPhone })` (forwarded as `phone` on `StripeOnramp`) */
283
- stripeOnrampPhone?: string;
284
- /**
285
- * How deposit confirmation is handled: auto_ui (show waiting UI + poll after 10s),
286
- * auto_silent (poll after 10s, no waiting UI), manual ("I've deposited" button starts polling).
287
- */
288
- depositConfirmationMode?: "auto_ui" | "auto_silent" | "manual";
289
- /** Transfer input variant: 'single_input' (unified selector) or 'double_input' (separate token/chain). Defaults to 'double_input' */
290
- transferInputVariant?: TransferInputVariant;
291
- /** Callback when deposit succeeds */
292
- onDepositSuccess?: (data: {
293
- message: string;
294
- executionId?: string;
295
- }) => void;
296
- /** Callback when deposit fails */
297
- onDepositError?: (error: {
298
- message: string;
299
- error?: unknown;
300
- code?: string;
301
- }) => void;
302
- /** Theme mode: 'light', 'dark', or 'auto' */
303
- theme?: ThemeMode | "auto";
304
- /** Border radius configuration for all bottom sheets */
305
- sheetBorderRadius?: {
306
- /** Default top-left corner radius for all bottom sheets (default: 24) */
307
- globalBorderTopLeftRadius?: number;
308
- /** Default top-right corner radius for all bottom sheets (default: 24) */
309
- globalBorderTopRightRadius?: number;
310
- /** The main deposit modal sheet */
311
- main?: BorderRadiusConfig;
312
- /** Transfer crypto wrapper sheet */
313
- transferCrypto?: BorderRadiusConfig;
314
- /** Buy with card wrapper sheet */
315
- buyWithCard?: BorderRadiusConfig;
316
- /** Deposits tracker modal */
317
- depositsTracker?: BorderRadiusConfig;
318
- /** Token selector sheet (inside transfer crypto) */
319
- tokenSelector?: BorderRadiusConfig;
320
- /** Chain selector sheet (inside transfer crypto, double_input variant) */
321
- chainSelector?: BorderRadiusConfig;
322
- /** Currency selector modal (inside buy with card) */
323
- currencyModal?: BorderRadiusConfig;
324
- /** Provider selection modal (inside buy with card) */
325
- providerModal?: BorderRadiusConfig;
326
- /** Deposit status sheet */
327
- depositStatus?: BorderRadiusConfig;
328
- /** Price impact & slippage info sheet */
329
- infoSheet?: BorderRadiusConfig;
330
- /** WebView sheet (inside buy with card) */
331
- webView?: BorderRadiusConfig;
332
- };
266
+ type TransferInputVariant = "single_input" | "double_input";
267
+ interface DepositModalProps {
268
+ /** Whether the modal is visible */
269
+ visible: boolean;
270
+ /** Callback when the modal should close */
271
+ onClose: () => void;
272
+ /** User ID for the deposit */
273
+ externalUserId: string;
274
+ /** Publishable API key */
275
+ publishableKey: string;
276
+ /** Custom modal title */
277
+ modalTitle?: string;
278
+ /** Target token symbol (e.g., "USDC") */
279
+ destinationTokenSymbol?: string;
280
+ /** Recipient wallet address */
281
+ recipientAddress?: string;
282
+ /** Target chain type */
283
+ destinationChainType?: "ethereum" | "solana" | "bitcoin";
284
+ /** Target chain ID (e.g., "137" for Polygon) */
285
+ destinationChainId?: string;
286
+ /** Target token contract address */
287
+ destinationTokenAddress?: string;
288
+ /** Default source chain type to pre-select in UI */
289
+ defaultChainType?: "ethereum" | "solana" | "bitcoin";
290
+ /** Default source chain ID to pre-select in UI (e.g., "137" for Polygon) */
291
+ defaultChainId?: string;
292
+ /** Default source token address to pre-select in UI */
293
+ defaultTokenAddress?: string;
294
+ /** Show recipient's destination token balance in the header */
295
+ showBalance?: boolean;
296
+ /** Hide the deposit tracker button */
297
+ hideDepositTracker?: boolean;
298
+ /** Show "Pay with Link" (Stripe) option in the deposit menu */
299
+ enableStripeLinkPay?: boolean;
300
+ /** Injected StripeOnramp component — avoids bundling Stripe into the main entry */
301
+ StripeOnrampComponent?: React$1.ComponentType<any>;
302
+ /** Pre-fills Stripe Link Pay email — set via `beginDeposit({ stripeOnrampEmail })` (forwarded as `email` on `StripeOnramp`) */
303
+ stripeOnrampEmail?: string;
304
+ /** Pre-fills Stripe Link Pay phone — set via `beginDeposit({ stripeOnrampPhone })` (forwarded as `phone` on `StripeOnramp`) */
305
+ stripeOnrampPhone?: string;
306
+ /**
307
+ * Same ThemeProvider options as `UnifoldProvider` (`theme`, `components`, fonts, etc.).
308
+ * Re-wrapped around the Stripe Link Pay sheet so nested modals receive theme context and
309
+ * `components.input` and other theme overrides apply like the rest of the deposit UI.
310
+ */
311
+ stripeTheme?: ThemeProviderConfig;
312
+ /**
313
+ * How deposit confirmation is handled: auto_ui (show waiting UI + poll after 10s),
314
+ * auto_silent (poll after 10s, no waiting UI), manual ("I've deposited" button starts polling).
315
+ */
316
+ depositConfirmationMode?: "auto_ui" | "auto_silent" | "manual";
317
+ /** Transfer input variant: 'single_input' (unified selector) or 'double_input' (separate token/chain). Defaults to 'double_input' */
318
+ transferInputVariant?: TransferInputVariant;
319
+ /** Callback when deposit succeeds */
320
+ onDepositSuccess?: (data: {
321
+ message: string;
322
+ executionId?: string;
323
+ }) => void;
324
+ /** Callback when deposit fails */
325
+ onDepositError?: (error: {
326
+ message: string;
327
+ error?: unknown;
328
+ code?: string;
329
+ }) => void;
330
+ /** Theme mode: 'light', 'dark', or 'auto' */
331
+ theme?: ThemeMode | "auto";
332
+ /** Border radius configuration for all bottom sheets */
333
+ sheetBorderRadius?: {
334
+ /** Default top-left corner radius for all bottom sheets (default: 24) */
335
+ globalBorderTopLeftRadius?: number;
336
+ /** Default top-right corner radius for all bottom sheets (default: 24) */
337
+ globalBorderTopRightRadius?: number;
338
+ /** The main deposit modal sheet */
339
+ main?: BorderRadiusConfig;
340
+ /** Transfer crypto wrapper sheet */
341
+ transferCrypto?: BorderRadiusConfig;
342
+ /** Buy with card wrapper sheet */
343
+ buyWithCard?: BorderRadiusConfig;
344
+ /** Deposits tracker modal */
345
+ depositsTracker?: BorderRadiusConfig;
346
+ /** Token selector sheet (inside transfer crypto) */
347
+ tokenSelector?: BorderRadiusConfig;
348
+ /** Chain selector sheet (inside transfer crypto, double_input variant) */
349
+ chainSelector?: BorderRadiusConfig;
350
+ /** Currency selector modal (inside buy with card) */
351
+ currencyModal?: BorderRadiusConfig;
352
+ /** Provider selection modal (inside buy with card) */
353
+ providerModal?: BorderRadiusConfig;
354
+ /** Deposit status sheet */
355
+ depositStatus?: BorderRadiusConfig;
356
+ /** Price impact & slippage info sheet */
357
+ infoSheet?: BorderRadiusConfig;
358
+ /** WebView sheet (inside buy with card) */
359
+ webView?: BorderRadiusConfig;
360
+ };
333
361
  }
362
+
334
363
  /**
335
364
  * Set development API URL (only works in __DEV__ mode)
336
365
  * For internal Unifold developers testing against localhost
337
366
  */
338
- export declare function setDevApiUrl(url: string): void;
367
+ declare function setDevApiUrl(url: string): void;
368
+
339
369
  /**
340
370
  * Result of the useAllowedCountry hook
341
371
  */
342
- export interface AllowedCountryResult {
343
- /** Whether the user is in an allowed country. null while loading. */
344
- isAllowed: boolean | null;
345
- /** ISO 3166-1 alpha-2 country code in lowercase (e.g., "us", "pt") */
346
- alpha2: string | null;
347
- /** Full country name (e.g., "United States", "Portugal") */
348
- country: string | null;
349
- /** Whether the hook is still loading data */
350
- isLoading: boolean;
351
- /** Error if either API call failed */
352
- error: Error | null;
372
+ interface AllowedCountryResult {
373
+ /** Whether the user is in an allowed country. null while loading. */
374
+ isAllowed: boolean | null;
375
+ /** ISO 3166-1 alpha-2 country code in lowercase (e.g., "us", "pt") */
376
+ alpha2: string | null;
377
+ /** Full country name (e.g., "United States", "Portugal") */
378
+ country: string | null;
379
+ /** Whether the hook is still loading data */
380
+ isLoading: boolean;
381
+ /** Error if either API call failed */
382
+ error: Error | null;
353
383
  }
354
384
  /**
355
385
  * Hook to determine if the current user is in an allowed country
@@ -374,7 +404,8 @@ export interface AllowedCountryResult {
374
404
  * }
375
405
  * ```
376
406
  */
377
- export declare function useAllowedCountry(publishableKey: string, enabled?: boolean): AllowedCountryResult;
407
+ declare function useAllowedCountry(publishableKey: string, enabled?: boolean): AllowedCountryResult;
408
+
378
409
  /**
379
410
  * Register the StripeOnramp component so the deposit menu can render it.
380
411
  * Called automatically by `@unifold/connect-react-native/stripe` when imported,
@@ -383,82 +414,83 @@ export declare function useAllowedCountry(publishableKey: string, enabled?: bool
383
414
  * Uses globalThis so the registration survives across separately-bundled entries
384
415
  * (tsup bundles index.js and stripe.js with splitting:false, creating isolated scopes).
385
416
  */
386
- export declare function registerStripeOnramp(component: React$1.ComponentType<any>): void;
387
- export interface UnifoldConnectProviderConfig {
388
- publishableKey: string;
389
- config?: {
390
- modalTitle?: string;
391
- hideDepositTracker?: boolean;
392
- /** Theme appearance: 'light', 'dark', or 'auto' (system preference). Defaults to 'dark' */
393
- appearance?: ThemeMode | "auto";
394
- /** Transfer input variant: 'single_input' (unified selector) or 'double_input' (separate token/chain). Defaults to 'double_input' */
395
- transferInputVariant?: TransferInputVariant;
396
- /** Simple accent/primary color override (applies to both light and dark modes) */
397
- accentColor?: string;
398
- /** Full theme color customization per mode */
399
- theme?: ThemeConfig;
400
- /** Single font family for all text (host app must load the font) */
401
- fontFamily?: string;
402
- /** Granular font family configuration for different weights */
403
- fonts?: FontConfig;
404
- /** Component-specific token overrides */
405
- components?: ComponentConfig;
406
- /** Border radius configuration for all bottom sheets */
407
- sheetBorderRadius?: DepositModalProps["sheetBorderRadius"];
408
- /**
409
- * Show "Pay with Link" (Stripe) option in the deposit menu.
410
- * Requires `import "@unifold/connect-react-native/stripe"` in your app entry
411
- * and `@stripe/stripe-react-native` to be installed.
412
- */
413
- enableStripeLinkPay?: boolean;
414
- };
417
+ declare function registerStripeOnramp(component: React.ComponentType<any>): void;
418
+
419
+ interface UnifoldConnectProviderConfig {
420
+ publishableKey: string;
421
+ config?: {
422
+ modalTitle?: string;
423
+ hideDepositTracker?: boolean;
424
+ /** Theme appearance: 'light', 'dark', or 'auto' (system preference). Defaults to 'dark' */
425
+ appearance?: ThemeMode | "auto";
426
+ /** Transfer input variant: 'single_input' (unified selector) or 'double_input' (separate token/chain). Defaults to 'double_input' */
427
+ transferInputVariant?: TransferInputVariant;
428
+ /** Simple accent/primary color override (applies to both light and dark modes) */
429
+ accentColor?: string;
430
+ /** Full theme color customization per mode */
431
+ theme?: ThemeConfig;
432
+ /** Single font family for all text (host app must load the font) */
433
+ fontFamily?: string;
434
+ /** Granular font family configuration for different weights */
435
+ fonts?: FontConfig;
436
+ /** Component-specific token overrides */
437
+ components?: ComponentConfig;
438
+ /** Border radius configuration for all bottom sheets */
439
+ sheetBorderRadius?: DepositModalProps["sheetBorderRadius"];
440
+ /**
441
+ * Show "Pay with Link" (Stripe) option in the deposit menu.
442
+ * Requires `import "@unifold/connect-react-native/stripe"` in your app entry
443
+ * and `@stripe/stripe-react-native` to be installed.
444
+ */
445
+ enableStripeLinkPay?: boolean;
446
+ };
415
447
  }
416
- export interface DepositResult {
417
- message: string;
418
- transaction?: unknown;
419
- executionId?: string;
448
+ interface DepositResult {
449
+ message: string;
450
+ transaction?: unknown;
451
+ executionId?: string;
420
452
  }
421
- export interface DepositError {
422
- message: string;
423
- error?: unknown;
424
- code?: string;
453
+ interface DepositError {
454
+ message: string;
455
+ error?: unknown;
456
+ code?: string;
425
457
  }
426
- export interface DepositConfig {
427
- externalUserId: string;
428
- destinationChainType?: "ethereum" | "solana" | "bitcoin";
429
- destinationChainId?: string;
430
- destinationTokenAddress?: string;
431
- destinationTokenSymbol?: string;
432
- recipientAddress?: string;
433
- defaultChainType?: "ethereum" | "solana" | "bitcoin";
434
- defaultChainId?: string;
435
- defaultTokenAddress?: string;
436
- showBalance?: boolean;
437
- /** Pre-fills Stripe Link Pay email (`beginDeposit` only — not provider config) */
438
- stripeOnrampEmail?: string;
439
- /** Pre-fills Stripe Link Pay phone; with `stripeOnrampEmail`, Stripe may skip verify steps */
440
- stripeOnrampPhone?: string;
441
- /**
442
- * How deposit confirmation and waiting behavior is handled.
443
- * - auto_ui (default): Automatically show "Processing deposit" UI and start polling after 10s. No "I've deposited" button.
444
- * - auto_silent: Automatically start polling after 10s. Do not show waiting UI (host controls UI).
445
- * - manual: Show "I've deposited" button. Clicking enters waiting UI and starts polling. No automatic polling.
446
- */
447
- depositConfirmationMode?: "auto_ui" | "auto_silent" | "manual";
448
- onSuccess?: (data: DepositResult) => void;
449
- onError?: (error: DepositError) => void;
458
+ interface DepositConfig {
459
+ externalUserId: string;
460
+ destinationChainType?: "ethereum" | "solana" | "bitcoin";
461
+ destinationChainId?: string;
462
+ destinationTokenAddress?: string;
463
+ destinationTokenSymbol?: string;
464
+ recipientAddress?: string;
465
+ defaultChainType?: "ethereum" | "solana" | "bitcoin";
466
+ defaultChainId?: string;
467
+ defaultTokenAddress?: string;
468
+ showBalance?: boolean;
469
+ /** Pre-fills Stripe Link Pay email (`beginDeposit` only — not provider config) */
470
+ stripeOnrampEmail?: string;
471
+ /** Pre-fills Stripe Link Pay phone; with `stripeOnrampEmail`, Stripe may skip verify steps */
472
+ stripeOnrampPhone?: string;
473
+ /**
474
+ * How deposit confirmation and waiting behavior is handled.
475
+ * - auto_ui (default): Automatically show "Processing deposit" UI and start polling after 10s. No "I've deposited" button.
476
+ * - auto_silent: Automatically start polling after 10s. Do not show waiting UI (host controls UI).
477
+ * - manual: Show "I've deposited" button. Clicking enters waiting UI and starts polling. No automatic polling.
478
+ */
479
+ depositConfirmationMode?: "auto_ui" | "auto_silent" | "manual";
480
+ onSuccess?: (data: DepositResult) => void;
481
+ onError?: (error: DepositError) => void;
450
482
  }
451
- export interface ConnectContextValue {
452
- publishableKey: string;
453
- beginDeposit: (config: DepositConfig) => Promise<DepositResult>;
454
- closeDeposit: () => void;
483
+ interface ConnectContextValue {
484
+ publishableKey: string;
485
+ beginDeposit: (config: DepositConfig) => Promise<DepositResult>;
486
+ closeDeposit: () => void;
455
487
  }
456
- export interface UnifoldProviderProps {
457
- children: React$1.ReactNode;
458
- publishableKey: string;
459
- config?: UnifoldConnectProviderConfig["config"];
488
+ interface UnifoldProviderProps {
489
+ children: ReactNode;
490
+ publishableKey: string;
491
+ config?: UnifoldConnectProviderConfig["config"];
460
492
  }
461
- export declare function UnifoldProvider({ children, publishableKey, config, }: UnifoldProviderProps): import("react/jsx-runtime").JSX.Element;
462
- export declare function useUnifold(): ConnectContextValue;
493
+ declare function UnifoldProvider({ children, publishableKey, config, }: UnifoldProviderProps): react_jsx_runtime.JSX.Element;
494
+ declare function useUnifold(): ConnectContextValue;
463
495
 
464
- export {};
496
+ export { type AllowedCountryResult, type BorderRadiusConfig, type ComponentConfig, type CustomThemeColors, type DepositConfig, type DepositError, type DepositResult, type FontConfig, type ThemeColors, type ThemeConfig, type ThemeMode, type ThemeProviderConfig, type TransferInputVariant, type UnifoldConnectProviderConfig, UnifoldProvider, type UnifoldProviderProps, registerStripeOnramp, setDevApiUrl, useAllowedCountry, useUnifold };