signer-test-sdk-react 0.0.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.
Files changed (70) hide show
  1. package/README.md +114 -0
  2. package/dist/src/AbstraxnProvider.d.ts +20 -0
  3. package/dist/src/AbstraxnProvider.js +2213 -0
  4. package/dist/src/AbstraxnProvider.js.map +1 -0
  5. package/dist/src/ConnectButton.css +217 -0
  6. package/dist/src/ConnectButton.d.ts +71 -0
  7. package/dist/src/ConnectButton.js +102 -0
  8. package/dist/src/ConnectButton.js.map +1 -0
  9. package/dist/src/ExternalWalletButtons.css +319 -0
  10. package/dist/src/ExternalWalletButtons.d.ts +56 -0
  11. package/dist/src/ExternalWalletButtons.js +245 -0
  12. package/dist/src/ExternalWalletButtons.js.map +1 -0
  13. package/dist/src/OnboardingUI.d.ts +63 -0
  14. package/dist/src/OnboardingUI.js +66 -0
  15. package/dist/src/OnboardingUI.js.map +1 -0
  16. package/dist/src/WalletModal.css +549 -0
  17. package/dist/src/WalletModal.d.ts +6 -0
  18. package/dist/src/WalletModal.js +89 -0
  19. package/dist/src/WalletModal.js.map +1 -0
  20. package/dist/src/components/OnboardingUI/OnboardingUI.css +727 -0
  21. package/dist/src/components/OnboardingUI/OnboardingUIReact.d.ts +15 -0
  22. package/dist/src/components/OnboardingUI/OnboardingUIReact.js +65 -0
  23. package/dist/src/components/OnboardingUI/OnboardingUIReact.js.map +1 -0
  24. package/dist/src/components/OnboardingUI/OnboardingUIWeb.d.ts +257 -0
  25. package/dist/src/components/OnboardingUI/OnboardingUIWeb.js +3454 -0
  26. package/dist/src/components/OnboardingUI/OnboardingUIWeb.js.map +1 -0
  27. package/dist/src/components/OnboardingUI/components/EmailForm.d.ts +16 -0
  28. package/dist/src/components/OnboardingUI/components/EmailForm.js +19 -0
  29. package/dist/src/components/OnboardingUI/components/EmailForm.js.map +1 -0
  30. package/dist/src/components/OnboardingUI/components/Modal.d.ts +15 -0
  31. package/dist/src/components/OnboardingUI/components/Modal.js +68 -0
  32. package/dist/src/components/OnboardingUI/components/Modal.js.map +1 -0
  33. package/dist/src/components/OnboardingUI/components/OtpForm.d.ts +19 -0
  34. package/dist/src/components/OnboardingUI/components/OtpForm.js +58 -0
  35. package/dist/src/components/OnboardingUI/components/OtpForm.js.map +1 -0
  36. package/dist/src/components/OnboardingUI/components/PasskeyButton.d.ts +14 -0
  37. package/dist/src/components/OnboardingUI/components/PasskeyButton.js +22 -0
  38. package/dist/src/components/OnboardingUI/components/PasskeyButton.js.map +1 -0
  39. package/dist/src/components/OnboardingUI/components/SocialButtons.d.ts +15 -0
  40. package/dist/src/components/OnboardingUI/components/SocialButtons.js +15 -0
  41. package/dist/src/components/OnboardingUI/components/SocialButtons.js.map +1 -0
  42. package/dist/src/components/OnboardingUI/components/index.d.ts +13 -0
  43. package/dist/src/components/OnboardingUI/components/index.js +9 -0
  44. package/dist/src/components/OnboardingUI/components/index.js.map +1 -0
  45. package/dist/src/components/OnboardingUI/hooks/index.d.ts +7 -0
  46. package/dist/src/components/OnboardingUI/hooks/index.js +6 -0
  47. package/dist/src/components/OnboardingUI/hooks/index.js.map +1 -0
  48. package/dist/src/components/OnboardingUI/hooks/useAuthMethods.d.ts +11 -0
  49. package/dist/src/components/OnboardingUI/hooks/useAuthMethods.js +146 -0
  50. package/dist/src/components/OnboardingUI/hooks/useAuthMethods.js.map +1 -0
  51. package/dist/src/components/OnboardingUI/hooks/useOnboarding.d.ts +21 -0
  52. package/dist/src/components/OnboardingUI/hooks/useOnboarding.js +135 -0
  53. package/dist/src/components/OnboardingUI/hooks/useOnboarding.js.map +1 -0
  54. package/dist/src/components/OnboardingUI/index.d.ts +12 -0
  55. package/dist/src/components/OnboardingUI/index.js +15 -0
  56. package/dist/src/components/OnboardingUI/index.js.map +1 -0
  57. package/dist/src/hooks.d.ts +204 -0
  58. package/dist/src/hooks.js +394 -0
  59. package/dist/src/hooks.js.map +1 -0
  60. package/dist/src/index.d.ts +14 -0
  61. package/dist/src/index.js +11 -0
  62. package/dist/src/index.js.map +1 -0
  63. package/dist/src/types.d.ts +181 -0
  64. package/dist/src/types.js +2 -0
  65. package/dist/src/types.js.map +1 -0
  66. package/dist/src/wagmiConfig.d.ts +147 -0
  67. package/dist/src/wagmiConfig.js +81 -0
  68. package/dist/src/wagmiConfig.js.map +1 -0
  69. package/dist/tsconfig.tsbuildinfo +1 -0
  70. package/package.json +68 -0
