@nexus-cross/dapp-ui 1.0.3-beta.1 → 1.0.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.cjs +14 -15
- package/dist/index.d.cts +3 -54
- package/dist/index.d.ts +3 -54
- package/dist/index.js +14 -15
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -126,14 +126,6 @@ interface SendTransactionArgs {
|
|
|
126
126
|
gas?: bigint;
|
|
127
127
|
}
|
|
128
128
|
type SendTransactionFn = (args: SendTransactionArgs) => Promise<`0x${string}`>;
|
|
129
|
-
interface GetTransactionReceiptArgs {
|
|
130
|
-
hash: `0x${string}`;
|
|
131
|
-
chainId?: number;
|
|
132
|
-
}
|
|
133
|
-
interface TransactionReceiptResult {
|
|
134
|
-
status?: "success" | "reverted" | "0x1" | "0x0" | number | bigint | boolean;
|
|
135
|
-
}
|
|
136
|
-
type GetTransactionReceiptFn = (args: GetTransactionReceiptArgs) => Promise<TransactionReceiptResult | null | undefined>;
|
|
137
129
|
interface PoolToken {
|
|
138
130
|
address: string;
|
|
139
131
|
symbol: string;
|
|
@@ -242,44 +234,6 @@ interface ForgeTokenDetail {
|
|
|
242
234
|
available_supply: string;
|
|
243
235
|
}
|
|
244
236
|
|
|
245
|
-
interface SendAsset {
|
|
246
|
-
name: string;
|
|
247
|
-
symbol: string;
|
|
248
|
-
chainId: number;
|
|
249
|
-
address: string;
|
|
250
|
-
quantity: {
|
|
251
|
-
decimals: number;
|
|
252
|
-
numeric: string;
|
|
253
|
-
};
|
|
254
|
-
icon_url: string;
|
|
255
|
-
}
|
|
256
|
-
type SendStatus = "idle" | "submitting" | "confirming" | "success" | "error";
|
|
257
|
-
interface RecentSendAddress {
|
|
258
|
-
address: `0x${string}`;
|
|
259
|
-
updatedAt: number;
|
|
260
|
-
}
|
|
261
|
-
interface SendAccount {
|
|
262
|
-
address: `0x${string}`;
|
|
263
|
-
index?: number;
|
|
264
|
-
name?: string;
|
|
265
|
-
}
|
|
266
|
-
interface SendPageProps {
|
|
267
|
-
env?: Environment;
|
|
268
|
-
theme?: Theme;
|
|
269
|
-
walletAddress: string;
|
|
270
|
-
accountName?: string;
|
|
271
|
-
accounts?: SendAccount[];
|
|
272
|
-
token: SendAsset;
|
|
273
|
-
tokens?: SendAsset[];
|
|
274
|
-
onTokenChange?: (token: SendAsset) => void;
|
|
275
|
-
sendTransaction?: SendTransactionFn;
|
|
276
|
-
getTransactionReceipt?: GetTransactionReceiptFn;
|
|
277
|
-
onSuccess?: (txHash: `0x${string}`) => void;
|
|
278
|
-
onConfirmSuccess?: () => void;
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
declare function SendPage({ env, theme, walletAddress, accounts, token, tokens, onTokenChange, sendTransaction, getTransactionReceipt, onSuccess, onConfirmSuccess, }: SendPageProps): react_jsx_runtime.JSX.Element;
|
|
282
|
-
|
|
283
237
|
type DexMarket = "cross" | "crossd" | "forge";
|
|
284
238
|
|
|
285
239
|
/**
|
|
@@ -379,7 +333,6 @@ interface WalletInfoProps {
|
|
|
379
333
|
qrLogoSrc?: string;
|
|
380
334
|
walletAddress: string;
|
|
381
335
|
accountName?: string;
|
|
382
|
-
sendAccounts?: SendAccount[];
|
|
383
336
|
/** 헤더 좌측에 표시될 프로필 이미지 URL. 미지정 시 주소 기반 그라디언트 아바타가 자동 생성됨. */
|
|
384
337
|
profileImageUrl?: string;
|
|
385
338
|
/** Resolves connectorName & connectorIconUrl from CONNECTOR_REGISTRY */
|
|
@@ -434,7 +387,6 @@ interface WalletInfoProps {
|
|
|
434
387
|
* wagmi의 `sendTransactionAsync`를 그대로 전달해도 호환된다.
|
|
435
388
|
*/
|
|
436
389
|
sendTransaction?: SendTransactionFn;
|
|
437
|
-
getTransactionReceipt?: GetTransactionReceiptFn;
|
|
438
390
|
/**
|
|
439
391
|
* Terms/Privacy · 포트폴리오 섹션 등 외부 링크 이동을 가로채는 콜백.
|
|
440
392
|
* `(url, ctx) => newUrl | null | undefined | Promise<...>` 형태이며
|
|
@@ -448,7 +400,7 @@ interface WalletInfoProps {
|
|
|
448
400
|
style?: WalletInfoStyle;
|
|
449
401
|
children: React.ReactNode;
|
|
450
402
|
}
|
|
451
|
-
declare function WalletInfoRoot({ env, theme, mobileBreakpoint, drawerDirection, modal, showBalance, showForgeToken, showGameToken, showQR, qrLogoSrc, walletAddress, accountName,
|
|
403
|
+
declare function WalletInfoRoot({ env, theme, mobileBreakpoint, drawerDirection, modal, showBalance, showForgeToken, showGameToken, showQR, qrLogoSrc, walletAddress, accountName, profileImageUrl, connectorId, connectorName: connectorNameProp, connectorIconUrl: connectorIconUrlProp, preferredTokens, onSelectWallet, onCopyAddress, onDisconnect, disconnectLabel, termsUrl, termsLabel, privacyUrl, privacyLabel, open: propOpen, onOpenChange, showPortfolio, portfolioTitle, showTotalAssets, totalAssetsLabel, sendTransaction, onOutlink, style, children, }: WalletInfoProps): react_jsx_runtime.JSX.Element;
|
|
452
404
|
declare const WalletInfo: typeof WalletInfoRoot & {
|
|
453
405
|
Trigger: typeof WalletInfoTrigger;
|
|
454
406
|
Content: typeof WalletInfoContent;
|
|
@@ -851,8 +803,6 @@ interface ConnectButtonProps {
|
|
|
851
803
|
providerName?: string;
|
|
852
804
|
/** WalletInfo 헤더에 노출될 계정 라벨 (예: "Account 1", 사용자 지정 이름). */
|
|
853
805
|
accountName?: string;
|
|
854
|
-
/** Send 주소록의 My Account 탭에 노출할 계정 목록. */
|
|
855
|
-
sendAccounts?: SendAccount[];
|
|
856
806
|
/** disconnected 상태에서 버튼 클릭 핸들러. */
|
|
857
807
|
onConnect?: () => void;
|
|
858
808
|
/** connected 상태에서 WalletInfo 하단 Disconnect 클릭 핸들러. */
|
|
@@ -886,7 +836,6 @@ interface ConnectButtonProps {
|
|
|
886
836
|
connectorId?: ConnectorId;
|
|
887
837
|
style?: WalletInfoStyle;
|
|
888
838
|
sendTransaction?: SendTransactionFn;
|
|
889
|
-
getTransactionReceipt?: GetTransactionReceiptFn;
|
|
890
839
|
}
|
|
891
840
|
|
|
892
841
|
/**
|
|
@@ -901,7 +850,7 @@ interface ConnectButtonProps {
|
|
|
901
850
|
* 상태/데이터/콜백은 props로 주입받는다. 실제 wagmi 연결 로직은
|
|
902
851
|
* `@nexus-cross/connect-kit-react`의 상위 래퍼에서 수행한다.
|
|
903
852
|
*/
|
|
904
|
-
declare function ConnectButton({ isConnecting, address, provider, providerName, accountName,
|
|
853
|
+
declare function ConnectButton({ isConnecting, address, provider, providerName, accountName, onConnect, onDisconnect, onCopy, onSelectWallet, label, connectingLabel, disconnectLabel, className, theme, env, showBalance, showPortfolio, drawerDirection, modal, connectorId, style, sendTransaction, }: ConnectButtonProps): react_jsx_runtime.JSX.Element;
|
|
905
854
|
|
|
906
855
|
/**
|
|
907
856
|
* Wallet provider icons used by `ConnectButton`. Ported from
|
|
@@ -923,4 +872,4 @@ declare const BINANCE_ICON: string;
|
|
|
923
872
|
declare const GOOGLE_ICON: string;
|
|
924
873
|
declare const APPLE_ICON: string;
|
|
925
874
|
|
|
926
|
-
export { APPLE_ICON, AppLauncher, AppLauncherContent, type AppLauncherContentProps, type AppLauncherProps, AppLauncherTrigger, type AppLauncherTriggerProps, BINANCE_ICON, CONNECTOR_REGISTRY, CROSSX_ICON, type ChainId, ConnectButton, type ConnectButtonProps, ConnectorId, type ConnectorMeta, type DrawerDirection$1 as DrawerDirection, type Environment, GOOGLE_ICON, type
|
|
875
|
+
export { APPLE_ICON, AppLauncher, AppLauncherContent, type AppLauncherContentProps, type AppLauncherProps, AppLauncherTrigger, type AppLauncherTriggerProps, BINANCE_ICON, CONNECTOR_REGISTRY, CROSSX_ICON, type ChainId, ConnectButton, type ConnectButtonProps, ConnectorId, type ConnectorMeta, type DrawerDirection$1 as DrawerDirection, type Environment, GOOGLE_ICON, type GlobalMenu, type GlobalMenuItem, type GlobalMenuItemUrl, METAMASK_ICON, type OnOutlink, type OutlinkCategory, type OutlinkContext, type OutlinkOrigin, type PreferredToken, type SendTransactionArgs, type SendTransactionFn, TOKEN_STATS_QUERY_KEY, type Theme, type TokenBalance, type TokenBalanceResponse, type TokenStats, type TokenStatsResponse, USER_BALANCE_QUERY_KEY, WALLET_REGISTRY, type WalletConfig, WalletConnectModal, type WalletConnectModalContentProps, type WalletConnectModalProps, type WalletConnectModalStyle, type WalletConnectModalTriggerProps, type WalletHandlers, type WalletId, WalletInfo, type WalletInfoContentProps, type WalletInfoFooterProps, type WalletInfoNavProps, type WalletInfoProps, type WalletInfoStyle, type WalletInfoTriggerProps, WalletPortfolio, WalletPortfolioBody, type WalletPortfolioBodyProps, type WalletPortfolioContentProps, type WalletPortfolioProps, type WalletPortfolioTriggerProps, type WalletProvider, resolveEnvironment, useGlobalMenu, useTokenBalance, useTokenStats, useWalletDetect };
|
package/dist/index.d.ts
CHANGED
|
@@ -126,14 +126,6 @@ interface SendTransactionArgs {
|
|
|
126
126
|
gas?: bigint;
|
|
127
127
|
}
|
|
128
128
|
type SendTransactionFn = (args: SendTransactionArgs) => Promise<`0x${string}`>;
|
|
129
|
-
interface GetTransactionReceiptArgs {
|
|
130
|
-
hash: `0x${string}`;
|
|
131
|
-
chainId?: number;
|
|
132
|
-
}
|
|
133
|
-
interface TransactionReceiptResult {
|
|
134
|
-
status?: "success" | "reverted" | "0x1" | "0x0" | number | bigint | boolean;
|
|
135
|
-
}
|
|
136
|
-
type GetTransactionReceiptFn = (args: GetTransactionReceiptArgs) => Promise<TransactionReceiptResult | null | undefined>;
|
|
137
129
|
interface PoolToken {
|
|
138
130
|
address: string;
|
|
139
131
|
symbol: string;
|
|
@@ -242,44 +234,6 @@ interface ForgeTokenDetail {
|
|
|
242
234
|
available_supply: string;
|
|
243
235
|
}
|
|
244
236
|
|
|
245
|
-
interface SendAsset {
|
|
246
|
-
name: string;
|
|
247
|
-
symbol: string;
|
|
248
|
-
chainId: number;
|
|
249
|
-
address: string;
|
|
250
|
-
quantity: {
|
|
251
|
-
decimals: number;
|
|
252
|
-
numeric: string;
|
|
253
|
-
};
|
|
254
|
-
icon_url: string;
|
|
255
|
-
}
|
|
256
|
-
type SendStatus = "idle" | "submitting" | "confirming" | "success" | "error";
|
|
257
|
-
interface RecentSendAddress {
|
|
258
|
-
address: `0x${string}`;
|
|
259
|
-
updatedAt: number;
|
|
260
|
-
}
|
|
261
|
-
interface SendAccount {
|
|
262
|
-
address: `0x${string}`;
|
|
263
|
-
index?: number;
|
|
264
|
-
name?: string;
|
|
265
|
-
}
|
|
266
|
-
interface SendPageProps {
|
|
267
|
-
env?: Environment;
|
|
268
|
-
theme?: Theme;
|
|
269
|
-
walletAddress: string;
|
|
270
|
-
accountName?: string;
|
|
271
|
-
accounts?: SendAccount[];
|
|
272
|
-
token: SendAsset;
|
|
273
|
-
tokens?: SendAsset[];
|
|
274
|
-
onTokenChange?: (token: SendAsset) => void;
|
|
275
|
-
sendTransaction?: SendTransactionFn;
|
|
276
|
-
getTransactionReceipt?: GetTransactionReceiptFn;
|
|
277
|
-
onSuccess?: (txHash: `0x${string}`) => void;
|
|
278
|
-
onConfirmSuccess?: () => void;
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
declare function SendPage({ env, theme, walletAddress, accounts, token, tokens, onTokenChange, sendTransaction, getTransactionReceipt, onSuccess, onConfirmSuccess, }: SendPageProps): react_jsx_runtime.JSX.Element;
|
|
282
|
-
|
|
283
237
|
type DexMarket = "cross" | "crossd" | "forge";
|
|
284
238
|
|
|
285
239
|
/**
|
|
@@ -379,7 +333,6 @@ interface WalletInfoProps {
|
|
|
379
333
|
qrLogoSrc?: string;
|
|
380
334
|
walletAddress: string;
|
|
381
335
|
accountName?: string;
|
|
382
|
-
sendAccounts?: SendAccount[];
|
|
383
336
|
/** 헤더 좌측에 표시될 프로필 이미지 URL. 미지정 시 주소 기반 그라디언트 아바타가 자동 생성됨. */
|
|
384
337
|
profileImageUrl?: string;
|
|
385
338
|
/** Resolves connectorName & connectorIconUrl from CONNECTOR_REGISTRY */
|
|
@@ -434,7 +387,6 @@ interface WalletInfoProps {
|
|
|
434
387
|
* wagmi의 `sendTransactionAsync`를 그대로 전달해도 호환된다.
|
|
435
388
|
*/
|
|
436
389
|
sendTransaction?: SendTransactionFn;
|
|
437
|
-
getTransactionReceipt?: GetTransactionReceiptFn;
|
|
438
390
|
/**
|
|
439
391
|
* Terms/Privacy · 포트폴리오 섹션 등 외부 링크 이동을 가로채는 콜백.
|
|
440
392
|
* `(url, ctx) => newUrl | null | undefined | Promise<...>` 형태이며
|
|
@@ -448,7 +400,7 @@ interface WalletInfoProps {
|
|
|
448
400
|
style?: WalletInfoStyle;
|
|
449
401
|
children: React.ReactNode;
|
|
450
402
|
}
|
|
451
|
-
declare function WalletInfoRoot({ env, theme, mobileBreakpoint, drawerDirection, modal, showBalance, showForgeToken, showGameToken, showQR, qrLogoSrc, walletAddress, accountName,
|
|
403
|
+
declare function WalletInfoRoot({ env, theme, mobileBreakpoint, drawerDirection, modal, showBalance, showForgeToken, showGameToken, showQR, qrLogoSrc, walletAddress, accountName, profileImageUrl, connectorId, connectorName: connectorNameProp, connectorIconUrl: connectorIconUrlProp, preferredTokens, onSelectWallet, onCopyAddress, onDisconnect, disconnectLabel, termsUrl, termsLabel, privacyUrl, privacyLabel, open: propOpen, onOpenChange, showPortfolio, portfolioTitle, showTotalAssets, totalAssetsLabel, sendTransaction, onOutlink, style, children, }: WalletInfoProps): react_jsx_runtime.JSX.Element;
|
|
452
404
|
declare const WalletInfo: typeof WalletInfoRoot & {
|
|
453
405
|
Trigger: typeof WalletInfoTrigger;
|
|
454
406
|
Content: typeof WalletInfoContent;
|
|
@@ -851,8 +803,6 @@ interface ConnectButtonProps {
|
|
|
851
803
|
providerName?: string;
|
|
852
804
|
/** WalletInfo 헤더에 노출될 계정 라벨 (예: "Account 1", 사용자 지정 이름). */
|
|
853
805
|
accountName?: string;
|
|
854
|
-
/** Send 주소록의 My Account 탭에 노출할 계정 목록. */
|
|
855
|
-
sendAccounts?: SendAccount[];
|
|
856
806
|
/** disconnected 상태에서 버튼 클릭 핸들러. */
|
|
857
807
|
onConnect?: () => void;
|
|
858
808
|
/** connected 상태에서 WalletInfo 하단 Disconnect 클릭 핸들러. */
|
|
@@ -886,7 +836,6 @@ interface ConnectButtonProps {
|
|
|
886
836
|
connectorId?: ConnectorId;
|
|
887
837
|
style?: WalletInfoStyle;
|
|
888
838
|
sendTransaction?: SendTransactionFn;
|
|
889
|
-
getTransactionReceipt?: GetTransactionReceiptFn;
|
|
890
839
|
}
|
|
891
840
|
|
|
892
841
|
/**
|
|
@@ -901,7 +850,7 @@ interface ConnectButtonProps {
|
|
|
901
850
|
* 상태/데이터/콜백은 props로 주입받는다. 실제 wagmi 연결 로직은
|
|
902
851
|
* `@nexus-cross/connect-kit-react`의 상위 래퍼에서 수행한다.
|
|
903
852
|
*/
|
|
904
|
-
declare function ConnectButton({ isConnecting, address, provider, providerName, accountName,
|
|
853
|
+
declare function ConnectButton({ isConnecting, address, provider, providerName, accountName, onConnect, onDisconnect, onCopy, onSelectWallet, label, connectingLabel, disconnectLabel, className, theme, env, showBalance, showPortfolio, drawerDirection, modal, connectorId, style, sendTransaction, }: ConnectButtonProps): react_jsx_runtime.JSX.Element;
|
|
905
854
|
|
|
906
855
|
/**
|
|
907
856
|
* Wallet provider icons used by `ConnectButton`. Ported from
|
|
@@ -923,4 +872,4 @@ declare const BINANCE_ICON: string;
|
|
|
923
872
|
declare const GOOGLE_ICON: string;
|
|
924
873
|
declare const APPLE_ICON: string;
|
|
925
874
|
|
|
926
|
-
export { APPLE_ICON, AppLauncher, AppLauncherContent, type AppLauncherContentProps, type AppLauncherProps, AppLauncherTrigger, type AppLauncherTriggerProps, BINANCE_ICON, CONNECTOR_REGISTRY, CROSSX_ICON, type ChainId, ConnectButton, type ConnectButtonProps, ConnectorId, type ConnectorMeta, type DrawerDirection$1 as DrawerDirection, type Environment, GOOGLE_ICON, type
|
|
875
|
+
export { APPLE_ICON, AppLauncher, AppLauncherContent, type AppLauncherContentProps, type AppLauncherProps, AppLauncherTrigger, type AppLauncherTriggerProps, BINANCE_ICON, CONNECTOR_REGISTRY, CROSSX_ICON, type ChainId, ConnectButton, type ConnectButtonProps, ConnectorId, type ConnectorMeta, type DrawerDirection$1 as DrawerDirection, type Environment, GOOGLE_ICON, type GlobalMenu, type GlobalMenuItem, type GlobalMenuItemUrl, METAMASK_ICON, type OnOutlink, type OutlinkCategory, type OutlinkContext, type OutlinkOrigin, type PreferredToken, type SendTransactionArgs, type SendTransactionFn, TOKEN_STATS_QUERY_KEY, type Theme, type TokenBalance, type TokenBalanceResponse, type TokenStats, type TokenStatsResponse, USER_BALANCE_QUERY_KEY, WALLET_REGISTRY, type WalletConfig, WalletConnectModal, type WalletConnectModalContentProps, type WalletConnectModalProps, type WalletConnectModalStyle, type WalletConnectModalTriggerProps, type WalletHandlers, type WalletId, WalletInfo, type WalletInfoContentProps, type WalletInfoFooterProps, type WalletInfoNavProps, type WalletInfoProps, type WalletInfoStyle, type WalletInfoTriggerProps, WalletPortfolio, WalletPortfolioBody, type WalletPortfolioBodyProps, type WalletPortfolioContentProps, type WalletPortfolioProps, type WalletPortfolioTriggerProps, type WalletProvider, resolveEnvironment, useGlobalMenu, useTokenBalance, useTokenStats, useWalletDetect };
|