@naculus/connect-appkit-ui 0.5.0 → 0.6.0

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.d.cts CHANGED
@@ -1,4 +1,5 @@
1
- import React from 'react';
1
+ import * as React from 'react';
2
+ import React__default from 'react';
2
3
  import { WalletNamespace, EmbeddedWalletAccountView, StorageSecurityReport, PassphraseRequest, Web3ConnectConfig } from '@naculus/connect-appkit-react';
3
4
  import { ClassValue } from 'clsx';
4
5
  import { SiwxResult } from '@naculus/siwx';
@@ -35,7 +36,7 @@ interface ChainSelectorProps {
35
36
  showLabel?: boolean;
36
37
  variant?: "dropdown" | "buttons" | "minimal";
37
38
  }
38
- declare function ChainSelector({ className, showLabel, variant }: ChainSelectorProps): React.JSX.Element | null;
39
+ declare function ChainSelector({ className, showLabel, variant }: ChainSelectorProps): React__default.JSX.Element | null;
39
40
 
40
41
  interface AccountButtonProps {
41
42
  className?: string;
@@ -46,7 +47,7 @@ interface AccountButtonProps {
46
47
  balanceSymbol?: string;
47
48
  onConnect?: () => void;
48
49
  }
49
- declare function AccountButton({ className, showAddress, showBalance, address: externalAddress, balance: externalBalance, balanceSymbol, onConnect, }: AccountButtonProps): React.JSX.Element;
50
+ declare function AccountButton({ className, showAddress, showBalance, address: externalAddress, balance: externalBalance, balanceSymbol, onConnect, }: AccountButtonProps): React__default.JSX.Element;
50
51
 
51
52
  interface AccountSelectorProps {
52
53
  className?: string;
@@ -77,14 +78,14 @@ interface AccountSelectorViewProps extends AccountSelectorProps {
77
78
  * in `canDerive`, and that state is otherwise reachable only by importing an
78
79
  * actual key.
79
80
  */
80
- declare function AccountSelectorView({ className, hideBackfill, onSelect, accounts, activeNamespace, canDerive, setActiveNamespace, backfillAccounts, }: AccountSelectorViewProps): React.JSX.Element | null;
81
+ declare function AccountSelectorView({ className, hideBackfill, onSelect, accounts, activeNamespace, canDerive, setActiveNamespace, backfillAccounts, }: AccountSelectorViewProps): React__default.JSX.Element | null;
81
82
  /**
82
83
  * Lists the embedded wallet's accounts and lets the user choose which signs.
83
84
  *
84
85
  * Renders nothing when there is no embedded wallet, so a consumer can mount
85
86
  * this unconditionally.
86
87
  */
87
- declare function AccountSelector(props: AccountSelectorProps): React.JSX.Element | null;
88
+ declare function AccountSelector(props: AccountSelectorProps): React__default.JSX.Element | null;
88
89
 
89
90
  interface WalletSecurityPanelProps {
90
91
  className?: string;
@@ -139,7 +140,7 @@ interface PassphraseDialogViewProps extends PassphraseDialogProps {
139
140
  * Exported because reaching the retry and create states otherwise means
140
141
  * arranging an actual failed decrypt.
141
142
  */
142
- declare function PassphraseDialogView({ className, request, submit, cancel, }: PassphraseDialogViewProps): React.JSX.Element | null;
143
+ declare function PassphraseDialogView({ className, request, submit, cancel, }: PassphraseDialogViewProps): React__default.JSX.Element | null;
143
144
  /**
144
145
  * Asks for the passphrase that encrypts the embedded wallet on this device.
145
146
  *
@@ -147,7 +148,7 @@ declare function PassphraseDialogView({ className, request, submit, cancel, }: P
147
148
  * blocked on the answer, and nothing at all when the app supplies its own
148
149
  * `encryptionPassphrase` or has encryption off.
149
150
  */
150
- declare function PassphraseDialog(props: PassphraseDialogProps): React.JSX.Element;
151
+ declare function PassphraseDialog(props: PassphraseDialogProps): React__default.JSX.Element;
151
152
 
152
153
  interface PasskeySetupProps {
153
154
  className?: string;
@@ -193,11 +194,11 @@ interface UnlockSnapshot {
193
194
  * unsealed, not yet checked — otherwise needs a real authenticator behaving a
194
195
  * particular way.
195
196
  */
196
- declare function PasskeySetupView({ className, passkeys, unlock, onRegistered, }: PasskeySetupViewProps): React.JSX.Element | null;
197
+ declare function PasskeySetupView({ className, passkeys, unlock, onRegistered, }: PasskeySetupViewProps): React__default.JSX.Element | null;
197
198
  /**
198
199
  * Registers a passkey for the embedded wallet and re-seals its stored record.
199
200
  */
200
- declare function PasskeySetup(props: PasskeySetupProps): React.JSX.Element;
201
+ declare function PasskeySetup(props: PasskeySetupProps): React__default.JSX.Element;
201
202
 
202
203
  /**
203
204
  * Hook that detects if the user is on a mobile device.
@@ -226,49 +227,49 @@ declare function useEIP6963(): UseEIP6963Result;
226
227
  declare function cn(...inputs: ClassValue[]): string;
227
228
 
228
229
  interface ComponentRegistry {
229
- Button?: React.ComponentType<any>;
230
- Card?: React.ComponentType<any>;
231
- Badge?: React.ComponentType<any>;
232
- Switch?: React.ComponentType<any>;
233
- Checkbox?: React.ComponentType<any>;
234
- Tabs?: React.ComponentType<any>;
235
- TabsContent?: React.ComponentType<any>;
236
- TabsList?: React.ComponentType<any>;
237
- TabsTrigger?: React.ComponentType<any>;
238
- DropdownMenu?: React.ComponentType<any>;
239
- Avatar?: React.ComponentType<any>;
240
- Skeleton?: React.ComponentType<any>;
241
- Tooltip?: React.ComponentType<any>;
242
- Popover?: React.ComponentType<any>;
243
- Progress?: React.ComponentType<any>;
244
- Separator?: React.ComponentType<any>;
245
- ScrollArea?: React.ComponentType<any>;
246
- Input?: React.ComponentType<any>;
247
- Select?: React.ComponentType<any>;
248
- Label?: React.ComponentType<any>;
249
- Sheet?: React.ComponentType<any>;
250
- Modal?: React.ComponentType<any>;
251
- Dialog?: React.ComponentType<any>;
252
- DialogContent?: React.ComponentType<any>;
253
- DialogHeader?: React.ComponentType<any>;
254
- DialogTitle?: React.ComponentType<any>;
255
- ConnectButton?: React.ComponentType<any>;
256
- AccountButton?: React.ComponentType<any>;
257
- ChainSelector?: React.ComponentType<any>;
258
- QRCodeModal?: React.ComponentType<any>;
259
- SignInButton?: React.ComponentType<any>;
260
- SeedPhraseBackup?: React.ComponentType<any>;
261
- ErrorBoundary?: React.ComponentType<any>;
262
- AppKit?: React.ComponentType<any>;
263
- AppKitButton?: React.ComponentType<any>;
264
- AppKitChainSelector?: React.ComponentType<any>;
265
- Web3ConnectUI?: React.ComponentType<any>;
230
+ Button?: React__default.ComponentType<any>;
231
+ Card?: React__default.ComponentType<any>;
232
+ Badge?: React__default.ComponentType<any>;
233
+ Switch?: React__default.ComponentType<any>;
234
+ Checkbox?: React__default.ComponentType<any>;
235
+ Tabs?: React__default.ComponentType<any>;
236
+ TabsContent?: React__default.ComponentType<any>;
237
+ TabsList?: React__default.ComponentType<any>;
238
+ TabsTrigger?: React__default.ComponentType<any>;
239
+ DropdownMenu?: React__default.ComponentType<any>;
240
+ Avatar?: React__default.ComponentType<any>;
241
+ Skeleton?: React__default.ComponentType<any>;
242
+ Tooltip?: React__default.ComponentType<any>;
243
+ Popover?: React__default.ComponentType<any>;
244
+ Progress?: React__default.ComponentType<any>;
245
+ Separator?: React__default.ComponentType<any>;
246
+ ScrollArea?: React__default.ComponentType<any>;
247
+ Input?: React__default.ComponentType<any>;
248
+ Select?: React__default.ComponentType<any>;
249
+ Label?: React__default.ComponentType<any>;
250
+ Sheet?: React__default.ComponentType<any>;
251
+ Modal?: React__default.ComponentType<any>;
252
+ Dialog?: React__default.ComponentType<any>;
253
+ DialogContent?: React__default.ComponentType<any>;
254
+ DialogHeader?: React__default.ComponentType<any>;
255
+ DialogTitle?: React__default.ComponentType<any>;
256
+ ConnectButton?: React__default.ComponentType<any>;
257
+ AccountButton?: React__default.ComponentType<any>;
258
+ ChainSelector?: React__default.ComponentType<any>;
259
+ QRCodeModal?: React__default.ComponentType<any>;
260
+ SignInButton?: React__default.ComponentType<any>;
261
+ SeedPhraseBackup?: React__default.ComponentType<any>;
262
+ ErrorBoundary?: React__default.ComponentType<any>;
263
+ AppKit?: React__default.ComponentType<any>;
264
+ AppKitButton?: React__default.ComponentType<any>;
265
+ AppKitChainSelector?: React__default.ComponentType<any>;
266
+ Web3ConnectUI?: React__default.ComponentType<any>;
266
267
  }
267
268
  interface Web3ComponentProviderProps {
268
- children: React.ReactNode;
269
+ children: React__default.ReactNode;
269
270
  components?: ComponentRegistry;
270
271
  }
271
- declare function Web3ComponentProvider({ children, components, }: Web3ComponentProviderProps): React.JSX.Element;
272
+ declare function Web3ComponentProvider({ children, components, }: Web3ComponentProviderProps): React__default.JSX.Element;
272
273
  declare function useComponentRegistry(): ComponentRegistry;
273
274
  declare function useComponent<K extends keyof ComponentRegistry>(name: K): ComponentRegistry[K] | undefined;
274
275
 
@@ -382,12 +383,12 @@ interface ThemeContextValue {
382
383
  toggleDarkMode: () => void;
383
384
  }
384
385
  interface ThemeProviderProps {
385
- children: React.ReactNode;
386
+ children: React__default.ReactNode;
386
387
  theme?: ThemeOverride;
387
388
  defaultDark?: boolean;
388
389
  priority?: ThemePriority;
389
390
  }
390
- declare function ThemeProvider({ children, theme, defaultDark, priority, }: ThemeProviderProps): React.JSX.Element;
391
+ declare function ThemeProvider({ children, theme, defaultDark, priority, }: ThemeProviderProps): React__default.JSX.Element;
391
392
  declare function useTheme(): ThemeContextValue;
392
393
  declare function useThemeVariable(name: ThemeVariableName): string;
393
394
 
@@ -405,9 +406,9 @@ interface WalletConnectContextValue {
405
406
  retryQR: () => void;
406
407
  }
407
408
  interface WalletConnectProviderProps {
408
- children: React.ReactNode;
409
+ children: React__default.ReactNode;
409
410
  }
410
- declare function WalletConnectProvider({ children }: WalletConnectProviderProps): React.JSX.Element;
411
+ declare function WalletConnectProvider({ children }: WalletConnectProviderProps): React__default.JSX.Element;
411
412
  declare function useWalletConnect(): WalletConnectContextValue;
412
413
  declare function useWalletConnectOptional(): WalletConnectContextValue | null;
413
414
 
@@ -425,17 +426,17 @@ interface QRCodeModalProps {
425
426
  description?: string;
426
427
  className?: string;
427
428
  }
428
- declare function QRCodeModal({ uri, open, onClose, onDeepLink, onRetry, status, showDeepLink: explicitShowDeepLink, timeoutMs, title, description, className, }: QRCodeModalProps): React.JSX.Element;
429
+ declare function QRCodeModal({ uri, open, onClose, onDeepLink, onRetry, status, showDeepLink: explicitShowDeepLink, timeoutMs, title, description, className, }: QRCodeModalProps): React__default.JSX.Element;
429
430
 
430
431
  interface ErrorBoundaryProps {
431
- children: React.ReactNode;
432
+ children: React__default.ReactNode;
432
433
  /** Optional custom fallback UI. Receives error and reset callback. */
433
434
  fallback?: (props: {
434
435
  error: Error;
435
436
  reset: () => void;
436
- }) => React.ReactNode;
437
+ }) => React__default.ReactNode;
437
438
  /** Called when an error is caught. Useful for logging. */
438
- onError?: (error: Error, errorInfo: React.ErrorInfo) => void;
439
+ onError?: (error: Error, errorInfo: React__default.ErrorInfo) => void;
439
440
  /** Called after the boundary resets. */
440
441
  onReset?: () => void;
441
442
  /** Called when the user dismisses the error dialog. */
@@ -448,13 +449,13 @@ interface ErrorBoundaryState {
448
449
  error: Error | null;
449
450
  dismissed: boolean;
450
451
  }
451
- declare class ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoundaryState> {
452
+ declare class ErrorBoundary extends React__default.Component<ErrorBoundaryProps, ErrorBoundaryState> {
452
453
  constructor(props: ErrorBoundaryProps);
453
454
  static getDerivedStateFromError(error: Error): ErrorBoundaryState;
454
- componentDidCatch(error: Error, errorInfo: React.ErrorInfo): void;
455
+ componentDidCatch(error: Error, errorInfo: React__default.ErrorInfo): void;
455
456
  handleReset: () => void;
456
457
  handleDismiss: () => void;
457
- render(): React.ReactNode;
458
+ render(): React__default.ReactNode;
458
459
  }
459
460
 
460
461
  interface SignInButtonProps {
@@ -465,9 +466,9 @@ interface SignInButtonProps {
465
466
  error?: Error | null;
466
467
  onSignIn?: () => void;
467
468
  onClearError?: () => void;
468
- children?: React.ReactNode;
469
+ children?: React__default.ReactNode;
469
470
  }
470
- declare function SignInButton({ className, isSignedIn, isSigningIn, result, error, onSignIn, onClearError, children, }: SignInButtonProps): React.JSX.Element;
471
+ declare function SignInButton({ className, isSignedIn, isSigningIn, result, error, onSignIn, onClearError, children, }: SignInButtonProps): React__default.JSX.Element;
471
472
 
472
473
  type DetectionMode = "auto" | "walletconnect" | "eip6963";
473
474
  interface DetectionContextValue {
@@ -476,7 +477,7 @@ interface DetectionContextValue {
476
477
  declare function useDetectionMode(): DetectionContextValue;
477
478
  interface Web3ConnectUIProps {
478
479
  config: Web3ConnectConfig;
479
- children: React.ReactNode;
480
+ children: React__default.ReactNode;
480
481
  autoConnect?: boolean;
481
482
  /** Wallet connection detection mode:
482
483
  * - "walletconnect" (default): Always use WalletConnect relay
@@ -495,7 +496,7 @@ interface Web3ConnectUIProps {
495
496
  */
496
497
  themePriority?: ThemePriority;
497
498
  }
498
- declare function Web3ConnectUI({ config, children, autoConnect, detectionMode, theme, defaultDark, themePriority, }: Web3ConnectUIProps): React.JSX.Element;
499
+ declare function Web3ConnectUI({ config, children, autoConnect, detectionMode, theme, defaultDark, themePriority, }: Web3ConnectUIProps): React__default.JSX.Element;
499
500
 
500
501
  interface SeedPhraseBackupProps {
501
502
  seedPhrase: string;
@@ -509,7 +510,7 @@ interface SeedPhraseBackupProps {
509
510
  open?: boolean;
510
511
  onOpenChange?: (open: boolean) => void;
511
512
  }
512
- declare function SeedPhraseBackup({ seedPhrase, onConfirm, onSkip, onExportPrivateKey, className, wordCount, inline, open, onOpenChange, }: SeedPhraseBackupProps): React.JSX.Element | null;
513
+ declare function SeedPhraseBackup({ seedPhrase, onConfirm, onSkip, onExportPrivateKey, className, wordCount, inline, open, onOpenChange, }: SeedPhraseBackupProps): React__default.JSX.Element | null;
513
514
 
514
515
  interface AppKitProps {
515
516
  projectId: string;
@@ -529,7 +530,7 @@ interface AppKitProps {
529
530
  encryptionKey?: Web3ConnectConfig["encryptionKey"];
530
531
  /** Optional SIWx authentication policy. */
531
532
  siwx?: Web3ConnectConfig["siwx"];
532
- children?: React.ReactNode;
533
+ children?: React__default.ReactNode;
533
534
  className?: string;
534
535
  autoConnect?: boolean;
535
536
  theme?: Web3ConnectUIProps["theme"];
@@ -564,16 +565,16 @@ interface AppKitContextValue {
564
565
  setOpen: (open: boolean) => void;
565
566
  }
566
567
  declare function useAppKit(): AppKitContextValue;
567
- declare function AppKit({ projectId, metadata, enableEmbedded, enablePasskeys, chains, embeddedConfig, encryptionKey, siwx, children, className, autoConnect, theme, defaultDark, themePriority, detectionMode, }: AppKitProps): React.JSX.Element;
568
+ declare function AppKit({ projectId, metadata, enableEmbedded, enablePasskeys, chains, embeddedConfig, encryptionKey, siwx, children, className, autoConnect, theme, defaultDark, themePriority, detectionMode, }: AppKitProps): React__default.JSX.Element;
568
569
  interface AppKitButtonProps {
569
570
  className?: string;
570
571
  }
571
- declare function AppKitButton({ className }: AppKitButtonProps): React.JSX.Element;
572
+ declare function AppKitButton({ className }: AppKitButtonProps): React__default.JSX.Element;
572
573
  interface AppKitChainSelectorProps {
573
574
  className?: string;
574
575
  variant?: "dropdown" | "buttons" | "minimal";
575
576
  }
576
- declare function AppKitChainSelector({ className, variant, }: AppKitChainSelectorProps): React.JSX.Element;
577
+ declare function AppKitChainSelector({ className, variant, }: AppKitChainSelectorProps): React__default.JSX.Element;
577
578
 
578
579
  /**
579
580
  * RouteSelector — UI component for cross-chain route selection.
@@ -645,7 +646,7 @@ interface RouteSelectorProps {
645
646
  /** Optional className overrides */
646
647
  className?: string;
647
648
  }
648
- declare function RouteSelector({ inputToken, outputToken, amount, routes, loading, executing, onRouteSelected, onCancel, successTxHash, error, className, }: RouteSelectorProps): React.JSX.Element;
649
+ declare function RouteSelector({ inputToken, outputToken, amount, routes, loading, executing, onRouteSelected, onCancel, successTxHash, error, className, }: RouteSelectorProps): React__default.JSX.Element;
649
650
 
650
651
  interface SmartWalletToggleProps {
651
652
  isDeployed?: boolean;
@@ -656,7 +657,7 @@ interface SmartWalletToggleProps {
656
657
  onShowSettings?: () => void;
657
658
  onRetry?: () => void;
658
659
  }
659
- declare function SmartWalletToggle({ isDeployed, isDeploying, estimatedGas, error, onUpgrade, onShowSettings, onRetry, }: SmartWalletToggleProps): React.JSX.Element;
660
+ declare function SmartWalletToggle({ isDeployed, isDeploying, estimatedGas, error, onUpgrade, onShowSettings, onRetry, }: SmartWalletToggleProps): React__default.JSX.Element;
660
661
 
661
662
  type AccountType = "simple" | "multi-sig" | "social-recovery";
662
663
  type PaymasterType = "self" | "sponsor" | "erc20" | "custom";
@@ -675,7 +676,7 @@ interface SmartWalletSettingsProps {
675
676
  onSave?: (config: SmartWalletConfig) => void;
676
677
  onBack?: () => void;
677
678
  }
678
- declare function SmartWalletSettings({ currentConfig, onSave, onBack }: SmartWalletSettingsProps): React.JSX.Element;
679
+ declare function SmartWalletSettings({ currentConfig, onSave, onBack }: SmartWalletSettingsProps): React__default.JSX.Element;
679
680
 
680
681
  interface AddressWarningDialogProps {
681
682
  address: string;
@@ -683,7 +684,7 @@ interface AddressWarningDialogProps {
683
684
  onClose: () => void;
684
685
  onProceed?: () => void;
685
686
  }
686
- declare function AddressWarningDialog({ address, open, onClose, onProceed, }: AddressWarningDialogProps): React.JSX.Element | null;
687
+ declare function AddressWarningDialog({ address, open, onClose, onProceed, }: AddressWarningDialogProps): React__default.JSX.Element | null;
687
688
 
688
689
  interface WalletPickerProps {
689
690
  wallets: DiscoveredWallet[];
@@ -691,6 +692,6 @@ interface WalletPickerProps {
691
692
  loading?: boolean;
692
693
  error?: string | null;
693
694
  }
694
- declare function WalletPicker({ wallets, onSelect, loading, error, }: WalletPickerProps): React.JSX.Element;
695
+ declare function WalletPicker({ wallets, onSelect, loading, error, }: WalletPickerProps): React__default.JSX.Element;
695
696
 
696
697
  export { AccountButton, type AccountButtonProps, AccountSelector, type AccountSelectorProps, AccountSelectorView, type AccountSelectorViewProps, type AccountType, AddressWarningDialog, type AddressWarningDialogProps, AppKit, AppKitButton, type AppKitButtonProps, AppKitChainSelector, type AppKitChainSelectorProps, type AppKitContextValue, type AppKitProps, type BundlerPreset, ChainSelector, type ChainSelectorProps, type ComponentRegistry, ConnectButtonAdapter as ConnectButton, type ConnectButtonProps, type DetectionMode, type DiscoveredWallet, ErrorBoundary, type ErrorBoundaryProps, PasskeySetup, type PasskeySetupProps, PasskeySetupView, type PasskeySetupViewProps, PassphraseDialog, type PassphraseDialogProps, PassphraseDialogView, type PassphraseDialogViewProps, type PaymasterType, QRCodeModal, type QRCodeModalProps, type QRCodeModalStatus, type QRStatus, RouteSelector, type RouteSelectorProps, SeedPhraseBackup, type SeedPhraseBackupProps, SignInButton, type SignInButtonProps, type SmartWalletConfig, SmartWalletSettings, type SmartWalletSettingsProps, SmartWalletToggle, type SmartWalletToggleProps, type ThemeOverride, type ThemePriority, ThemeProvider, type ThemeProviderProps, type TokenDisplay, type UnlockSnapshot, type UseEIP6963Result, type WalletConnectContextValue, WalletConnectProvider, type WalletConnectProviderProps, type WalletConnectState, WalletPicker, type WalletPickerProps, WalletSecurityPanel, type WalletSecurityPanelProps, WalletSecurityPanelView, type WalletSecurityPanelViewProps, Web3ComponentProvider, type Web3ComponentProviderProps, Web3ConnectUI, type Web3ConnectUIProps, cn, useAppKit, useComponent, useComponentRegistry, useDetectionMode, useEIP6963, useIsMobile, useTheme, useThemeVariable, useWalletConnect, useWalletConnectOptional };