@@ -0,0 +1,319 @@
1
+ .external-wallet-buttons {
2
+ display: flex;
3
+ flex-direction: column;
4
+ gap: 12px;
5
+ width: 100%;
6
+ }
7
+
8
+ .external-wallet-buttons-list {
9
+ flex-direction: column;
10
+ }
11
+
12
+ .external-wallet-buttons-grid {
13
+ flex-direction: row;
14
+ flex-wrap: wrap;
15
+ }
16
+
17
+ .external-wallet-button {
18
+ display: flex;
19
+ align-items: center;
20
+ justify-content: flex-start;
21
+ gap: 12px;
22
+ padding: 13px 24px;
23
+ font-size: 15px;
24
+ font-weight: 500;
25
+ border: 1.5px solid #e5e7eb;
26
+ border-radius: 12px;
27
+ background-color: #ffffff;
28
+ color: #1f2937;
29
+ cursor: pointer;
30
+ transition: all 0.2s ease;
31
+ width: 100%;
32
+ min-height: 48px;
33
+ position: relative;
34
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
35
+ /* Match onboarding button style */
36
+ }
37
+
38
+ /* Center content only in the initial "Continue with wallet" button */
39
+ .external-wallet-button-initial {
40
+ justify-content: center;
41
+ }
42
+
43
+ .onboarding-theme-light .external-wallet-button {
44
+ background-color: #ffffff;
45
+ border-color: #e5e7eb;
46
+ color: #1f2937;
47
+ }
48
+
49
+ .onboarding-theme-light .external-wallet-button:hover:not(:disabled) {
50
+ background-color: #f9fafb;
51
+ border-color: #d1d5db;
52
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
53
+ transform: translateY(-1px);
54
+ }
55
+
56
+ .onboarding-theme-light .external-wallet-button:active:not(:disabled) {
57
+ background-color: #f3f4f6;
58
+ transform: translateY(0);
59
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
60
+ }
61
+
62
+ /* Dark theme */
63
+ .onboarding-theme-dark .external-wallet-button {
64
+ background-color: #374151;
65
+ border-color: #4b5563;
66
+ color: #ffffff;
67
+ }
68
+
69
+ .onboarding-theme-dark .external-wallet-button:hover:not(:disabled) {
70
+ background-color: #4b5563;
71
+ border-color: #6b7280;
72
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
73
+ transform: translateY(-1px);
74
+ }
75
+
76
+ .onboarding-theme-dark .external-wallet-button:active:not(:disabled) {
77
+ background-color: #4b5563;
78
+ transform: translateY(0);
79
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
80
+ }
81
+
82
+ .external-wallet-button:disabled {
83
+ cursor: not-allowed;
84
+ /* Don't change opacity on disabled to prevent blinking */
85
+ }
86
+
87
+ .external-wallet-button-connected {
88
+ background-color: #f0fdf4;
89
+ border-color: #86efac;
90
+ color: #166534;
91
+ }
92
+
93
+ .external-wallet-button-connected:hover {
94
+ background-color: #dcfce7;
95
+ }
96
+
97
+ .external-wallet-button-icon {
98
+ display: flex;
99
+ align-items: center;
100
+ justify-content: center;
101
+ width: 24px;
102
+ height: 24px;
103
+ flex-shrink: 0;
104
+ /* Prevent icon from blinking */
105
+ position: relative;
106
+ }
107
+
108
+ .external-wallet-button-icon img {
109
+ width: 100%;
110
+ height: 100%;
111
+ object-fit: contain;
112
+ }
113
+
114
+ .external-wallet-button-icon svg {
115
+ width: 100%;
116
+ height: 100%;
117
+ color: currentColor;
118
+ }
119
+
120
+ .external-wallet-icon-svg {
121
+ width: 100%;
122
+ height: 100%;
123
+ }
124
+
125
+ .external-wallet-icon-svg path {
126
+ fill: currentColor;
127
+ }
128
+
129
+ /* Theme-specific icon colors */
130
+ .onboarding-theme-light .external-wallet-button-icon svg {
131
+ color: #1f2937;
132
+ }
133
+
134
+ .onboarding-theme-dark .external-wallet-button-icon svg {
135
+ color: #ffffff;
136
+ }
137
+
138
+ .external-wallet-button-text {
139
+ text-align: left;
140
+ font-weight: 500;
141
+ letter-spacing: -0.01em;
142
+ line-height: 1.5;
143
+ flex: 1;
144
+ }
145
+
146
+ /* Center text only in the initial button */
147
+ .external-wallet-button-initial .external-wallet-button-text {
148
+ text-align: center;
149
+ flex: 0;
150
+ white-space: nowrap;
151
+ }
152
+
153
+ .onboarding-theme-light .external-wallet-button-text {
154
+ color: #1f2937;
155
+ }
156
+
157
+ .onboarding-theme-dark .external-wallet-button-text {
158
+ color: #ffffff;
159
+ }
160
+
161
+ /* Connected state */
162
+ .onboarding-theme-light .external-wallet-button-connected {
163
+ background-color: #f0fdf4;
164
+ border-color: #86efac;
165
+ color: #166534;
166
+ }
167
+
168
+ .onboarding-theme-light .external-wallet-button-connected:hover {
169
+ background-color: #dcfce7;
170
+ }
171
+
172
+ .onboarding-theme-dark .external-wallet-button-connected {
173
+ background-color: #064e3b;
174
+ border-color: #10b981;
175
+ color: #6ee7b7;
176
+ }
177
+
178
+ .onboarding-theme-dark .external-wallet-button-connected:hover {
179
+ background-color: #065f46;
180
+ }
181
+
182
+ /* More wallets modal */
183
+ .external-wallet-modal {
184
+ position: relative;
185
+ width: 100%;
186
+ background: transparent;
187
+ }
188
+
189
+ .external-wallet-modal-header {
190
+ display: flex;
191
+ align-items: center;
192
+ gap: 12px;
193
+ margin-bottom: 16px;
194
+ position: relative;
195
+ }
196
+
197
+ .external-wallet-modal-back {
198
+ display: flex;
199
+ align-items: center;
200
+ justify-content: center;
201
+ width: 32px;
202
+ height: 32px;
203
+ min-width: 32px;
204
+ min-height: 32px;
205
+ border: none;
206
+ background: transparent;
207
+ cursor: pointer;
208
+ border-radius: 8px;
209
+ transition: all 0.2s ease;
210
+ padding: 0;
211
+ flex-shrink: 0;
212
+ z-index: 10;
213
+ position: relative;
214
+ }
215
+
216
+ .onboarding-theme-light .external-wallet-modal-back {
217
+ color: #6b7280;
218
+ }
219
+
220
+ .onboarding-theme-light .external-wallet-modal-back:hover {
221
+ background-color: #f3f4f6;
222
+ color: #1f2937;
223
+ }
224
+
225
+ .onboarding-theme-dark .external-wallet-modal-back {
226
+ color: #9ca3af;
227
+ }
228
+
229
+ .onboarding-theme-dark .external-wallet-modal-back:hover {
230
+ background-color: #4b5563;
231
+ color: #ffffff;
232
+ }
233
+
234
+ .external-wallet-modal-title {
235
+ font-size: 18px;
236
+ font-weight: 600;
237
+ margin: 0;
238
+ flex: 1;
239
+ text-align: center;
240
+ position: absolute;
241
+ left: 50%;
242
+ transform: translateX(-50%);
243
+ width: 100%;
244
+ }
245
+
246
+ .onboarding-theme-light .external-wallet-modal-title {
247
+ color: #1f2937;
248
+ }
249
+
250
+ .onboarding-theme-dark .external-wallet-modal-title {
251
+ color: #ffffff;
252
+ }
253
+
254
+ .external-wallet-button-more {
255
+ /* Same styling as other buttons, but with a different icon */
256
+ }
257
+
258
+ .external-wallet-button-more .external-wallet-button-icon {
259
+ opacity: 0.6;
260
+ }
261
+
262
+ /* WalletConnect Modal z-index fix - ensure it appears above onboarding modal (z-index: 9999) */
263
+ /* WalletConnect v3 uses w3m-* classes */
264
+ w3m-modal,
265
+ w3m-modal-backdrop,
266
+ .w3m-modal,
267
+ .w3m-modal-backdrop,
268
+ #w3m-modal,
269
+ #w3m-modal-backdrop,
270
+ [data-w3m-modal],
271
+ [data-w3m-modal-backdrop] {
272
+ z-index: 10000 !important;
273
+ }
274
+
275
+ /* WalletConnect v2 uses walletconnect-* classes */
276
+ .walletconnect-modal,
277
+ .walletconnect-modal__backdrop,
278
+ .walletconnect-qrcode__base,
279
+ .walletconnect-qrcode-modal,
280
+ #walletconnect-qrcode-modal,
281
+ [class*="walletconnect-modal"],
282
+ [class*="walletconnect-qrcode"] {
283
+ z-index: 10000 !important;
284
+ }
285
+
286
+ /* Ensure WalletConnect overlay appears above onboarding modal */
287
+ .walletconnect-modal__backdrop,
288
+ .w3m-modal-backdrop,
289
+ [class*="walletconnect"] [class*="backdrop"],
290
+ [class*="w3m"] [class*="backdrop"] {
291
+ z-index: 10000 !important;
292
+ }
293
+
294
+ /* WalletConnect container and base elements */
295
+ .walletconnect-modal__container,
296
+ .walletconnect-qrcode__base,
297
+ .w3m-container,
298
+ [class*="walletconnect"] [class*="container"],
299
+ [class*="w3m"] [class*="container"] {
300
+ z-index: 10001 !important;
301
+ }
302
+
303
+ /* WalletConnect QR code modal specifically */
304
+ .walletconnect-qrcode-modal,
305
+ .walletconnect-qrcode__base,
306
+ .w3m-qrcode,
307
+ [class*="walletconnect-qrcode"],
308
+ [class*="w3m-qrcode"] {
309
+ z-index: 10001 !important;
310
+ }
311
+
312
+ /* Additional WalletConnect modal elements */
313
+ div[class*="walletconnect"],
314
+ div[class*="w3m"],
315
+ div[id*="walletconnect"],
316
+ div[id*="w3m"] {
317
+ z-index: 10000 !important;
318
+ }
319
+
@@ -0,0 +1,56 @@
1
+ /**
2
+ * External Wallet Buttons Component
3
+ * Displays buttons to connect external wallets (MetaMask, WalletConnect, etc.)
4
+ */
5
+ import React from 'react';
6
+ import './ExternalWalletButtons.css';
7
+ export interface ExternalWalletButtonsProps {
8
+ /**
9
+ * Show as a list of buttons
10
+ * @default true
11
+ */
12
+ showAsList?: boolean;
13
+ /**
14
+ * Custom className
15
+ */
16
+ className?: string;
17
+ /**
18
+ * Custom styles
19
+ */
20
+ style?: React.CSSProperties;
21
+ /**
22
+ * Callback when wallet is connected
23
+ */
24
+ onConnect?: (connectorId: string, address: string) => void;
25
+ /**
26
+ * Callback when connection fails
27
+ */
28
+ onError?: (error: Error) => void;
29
+ /**
30
+ * Callback when "More wallets" is clicked (to hide email/Google sections)
31
+ */
32
+ onShowMoreWallets?: () => void;
33
+ /**
34
+ * Callback when back button is clicked (to show email/Google sections again)
35
+ */
36
+ onHideMoreWallets?: () => void;
37
+ }
38
+ /**
39
+ * External Wallet Buttons Component
40
+ *
41
+ * @example
42
+ * ```tsx
43
+ * import { ExternalWalletButtons } from '@abstraxn/signer/react';
44
+ *
45
+ * function App() {
46
+ * return (
47
+ * <ExternalWalletButtons
48
+ * onConnect={(connectorId, address) => {
49
+ * console.log('Connected:', connectorId, address);
50
+ * }}
51
+ * />
52
+ * );
53
+ * }
54
+ * ```
55
+ */
56
+ export declare function ExternalWalletButtons({ showAsList, className, style, onConnect, onError, onShowMoreWallets, onHideMoreWallets, }: ExternalWalletButtonsProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,245 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * External Wallet Buttons Component
4
+ * Displays buttons to connect external wallets (MetaMask, WalletConnect, etc.)
5
+ */
6
+ import { useEffect, useRef, useState } from 'react';
7
+ import { useExternalWallet } from './hooks';
8
+ import { useAbstraxnWallet } from './AbstraxnProvider';
9
+ import './ExternalWalletButtons.css';
10
+ /**
11
+ * External Wallet Buttons Component
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * import { ExternalWalletButtons } from '@abstraxn/signer/react';
16
+ *
17
+ * function App() {
18
+ * return (
19
+ * <ExternalWalletButtons
20
+ * onConnect={(connectorId, address) => {
21
+ * console.log('Connected:', connectorId, address);
22
+ * }}
23
+ * />
24
+ * );
25
+ * }
26
+ * ```
27
+ */
28
+ export function ExternalWalletButtons({ showAsList = true, className, style, onConnect, onError, onShowMoreWallets, onHideMoreWallets, }) {
29
+ const { connectExternalWallet, availableConnectors, isExternalWalletConnected, externalWalletAddress, } = useExternalWallet();
30
+ const { uiConfig } = useAbstraxnWallet();
31
+ const theme = uiConfig?.theme || 'light';
32
+ // State to manage modal view (initial vs expanded)
33
+ const [showMoreWallets, setShowMoreWallets] = useState(false);
34
+ // Use local loading state per button to prevent blinking
35
+ const [connectingConnectorId, setConnectingConnectorId] = useState(null);
36
+ // Track last connected address to call onConnect callback
37
+ const lastAddressRef = useRef(null);
38
+ // Call onConnect when external wallet address becomes available
39
+ useEffect(() => {
40
+ if (externalWalletAddress && externalWalletAddress !== lastAddressRef.current && onConnect) {
41
+ lastAddressRef.current = externalWalletAddress;
42
+ // Find which connector was used (injected for MetaMask)
43
+ const connectorId = availableConnectors.find((c) => c.id.includes('injected') || c.id.includes('metamask'))?.id || 'injected';
44
+ onConnect(connectorId, externalWalletAddress);
45
+ }
46
+ }, [externalWalletAddress, onConnect, availableConnectors]);
47
+ // Reset wallet selection state when wallet is connected
48
+ useEffect(() => {
49
+ if (isExternalWalletConnected && showMoreWallets) {
50
+ // Reset to initial view
51
+ setShowMoreWallets(false);
52
+ // Restore email/Google/passkey sections
53
+ if (onHideMoreWallets) {
54
+ onHideMoreWallets();
55
+ }
56
+ }
57
+ }, [isExternalWalletConnected, showMoreWallets, onHideMoreWallets]);
58
+ // Hide/restore social auth buttons when the wallet list is shown
59
+ useEffect(() => {
60
+ const toggleSocial = (show) => {
61
+ const els = document.querySelectorAll('.onboarding-button-social-icon, .onboarding-button-social, .onboarding-social-grid');
62
+ els.forEach((el) => {
63
+ el.style.display = show ? '' : 'none';
64
+ });
65
+ };
66
+ toggleSocial(!showMoreWallets);
67
+ return () => {
68
+ toggleSocial(true);
69
+ };
70
+ }, [showMoreWallets]);
71
+ // Ensure divider stays hidden while on wallet selection screen
72
+ useEffect(() => {
73
+ if (showMoreWallets && onShowMoreWallets) {
74
+ // Ensure all elements (including divider) stay hidden on wallet selection screen
75
+ onShowMoreWallets();
76
+ }
77
+ }, [showMoreWallets, onShowMoreWallets]);
78
+ const handleConnect = async (connectorId) => {
79
+ // Ensure divider stays hidden when clicking a wallet button
80
+ if (showMoreWallets && onShowMoreWallets) {
81
+ onShowMoreWallets();
82
+ }
83
+ // Set local loading state for this specific button
84
+ setConnectingConnectorId(connectorId);
85
+ try {
86
+ // Connect external wallet - this will trigger MetaMask popup
87
+ // NO API calls are made - only wagmi connection
88
+ await connectExternalWallet(connectorId);
89
+ }
90
+ catch (error) {
91
+ // Show error to user
92
+ alert(error instanceof Error ? error.message : 'Failed to connect wallet. Please try again.');
93
+ if (onError) {
94
+ onError(error instanceof Error ? error : new Error('Failed to connect wallet'));
95
+ }
96
+ // Clear loading state immediately on error
97
+ setConnectingConnectorId(null);
98
+ }
99
+ finally {
100
+ // Clear loading state after a short delay to prevent blinking (only if no error)
101
+ setTimeout(() => {
102
+ setConnectingConnectorId(null);
103
+ }, 300);
104
+ }
105
+ };
106
+ if (availableConnectors.length === 0) {
107
+ return null;
108
+ }
109
+ // Map connector IDs to user-friendly names and icons
110
+ const getConnectorInfo = (connectorId, connectorName) => {
111
+ const id = connectorId.toLowerCase();
112
+ const name = connectorName.toLowerCase();
113
+ // WalletConnect
114
+ if (id.includes('walletconnect') || name.includes('walletconnect')) {
115
+ return {
116
+ displayName: 'WalletConnect',
117
+ icon: (_jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("circle", { cx: "12", cy: "12", r: "10", fill: "#3B99FC" }), _jsx("circle", { cx: "12", cy: "12", r: "4.5", fill: "white" }), _jsx("path", { d: "M12 3C6.477 3 2 7.477 2 12C2 16.523 6.477 21 12 21C17.523 21 22 16.523 22 12C22 7.477 17.523 3 12 3Z", fill: "none", stroke: "white", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", opacity: "0.9" }), _jsx("path", { d: "M12 19C7.589 19 4 15.411 4 11C4 6.589 7.589 3 12 3C16.411 3 20 6.589 20 11C20 15.411 16.411 19 12 19Z", fill: "none", stroke: "white", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", opacity: "0.7" })] })),
118
+ };
119
+ }
120
+ // MetaMask (io.metamask or injected with MetaMask detected)
121
+ if (id.includes('io.metamask') || id === 'metamask' || (id.includes('injected') && typeof window !== 'undefined' && window.ethereum?.isMetaMask)) {
122
+ return {
123
+ displayName: 'MetaMask',
124
+ icon: (_jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("path", { d: "M21.5 2L13.5 8.5L15 4L21.5 2Z", fill: "#E2761B" }), _jsx("path", { d: "M2.5 2L10.3 8.6L9 4L2.5 2Z", fill: "#E4761B" }), _jsx("path", { d: "M18.5 16.5L16.5 20L21 21.5L22.5 16.5L18.5 16.5Z", fill: "#E4761B" }), _jsx("path", { d: "M1.5 16.5L3 21.5L7.5 20L5.5 16.5L1.5 16.5Z", fill: "#E4761B" }), _jsx("path", { d: "M7 10.5L5.5 13L10.5 13.5L10 8L7 10.5Z", fill: "#E4761B" }), _jsx("path", { d: "M17 10.5L14 8L13.5 13.5L18.5 13L17 10.5Z", fill: "#E4761B" }), _jsx("path", { d: "M7.5 20L10.5 18.5L8 16.5L7.5 20Z", fill: "#E4761B" }), _jsx("path", { d: "M13.5 18.5L16.5 20L16 16.5L13.5 18.5Z", fill: "#E4761B" })] })),
125
+ };
126
+ }
127
+ // Coinbase Wallet
128
+ if (id.includes('coinbase') || id.includes('com.coinbase.wallet')) {
129
+ return {
130
+ displayName: 'Coinbase Wallet',
131
+ icon: (_jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("rect", { width: "24", height: "24", rx: "12", fill: "#0052FF" }), _jsx("path", { d: "M12 6C8.68629 6 6 8.68629 6 12C6 15.3137 8.68629 18 12 18C15.3137 18 18 15.3137 18 12C18 8.68629 15.3137 6 12 6Z", fill: "white" }), _jsx("path", { d: "M12 8C14.2091 8 16 9.79086 16 12C16 14.2091 14.2091 16 12 16C9.79086 16 8 14.2091 8 12C8 9.79086 9.79086 8 12 8Z", fill: "#0052FF" })] })),
132
+ };
133
+ }
134
+ // Phantom Wallet
135
+ if (id.includes('phantom') || id.includes('app.phantom')) {
136
+ return {
137
+ displayName: 'Phantom',
138
+ icon: (_jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("rect", { width: "24", height: "24", rx: "6", fill: "#AB9FF2" }), _jsx("path", { d: "M12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4Z", fill: "white" }), _jsx("path", { d: "M12 7C9.79086 7 8 8.79086 8 11C8 13.2091 9.79086 15 12 15C14.2091 15 16 13.2091 16 11C16 8.79086 14.2091 7 12 7Z", fill: "#AB9FF2" })] })),
139
+ };
140
+ }
141
+ // Injected connector (generic browser wallet)
142
+ if (id.includes('injected') || name.includes('injected') || name.includes('browser')) {
143
+ // Check if MetaMask is available in the browser
144
+ const ethereum = typeof window !== 'undefined' ? window.ethereum : null;
145
+ const isMetaMask = ethereum?.isMetaMask || ethereum?.providers?.some((p) => p.isMetaMask);
146
+ if (isMetaMask) {
147
+ return {
148
+ displayName: 'MetaMask',
149
+ icon: (_jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("path", { d: "M21.5 2L13.5 8.5L15 4L21.5 2Z", fill: "#E2761B" }), _jsx("path", { d: "M2.5 2L10.3 8.6L9 4L2.5 2Z", fill: "#E4761B" }), _jsx("path", { d: "M18.5 16.5L16.5 20L21 21.5L22.5 16.5L18.5 16.5Z", fill: "#E4761B" }), _jsx("path", { d: "M1.5 16.5L3 21.5L7.5 20L5.5 16.5L1.5 16.5Z", fill: "#E4761B" }), _jsx("path", { d: "M7 10.5L5.5 13L10.5 13.5L10 8L7 10.5Z", fill: "#E4761B" }), _jsx("path", { d: "M17 10.5L14 8L13.5 13.5L18.5 13L17 10.5Z", fill: "#E4761B" }), _jsx("path", { d: "M7.5 20L10.5 18.5L8 16.5L7.5 20Z", fill: "#E4761B" }), _jsx("path", { d: "M13.5 18.5L16.5 20L16 16.5L13.5 18.5Z", fill: "#E4761B" })] })),
150
+ };
151
+ }
152
+ return {
153
+ displayName: 'Browser Wallet',
154
+ icon: (_jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("rect", { width: "24", height: "24", rx: "4", fill: "#E5E7EB" }), _jsx("path", { d: "M12 6C8.68629 6 6 8.68629 6 12C6 15.3137 8.68629 18 12 18C15.3137 18 18 15.3137 18 12C18 8.68629 15.3137 6 12 6Z", fill: "#9CA3AF" })] })),
155
+ };
156
+ }
157
+ // Default: use connector name if available, otherwise "More wallets"
158
+ return {
159
+ displayName: connectorName || 'More wallets',
160
+ icon: (_jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("rect", { width: "24", height: "24", rx: "4", fill: "#E5E7EB" }), _jsx("path", { d: "M12 6C8.68629 6 6 8.68629 6 12C6 15.3137 8.68629 18 12 18C15.3137 18 18 15.3137 18 12C18 8.68629 15.3137 6 12 6Z", fill: "#9CA3AF" })] })),
161
+ };
162
+ };
163
+ const containerClass = `external-wallet-buttons ${showAsList ? 'external-wallet-buttons-list' : 'external-wallet-buttons-grid'} onboarding-theme-${theme} ${className || ''}`;
164
+ // Remove duplicates and sort connectors
165
+ // Priority: WalletConnect first, then MetaMask, then others alphabetically
166
+ const uniqueConnectors = availableConnectors.filter((connector, index, self) => {
167
+ // Remove duplicate injected connectors (keep first one)
168
+ if (connector.id === 'injected') {
169
+ return self.findIndex((c) => c.id === 'injected') === index;
170
+ }
171
+ // Remove duplicate MetaMask connectors (keep io.metamask over injected if both exist)
172
+ if (connector.id === 'io.metamask') {
173
+ return true; // Always keep io.metamask
174
+ }
175
+ if (connector.id === 'injected' && self.some((c) => c.id === 'io.metamask')) {
176
+ // If io.metamask exists, skip injected (they're the same)
177
+ return false;
178
+ }
179
+ return true;
180
+ }).sort((a, b) => {
181
+ // Sort: WalletConnect first, then MetaMask, then others
182
+ const aId = a.id.toLowerCase();
183
+ const bId = b.id.toLowerCase();
184
+ if (aId.includes('walletconnect'))
185
+ return -1;
186
+ if (bId.includes('walletconnect'))
187
+ return 1;
188
+ if (aId.includes('metamask') || aId === 'io.metamask')
189
+ return -1;
190
+ if (bId.includes('metamask') || bId === 'io.metamask')
191
+ return 1;
192
+ // Alphabetical for others
193
+ return a.name.localeCompare(b.name);
194
+ });
195
+ // Filter for initial view: only WalletConnect and MetaMask
196
+ const initialConnectors = uniqueConnectors.filter((connector) => {
197
+ const id = connector.id.toLowerCase();
198
+ const name = connector.name?.toLowerCase() || '';
199
+ return id.includes('walletconnect') ||
200
+ id.includes('metamask') ||
201
+ id.includes('io.metamask') ||
202
+ (id.includes('injected') && typeof window !== 'undefined' && window.ethereum?.isMetaMask);
203
+ });
204
+ // All connectors for the "More wallets" modal (including WalletConnect and MetaMask)
205
+ // This shows ALL available wallets when "More wallets" is clicked
206
+ const moreConnectors = uniqueConnectors;
207
+ // Render a wallet button
208
+ const renderWalletButton = (connector) => {
209
+ const connectorInfo = getConnectorInfo(connector.id, connector.name);
210
+ const isConnecting = connectingConnectorId === connector.id;
211
+ const isConnected = isExternalWalletConnected && externalWalletAddress;
212
+ return (_jsxs("button", { className: "external-wallet-button", onClick: (e) => {
213
+ e.preventDefault();
214
+ e.stopPropagation();
215
+ handleConnect(connector.id);
216
+ }, disabled: !!(isConnecting || isConnected), type: "button", style: {
217
+ opacity: isConnecting ? 0.7 : 1,
218
+ pointerEvents: isConnecting || isConnected ? 'none' : 'auto',
219
+ }, children: [_jsx("span", { className: "external-wallet-button-icon", children: connector.icon ? (_jsx("img", { src: connector.icon, alt: connectorInfo.displayName })) : (connectorInfo.icon) }), _jsx("span", { className: "external-wallet-button-text", children: isConnecting ? 'Connecting...' : connectorInfo.displayName })] }, connector.id));
220
+ };
221
+ // If showing "More wallets" modal
222
+ if (showMoreWallets) {
223
+ return (_jsxs("div", { className: `external-wallet-modal onboarding-theme-${theme}`, children: [_jsxs("div", { className: "external-wallet-modal-header", children: [_jsx("button", { className: "external-wallet-modal-back", onClick: (e) => {
224
+ e.preventDefault();
225
+ e.stopPropagation();
226
+ // Notify parent to show email/Google sections again (restore initial screen)
227
+ if (onHideMoreWallets) {
228
+ onHideMoreWallets();
229
+ }
230
+ // Reset the state to go back to initial view
231
+ setShowMoreWallets(false);
232
+ }, type: "button", "aria-label": "Go back", children: _jsx("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M12.5 15L7.5 10L12.5 5", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }) }), _jsx("h3", { className: "external-wallet-modal-title", children: "Select your wallet" })] }), _jsx("div", { className: containerClass, style: style, children: moreConnectors.map((connector) => renderWalletButton(connector)) })] }));
233
+ }
234
+ // Initial view: Single "Continue with wallets" button
235
+ return (_jsx("div", { className: containerClass, style: style, children: moreConnectors.length > 0 && (_jsxs("button", { className: "external-wallet-button external-wallet-button-initial", onClick: (e) => {
236
+ e.preventDefault();
237
+ e.stopPropagation();
238
+ setShowMoreWallets(true);
239
+ // Notify parent to hide email/Google sections
240
+ if (onShowMoreWallets) {
241
+ onShowMoreWallets();
242
+ }
243
+ }, type: "button", children: [_jsx("span", { className: "external-wallet-button-icon", children: _jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: "external-wallet-icon-svg", children: [_jsx("path", { d: "M19 12C19 12.5523 18.5523 13 18 13C17.4477 13 17 12.5523 17 12C17 11.4477 17.4477 11 18 11C18.5523 11 19 11.4477 19 12Z", fill: "currentColor" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M9.94358 3.25H13.0564C14.8942 3.24998 16.3498 3.24997 17.489 3.40314C18.6614 3.56076 19.6104 3.89288 20.3588 4.64124C21.2831 5.56563 21.5777 6.80363 21.6847 8.41008C22.2619 8.6641 22.6978 9.2013 22.7458 9.88179C22.7501 9.94199 22.75 10.0069 22.75 10.067C22.75 10.0725 22.75 10.0779 22.75 10.0833V13.9167C22.75 13.9221 22.75 13.9275 22.75 13.933C22.75 13.9931 22.7501 14.058 22.7458 14.1182C22.6978 14.7987 22.2619 15.3359 21.6847 15.5899C21.5777 17.1964 21.2831 18.4344 20.3588 19.3588C19.6104 20.1071 18.6614 20.4392 17.489 20.5969C16.3498 20.75 14.8942 20.75 13.0564 20.75H9.94359C8.10583 20.75 6.65019 20.75 5.51098 20.5969C4.33856 20.4392 3.38961 20.1071 2.64124 19.3588C1.89288 18.6104 1.56076 17.6614 1.40314 16.489C1.24997 15.3498 1.24998 13.8942 1.25 12.0564V11.9436C1.24998 10.1058 1.24997 8.65019 1.40314 7.51098C1.56076 6.33856 1.89288 5.38961 2.64124 4.64124C3.38961 3.89288 4.33856 3.56076 5.51098 3.40314C6.65019 3.24997 8.10582 3.24998 9.94358 3.25ZM20.1679 15.75H18.2308C16.0856 15.75 14.25 14.1224 14.25 12C14.25 9.87756 16.0856 8.25 18.2308 8.25H20.1679C20.0541 6.90855 19.7966 6.20043 19.2981 5.7019C18.8749 5.27869 18.2952 5.02502 17.2892 4.88976C16.2615 4.75159 14.9068 4.75 13 4.75H10C8.09318 4.75 6.73851 4.75159 5.71085 4.88976C4.70476 5.02502 4.12511 5.27869 3.7019 5.7019C3.27869 6.12511 3.02502 6.70476 2.88976 7.71085C2.75159 8.73851 2.75 10.0932 2.75 12C2.75 13.9068 2.75159 15.2615 2.88976 16.2892C3.02502 17.2952 3.27869 17.8749 3.7019 18.2981C4.12511 18.7213 4.70476 18.975 5.71085 19.1102C6.73851 19.2484 8.09318 19.25 10 19.25H13C14.9068 19.25 16.2615 19.2484 17.2892 19.1102C18.2952 18.975 18.8749 18.7213 19.2981 18.2981C19.7966 17.7996 20.0541 17.0915 20.1679 15.75ZM5.25 8C5.25 7.58579 5.58579 7.25 6 7.25H10C10.4142 7.25 10.75 7.58579 10.75 8C10.75 8.41421 10.4142 8.75 10 8.75H6C5.58579 8.75 5.25 8.41421 5.25 8ZM20.9235 9.75023C20.9032 9.75001 20.8766 9.75 20.8333 9.75H18.2308C16.8074 9.75 15.75 10.8087 15.75 12C15.75 13.1913 16.8074 14.25 18.2308 14.25H20.8333C20.8766 14.25 20.9032 14.25 20.9235 14.2498C20.936 14.2496 20.9426 14.2495 20.9457 14.2493L20.9479 14.2492C21.1541 14.2367 21.2427 14.0976 21.2495 14.0139C21.2495 14.0139 21.2497 14.0076 21.2498 13.9986C21.25 13.9808 21.25 13.9572 21.25 13.9167V10.0833C21.25 10.0428 21.25 10.0192 21.2498 10.0014C21.2497 9.99238 21.2495 9.98609 21.2495 9.98609C21.2427 9.90242 21.1541 9.7633 20.9479 9.75076C20.9479 9.75076 20.943 9.75043 20.9235 9.75023Z", fill: "currentColor" })] }) }), _jsx("span", { className: "external-wallet-button-text", children: "Continue with wallet" })] })) }));
244
+ }
245
+ //# sourceMappingURL=ExternalWalletButtons.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExternalWalletButtons.js","sourceRoot":"","sources":["../../src/ExternalWalletButtons.tsx"],"names":[],"mappings":";AAAA;;;GAGG;AACH,OAAc,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,6BAA6B,CAAC;AAwCrC;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,qBAAqB,CAAC,EACpC,UAAU,GAAG,IAAI,EACjB,SAAS,EACT,KAAK,EACL,SAAS,EACT,OAAO,EACP,iBAAiB,EACjB,iBAAiB,GACU;IAC3B,MAAM,EACJ,qBAAqB,EACrB,mBAAmB,EACnB,yBAAyB,EACzB,qBAAqB,GACtB,GAAG,iBAAiB,EAAE,CAAC;IAExB,MAAM,EAAE,QAAQ,EAAE,GAAG,iBAAiB,EAAE,CAAC;IACzC,MAAM,KAAK,GAAG,QAAQ,EAAE,KAAK,IAAI,OAAO,CAAC;IAEzC,mDAAmD;IACnD,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG,Q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