@nexus-cross/dapp-ui 1.1.3-beta.1 → 1.1.3-beta.2
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/README.md +24 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -312,10 +312,14 @@ function ConnectButton() {
|
|
|
312
312
|
return (
|
|
313
313
|
<WalletConnectModal
|
|
314
314
|
wallets={{
|
|
315
|
-
cross_embedded: () => connect({ connectorType: "cross_embedded" }),
|
|
316
315
|
cross_wallet: () => connect({ connectorType: "cross_wallet" }),
|
|
317
316
|
cross_extension: () => connect({ connectorType: "cross_extension" }),
|
|
318
317
|
metamask: () => connect({ connectorType: "metamask" }),
|
|
318
|
+
binance: () => connect({ connectorType: "binance" }),
|
|
319
|
+
}}
|
|
320
|
+
socialProviders={{
|
|
321
|
+
google: () => signInWithProvider("google"),
|
|
322
|
+
apple: () => signInWithProvider("apple"),
|
|
319
323
|
}}
|
|
320
324
|
>
|
|
321
325
|
<WalletConnectModal.Trigger />
|
|
@@ -332,6 +336,9 @@ Context Provider + Dialog/Drawer Root.
|
|
|
332
336
|
| Prop | Type | Default | Description |
|
|
333
337
|
| ------------------ | ---------------------------------------- | ---------- | ------------------------------------------ |
|
|
334
338
|
| `wallets` | `WalletHandlers` | (필수) | 지갑별 연결 콜백 (key가 표시할 지갑 결정) |
|
|
339
|
+
| `socialProviders` | `SocialHandlers` | - | Google/Apple 소셜 로그인 콜백 |
|
|
340
|
+
| `termsUrl` | `string` | - | Footer Terms 링크 URL |
|
|
341
|
+
| `privacyUrl` | `string` | - | Footer Privacy 링크 URL |
|
|
335
342
|
| `theme` | `'dark' \| 'light'` | `'dark'` | 다크/라이트 테마 |
|
|
336
343
|
| `mobileBreakpoint` | `number` | `768` | 이 px 이하에서 Drawer로 전환 |
|
|
337
344
|
| `drawerDirection` | `'bottom' \| 'left' \| 'right' \| 'top'` | `'bottom'` | 모바일 Drawer 방향 |
|
|
@@ -339,17 +346,25 @@ Context Provider + Dialog/Drawer Root.
|
|
|
339
346
|
| `drawerMaxWidth` | `string` | - | Drawer 최대 너비 |
|
|
340
347
|
| `drawerMinWidth` | `string` | - | Drawer 최소 너비 |
|
|
341
348
|
| `style` | `WalletConnectModalStyle` | - | CSS 커스텀 변수 오버라이드 (자동완성 지원) |
|
|
349
|
+
| `open` | `boolean` | - | Controlled mode: 외부에서 열림 상태 제어 |
|
|
350
|
+
| `onOpenChange` | `(open: boolean) => void` | - | 열림 상태 변경 콜백 |
|
|
342
351
|
|
|
343
352
|
#### `WalletHandlers` 타입
|
|
344
353
|
|
|
345
354
|
```ts
|
|
346
355
|
type WalletHandlers = Partial<Record<WalletId, () => void | Promise<void>>>;
|
|
347
356
|
|
|
348
|
-
// WalletId = 'cross_embedded' | 'cross_wallet' | 'cross_extension' | 'metamask' | 'verse8'
|
|
357
|
+
// WalletId = 'cross_embedded' | 'cross_wallet' | 'cross_extension' | 'metamask' | 'binance' | 'verse8' | 'tron'
|
|
349
358
|
```
|
|
350
359
|
|
|
351
360
|
객체에 포함된 key의 지갑만 UI에 표시된다. key는 타입 추론이 된다.
|
|
352
361
|
|
|
362
|
+
`SocialHandlers`는 Google/Apple 소셜 로그인 행에만 사용된다.
|
|
363
|
+
|
|
364
|
+
```ts
|
|
365
|
+
type SocialHandlers = Partial<Record<'google' | 'apple', () => void | Promise<void>>>;
|
|
366
|
+
```
|
|
367
|
+
|
|
353
368
|
### `<WalletConnectModal.Trigger>`
|
|
354
369
|
|
|
355
370
|
Trigger 버튼. children 없이 사용하면 기본 "Connect Wallet" 버튼이 렌더링된다.
|
|
@@ -438,7 +453,14 @@ if (isDetected("io.metamask")) {
|
|
|
438
453
|
| `cross_wallet` | CROSSx | 앱 승인 방식 |
|
|
439
454
|
| `cross_extension` | CROSSx Extension | 브라우저 확장, 데스크톱 전용 |
|
|
440
455
|
| `metamask` | MetaMask | 브라우저 확장 |
|
|
456
|
+
| `binance` | Binance | 모바일 앱 / WalletConnect |
|
|
441
457
|
| `verse8` | Verse8 Wallet | For Forge 배지 |
|
|
458
|
+
| `tron` | Tron Wallet | For SHOP 배지 |
|
|
459
|
+
|
|
460
|
+
`@nexus-cross/connect-kit-react`를 쓰는 경우에는 직접 `WalletConnectModal`을
|
|
461
|
+
조립하지 않아도 된다. `<CrossConnectKitProvider>`가 이 컴포넌트를 기반으로 한
|
|
462
|
+
unified connect modal을 자동 렌더링하며, 지갑 필터링은
|
|
463
|
+
`walletAllowlist` / `extraWallets` props로 처리한다.
|
|
442
464
|
|
|
443
465
|
---
|
|
444
466
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nexus-cross/dapp-ui",
|
|
3
|
-
"version": "1.1.3-beta.
|
|
3
|
+
"version": "1.1.3-beta.2",
|
|
4
4
|
"description": "Shared DApp UI components for the CROSS ecosystem — AppLauncher, WalletInfo, WalletPortfolio, WalletConnectModal",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|