@nexus-cross/connect-kit-react 1.0.0-beta.1
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 +258 -0
- package/dist/components/ConnectButton.d.ts +64 -0
- package/dist/components/ConnectButton.d.ts.map +1 -0
- package/dist/components/ConnectButton.js +257 -0
- package/dist/components/ConnectButton.js.map +1 -0
- package/dist/components/CrossConnectKitProvider.d.ts +15 -0
- package/dist/components/CrossConnectKitProvider.d.ts.map +1 -0
- package/dist/components/CrossConnectKitProvider.js +570 -0
- package/dist/components/CrossConnectKitProvider.js.map +1 -0
- package/dist/components/OtherWalletsModal.d.ts +20 -0
- package/dist/components/OtherWalletsModal.d.ts.map +1 -0
- package/dist/components/OtherWalletsModal.js +300 -0
- package/dist/components/OtherWalletsModal.js.map +1 -0
- package/dist/components/WalletInfoPopover.d.ts +7 -0
- package/dist/components/WalletInfoPopover.d.ts.map +1 -0
- package/dist/components/WalletInfoPopover.js +166 -0
- package/dist/components/WalletInfoPopover.js.map +1 -0
- package/dist/components/types.d.ts +23 -0
- package/dist/components/types.d.ts.map +1 -0
- package/dist/components/types.js +2 -0
- package/dist/components/types.js.map +1 -0
- package/dist/context/CrossConnectKitContext.d.ts +30 -0
- package/dist/context/CrossConnectKitContext.d.ts.map +1 -0
- package/dist/context/CrossConnectKitContext.js +10 -0
- package/dist/context/CrossConnectKitContext.js.map +1 -0
- package/dist/context/CrossConnectKitThemeContext.d.ts +41 -0
- package/dist/context/CrossConnectKitThemeContext.d.ts.map +1 -0
- package/dist/context/CrossConnectKitThemeContext.js +22 -0
- package/dist/context/CrossConnectKitThemeContext.js.map +1 -0
- package/dist/hooks/useCrossxEmbeddedInfo.d.ts +25 -0
- package/dist/hooks/useCrossxEmbeddedInfo.d.ts.map +1 -0
- package/dist/hooks/useCrossxEmbeddedInfo.js +71 -0
- package/dist/hooks/useCrossxEmbeddedInfo.js.map +1 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/package.json +43 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { createContext, useContext } from 'react';
|
|
2
|
+
export const CrossConnectKitThemeContext = createContext(null);
|
|
3
|
+
/**
|
|
4
|
+
* Access the resolved theme and the runtime override setters. Must be
|
|
5
|
+
* called inside `<CrossConnectKitProvider>`.
|
|
6
|
+
*/
|
|
7
|
+
export function useCrossConnectKitTheme() {
|
|
8
|
+
const ctx = useContext(CrossConnectKitThemeContext);
|
|
9
|
+
if (!ctx) {
|
|
10
|
+
throw new Error('useCrossConnectKitTheme must be used within <CrossConnectKitProvider>');
|
|
11
|
+
}
|
|
12
|
+
return ctx;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Version that returns `null` when called outside the provider — handy
|
|
16
|
+
* for components (like `WalletInfo`) that want to opt into the kit's
|
|
17
|
+
* theme if mounted under the provider, but keep working standalone.
|
|
18
|
+
*/
|
|
19
|
+
export function useOptionalCrossConnectKitTheme() {
|
|
20
|
+
return useContext(CrossConnectKitThemeContext);
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=CrossConnectKitThemeContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CrossConnectKitThemeContext.js","sourceRoot":"","sources":["../../src/context/CrossConnectKitThemeContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AA+BlD,MAAM,CAAC,MAAM,2BAA2B,GACtC,aAAa,CAA0C,IAAI,CAAC,CAAC;AAE/D;;;GAGG;AACH,MAAM,UAAU,uBAAuB;IACrC,MAAM,GAAG,GAAG,UAAU,CAAC,2BAA2B,CAAC,CAAC;IACpD,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,MAAM,IAAI,KAAK,CACb,uEAAuE,CACxE,CAAC;IACJ,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,+BAA+B;IAC7C,OAAO,UAAU,CAAC,2BAA2B,CAAC,CAAC;AACjD,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Connector } from 'wagmi';
|
|
2
|
+
export interface CrossxEmbeddedInfo {
|
|
3
|
+
/** crossy-sdk OAuth 로그인 타입. embedded가 아니면 `null`. */
|
|
4
|
+
loginType: 'google' | 'apple' | null;
|
|
5
|
+
/** SDK `getAddresses()`가 리턴한 현재 주소의 `name` 필드(계정 라벨). */
|
|
6
|
+
accountName: string | null;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* crossy-sdk 2.0 세션 메타데이터(`getUserInfo().loginType`,
|
|
10
|
+
* `getAddresses()[].name`)를 비동기로 읽어오는 훅.
|
|
11
|
+
*
|
|
12
|
+
* - `walletId`가 `"cross_embedded"`가 아니면 항상 `{ loginType: null,
|
|
13
|
+
* accountName: null }`을 반환한다.
|
|
14
|
+
* - 내부 호출은 연결된 Provider가 `sdk` 필드를 노출하는 crossy-sdk 스펙을
|
|
15
|
+
* 가정하며, 필드가 없거나 에러가 나면 조용히 nulls로 떨어진다.
|
|
16
|
+
*
|
|
17
|
+
* 인자 없이 호출하면 `useAccount()` / `useCrossConnectKit()`에서 값을 자동으로
|
|
18
|
+
* 받아오고, 명시적으로 제어하고 싶으면 오버라이드 값을 넘길 수 있다.
|
|
19
|
+
*/
|
|
20
|
+
export declare function useCrossxEmbeddedInfo(args?: {
|
|
21
|
+
walletId?: string | null;
|
|
22
|
+
connector?: Connector;
|
|
23
|
+
address?: string;
|
|
24
|
+
}): CrossxEmbeddedInfo;
|
|
25
|
+
//# sourceMappingURL=useCrossxEmbeddedInfo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCrossxEmbeddedInfo.d.ts","sourceRoot":"","sources":["../../src/hooks/useCrossxEmbeddedInfo.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,MAAM,WAAW,kBAAkB;IACjC,qDAAqD;IACrD,SAAS,EAAE,QAAQ,GAAG,OAAO,GAAG,IAAI,CAAC;IACrC,yDAAyD;IACzD,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,CAAC,EAAE;IAC3C,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,GAAG,kBAAkB,CAkErB"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
2
|
+
import { useAccount } from 'wagmi';
|
|
3
|
+
import { useCrossConnectKit } from '../context/CrossConnectKitContext.js';
|
|
4
|
+
/**
|
|
5
|
+
* crossy-sdk 2.0 세션 메타데이터(`getUserInfo().loginType`,
|
|
6
|
+
* `getAddresses()[].name`)를 비동기로 읽어오는 훅.
|
|
7
|
+
*
|
|
8
|
+
* - `walletId`가 `"cross_embedded"`가 아니면 항상 `{ loginType: null,
|
|
9
|
+
* accountName: null }`을 반환한다.
|
|
10
|
+
* - 내부 호출은 연결된 Provider가 `sdk` 필드를 노출하는 crossy-sdk 스펙을
|
|
11
|
+
* 가정하며, 필드가 없거나 에러가 나면 조용히 nulls로 떨어진다.
|
|
12
|
+
*
|
|
13
|
+
* 인자 없이 호출하면 `useAccount()` / `useCrossConnectKit()`에서 값을 자동으로
|
|
14
|
+
* 받아오고, 명시적으로 제어하고 싶으면 오버라이드 값을 넘길 수 있다.
|
|
15
|
+
*/
|
|
16
|
+
export function useCrossxEmbeddedInfo(args) {
|
|
17
|
+
const { address: autoAddress, connector: autoConnector } = useAccount();
|
|
18
|
+
const { currentWallet: autoWalletId } = useCrossConnectKit();
|
|
19
|
+
const walletId = args?.walletId !== undefined ? args.walletId : autoWalletId;
|
|
20
|
+
const connector = args?.connector !== undefined ? args.connector : autoConnector;
|
|
21
|
+
const address = args?.address !== undefined ? args.address : autoAddress;
|
|
22
|
+
const [info, setInfo] = useState({
|
|
23
|
+
loginType: null,
|
|
24
|
+
accountName: null,
|
|
25
|
+
});
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
let cancelled = false;
|
|
28
|
+
if (walletId !== 'cross_embedded' || !connector) {
|
|
29
|
+
setInfo({ loginType: null, accountName: null });
|
|
30
|
+
return () => {
|
|
31
|
+
cancelled = true;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
void (async () => {
|
|
35
|
+
try {
|
|
36
|
+
const provider = (await connector.getProvider());
|
|
37
|
+
const sdk = provider?.sdk;
|
|
38
|
+
if (!sdk) {
|
|
39
|
+
if (!cancelled)
|
|
40
|
+
setInfo({ loginType: null, accountName: null });
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
const [userInfo, addresses] = await Promise.all([
|
|
44
|
+
sdk.getUserInfo?.().catch(() => null) ?? null,
|
|
45
|
+
sdk.getAddresses?.().catch(() => null) ?? null,
|
|
46
|
+
]);
|
|
47
|
+
if (cancelled)
|
|
48
|
+
return;
|
|
49
|
+
const loginTypeRaw = userInfo?.loginType;
|
|
50
|
+
const loginType = loginTypeRaw === 'google' || loginTypeRaw === 'apple'
|
|
51
|
+
? loginTypeRaw
|
|
52
|
+
: null;
|
|
53
|
+
const normalized = address?.toLowerCase();
|
|
54
|
+
const match = normalized && Array.isArray(addresses)
|
|
55
|
+
? addresses.find((e) => e.address.toLowerCase() === normalized)
|
|
56
|
+
: null;
|
|
57
|
+
const accountName = match?.name?.trim() || null;
|
|
58
|
+
setInfo({ loginType, accountName });
|
|
59
|
+
}
|
|
60
|
+
catch {
|
|
61
|
+
if (!cancelled)
|
|
62
|
+
setInfo({ loginType: null, accountName: null });
|
|
63
|
+
}
|
|
64
|
+
})();
|
|
65
|
+
return () => {
|
|
66
|
+
cancelled = true;
|
|
67
|
+
};
|
|
68
|
+
}, [walletId, connector, address]);
|
|
69
|
+
return info;
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=useCrossxEmbeddedInfo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCrossxEmbeddedInfo.js","sourceRoot":"","sources":["../../src/hooks/useCrossxEmbeddedInfo.ts"],"names":[],"mappings":"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"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export { CrossConnectKitProvider } from './components/CrossConnectKitProvider.js';
|
|
2
|
+
export type { CrossConnectKitProviderProps } from './components/CrossConnectKitProvider.js';
|
|
3
|
+
export { ConnectButton } from './components/ConnectButton.js';
|
|
4
|
+
export type { ConnectButtonProps, WalletUser, WalletProvider, } from './components/ConnectButton.js';
|
|
5
|
+
export { OtherWalletsModal } from './components/OtherWalletsModal.js';
|
|
6
|
+
export type { OtherWalletsModalProps } from './components/OtherWalletsModal.js';
|
|
7
|
+
export { useCrossConnectKit } from './context/CrossConnectKitContext.js';
|
|
8
|
+
export type { CrossConnectKitContextValue } from './context/CrossConnectKitContext.js';
|
|
9
|
+
export { useCrossConnectKitTheme, useOptionalCrossConnectKitTheme, } from './context/CrossConnectKitThemeContext.js';
|
|
10
|
+
export type { CrossConnectKitThemeContextValue } from './context/CrossConnectKitThemeContext.js';
|
|
11
|
+
export { useCrossxEmbeddedInfo } from './hooks/useCrossxEmbeddedInfo.js';
|
|
12
|
+
export type { CrossxEmbeddedInfo } from './hooks/useCrossxEmbeddedInfo.js';
|
|
13
|
+
export { WalletInfo, ConnectorId } from '@nexus-cross/dapp-ui';
|
|
14
|
+
export type { WalletInfoProps, WalletInfoStyle, WalletInfoTriggerProps, WalletInfoContentProps, } from '@nexus-cross/dapp-ui';
|
|
15
|
+
export { AppLauncher, AppLauncherTrigger, AppLauncherContent, useGlobalMenu, } from '@nexus-cross/dapp-ui';
|
|
16
|
+
export type { AppLauncherProps, AppLauncherTriggerProps, AppLauncherContentProps, GlobalMenu, GlobalMenuItem, GlobalMenuItemUrl, } from '@nexus-cross/dapp-ui';
|
|
17
|
+
export type { Account, WalletState, WalletId, WalletDescriptor, ChainBalance, ConnectorType, Theme, ThemeMode, ColorOverrides, ThemeTokens, ModalView, CrossConnectKitConfig, } from '@nexus-cross/connect-kit-core';
|
|
18
|
+
export type { ConnectorEntry, ConnectorRegistry, } from '@nexus-cross/connect-kit-wagmi';
|
|
19
|
+
export { ConnectionStatus, formatBalance, formatWei } from '@nexus-cross/connect-kit-core';
|
|
20
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAClF,YAAY,EAAE,4BAA4B,EAAE,MAAM,yCAAyC,CAAC;AAE5F,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,YAAY,EACV,kBAAkB,EAClB,UAAU,EACV,cAAc,GACf,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,YAAY,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAEhF,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,YAAY,EAAE,2BAA2B,EAAE,MAAM,qCAAqC,CAAC;AAEvF,OAAO,EACL,uBAAuB,EACvB,+BAA+B,GAChC,MAAM,0CAA0C,CAAC;AAClD,YAAY,EAAE,gCAAgC,EAAE,MAAM,0CAA0C,CAAC;AAEjG,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,YAAY,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAE3E,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC/D,YAAY,EACV,eAAe,EACf,eAAe,EACf,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,aAAa,GACd,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EACV,gBAAgB,EAChB,uBAAuB,EACvB,uBAAuB,EACvB,UAAU,EACV,cAAc,EACd,iBAAiB,GAClB,MAAM,sBAAsB,CAAC;AAE9B,YAAY,EACV,OAAO,EACP,WAAW,EACX,QAAQ,EACR,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,KAAK,EACL,SAAS,EACT,cAAc,EACd,WAAW,EACX,SAAS,EACT,qBAAqB,GACtB,MAAM,+BAA+B,CAAC;AAEvC,YAAY,EACV,cAAc,EACd,iBAAiB,GAClB,MAAM,gCAAgC,CAAC;AAExC,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { CrossConnectKitProvider } from './components/CrossConnectKitProvider.js';
|
|
2
|
+
export { ConnectButton } from './components/ConnectButton.js';
|
|
3
|
+
export { OtherWalletsModal } from './components/OtherWalletsModal.js';
|
|
4
|
+
export { useCrossConnectKit } from './context/CrossConnectKitContext.js';
|
|
5
|
+
export { useCrossConnectKitTheme, useOptionalCrossConnectKitTheme, } from './context/CrossConnectKitThemeContext.js';
|
|
6
|
+
export { useCrossxEmbeddedInfo } from './hooks/useCrossxEmbeddedInfo.js';
|
|
7
|
+
export { WalletInfo, ConnectorId } from '@nexus-cross/dapp-ui';
|
|
8
|
+
export { AppLauncher, AppLauncherTrigger, AppLauncherContent, useGlobalMenu, } from '@nexus-cross/dapp-ui';
|
|
9
|
+
export { ConnectionStatus, formatBalance, formatWei } from '@nexus-cross/connect-kit-core';
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAGlF,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAO9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAGtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAGzE,OAAO,EACL,uBAAuB,EACvB,+BAA+B,GAChC,MAAM,0CAA0C,CAAC;AAGlD,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAGzE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAQ/D,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,aAAa,GACd,MAAM,sBAAsB,CAAC;AA8B9B,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@nexus-cross/connect-kit-react",
|
|
3
|
+
"version": "1.0.0-beta.1",
|
|
4
|
+
"description": "React components and hooks for @nexus-cross/connect-kit wallet connection",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist"
|
|
16
|
+
],
|
|
17
|
+
"publishConfig": {
|
|
18
|
+
"registry": "https://registry.npmjs.org",
|
|
19
|
+
"access": "public"
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@nexus-cross/connect-kit-core": "1.0.0-beta.1",
|
|
23
|
+
"@nexus-cross/connect-kit-wagmi": "1.0.0-beta.1",
|
|
24
|
+
"@nexus-cross/dapp-ui": "0.0.1"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@types/react": "^19.0.0",
|
|
28
|
+
"@types/react-dom": "^19.0.0"
|
|
29
|
+
},
|
|
30
|
+
"peerDependencies": {
|
|
31
|
+
"@tanstack/react-query": "^5.0.0",
|
|
32
|
+
"react": "^19.0.0",
|
|
33
|
+
"react-dom": "^19.0.0",
|
|
34
|
+
"wagmi": "^2.0.0"
|
|
35
|
+
},
|
|
36
|
+
"license": "MIT",
|
|
37
|
+
"scripts": {
|
|
38
|
+
"build": "tsc",
|
|
39
|
+
"dev": "tsc --watch",
|
|
40
|
+
"test": "echo 'no tests yet'",
|
|
41
|
+
"typecheck": "tsc --noEmit"
|
|
42
|
+
}
|
|
43
|
+
}
|