@unifold/connect-react 0.1.53 → 0.1.55
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 +13 -1
- package/dist/index.d.ts +13 -1
- package/dist/index.js +3463 -2547
- package/dist/index.mjs +3355 -2439
- package/dist/styles-base.css +1 -1
- package/dist/styles.css +1 -1
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import { QueryClient } from '@tanstack/react-query';
|
|
3
4
|
import { ThemeMode, ThemeConfig, FontConfig, ComponentConfig, DepositModalInitialScreen, ChainType, DepositConfirmationMode, WithdrawTransactionInfo, AllowedCountryResult } from '@unifold/ui-react';
|
|
4
5
|
export { AllowedCountryResult, BrowserWalletAmountQuickSelect, Button, ButtonProps, ButtonTokens, CardTokens, ComponentConfig, ComponentTokens, ConfirmingView, ContainerTokens, CustomThemeColors, DepositConfirmationMode, DepositModalInitialScreen as DepositInitialScreen, FontConfig, HeaderTokens, InputTokens, ListTokens, SearchTokens, ThemeColors, ThemeConfig, ThemeMode, UseSupportedDepositTokensOptions, WithdrawTransactionInfo, useSupportedDepositTokens } from '@unifold/ui-react';
|
|
5
6
|
import { DepositEvent } from '@unifold/core';
|
|
@@ -7,6 +8,15 @@ export { ActionType, AutoSwapRequest, AutoSwapResponse, ChainType, CreateDeposit
|
|
|
7
8
|
|
|
8
9
|
interface UnifoldConnectProviderConfig {
|
|
9
10
|
publishableKey: string;
|
|
11
|
+
/**
|
|
12
|
+
* Bring your own TanStack QueryClient. When provided, UnifoldProvider will
|
|
13
|
+
* use this client instead of creating its own, and will not add a
|
|
14
|
+
* QueryClientProvider wrapper (it assumes one already exists in the tree).
|
|
15
|
+
*
|
|
16
|
+
* This avoids shadowing the host app's QueryClient and lets Unifold hooks
|
|
17
|
+
* share the same cache, devtools, and default options as the rest of the app.
|
|
18
|
+
*/
|
|
19
|
+
queryClient?: QueryClient;
|
|
10
20
|
config?: {
|
|
11
21
|
modalTitle?: string;
|
|
12
22
|
/** Custom title for the withdraw modal. @default `"Withdraw"` */
|
|
@@ -22,6 +32,8 @@ interface UnifoldConnectProviderConfig {
|
|
|
22
32
|
enableConnectWallet?: boolean;
|
|
23
33
|
/** Enable "Pay with Exchange" option. Overrides dashboard default. Defaults to dashboard value or true. */
|
|
24
34
|
enablePayWithExchange?: boolean;
|
|
35
|
+
/** Enable "Pay with Cash App" option. Defaults to false. */
|
|
36
|
+
enableCashApp?: boolean;
|
|
25
37
|
/** Simple accent/primary color override (applies to both light and dark modes) */
|
|
26
38
|
accentColor?: string;
|
|
27
39
|
/** Full theme color customization per mode */
|
|
@@ -178,7 +190,7 @@ interface WithdrawConfig {
|
|
|
178
190
|
onClose?: () => void;
|
|
179
191
|
}
|
|
180
192
|
|
|
181
|
-
declare function UnifoldProvider({ children, publishableKey, config, }: React.PropsWithChildren<UnifoldConnectProviderConfig>): react_jsx_runtime.JSX.Element;
|
|
193
|
+
declare function UnifoldProvider({ children, publishableKey, queryClient, config, }: React.PropsWithChildren<UnifoldConnectProviderConfig>): react_jsx_runtime.JSX.Element;
|
|
182
194
|
declare function useUnifold(): {
|
|
183
195
|
publishableKey: string;
|
|
184
196
|
beginDeposit: (config: DepositConfig) => Promise<DepositResult>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import { QueryClient } from '@tanstack/react-query';
|
|
3
4
|
import { ThemeMode, ThemeConfig, FontConfig, ComponentConfig, DepositModalInitialScreen, ChainType, DepositConfirmationMode, WithdrawTransactionInfo, AllowedCountryResult } from '@unifold/ui-react';
|
|
4
5
|
export { AllowedCountryResult, BrowserWalletAmountQuickSelect, Button, ButtonProps, ButtonTokens, CardTokens, ComponentConfig, ComponentTokens, ConfirmingView, ContainerTokens, CustomThemeColors, DepositConfirmationMode, DepositModalInitialScreen as DepositInitialScreen, FontConfig, HeaderTokens, InputTokens, ListTokens, SearchTokens, ThemeColors, ThemeConfig, ThemeMode, UseSupportedDepositTokensOptions, WithdrawTransactionInfo, useSupportedDepositTokens } from '@unifold/ui-react';
|
|
5
6
|
import { DepositEvent } from '@unifold/core';
|
|
@@ -7,6 +8,15 @@ export { ActionType, AutoSwapRequest, AutoSwapResponse, ChainType, CreateDeposit
|
|
|
7
8
|
|
|
8
9
|
interface UnifoldConnectProviderConfig {
|
|
9
10
|
publishableKey: string;
|
|
11
|
+
/**
|
|
12
|
+
* Bring your own TanStack QueryClient. When provided, UnifoldProvider will
|
|
13
|
+
* use this client instead of creating its own, and will not add a
|
|
14
|
+
* QueryClientProvider wrapper (it assumes one already exists in the tree).
|
|
15
|
+
*
|
|
16
|
+
* This avoids shadowing the host app's QueryClient and lets Unifold hooks
|
|
17
|
+
* share the same cache, devtools, and default options as the rest of the app.
|
|
18
|
+
*/
|
|
19
|
+
queryClient?: QueryClient;
|
|
10
20
|
config?: {
|
|
11
21
|
modalTitle?: string;
|
|
12
22
|
/** Custom title for the withdraw modal. @default `"Withdraw"` */
|
|
@@ -22,6 +32,8 @@ interface UnifoldConnectProviderConfig {
|
|
|
22
32
|
enableConnectWallet?: boolean;
|
|
23
33
|
/** Enable "Pay with Exchange" option. Overrides dashboard default. Defaults to dashboard value or true. */
|
|
24
34
|
enablePayWithExchange?: boolean;
|
|
35
|
+
/** Enable "Pay with Cash App" option. Defaults to false. */
|
|
36
|
+
enableCashApp?: boolean;
|
|
25
37
|
/** Simple accent/primary color override (applies to both light and dark modes) */
|
|
26
38
|
accentColor?: string;
|
|
27
39
|
/** Full theme color customization per mode */
|
|
@@ -178,7 +190,7 @@ interface WithdrawConfig {
|
|
|
178
190
|
onClose?: () => void;
|
|
179
191
|
}
|
|
180
192
|
|
|
181
|
-
declare function UnifoldProvider({ children, publishableKey, config, }: React.PropsWithChildren<UnifoldConnectProviderConfig>): react_jsx_runtime.JSX.Element;
|
|
193
|
+
declare function UnifoldProvider({ children, publishableKey, queryClient, config, }: React.PropsWithChildren<UnifoldConnectProviderConfig>): react_jsx_runtime.JSX.Element;
|
|
182
194
|
declare function useUnifold(): {
|
|
183
195
|
publishableKey: string;
|
|
184
196
|
beginDeposit: (config: DepositConfig) => Promise<DepositResult>;
|