@tuwaio/nova-connect 1.0.0-fix-test-alpha.60.80c744e → 1.0.0-fix-test-alpha.62.a3a7178

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 CHANGED
@@ -1,28 +1,32 @@
1
- # Satellite Connect React
1
+ # Nova Connect
2
2
 
3
- [![NPM Version](https://img.shields.io/npm/v/@tuwaio/satellite-react.svg)](https://www.npmjs.com/package/@tuwaio/satellite-react)
4
- [![License](https://img.shields.io/npm/l/@tuwaio/satellite-react.svg)](./LICENSE)
5
- [![Build Status](https://img.shields.io/github/actions/workflow/status/TuwaIO/satellite-connect/release.yml?branch=main)](https://github.com/TuwaIO/satellite-connect/actions)
3
+ [![NPM Version](https://img.shields.io/npm/v/@tuwaio/nova-connect.svg)](https://www.npmjs.com/package/@tuwaio/nova-connect)
4
+ [![License](https://img.shields.io/npm/l/@tuwaio/nova-connect.svg)](./LICENSE)
5
+ [![Build Status](https://img.shields.io/github/actions/workflow/status/TuwaIO/nova-uikit/release.yml?branch=main)](https://github.com/TuwaIO/nova-uikit/actions)
6
6
 
7
- React components and hooks for the Satellite Connect ecosystem, providing an easy-to-use interface for integrating Web3 wallet functionality into React applications.
7
+ Feature-rich React components for connecting Web3 wallets with a comprehensive customization system and support for multiple blockchain networks.
8
8
 
9
9
  ---
10
10
 
11
- ## 🏛️ What is `@tuwaio/satellite-react`?
11
+ ## 🏛️ What is `@tuwaio/nova-connect`?
12
12
 
13
- `@tuwaio/satellite-react` is the React integration layer for the Satellite Connect ecosystem. It provides a collection of React hooks and components that make it easy to integrate Web3 wallet functionality into your React applications.
13
+ `@tuwaio/nova-connect` is a comprehensive solution for integrating Web3 wallets into React applications. The package provides ready-to-use components with deep customization and support for both EVM and Solana blockchains.
14
14
 
15
- Built on top of `@tuwaio/satellite-core`, this package offers a seamless developer experience for React applications requiring Web3 wallet integration.
15
+ Built on top of the Satellite Connect ecosystem, Nova Connect offers a unified interface for working with various wallet types and blockchain networks.
16
16
 
17
17
  ---
18
18
 
19
19
  ## ✨ Key Features
20
20
 
21
- - **Type Safety:** Full TypeScript support with proper type definitions
22
- - **Chain Agnostic:** Unified support for both EVM and Solana wallets
23
- - **Modern React:** Built with React 19+ features and best practices
24
- - **Multi-Chain Support:** Seamless integration with multiple blockchain networks
25
- - **State Management:** Zustand-based store for efficient state handling
21
+ - **🎨 Full Customization**: Comprehensive customization system for all components and behaviors.
22
+ - **⚡ TypeScript**: Full TypeScript support with proper type definitions.
23
+ - **🌐 Multi-Blockchain**: Unified support for EVM and Solana wallets.
24
+ - **🔗 Modern React**: Built using React 19+ features and best practices.
25
+ - **🎯 Ready-made Components**: Connection button, modals, network selectors.
26
+ - **♿ Accessibility**: Full ARIA and keyboard navigation support.
27
+ - **🎭 Internationalization**: Support for multiple languages.
28
+ - **🔄 State Management**: Zustand-based store for efficient state management.
29
+ - **📱 Responsiveness**: Mobile-first design.
26
30
 
27
31
  ---
28
32
 
@@ -35,19 +39,21 @@ Built on top of `@tuwaio/satellite-core`, this package offers a seamless develop
35
39
 
36
40
  ```bash
37
41
  # Using pnpm (recommended)
38
- pnpm add @tuwaio/satellite-react @tuwaio/satellite-core @tuwaio/orbit-core @wagmi/core @wallet-standard/react gill react immer zustand
42
+ pnpm add @tuwaio/nova-connect @tuwaio/satellite-core @tuwaio/orbit-core @tuwaio/pulsar-core @tuwaio/satellite-evm @tuwaio/satellite-solana @wagmi/core @wallet-standard/react viem zustand
39
43
 
40
44
  # Using npm
41
- npm install @tuwaio/satellite-react @tuwaio/satellite-core @tuwaio/orbit-core @wagmi/core @wallet-standard/react gill react immer zustand
45
+ npm install @tuwaio/nova-connect @tuwaio/satellite-core @tuwaio/orbit-core @tuwaio/pulsar-core @tuwaio/satellite-evm @tuwaio/satellite-solana @wagmi/core @wallet-standard/react viem zustand
42
46
 
43
47
  # Using yarn
44
- yarn add @tuwaio/satellite-react @tuwaio/satellite-core @tuwaio/orbit-core @wagmi/core @wallet-standard/react gill react immer zustand
45
- ```
46
- ---
48
+ yarn add @tuwaio/nova-connect @tuwaio/satellite-core @tuwaio/orbit-core @tuwaio/pulsar-core @tuwaio/satellite-evm @tuwaio/satellite-solana @wagmi/core @wallet-standard/react viem zustand
49
+ ````
50
+
51
+ -----
47
52
 
48
53
  ## 🚀 Quick Start
49
54
 
50
- ### Basic Setup
55
+ ### Basic Provider Setup
56
+
51
57
  ```tsx
52
58
  import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
53
59
  import { satelliteEVMAdapter } from '@tuwaio/satellite-evm';
@@ -56,17 +62,17 @@ import { initializeSolanaMobileConnectors, satelliteSolanaAdapter } from '@tuwai
56
62
  import { ReactNode } from 'react';
57
63
  import { WagmiProvider } from 'wagmi';
58
64
  import { createWagmiConfig } from '@tuwaio/satellite-evm';
59
- import { Chain, mainnet, sepolia } from 'viem/chains';
65
+ import { Chain, mainnet, polygon, arbitrum } from 'viem/chains';
60
66
 
61
67
  export const appConfig = {
62
- appName: 'Satellite EVM Test App',
68
+ appName: 'My Nova Connect App',
63
69
  };
64
70
 
65
71
  export const solanaRPCUrls = {
66
- devnet: 'https://api.devnet.solana.com',
72
+ mainnet: '[https://api.mainnet-beta.solana.com](https://api.mainnet-beta.solana.com)',
67
73
  };
68
74
 
69
- export const appEVMChains = [mainnet, sepolia] as readonly [Chain, ...Chain[]];
75
+ export const appEVMChains = [mainnet, polygon, arbitrum] as readonly [Chain, ...Chain[]];
70
76
 
71
77
  export const wagmiConfig = createWagmiConfig({
72
78
  ...appConfig,
@@ -75,7 +81,6 @@ export const wagmiConfig = createWagmiConfig({
75
81
  syncConnectedChain: true,
76
82
  });
77
83
 
78
-
79
84
  const queryClient = new QueryClient();
80
85
 
81
86
  initializeSolanaMobileConnectors({
@@ -88,10 +93,10 @@ export function Providers({ children }: { children: ReactNode }) {
88
93
  <WagmiProvider config={wagmiConfig}>
89
94
  <QueryClientProvider client={queryClient}>
90
95
  <SatelliteConnectProvider
91
- adapter={[satelliteEVMAdapter(wagmiConfig), satelliteSolanaAdapter({ rpcUrls: solanaRPCUrls })]}
92
- autoConnect={true}
96
+ adapters={[satelliteEVMAdapter({ wagmiConfig }), satelliteSolanaAdapter()]}
97
+ appName={appConfig.appName}
93
98
  >
94
- <EVMWalletsWatcher wagmiConfig={wagmiConfig} />
99
+ <EVMWalletsWatcher />
95
100
  <SolanaWalletsWatcher />
96
101
  {children}
97
102
  </SatelliteConnectProvider>
@@ -101,29 +106,161 @@ export function Providers({ children }: { children: ReactNode }) {
101
106
  }
102
107
  ```
103
108
 
104
- ### Using Hooks
109
+ ### Using NovaConnectButton
110
+
105
111
  ```tsx
106
- import { useSatelliteConnectStore } from '@tuwaio/satellite-react';
112
+ import { NovaConnectButton } from '@tuwaio/nova-connect';
113
+ import { SatelliteStoreContext } from '@tuwaio/satellite-react';
114
+ import { useContext } from 'react';
107
115
 
108
- function ExampleGettingActiveWalletFromStore() {
109
- const activeWallet = useSatelliteConnectStore((state) => state.activeWallet);
110
- return <div>{activeWallet?.address}</div>
116
+ function App() {
117
+ const store = useContext(SatelliteStoreContext);
118
+
119
+ return (
120
+ <div>
121
+ <NovaConnectButton
122
+ store={store}
123
+ appChains={appEVMChains}
124
+ solanaRPCUrls={solanaRPCUrls}
125
+ withBalance
126
+ withChain
127
+ withImpersonated
128
+ />
129
+ </div>
130
+ );
111
131
  }
112
132
  ```
113
- ---
114
133
 
115
- ### Core Components
134
+ -----
116
135
 
117
- 1. **Store Access**
118
- - `useSatelliteConnectStore`: Access to satellite connect store with full type safety
119
- - Provides access to wallet state, connection methods, and chain management
136
+ ## 🎨 Customization
120
137
 
121
- 2. **Provider Components**
122
- - `SatelliteConnectProvider`: Global context provider with all necessary configurations
123
- - `EVMWalletsWatcher`: EVM wallet connection state management
124
- - `SolanaWalletsWatcher`: Solana wallet connection state management
138
+ Nova Connect provides three levels of customization:
125
139
 
126
- ---
140
+ ### Basic Customization
141
+
142
+ ```tsx
143
+ <NovaConnectButton
144
+ store={store}
145
+ appChains={appEVMChains}
146
+ solanaRPCUrls={solanaRPCUrls}
147
+ className="custom-button"
148
+ labels={{
149
+ connectWallet: 'Connect Wallet',
150
+ disconnect: 'Disconnect',
151
+ }}
152
+ />
153
+ ```
154
+
155
+ ### Advanced Customization
156
+
157
+ ```tsx
158
+ <NovaConnectButton
159
+ store={store}
160
+ appChains={appEVMChains}
161
+ solanaRPCUrls={solanaRPCUrls}
162
+ customization={{
163
+ connectButton: {
164
+ classNames: {
165
+ button: ({ buttonData }) => `btn ${buttonData.isConnected ? 'btn-connected' : 'btn-connect'}`,
166
+ },
167
+ },
168
+ provider: {
169
+ errors: {
170
+ position: 'bottom-right',
171
+ autoClose: 5000,
172
+ },
173
+ },
174
+ }}
175
+ />
176
+ ```
177
+
178
+ ### Full Provider Customization
179
+
180
+ ```tsx
181
+ <NovaConnectButton
182
+ store={store}
183
+ appChains={appEVMChains}
184
+ solanaRPCUrls={solanaRPCUrls}
185
+ customization={{
186
+ provider: {
187
+ // Custom components
188
+ components: {
189
+ ErrorsProvider: CustomErrorsProvider,
190
+ LabelsProvider: CustomLabelsProvider,
191
+ },
192
+ // Label customization
193
+ labels: {
194
+ merge: (defaultLabels, userLabels) => ({ ...defaultLabels, ...userLabels }),
195
+ transform: (mergedLabels, context) => ({
196
+ ...mergedLabels,
197
+ connectWallet: context.isConnected ? 'Reconnect' : 'Connect Wallet',
198
+ }),
199
+ },
200
+ // Lifecycle hooks
201
+ initialization: {
202
+ onConnectionStateChange: (isConnected, wallet, context) => {
203
+ console.log('Connection state changed:', isConnected);
204
+ },
205
+ },
206
+ },
207
+ }}
208
+ />
209
+ ```
210
+
211
+ -----
212
+
213
+ ## 🧩 Key Components
214
+
215
+ ### 1. **NovaConnectButton**
216
+
217
+ - Main component for wallet connection.
218
+ - Built-in support for balance display and network selector.
219
+ - Full customization system.
220
+
221
+ ### 2. **NovaConnectProvider**
222
+
223
+ - Context provider with state management.
224
+ - Customizable error handling.
225
+ - Flexible internationalization system.
226
+
227
+ ### 3. **Hooks**
228
+
229
+ - `useWalletBalance`: Get the wallet balance.
230
+
231
+ -----
232
+
233
+ ## 🌍 Internationalization
234
+
235
+ Nova Connect supports full label customization:
236
+
237
+ ```tsx
238
+ const customLabels = {
239
+ connectWallet: 'Connect Wallet',
240
+ disconnect: 'Disconnect',
241
+ connecting: 'Connecting...',
242
+ connected: 'Connected',
243
+ // ... other labels
244
+ };
245
+
246
+ <NovaConnectButton
247
+ store={store}
248
+ labels={customLabels}
249
+ // ... other props
250
+ />
251
+ ```
252
+
253
+ -----
254
+
255
+ ## ♿ Accessibility
256
+
257
+ Nova Connect fully supports accessibility standards:
258
+
259
+ - ARIA labels and descriptions
260
+ - Keyboard navigation
261
+ - Screen reader support
262
+ - Semantic HTML elements
263
+ - High contrast
127
264
 
128
265
  ## 🤝 Contributing & Support
129
266