@unifold/connect-react-native 0.1.31 → 0.1.33

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
@@ -331,6 +331,8 @@ declare function BottomSheet({ visible, onClose, children, closeOnBackdropPress,
331
331
 
332
332
  /** Controls which transfer crypto input variant is rendered */
333
333
  type TransferInputVariant = "single_input" | "double_input";
334
+ /** Controls which screen opens first when the deposit modal is shown */
335
+ type DepositInitialScreen = "main" | "transfer" | "card" | "tracker";
334
336
  interface DepositModalProps {
335
337
  /** Whether the modal is visible */
336
338
  visible: boolean;
@@ -376,6 +378,10 @@ interface DepositModalProps {
376
378
  * in app.json (the UI reads it via `expo-constants`).
377
379
  */
378
380
  stripeMerchantIdentifier?: string;
381
+ /** Where to render the Stripe payment method selector: "header" or "inline". Default: "header" */
382
+ stripePaymentSelectorPosition?: "header" | "inline";
383
+ /** Skip the success confirmation screen and fire onComplete immediately. Default: false */
384
+ stripeSkipSuccessConfirmation?: boolean;
379
385
  /**
380
386
  * Same ThemeProvider options as `UnifoldProvider` (`theme`, `components`, fonts, etc.).
381
387
  * Re-wrapped around the Stripe Link Pay sheet so nested modals receive theme context and
@@ -389,6 +395,14 @@ interface DepositModalProps {
389
395
  depositConfirmationMode?: "auto_ui" | "auto_silent" | "manual";
390
396
  /** Transfer input variant: 'single_input' (unified selector) or 'double_input' (separate token/chain). Defaults to 'double_input' */
391
397
  transferInputVariant?: TransferInputVariant;
398
+ /**
399
+ * Which screen to open first. Defaults to 'main' (the option menu).
400
+ * - 'main': show the menu (default)
401
+ * - 'transfer': open Transfer Crypto immediately
402
+ * - 'card': open Buy with Card immediately
403
+ * - 'tracker': open Deposit Tracker immediately (ignored if hideDepositTracker is true)
404
+ */
405
+ initialScreen?: DepositInitialScreen;
392
406
  /** Callback when deposit succeeds */
393
407
  onDepositSuccess?: (data: {
394
408
  message: string;
@@ -587,6 +601,10 @@ interface UnifoldConnectProviderConfig {
587
601
  * `expo-constants`. Use this for bare React Native or to override.
588
602
  */
589
603
  stripeMerchantIdentifier?: string;
604
+ /** Where to render the Stripe payment method selector: "header" (above amount) or "inline" (below). Default: "header" */
605
+ stripePaymentSelectorPosition?: "header" | "inline";
606
+ /** Skip the success confirmation screen and fire onComplete immediately. Default: false */
607
+ stripeSkipSuccessConfirmation?: boolean;
590
608
  };
591
609
  }
592
610
  interface DepositResult {
@@ -621,6 +639,14 @@ interface DepositConfig {
621
639
  * - manual: Show "I've deposited" button. Clicking enters waiting UI and starts polling. No automatic polling.
622
640
  */
623
641
  depositConfirmationMode?: "auto_ui" | "auto_silent" | "manual";
642
+ /**
643
+ * Which screen to open first when the deposit modal appears.
644
+ * - 'main' (default): show the option menu
645
+ * - 'transfer': open Transfer Crypto immediately
646
+ * - 'card': open Buy with Card immediately
647
+ * - 'tracker': open Deposit Tracker immediately
648
+ */
649
+ initialScreen?: DepositInitialScreen;
624
650
  onSuccess?: (data: DepositResult) => void;
625
651
  onError?: (error: DepositError) => void;
626
652
  }
@@ -684,4 +710,4 @@ interface UnifoldProviderProps {
684
710
  declare function UnifoldProvider({ children, publishableKey, config, }: UnifoldProviderProps): react_jsx_runtime.JSX.Element;
685
711
  declare function useUnifold(): ConnectContextValue;
686
712
 
687
- export { type AllowedCountryResult, type BorderRadiusConfig, BottomSheet, type ComponentConfig, type CustomThemeColors, type DepositConfig, type DepositError, type DepositResult, type DestinationToken, type DestinationTokenChain, type FontConfig, type ThemeColors, type ThemeConfig, type ThemeMode, type ThemeProviderConfig, type TransferInputVariant, type UnifoldConnectProviderConfig, UnifoldProvider, type UnifoldProviderProps, type WithdrawConfig, type WithdrawError, type WithdrawResult, type WithdrawTransactionInfo, getPreferredIcon, getSupportedDestinationTokens, normalizeIconUrl, registerStripeOnramp, setDevApiUrl, useAllowedCountry, useTheme, useUnifold };
713
+ export { type AllowedCountryResult, type BorderRadiusConfig, BottomSheet, type ComponentConfig, type CustomThemeColors, type DepositConfig, type DepositError, type DepositInitialScreen, type DepositResult, type DestinationToken, type DestinationTokenChain, type FontConfig, type ThemeColors, type ThemeConfig, type ThemeMode, type ThemeProviderConfig, type TransferInputVariant, type UnifoldConnectProviderConfig, UnifoldProvider, type UnifoldProviderProps, type WithdrawConfig, type WithdrawError, type WithdrawResult, type WithdrawTransactionInfo, getPreferredIcon, getSupportedDestinationTokens, normalizeIconUrl, registerStripeOnramp, setDevApiUrl, useAllowedCountry, useTheme, useUnifold };
package/dist/index.d.ts CHANGED
@@ -331,6 +331,8 @@ declare function BottomSheet({ visible, onClose, children, closeOnBackdropPress,
331
331
 
332
332
  /** Controls which transfer crypto input variant is rendered */
333
333
  type TransferInputVariant = "single_input" | "double_input";
334
+ /** Controls which screen opens first when the deposit modal is shown */
335
+ type DepositInitialScreen = "main" | "transfer" | "card" | "tracker";
334
336
  interface DepositModalProps {
335
337
  /** Whether the modal is visible */
336
338
  visible: boolean;
@@ -376,6 +378,10 @@ interface DepositModalProps {
376
378
  * in app.json (the UI reads it via `expo-constants`).
377
379
  */
378
380
  stripeMerchantIdentifier?: string;
381
+ /** Where to render the Stripe payment method selector: "header" or "inline". Default: "header" */
382
+ stripePaymentSelectorPosition?: "header" | "inline";
383
+ /** Skip the success confirmation screen and fire onComplete immediately. Default: false */
384
+ stripeSkipSuccessConfirmation?: boolean;
379
385
  /**
380
386
  * Same ThemeProvider options as `UnifoldProvider` (`theme`, `components`, fonts, etc.).
381
387
  * Re-wrapped around the Stripe Link Pay sheet so nested modals receive theme context and
@@ -389,6 +395,14 @@ interface DepositModalProps {
389
395
  depositConfirmationMode?: "auto_ui" | "auto_silent" | "manual";
390
396
  /** Transfer input variant: 'single_input' (unified selector) or 'double_input' (separate token/chain). Defaults to 'double_input' */
391
397
  transferInputVariant?: TransferInputVariant;
398
+ /**
399
+ * Which screen to open first. Defaults to 'main' (the option menu).
400
+ * - 'main': show the menu (default)
401
+ * - 'transfer': open Transfer Crypto immediately
402
+ * - 'card': open Buy with Card immediately
403
+ * - 'tracker': open Deposit Tracker immediately (ignored if hideDepositTracker is true)
404
+ */
405
+ initialScreen?: DepositInitialScreen;
392
406
  /** Callback when deposit succeeds */
393
407
  onDepositSuccess?: (data: {
394
408
  message: string;
@@ -587,6 +601,10 @@ interface UnifoldConnectProviderConfig {
587
601
  * `expo-constants`. Use this for bare React Native or to override.
588
602
  */
589
603
  stripeMerchantIdentifier?: string;
604
+ /** Where to render the Stripe payment method selector: "header" (above amount) or "inline" (below). Default: "header" */
605
+ stripePaymentSelectorPosition?: "header" | "inline";
606
+ /** Skip the success confirmation screen and fire onComplete immediately. Default: false */
607
+ stripeSkipSuccessConfirmation?: boolean;
590
608
  };
591
609
  }
592
610
  interface DepositResult {
@@ -621,6 +639,14 @@ interface DepositConfig {
621
639
  * - manual: Show "I've deposited" button. Clicking enters waiting UI and starts polling. No automatic polling.
622
640
  */
623
641
  depositConfirmationMode?: "auto_ui" | "auto_silent" | "manual";
642
+ /**
643
+ * Which screen to open first when the deposit modal appears.
644
+ * - 'main' (default): show the option menu
645
+ * - 'transfer': open Transfer Crypto immediately
646
+ * - 'card': open Buy with Card immediately
647
+ * - 'tracker': open Deposit Tracker immediately
648
+ */
649
+ initialScreen?: DepositInitialScreen;
624
650
  onSuccess?: (data: DepositResult) => void;
625
651
  onError?: (error: DepositError) => void;
626
652
  }
@@ -684,4 +710,4 @@ interface UnifoldProviderProps {
684
710
  declare function UnifoldProvider({ children, publishableKey, config, }: UnifoldProviderProps): react_jsx_runtime.JSX.Element;
685
711
  declare function useUnifold(): ConnectContextValue;
686
712
 
687
- export { type AllowedCountryResult, type BorderRadiusConfig, BottomSheet, type ComponentConfig, type CustomThemeColors, type DepositConfig, type DepositError, type DepositResult, type DestinationToken, type DestinationTokenChain, type FontConfig, type ThemeColors, type ThemeConfig, type ThemeMode, type ThemeProviderConfig, type TransferInputVariant, type UnifoldConnectProviderConfig, UnifoldProvider, type UnifoldProviderProps, type WithdrawConfig, type WithdrawError, type WithdrawResult, type WithdrawTransactionInfo, getPreferredIcon, getSupportedDestinationTokens, normalizeIconUrl, registerStripeOnramp, setDevApiUrl, useAllowedCountry, useTheme, useUnifold };
713
+ export { type AllowedCountryResult, type BorderRadiusConfig, BottomSheet, type ComponentConfig, type CustomThemeColors, type DepositConfig, type DepositError, type DepositInitialScreen, type DepositResult, type DestinationToken, type DestinationTokenChain, type FontConfig, type ThemeColors, type ThemeConfig, type ThemeMode, type ThemeProviderConfig, type TransferInputVariant, type UnifoldConnectProviderConfig, UnifoldProvider, type UnifoldProviderProps, type WithdrawConfig, type WithdrawError, type WithdrawResult, type WithdrawTransactionInfo, getPreferredIcon, getSupportedDestinationTokens, normalizeIconUrl, registerStripeOnramp, setDevApiUrl, useAllowedCountry, useTheme, useUnifold };