@unifold/ui-react 0.1.7 → 0.1.8
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 +25 -6
- package/dist/index.d.ts +25 -6
- package/dist/index.js +719 -412
- package/dist/index.mjs +715 -410
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -61,6 +61,12 @@ declare function getApiBaseUrl(): string;
|
|
|
61
61
|
* like "http://localhost:3002/api/public/icons/networks/ethereum.svg"
|
|
62
62
|
*/
|
|
63
63
|
declare function getIconUrl(iconPath: string): string;
|
|
64
|
+
/**
|
|
65
|
+
* Build an icon URL using a custom CDN base URL
|
|
66
|
+
* Converts relative paths like "/icons/networks/ethereum.svg" to full CDN URLs
|
|
67
|
+
* Falls back to getIconUrl if no CDN URL is provided
|
|
68
|
+
*/
|
|
69
|
+
declare function getIconUrlWithCdn(iconPath: string, assetCdnUrl?: string): string;
|
|
64
70
|
interface Wallet {
|
|
65
71
|
id: string;
|
|
66
72
|
chain_type: "ethereum" | "solana" | "bitcoin";
|
|
@@ -121,6 +127,7 @@ interface AutoSwapResponse {
|
|
|
121
127
|
destination_chain_id: string;
|
|
122
128
|
destination_token_address: string;
|
|
123
129
|
source_amount_base_unit: string;
|
|
130
|
+
source_amount_usd?: string;
|
|
124
131
|
destination_amount_base_unit: string;
|
|
125
132
|
provider_metadata: unknown;
|
|
126
133
|
created_at?: string;
|
|
@@ -132,6 +139,9 @@ interface AutoSwapResponse {
|
|
|
132
139
|
source_token_metadata?: {
|
|
133
140
|
icon_url: string;
|
|
134
141
|
};
|
|
142
|
+
destination_token_metadata?: {
|
|
143
|
+
icon_url: string;
|
|
144
|
+
};
|
|
135
145
|
}
|
|
136
146
|
declare const SOLANA_USDC_ADDRESS = "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v";
|
|
137
147
|
interface QueryExecutionsRequest {
|
|
@@ -347,8 +357,9 @@ interface BuyWithCardProps {
|
|
|
347
357
|
}) => void;
|
|
348
358
|
themeClass?: string;
|
|
349
359
|
wallets?: Wallet[];
|
|
360
|
+
assetCdnUrl?: string;
|
|
350
361
|
}
|
|
351
|
-
declare function BuyWithCard({ userId, publishableKey, view: externalView, onViewChange, maxAmountUsd, accentColor, destinationTokenSymbol, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, themeClass, wallets: externalWallets, }: BuyWithCardProps): react_jsx_runtime.JSX.Element;
|
|
362
|
+
declare function BuyWithCard({ userId, publishableKey, view: externalView, onViewChange, maxAmountUsd, accentColor, destinationTokenSymbol, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, themeClass, wallets: externalWallets, assetCdnUrl, }: BuyWithCardProps): react_jsx_runtime.JSX.Element;
|
|
352
363
|
|
|
353
364
|
interface CurrencyModalProps {
|
|
354
365
|
open: boolean;
|
|
@@ -370,9 +381,10 @@ interface DepositSuccessToastProps {
|
|
|
370
381
|
completionExplorerUrl?: string;
|
|
371
382
|
status: ExecutionStatus;
|
|
372
383
|
tokenIconUrl?: string;
|
|
384
|
+
sourceAmountBaseUnit?: string;
|
|
373
385
|
onClose: () => void;
|
|
374
386
|
}
|
|
375
|
-
declare function DepositSuccessToast({ depositTx,
|
|
387
|
+
declare function DepositSuccessToast({ depositTx, orderSubmittedAt, status, tokenIconUrl, sourceAmountBaseUnit, onClose, }: DepositSuccessToastProps): react_jsx_runtime.JSX.Element;
|
|
376
388
|
|
|
377
389
|
interface DepositsModalProps {
|
|
378
390
|
open: boolean;
|
|
@@ -419,10 +431,17 @@ declare function DepositTrackerButton({ onClick, title, subtitle, badge, }: Depo
|
|
|
419
431
|
|
|
420
432
|
interface DepositExecutionItemProps {
|
|
421
433
|
execution: AutoSwapResponse;
|
|
422
|
-
|
|
423
|
-
|
|
434
|
+
onClick?: () => void;
|
|
435
|
+
}
|
|
436
|
+
declare function DepositExecutionItem({ execution, onClick, }: DepositExecutionItemProps): react_jsx_runtime.JSX.Element;
|
|
437
|
+
|
|
438
|
+
interface DepositDetailModalProps {
|
|
439
|
+
open: boolean;
|
|
440
|
+
onOpenChange: (open: boolean) => void;
|
|
441
|
+
execution: AutoSwapResponse | null;
|
|
442
|
+
themeClass?: string;
|
|
424
443
|
}
|
|
425
|
-
declare function
|
|
444
|
+
declare function DepositDetailModal({ open, onOpenChange, execution, themeClass, }: DepositDetailModalProps): react_jsx_runtime.JSX.Element | null;
|
|
426
445
|
|
|
427
446
|
interface CurrencyListItemProps {
|
|
428
447
|
currency: FiatCurrency;
|
|
@@ -583,4 +602,4 @@ declare const i18n: {
|
|
|
583
602
|
};
|
|
584
603
|
type I18nStrings = typeof i18n;
|
|
585
604
|
|
|
586
|
-
export { type AutoSwapRequest, type AutoSwapResponse, Button, type ButtonProps, BuyWithCard, type CreateEOARequest, CurrencyListItem, CurrencyListSection, CurrencyModal, DepositExecutionItem, DepositHeader, DepositModal, DepositSuccessToast, DepositTrackerButton, DepositWithCardButton, DepositsModal, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, type EOAResponse, ExecutionStatus, type FiatCurrenciesResponse, type FiatCurrency, type I18nStrings, type MeldQuote, type MeldQuotesRequest, type MeldQuotesResponse, type MeldSessionRequest, type MeldSessionResponse, type QueryExecutionsRequest, type QueryExecutionsResponse, SOLANA_USDC_ADDRESS, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, StyledQRCode, type SupportedChain, type SupportedDepositTokensResponse, type SupportedToken, ThemeProvider, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TransferCrypto, TransferCrypto2, TransferCryptoBase, TransferCryptoButton, type UserIpInfo, type Wallet, buttonVariants, cn, createEOA, createMeldSession, getApiBaseUrl, getFiatCurrencies, getIconUrl, getMeldQuotes, getSupportedDepositTokens, getWalletByChainType, i18n, queryExecutions, setApiConfig, useTheme, useUserIp };
|
|
605
|
+
export { type AutoSwapRequest, type AutoSwapResponse, Button, type ButtonProps, BuyWithCard, type CreateEOARequest, CurrencyListItem, CurrencyListSection, CurrencyModal, DepositDetailModal, DepositExecutionItem, DepositHeader, DepositModal, DepositSuccessToast, DepositTrackerButton, DepositWithCardButton, DepositsModal, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, type EOAResponse, ExecutionStatus, type FiatCurrenciesResponse, type FiatCurrency, type I18nStrings, type MeldQuote, type MeldQuotesRequest, type MeldQuotesResponse, type MeldSessionRequest, type MeldSessionResponse, type QueryExecutionsRequest, type QueryExecutionsResponse, SOLANA_USDC_ADDRESS, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, StyledQRCode, type SupportedChain, type SupportedDepositTokensResponse, type SupportedToken, ThemeProvider, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TransferCrypto, TransferCrypto2, TransferCryptoBase, TransferCryptoButton, type UserIpInfo, type Wallet, buttonVariants, cn, createEOA, createMeldSession, getApiBaseUrl, getFiatCurrencies, getIconUrl, getIconUrlWithCdn, getMeldQuotes, getSupportedDepositTokens, getWalletByChainType, i18n, queryExecutions, setApiConfig, useTheme, useUserIp };
|
package/dist/index.d.ts
CHANGED
|
@@ -61,6 +61,12 @@ declare function getApiBaseUrl(): string;
|
|
|
61
61
|
* like "http://localhost:3002/api/public/icons/networks/ethereum.svg"
|
|
62
62
|
*/
|
|
63
63
|
declare function getIconUrl(iconPath: string): string;
|
|
64
|
+
/**
|
|
65
|
+
* Build an icon URL using a custom CDN base URL
|
|
66
|
+
* Converts relative paths like "/icons/networks/ethereum.svg" to full CDN URLs
|
|
67
|
+
* Falls back to getIconUrl if no CDN URL is provided
|
|
68
|
+
*/
|
|
69
|
+
declare function getIconUrlWithCdn(iconPath: string, assetCdnUrl?: string): string;
|
|
64
70
|
interface Wallet {
|
|
65
71
|
id: string;
|
|
66
72
|
chain_type: "ethereum" | "solana" | "bitcoin";
|
|
@@ -121,6 +127,7 @@ interface AutoSwapResponse {
|
|
|
121
127
|
destination_chain_id: string;
|
|
122
128
|
destination_token_address: string;
|
|
123
129
|
source_amount_base_unit: string;
|
|
130
|
+
source_amount_usd?: string;
|
|
124
131
|
destination_amount_base_unit: string;
|
|
125
132
|
provider_metadata: unknown;
|
|
126
133
|
created_at?: string;
|
|
@@ -132,6 +139,9 @@ interface AutoSwapResponse {
|
|
|
132
139
|
source_token_metadata?: {
|
|
133
140
|
icon_url: string;
|
|
134
141
|
};
|
|
142
|
+
destination_token_metadata?: {
|
|
143
|
+
icon_url: string;
|
|
144
|
+
};
|
|
135
145
|
}
|
|
136
146
|
declare const SOLANA_USDC_ADDRESS = "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v";
|
|
137
147
|
interface QueryExecutionsRequest {
|
|
@@ -347,8 +357,9 @@ interface BuyWithCardProps {
|
|
|
347
357
|
}) => void;
|
|
348
358
|
themeClass?: string;
|
|
349
359
|
wallets?: Wallet[];
|
|
360
|
+
assetCdnUrl?: string;
|
|
350
361
|
}
|
|
351
|
-
declare function BuyWithCard({ userId, publishableKey, view: externalView, onViewChange, maxAmountUsd, accentColor, destinationTokenSymbol, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, themeClass, wallets: externalWallets, }: BuyWithCardProps): react_jsx_runtime.JSX.Element;
|
|
362
|
+
declare function BuyWithCard({ userId, publishableKey, view: externalView, onViewChange, maxAmountUsd, accentColor, destinationTokenSymbol, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, themeClass, wallets: externalWallets, assetCdnUrl, }: BuyWithCardProps): react_jsx_runtime.JSX.Element;
|
|
352
363
|
|
|
353
364
|
interface CurrencyModalProps {
|
|
354
365
|
open: boolean;
|
|
@@ -370,9 +381,10 @@ interface DepositSuccessToastProps {
|
|
|
370
381
|
completionExplorerUrl?: string;
|
|
371
382
|
status: ExecutionStatus;
|
|
372
383
|
tokenIconUrl?: string;
|
|
384
|
+
sourceAmountBaseUnit?: string;
|
|
373
385
|
onClose: () => void;
|
|
374
386
|
}
|
|
375
|
-
declare function DepositSuccessToast({ depositTx,
|
|
387
|
+
declare function DepositSuccessToast({ depositTx, orderSubmittedAt, status, tokenIconUrl, sourceAmountBaseUnit, onClose, }: DepositSuccessToastProps): react_jsx_runtime.JSX.Element;
|
|
376
388
|
|
|
377
389
|
interface DepositsModalProps {
|
|
378
390
|
open: boolean;
|
|
@@ -419,10 +431,17 @@ declare function DepositTrackerButton({ onClick, title, subtitle, badge, }: Depo
|
|
|
419
431
|
|
|
420
432
|
interface DepositExecutionItemProps {
|
|
421
433
|
execution: AutoSwapResponse;
|
|
422
|
-
|
|
423
|
-
|
|
434
|
+
onClick?: () => void;
|
|
435
|
+
}
|
|
436
|
+
declare function DepositExecutionItem({ execution, onClick, }: DepositExecutionItemProps): react_jsx_runtime.JSX.Element;
|
|
437
|
+
|
|
438
|
+
interface DepositDetailModalProps {
|
|
439
|
+
open: boolean;
|
|
440
|
+
onOpenChange: (open: boolean) => void;
|
|
441
|
+
execution: AutoSwapResponse | null;
|
|
442
|
+
themeClass?: string;
|
|
424
443
|
}
|
|
425
|
-
declare function
|
|
444
|
+
declare function DepositDetailModal({ open, onOpenChange, execution, themeClass, }: DepositDetailModalProps): react_jsx_runtime.JSX.Element | null;
|
|
426
445
|
|
|
427
446
|
interface CurrencyListItemProps {
|
|
428
447
|
currency: FiatCurrency;
|
|
@@ -583,4 +602,4 @@ declare const i18n: {
|
|
|
583
602
|
};
|
|
584
603
|
type I18nStrings = typeof i18n;
|
|
585
604
|
|
|
586
|
-
export { type AutoSwapRequest, type AutoSwapResponse, Button, type ButtonProps, BuyWithCard, type CreateEOARequest, CurrencyListItem, CurrencyListSection, CurrencyModal, DepositExecutionItem, DepositHeader, DepositModal, DepositSuccessToast, DepositTrackerButton, DepositWithCardButton, DepositsModal, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, type EOAResponse, ExecutionStatus, type FiatCurrenciesResponse, type FiatCurrency, type I18nStrings, type MeldQuote, type MeldQuotesRequest, type MeldQuotesResponse, type MeldSessionRequest, type MeldSessionResponse, type QueryExecutionsRequest, type QueryExecutionsResponse, SOLANA_USDC_ADDRESS, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, StyledQRCode, type SupportedChain, type SupportedDepositTokensResponse, type SupportedToken, ThemeProvider, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TransferCrypto, TransferCrypto2, TransferCryptoBase, TransferCryptoButton, type UserIpInfo, type Wallet, buttonVariants, cn, createEOA, createMeldSession, getApiBaseUrl, getFiatCurrencies, getIconUrl, getMeldQuotes, getSupportedDepositTokens, getWalletByChainType, i18n, queryExecutions, setApiConfig, useTheme, useUserIp };
|
|
605
|
+
export { type AutoSwapRequest, type AutoSwapResponse, Button, type ButtonProps, BuyWithCard, type CreateEOARequest, CurrencyListItem, CurrencyListSection, CurrencyModal, DepositDetailModal, DepositExecutionItem, DepositHeader, DepositModal, DepositSuccessToast, DepositTrackerButton, DepositWithCardButton, DepositsModal, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, type EOAResponse, ExecutionStatus, type FiatCurrenciesResponse, type FiatCurrency, type I18nStrings, type MeldQuote, type MeldQuotesRequest, type MeldQuotesResponse, type MeldSessionRequest, type MeldSessionResponse, type QueryExecutionsRequest, type QueryExecutionsResponse, SOLANA_USDC_ADDRESS, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, StyledQRCode, type SupportedChain, type SupportedDepositTokensResponse, type SupportedToken, ThemeProvider, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TransferCrypto, TransferCrypto2, TransferCryptoBase, TransferCryptoButton, type UserIpInfo, type Wallet, buttonVariants, cn, createEOA, createMeldSession, getApiBaseUrl, getFiatCurrencies, getIconUrl, getIconUrlWithCdn, getMeldQuotes, getSupportedDepositTokens, getWalletByChainType, i18n, queryExecutions, setApiConfig, useTheme, useUserIp };
|