@tuwaio/nova-connect 1.0.0-fix-test-alpha.58.f75b213 → 1.0.0-fix-test-alpha.59.8fde9e1
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.cjs +3 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2013 -1525
- package/dist/index.d.ts +2013 -1525
- package/dist/index.js +3 -5
- package/dist/index.js.map +1 -1
- package/dist/providers/index.cjs +2 -2
- package/dist/providers/index.cjs.map +1 -1
- package/dist/providers/index.js +2 -2
- package/dist/providers/index.js.map +1 -1
- package/package.json +8 -8
package/dist/index.d.ts
CHANGED
|
@@ -8,7 +8,6 @@ import { TransactionPool, Transaction, TxAdapter } from '@tuwaio/pulsar-core';
|
|
|
8
8
|
import { ISatelliteConnectStore, BaseWallet } from '@tuwaio/satellite-core';
|
|
9
9
|
import { StoreApi } from 'zustand/index';
|
|
10
10
|
import { Dialog, DialogContent, StarsBackground } from '@tuwaio/nova-core';
|
|
11
|
-
import { Connector as Connector$1 } from '@tuwaio/satellite-react';
|
|
12
11
|
|
|
13
12
|
/**
|
|
14
13
|
* @file Highly customizable chain list renderer with comprehensive styling and behavior control.
|
|
@@ -3596,7 +3595,7 @@ type BackButtonProps = {
|
|
|
3596
3595
|
className?: string;
|
|
3597
3596
|
style?: React__default.CSSProperties;
|
|
3598
3597
|
};
|
|
3599
|
-
type TitleProps$
|
|
3598
|
+
type TitleProps$5 = {
|
|
3600
3599
|
title: string;
|
|
3601
3600
|
className?: string;
|
|
3602
3601
|
style?: React__default.CSSProperties;
|
|
@@ -3653,7 +3652,7 @@ type ConnectedModalCustomization = {
|
|
|
3653
3652
|
/** Custom back button component */
|
|
3654
3653
|
BackButton?: ComponentType<BackButtonProps>;
|
|
3655
3654
|
/** Custom title component */
|
|
3656
|
-
Title?: ComponentType<TitleProps$
|
|
3655
|
+
Title?: ComponentType<TitleProps$5>;
|
|
3657
3656
|
/** Custom close button component */
|
|
3658
3657
|
CloseButton?: ComponentType<CloseButtonProps>;
|
|
3659
3658
|
/** Custom main content component */
|
|
@@ -4296,7 +4295,7 @@ type TextContainerProps = {
|
|
|
4296
4295
|
children: React__default.ReactNode;
|
|
4297
4296
|
cardData: ConnectCardData;
|
|
4298
4297
|
} & React__default.RefAttributes<HTMLDivElement>;
|
|
4299
|
-
type TitleProps$
|
|
4298
|
+
type TitleProps$4 = {
|
|
4300
4299
|
className?: string;
|
|
4301
4300
|
style?: React__default.CSSProperties;
|
|
4302
4301
|
children: React__default.ReactNode;
|
|
@@ -4354,7 +4353,7 @@ type ConnectCardCustomization = {
|
|
|
4354
4353
|
/** Custom text container */
|
|
4355
4354
|
TextContainer?: ComponentType<TextContainerProps>;
|
|
4356
4355
|
/** Custom title */
|
|
4357
|
-
Title?: ComponentType<TitleProps$
|
|
4356
|
+
Title?: ComponentType<TitleProps$4>;
|
|
4358
4357
|
/** Custom subtitle */
|
|
4359
4358
|
Subtitle?: ComponentType<SubtitleProps>;
|
|
4360
4359
|
/** Custom info link */
|
|
@@ -4557,360 +4556,568 @@ interface ConnectCardProps {
|
|
|
4557
4556
|
declare const ConnectCard: React__default.NamedExoticComponent<ConnectCardProps & React__default.RefAttributes<HTMLButtonElement>>;
|
|
4558
4557
|
|
|
4559
4558
|
/**
|
|
4560
|
-
*
|
|
4559
|
+
* A custom hook to easily access the i18n labels from any component
|
|
4560
|
+
* within the `NovaConnectLabelsProvider` tree.
|
|
4561
|
+
*
|
|
4562
|
+
* This hook provides type-safe access to all UI labels and automatically
|
|
4563
|
+
* falls back to default English labels if no provider is found.
|
|
4564
|
+
*
|
|
4565
|
+
* @returns {NovaConnectLabels} The complete object of UI labels for the current locale.
|
|
4566
|
+
*
|
|
4567
|
+
* @example
|
|
4568
|
+
* ```typescript
|
|
4569
|
+
* import { useNovaConnectLabels } from './hooks/useNovaConnectLabels';
|
|
4570
|
+
*
|
|
4571
|
+
* function MyComponent() {
|
|
4572
|
+
* const labels = useNovaConnectLabels();
|
|
4573
|
+
*
|
|
4574
|
+
* return (
|
|
4575
|
+
* <div>
|
|
4576
|
+
* <h1>{labels.connectWallet}</h1>
|
|
4577
|
+
* <button>{labels.connect}</button>
|
|
4578
|
+
* <p aria-label={labels.walletBalance}>{formattedBalance}</p>
|
|
4579
|
+
* </div>
|
|
4580
|
+
* );
|
|
4581
|
+
* }
|
|
4582
|
+
* ```
|
|
4583
|
+
*
|
|
4584
|
+
* @example
|
|
4585
|
+
* ```typescript
|
|
4586
|
+
* // Destructuring specific labels for better performance
|
|
4587
|
+
* function ConnectButton() {
|
|
4588
|
+
* const { connectWallet, connecting, connected } = useNovaConnectLabels();
|
|
4589
|
+
*
|
|
4590
|
+
* return (
|
|
4591
|
+
* <button>
|
|
4592
|
+
* {isConnecting ? connecting : isConnected ? connected : connectWallet}
|
|
4593
|
+
* </button>
|
|
4594
|
+
* );
|
|
4595
|
+
* }
|
|
4596
|
+
* ```
|
|
4561
4597
|
*/
|
|
4562
|
-
|
|
4563
|
-
/** Name of the wallet connector */
|
|
4564
|
-
name: string;
|
|
4565
|
-
/** Optional icon for the wallet */
|
|
4566
|
-
icon?: string;
|
|
4567
|
-
/** Array of supported network adapters */
|
|
4568
|
-
adapters: OrbitAdapter[];
|
|
4569
|
-
/** Array of connectors with their associated adapters */
|
|
4570
|
-
connectors: (Connector$1 & {
|
|
4571
|
-
adapter: OrbitAdapter;
|
|
4572
|
-
})[];
|
|
4573
|
-
}
|
|
4598
|
+
declare const useNovaConnectLabels: () => NovaConnectLabels;
|
|
4574
4599
|
|
|
4575
4600
|
/**
|
|
4576
|
-
* @file
|
|
4601
|
+
* @file ConnectorsBlock component with comprehensive customization options and connector group display.
|
|
4577
4602
|
*/
|
|
4578
4603
|
|
|
4579
4604
|
/**
|
|
4580
|
-
*
|
|
4605
|
+
* Connector block data for customization context
|
|
4581
4606
|
*/
|
|
4582
|
-
|
|
4607
|
+
interface ConnectorsBlockData {
|
|
4608
|
+
/** Currently selected network adapter */
|
|
4609
|
+
selectedAdapter: OrbitAdapter | undefined;
|
|
4610
|
+
/** Array of grouped wallet connectors to display */
|
|
4611
|
+
connectors: GroupedConnector[];
|
|
4612
|
+
/** Title text for the connector group */
|
|
4613
|
+
title: string;
|
|
4614
|
+
/** Whether to render the title in bold accent color */
|
|
4615
|
+
isTitleBold: boolean;
|
|
4616
|
+
/** Whether only one network is available */
|
|
4617
|
+
isOnlyOneNetwork: boolean;
|
|
4618
|
+
/** Whether device is touch-enabled */
|
|
4619
|
+
isTouch: boolean;
|
|
4620
|
+
/** Whether there are connectors to display */
|
|
4621
|
+
hasConnectors: boolean;
|
|
4622
|
+
/** Recent wallets data */
|
|
4623
|
+
recentWallets: Record<string, Record<string, boolean>> | null;
|
|
4624
|
+
/** Section ID for accessibility */
|
|
4625
|
+
sectionId: string;
|
|
4626
|
+
}
|
|
4583
4627
|
/**
|
|
4584
|
-
*
|
|
4628
|
+
* Individual connector item data
|
|
4585
4629
|
*/
|
|
4586
|
-
interface
|
|
4587
|
-
/**
|
|
4588
|
-
|
|
4589
|
-
/**
|
|
4590
|
-
|
|
4591
|
-
/**
|
|
4592
|
-
|
|
4593
|
-
/**
|
|
4594
|
-
|
|
4595
|
-
/** Selected adapter */
|
|
4596
|
-
selectedAdapter: OrbitAdapter | undefined;
|
|
4597
|
-
/** Current connector configuration */
|
|
4598
|
-
currentConnector: GroupedConnector$1 | null;
|
|
4599
|
-
/** Whether to show detailed error */
|
|
4600
|
-
showDetailedError: boolean;
|
|
4601
|
-
/** Raw error object */
|
|
4602
|
-
rawError: unknown;
|
|
4630
|
+
interface ConnectorItemData {
|
|
4631
|
+
/** Grouped connector configuration */
|
|
4632
|
+
group: GroupedConnector;
|
|
4633
|
+
/** Formatted wallet name */
|
|
4634
|
+
name: string;
|
|
4635
|
+
/** Whether this wallet was recently used */
|
|
4636
|
+
isRecent: boolean;
|
|
4637
|
+
/** Item index in the list */
|
|
4638
|
+
index: number;
|
|
4603
4639
|
}
|
|
4604
|
-
type ContainerProps$
|
|
4640
|
+
type ContainerProps$8 = {
|
|
4605
4641
|
className?: string;
|
|
4606
4642
|
style?: React__default.CSSProperties;
|
|
4607
4643
|
children: React__default.ReactNode;
|
|
4608
4644
|
role?: string;
|
|
4645
|
+
'aria-labelledby'?: string;
|
|
4609
4646
|
'aria-label'?: string;
|
|
4610
|
-
|
|
4611
|
-
'aria-atomic'?: boolean;
|
|
4612
|
-
statusData: ConnectingStatusData;
|
|
4647
|
+
blockData: ConnectorsBlockData;
|
|
4613
4648
|
} & React__default.RefAttributes<HTMLElement>;
|
|
4614
|
-
type
|
|
4615
|
-
className?: string;
|
|
4616
|
-
style?: React__default.CSSProperties;
|
|
4617
|
-
children: React__default.ReactNode;
|
|
4618
|
-
statusData: ConnectingStatusData;
|
|
4619
|
-
} & React__default.RefAttributes<HTMLDivElement>;
|
|
4620
|
-
type SpinnerProps = {
|
|
4621
|
-
className?: string;
|
|
4622
|
-
style?: React__default.CSSProperties;
|
|
4623
|
-
role?: string;
|
|
4624
|
-
'aria-label'?: string;
|
|
4625
|
-
'aria-describedby'?: string;
|
|
4626
|
-
statusData: ConnectingStatusData;
|
|
4627
|
-
} & React__default.RefAttributes<HTMLDivElement>;
|
|
4628
|
-
type StatusIconProps = {
|
|
4629
|
-
className?: string;
|
|
4630
|
-
style?: React__default.CSSProperties;
|
|
4631
|
-
role?: string;
|
|
4632
|
-
'aria-label'?: string;
|
|
4633
|
-
statusData: ConnectingStatusData;
|
|
4634
|
-
} & React__default.RefAttributes<HTMLDivElement>;
|
|
4635
|
-
type WalletIconContainerProps = {
|
|
4636
|
-
className?: string;
|
|
4637
|
-
style?: React__default.CSSProperties;
|
|
4638
|
-
children: React__default.ReactNode;
|
|
4639
|
-
statusData: ConnectingStatusData;
|
|
4640
|
-
} & React__default.RefAttributes<HTMLDivElement>;
|
|
4641
|
-
type MessageContainerProps = {
|
|
4642
|
-
className?: string;
|
|
4643
|
-
style?: React__default.CSSProperties;
|
|
4644
|
-
children: React__default.ReactNode;
|
|
4645
|
-
statusData: ConnectingStatusData;
|
|
4646
|
-
} & React__default.RefAttributes<HTMLDivElement>;
|
|
4647
|
-
type StatusMessageProps = {
|
|
4649
|
+
type TitleProps$3 = {
|
|
4648
4650
|
className?: string;
|
|
4649
4651
|
style?: React__default.CSSProperties;
|
|
4650
4652
|
children: React__default.ReactNode;
|
|
4651
4653
|
id?: string;
|
|
4652
4654
|
role?: string;
|
|
4653
4655
|
'aria-level'?: number;
|
|
4654
|
-
|
|
4656
|
+
onClick?: () => void;
|
|
4657
|
+
blockData: ConnectorsBlockData;
|
|
4655
4658
|
} & React__default.RefAttributes<HTMLHeadingElement>;
|
|
4656
|
-
type
|
|
4659
|
+
type ConnectorsListProps = {
|
|
4657
4660
|
className?: string;
|
|
4658
4661
|
style?: React__default.CSSProperties;
|
|
4659
4662
|
children: React__default.ReactNode;
|
|
4660
4663
|
role?: string;
|
|
4661
|
-
'aria-
|
|
4662
|
-
|
|
4663
|
-
} & React__default.RefAttributes<
|
|
4664
|
-
type
|
|
4664
|
+
'aria-label'?: string;
|
|
4665
|
+
blockData: ConnectorsBlockData;
|
|
4666
|
+
} & React__default.RefAttributes<HTMLDivElement>;
|
|
4667
|
+
type ConnectorItemProps = {
|
|
4665
4668
|
className?: string;
|
|
4666
4669
|
style?: React__default.CSSProperties;
|
|
4667
4670
|
children: React__default.ReactNode;
|
|
4668
|
-
|
|
4669
|
-
|
|
4670
|
-
|
|
4671
|
+
role?: string;
|
|
4672
|
+
itemData: ConnectorItemData;
|
|
4673
|
+
blockData: ConnectorsBlockData;
|
|
4674
|
+
} & React__default.RefAttributes<HTMLDivElement>;
|
|
4675
|
+
type EmptyStateProps$1 = {
|
|
4671
4676
|
className?: string;
|
|
4672
4677
|
style?: React__default.CSSProperties;
|
|
4678
|
+
children: React__default.ReactNode;
|
|
4673
4679
|
role?: string;
|
|
4674
4680
|
'aria-label'?: string;
|
|
4675
|
-
|
|
4681
|
+
onClick?: () => void;
|
|
4682
|
+
blockData: ConnectorsBlockData;
|
|
4676
4683
|
} & React__default.RefAttributes<HTMLDivElement>;
|
|
4677
4684
|
/**
|
|
4678
|
-
* Customization options for
|
|
4685
|
+
* Customization options for ConnectorsBlock component
|
|
4679
4686
|
*/
|
|
4680
|
-
type
|
|
4687
|
+
type ConnectorsBlockCustomization = {
|
|
4681
4688
|
/** Custom components */
|
|
4682
4689
|
components?: {
|
|
4683
4690
|
/** Custom container wrapper */
|
|
4684
|
-
Container?: ComponentType<ContainerProps$
|
|
4685
|
-
/** Custom
|
|
4686
|
-
|
|
4687
|
-
/** Custom
|
|
4688
|
-
|
|
4689
|
-
/** Custom
|
|
4690
|
-
|
|
4691
|
-
/** Custom
|
|
4692
|
-
|
|
4693
|
-
/** Custom message container */
|
|
4694
|
-
MessageContainer?: ComponentType<MessageContainerProps>;
|
|
4695
|
-
/** Custom status message */
|
|
4696
|
-
StatusMessage?: ComponentType<StatusMessageProps>;
|
|
4697
|
-
/** Custom error message */
|
|
4698
|
-
ErrorMessage?: ComponentType<ErrorMessageProps$2>;
|
|
4699
|
-
/** Custom error details */
|
|
4700
|
-
ErrorDetails?: ComponentType<ErrorDetailsProps>;
|
|
4701
|
-
/** Custom loading placeholder */
|
|
4702
|
-
LoadingPlaceholder?: ComponentType<LoadingPlaceholderProps>;
|
|
4691
|
+
Container?: ComponentType<ContainerProps$8>;
|
|
4692
|
+
/** Custom title component */
|
|
4693
|
+
Title?: ComponentType<TitleProps$3>;
|
|
4694
|
+
/** Custom connectors list */
|
|
4695
|
+
ConnectorsList?: ComponentType<ConnectorsListProps>;
|
|
4696
|
+
/** Custom connector item wrapper */
|
|
4697
|
+
ConnectorItem?: ComponentType<ConnectorItemProps>;
|
|
4698
|
+
/** Custom empty state component */
|
|
4699
|
+
EmptyState?: ComponentType<EmptyStateProps$1>;
|
|
4703
4700
|
};
|
|
4704
4701
|
/** Custom class name generators */
|
|
4705
4702
|
classNames?: {
|
|
4706
4703
|
/** Function to generate container classes */
|
|
4707
4704
|
container?: (params: {
|
|
4708
|
-
|
|
4709
|
-
}) => string;
|
|
4710
|
-
/** Function to generate status container classes */
|
|
4711
|
-
statusContainer?: (params: {
|
|
4712
|
-
statusData: ConnectingStatusData;
|
|
4713
|
-
}) => string;
|
|
4714
|
-
/** Function to generate spinner classes */
|
|
4715
|
-
spinner?: (params: {
|
|
4716
|
-
statusData: ConnectingStatusData;
|
|
4717
|
-
}) => string;
|
|
4718
|
-
/** Function to generate status icon classes */
|
|
4719
|
-
statusIcon?: (params: {
|
|
4720
|
-
statusData: ConnectingStatusData;
|
|
4721
|
-
}) => string;
|
|
4722
|
-
/** Function to generate wallet icon container classes */
|
|
4723
|
-
walletIconContainer?: (params: {
|
|
4724
|
-
statusData: ConnectingStatusData;
|
|
4725
|
-
}) => string;
|
|
4726
|
-
/** Function to generate message container classes */
|
|
4727
|
-
messageContainer?: (params: {
|
|
4728
|
-
statusData: ConnectingStatusData;
|
|
4705
|
+
blockData: ConnectorsBlockData;
|
|
4729
4706
|
}) => string;
|
|
4730
|
-
/** Function to generate
|
|
4731
|
-
|
|
4732
|
-
|
|
4707
|
+
/** Function to generate title classes */
|
|
4708
|
+
title?: (params: {
|
|
4709
|
+
blockData: ConnectorsBlockData;
|
|
4733
4710
|
}) => string;
|
|
4734
|
-
/** Function to generate
|
|
4735
|
-
|
|
4736
|
-
|
|
4711
|
+
/** Function to generate connectors list classes */
|
|
4712
|
+
connectorsList?: (params: {
|
|
4713
|
+
blockData: ConnectorsBlockData;
|
|
4737
4714
|
}) => string;
|
|
4738
|
-
/** Function to generate
|
|
4739
|
-
|
|
4740
|
-
|
|
4715
|
+
/** Function to generate connector item classes */
|
|
4716
|
+
connectorItem?: (params: {
|
|
4717
|
+
itemData: ConnectorItemData;
|
|
4718
|
+
blockData: ConnectorsBlockData;
|
|
4741
4719
|
}) => string;
|
|
4742
|
-
/** Function to generate
|
|
4743
|
-
|
|
4744
|
-
|
|
4720
|
+
/** Function to generate empty state classes */
|
|
4721
|
+
emptyState?: (params: {
|
|
4722
|
+
blockData: ConnectorsBlockData;
|
|
4745
4723
|
}) => string;
|
|
4746
4724
|
};
|
|
4747
4725
|
/** Custom style generators */
|
|
4748
4726
|
styles?: {
|
|
4749
4727
|
/** Function to generate container styles */
|
|
4750
4728
|
container?: (params: {
|
|
4751
|
-
|
|
4752
|
-
}) => React__default.CSSProperties;
|
|
4753
|
-
/** Function to generate status container styles */
|
|
4754
|
-
statusContainer?: (params: {
|
|
4755
|
-
statusData: ConnectingStatusData;
|
|
4729
|
+
blockData: ConnectorsBlockData;
|
|
4756
4730
|
}) => React__default.CSSProperties;
|
|
4757
|
-
/** Function to generate
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
-
}) => React__default.CSSProperties;
|
|
4761
|
-
/** Function to generate status icon styles */
|
|
4762
|
-
statusIcon?: (params: {
|
|
4763
|
-
statusData: ConnectingStatusData;
|
|
4764
|
-
}) => React__default.CSSProperties;
|
|
4765
|
-
/** Function to generate wallet icon container styles */
|
|
4766
|
-
walletIconContainer?: (params: {
|
|
4767
|
-
statusData: ConnectingStatusData;
|
|
4768
|
-
}) => React__default.CSSProperties;
|
|
4769
|
-
/** Function to generate message container styles */
|
|
4770
|
-
messageContainer?: (params: {
|
|
4771
|
-
statusData: ConnectingStatusData;
|
|
4772
|
-
}) => React__default.CSSProperties;
|
|
4773
|
-
/** Function to generate status message styles */
|
|
4774
|
-
statusMessage?: (params: {
|
|
4775
|
-
statusData: ConnectingStatusData;
|
|
4731
|
+
/** Function to generate title styles */
|
|
4732
|
+
title?: (params: {
|
|
4733
|
+
blockData: ConnectorsBlockData;
|
|
4776
4734
|
}) => React__default.CSSProperties;
|
|
4777
|
-
/** Function to generate
|
|
4778
|
-
|
|
4779
|
-
|
|
4735
|
+
/** Function to generate connectors list styles */
|
|
4736
|
+
connectorsList?: (params: {
|
|
4737
|
+
blockData: ConnectorsBlockData;
|
|
4780
4738
|
}) => React__default.CSSProperties;
|
|
4781
|
-
/** Function to generate
|
|
4782
|
-
|
|
4783
|
-
|
|
4739
|
+
/** Function to generate connector item styles */
|
|
4740
|
+
connectorItem?: (params: {
|
|
4741
|
+
itemData: ConnectorItemData;
|
|
4742
|
+
blockData: ConnectorsBlockData;
|
|
4784
4743
|
}) => React__default.CSSProperties;
|
|
4785
|
-
/** Function to generate
|
|
4786
|
-
|
|
4787
|
-
|
|
4744
|
+
/** Function to generate empty state styles */
|
|
4745
|
+
emptyState?: (params: {
|
|
4746
|
+
blockData: ConnectorsBlockData;
|
|
4788
4747
|
}) => React__default.CSSProperties;
|
|
4789
4748
|
};
|
|
4790
4749
|
/** Custom event handlers */
|
|
4791
4750
|
handlers?: {
|
|
4792
|
-
/** Custom
|
|
4793
|
-
|
|
4794
|
-
/** Custom
|
|
4795
|
-
|
|
4796
|
-
/** Custom
|
|
4797
|
-
|
|
4798
|
-
/** Custom handler for connection start */
|
|
4799
|
-
onConnectingStart?: (statusData: ConnectingStatusData) => void;
|
|
4800
|
-
/** Custom cleanup handler called on unmount */
|
|
4801
|
-
onCleanup?: (statusData: ConnectingStatusData) => void;
|
|
4751
|
+
/** Custom connector click handler */
|
|
4752
|
+
onConnectorClick?: (itemData: ConnectorItemData, blockData: ConnectorsBlockData, originalHandler: (group: GroupedConnector) => Promise<void>) => void;
|
|
4753
|
+
/** Custom title click handler */
|
|
4754
|
+
onTitleClick?: (blockData: ConnectorsBlockData) => void;
|
|
4755
|
+
/** Custom empty state action handler */
|
|
4756
|
+
onEmptyStateAction?: (blockData: ConnectorsBlockData) => void;
|
|
4802
4757
|
};
|
|
4803
4758
|
/** Configuration options */
|
|
4804
4759
|
config?: {
|
|
4805
4760
|
/** Custom ARIA labels */
|
|
4806
4761
|
ariaLabels?: {
|
|
4807
|
-
container?: string;
|
|
4808
|
-
|
|
4809
|
-
|
|
4810
|
-
errorIcon?: string;
|
|
4811
|
-
loading?: string;
|
|
4762
|
+
container?: (blockData: ConnectorsBlockData) => string;
|
|
4763
|
+
connectorsList?: (blockData: ConnectorsBlockData) => string;
|
|
4764
|
+
emptyState?: (blockData: ConnectorsBlockData) => string;
|
|
4812
4765
|
};
|
|
4813
|
-
/** Custom
|
|
4814
|
-
|
|
4815
|
-
|
|
4816
|
-
|
|
4766
|
+
/** Custom layout configuration */
|
|
4767
|
+
layout?: {
|
|
4768
|
+
/** Touch device gap between items */
|
|
4769
|
+
touchGap?: string;
|
|
4770
|
+
/** Mouse device gap between items */
|
|
4771
|
+
mouseGap?: string;
|
|
4772
|
+
/** Custom touch layout classes */
|
|
4773
|
+
touchClasses?: string[];
|
|
4774
|
+
/** Custom mouse layout classes */
|
|
4775
|
+
mouseClasses?: string[];
|
|
4817
4776
|
};
|
|
4818
|
-
/**
|
|
4819
|
-
|
|
4820
|
-
|
|
4821
|
-
|
|
4822
|
-
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
|
|
4826
|
-
className?: string;
|
|
4827
|
-
}>;
|
|
4777
|
+
/** Show/hide features */
|
|
4778
|
+
features?: {
|
|
4779
|
+
/** Whether to show empty state */
|
|
4780
|
+
showEmptyState?: boolean;
|
|
4781
|
+
/** Whether to show title when no connectors */
|
|
4782
|
+
showTitleWhenEmpty?: boolean;
|
|
4783
|
+
/** Whether to show recent indicators */
|
|
4784
|
+
showRecentIndicators?: boolean;
|
|
4828
4785
|
};
|
|
4829
4786
|
};
|
|
4787
|
+
/** ConnectCard customization for each connector card */
|
|
4788
|
+
connectCard?: ConnectCardCustomization;
|
|
4830
4789
|
};
|
|
4831
4790
|
/**
|
|
4832
|
-
*
|
|
4791
|
+
* Props for the ConnectorsBlock component
|
|
4833
4792
|
*/
|
|
4834
|
-
interface
|
|
4835
|
-
/** Currently
|
|
4836
|
-
activeConnector: string | undefined;
|
|
4837
|
-
/** Selected orbit adapter for the connection */
|
|
4793
|
+
interface ConnectorsBlockProps extends Pick<ConnectorsSelectionsProps, 'waitForPredict' | 'setIsOpen' | 'setIsConnected' | 'onClick' | 'appChains' | 'solanaRPCUrls'>, Pick<ConnectButtonProps, 'store'> {
|
|
4794
|
+
/** Currently selected network adapter */
|
|
4838
4795
|
selectedAdapter: OrbitAdapter | undefined;
|
|
4839
|
-
/** Array of
|
|
4840
|
-
connectors: GroupedConnector
|
|
4841
|
-
/**
|
|
4842
|
-
|
|
4843
|
-
/**
|
|
4844
|
-
|
|
4845
|
-
/** Whether
|
|
4846
|
-
|
|
4847
|
-
/** Custom CSS classes for styling the container */
|
|
4848
|
-
className?: string;
|
|
4796
|
+
/** Array of grouped wallet connectors to display */
|
|
4797
|
+
connectors: GroupedConnector[];
|
|
4798
|
+
/** Title text for the connector group */
|
|
4799
|
+
title: string;
|
|
4800
|
+
/** Whether to render the title in bold accent color */
|
|
4801
|
+
isTitleBold?: boolean;
|
|
4802
|
+
/** Whether only one network is available */
|
|
4803
|
+
isOnlyOneNetwork?: boolean;
|
|
4849
4804
|
/** Customization options */
|
|
4850
|
-
customization?:
|
|
4805
|
+
customization?: ConnectorsBlockCustomization;
|
|
4851
4806
|
}
|
|
4852
4807
|
/**
|
|
4853
|
-
*
|
|
4808
|
+
* ConnectorsBlock component - Displays a grouped section of wallet connectors with full customization
|
|
4854
4809
|
*
|
|
4855
|
-
* This component
|
|
4856
|
-
* -
|
|
4857
|
-
* -
|
|
4858
|
-
* -
|
|
4859
|
-
* -
|
|
4860
|
-
* -
|
|
4861
|
-
* -
|
|
4862
|
-
* -
|
|
4863
|
-
* - Screen reader announcements for state changes
|
|
4810
|
+
* This component renders a section of wallet connectors with:
|
|
4811
|
+
* - Responsive layout adapting to touch/mouse interfaces
|
|
4812
|
+
* - Support for multi-network wallet selection
|
|
4813
|
+
* - Automatic connection handling for single-network wallets
|
|
4814
|
+
* - Recent wallet indicators and prioritization
|
|
4815
|
+
* - Full accessibility support with proper labeling
|
|
4816
|
+
* - Error handling and connection retry logic
|
|
4817
|
+
* - Complete customization of all child components and styling
|
|
4864
4818
|
*
|
|
4865
|
-
*
|
|
4866
|
-
*
|
|
4819
|
+
* Layout features:
|
|
4820
|
+
* - Touch devices: Horizontal scrolling layout with cards
|
|
4821
|
+
* - Mouse devices: Vertical stacked layout for better readability
|
|
4822
|
+
* - Dynamic title styling based on section importance
|
|
4823
|
+
* - Consistent spacing and visual hierarchy
|
|
4824
|
+
* - Customizable layout parameters and responsive behavior
|
|
4867
4825
|
*
|
|
4868
|
-
*
|
|
4869
|
-
*
|
|
4870
|
-
*
|
|
4871
|
-
*
|
|
4872
|
-
*
|
|
4873
|
-
*
|
|
4874
|
-
* @returns JSX element displaying connection status with visual feedback
|
|
4826
|
+
* Connection flow:
|
|
4827
|
+
* - Single adapter: Direct connection attempt
|
|
4828
|
+
* - Multiple adapters without selection: Triggers network selection
|
|
4829
|
+
* - Selected adapter: Uses specific adapter for connection
|
|
4830
|
+
* - Recent wallets: Visual indicators for previously used wallets
|
|
4831
|
+
* - Error handling with retry mechanisms
|
|
4875
4832
|
*
|
|
4876
|
-
*
|
|
4877
|
-
*
|
|
4878
|
-
*
|
|
4879
|
-
*
|
|
4880
|
-
*
|
|
4881
|
-
*
|
|
4882
|
-
* isConnected={false}
|
|
4883
|
-
* />
|
|
4884
|
-
* ```
|
|
4833
|
+
* Accessibility features:
|
|
4834
|
+
* - Semantic heading structure with proper levels
|
|
4835
|
+
* - Group labeling for related connector sets
|
|
4836
|
+
* - Screen reader friendly section descriptions
|
|
4837
|
+
* - Proper focus management and keyboard navigation
|
|
4838
|
+
* - ARIA live regions for dynamic content updates
|
|
4885
4839
|
*
|
|
4886
|
-
* @example
|
|
4840
|
+
* @example Basic usage
|
|
4887
4841
|
* ```tsx
|
|
4888
|
-
*
|
|
4889
|
-
*
|
|
4890
|
-
*
|
|
4891
|
-
*
|
|
4892
|
-
*
|
|
4893
|
-
*
|
|
4894
|
-
*
|
|
4895
|
-
*
|
|
4842
|
+
* <ConnectorsBlock
|
|
4843
|
+
* selectedAdapter={OrbitAdapter.EVM}
|
|
4844
|
+
* connectors={installedConnectors}
|
|
4845
|
+
* title="Installed"
|
|
4846
|
+
* isTitleBold={true}
|
|
4847
|
+
* isOnlyOneNetwork={false}
|
|
4848
|
+
* onClick={(group) => handleWalletSelection(group)}
|
|
4849
|
+
* appChains={appConfiguration}
|
|
4850
|
+
* solanaRPCUrls={rpcConfig}
|
|
4851
|
+
* store={walletStore}
|
|
4896
4852
|
* />
|
|
4897
4853
|
* ```
|
|
4898
4854
|
*
|
|
4899
|
-
* @example
|
|
4855
|
+
* @example With full customization
|
|
4900
4856
|
* ```tsx
|
|
4901
|
-
*
|
|
4902
|
-
*
|
|
4903
|
-
*
|
|
4904
|
-
*
|
|
4905
|
-
*
|
|
4906
|
-
*
|
|
4857
|
+
* <ConnectorsBlock
|
|
4858
|
+
* selectedAdapter={undefined}
|
|
4859
|
+
* connectors={popularConnectors}
|
|
4860
|
+
* title="Popular"
|
|
4861
|
+
* isTitleBold={false}
|
|
4862
|
+
* isOnlyOneNetwork={true}
|
|
4863
|
+
* onClick={(group) => initiateConnection(group)}
|
|
4864
|
+
* customization={{
|
|
4865
|
+
* components: {
|
|
4866
|
+
* Container: CustomConnectorsContainer,
|
|
4867
|
+
* Title: CustomSectionTitle
|
|
4868
|
+
* },
|
|
4869
|
+
* classNames: {
|
|
4870
|
+
* connectorsList: ({ blockData }) =>
|
|
4871
|
+
* blockData.isTouch ? 'horizontal-scroll' : 'vertical-stack',
|
|
4872
|
+
* connectorItem: ({ itemData, blockData }) =>
|
|
4873
|
+
* itemData.isRecent ? 'recent-connector' : 'standard-connector'
|
|
4874
|
+
* },
|
|
4875
|
+
* handlers: {
|
|
4876
|
+
* onConnectorClick: (itemData, blockData, originalHandler) => {
|
|
4877
|
+
* analytics.track('connector_clicked', { wallet: itemData.name });
|
|
4878
|
+
* originalHandler(itemData.group);
|
|
4879
|
+
* }
|
|
4880
|
+
* },
|
|
4881
|
+
* connectCard: {
|
|
4882
|
+
* classNames: {
|
|
4883
|
+
* container: ({ cardData }) =>
|
|
4884
|
+
* cardData.isRecent ? 'bg-accent' : 'bg-default'
|
|
4885
|
+
* }
|
|
4886
|
+
* }
|
|
4887
|
+
* }}
|
|
4907
4888
|
* />
|
|
4908
4889
|
* ```
|
|
4909
|
-
*
|
|
4910
|
-
* @public
|
|
4911
4890
|
*/
|
|
4912
|
-
declare const
|
|
4891
|
+
declare const ConnectorsBlock: React__default.NamedExoticComponent<ConnectorsBlockProps & React__default.RefAttributes<HTMLElement>>;
|
|
4892
|
+
|
|
4893
|
+
/**
|
|
4894
|
+
* @file ConnectorsSelections component with comprehensive customization options and categorized connector display.
|
|
4895
|
+
*/
|
|
4913
4896
|
|
|
4897
|
+
/**
|
|
4898
|
+
* Connector selections data for customization context
|
|
4899
|
+
*/
|
|
4900
|
+
interface ConnectorsSelectionsData {
|
|
4901
|
+
/** Currently selected network adapter */
|
|
4902
|
+
selectedAdapter: OrbitAdapter | undefined;
|
|
4903
|
+
/** All available connectors */
|
|
4904
|
+
connectors: GroupedConnector[];
|
|
4905
|
+
/** Whether only one network is available */
|
|
4906
|
+
isOnlyOneNetwork: boolean;
|
|
4907
|
+
/** Whether device is touch-enabled */
|
|
4908
|
+
isTouch: boolean;
|
|
4909
|
+
/** Whether impersonated wallet is available */
|
|
4910
|
+
hasImpersonatedConnector: boolean;
|
|
4911
|
+
/** Whether impersonated section should be shown */
|
|
4912
|
+
showImpersonated: boolean;
|
|
4913
|
+
/** Filtered connector groups */
|
|
4914
|
+
connectorGroups: {
|
|
4915
|
+
installed: GroupedConnector[];
|
|
4916
|
+
popular: GroupedConnector[];
|
|
4917
|
+
impersonated?: GroupedConnector;
|
|
4918
|
+
};
|
|
4919
|
+
/** Current labels from i18n */
|
|
4920
|
+
labels: ReturnType<typeof useNovaConnectLabels>;
|
|
4921
|
+
}
|
|
4922
|
+
/**
|
|
4923
|
+
* Impersonate section data
|
|
4924
|
+
*/
|
|
4925
|
+
interface ImpersonateSectionData {
|
|
4926
|
+
/** The impersonated wallet connector */
|
|
4927
|
+
connector: GroupedConnector;
|
|
4928
|
+
/** Whether device is touch-enabled */
|
|
4929
|
+
isTouch: boolean;
|
|
4930
|
+
/** Current labels from i18n */
|
|
4931
|
+
labels: ReturnType<typeof useNovaConnectLabels>;
|
|
4932
|
+
/** Section data for context */
|
|
4933
|
+
sectionsData: ConnectorsSelectionsData;
|
|
4934
|
+
}
|
|
4935
|
+
type ContainerProps$7 = {
|
|
4936
|
+
className?: string;
|
|
4937
|
+
style?: React__default.CSSProperties;
|
|
4938
|
+
children: React__default.ReactNode;
|
|
4939
|
+
role?: string;
|
|
4940
|
+
'aria-label'?: string;
|
|
4941
|
+
selectionsData: ConnectorsSelectionsData;
|
|
4942
|
+
} & React__default.RefAttributes<HTMLDivElement>;
|
|
4943
|
+
type ContentWrapperProps = {
|
|
4944
|
+
className?: string;
|
|
4945
|
+
style?: React__default.CSSProperties;
|
|
4946
|
+
children: React__default.ReactNode;
|
|
4947
|
+
selectionsData: ConnectorsSelectionsData;
|
|
4948
|
+
} & React__default.RefAttributes<HTMLDivElement>;
|
|
4949
|
+
type ConnectorsAreaProps = {
|
|
4950
|
+
className?: string;
|
|
4951
|
+
style?: React__default.CSSProperties;
|
|
4952
|
+
children: React__default.ReactNode;
|
|
4953
|
+
role?: string;
|
|
4954
|
+
'aria-label'?: string;
|
|
4955
|
+
selectionsData: ConnectorsSelectionsData;
|
|
4956
|
+
} & React__default.RefAttributes<HTMLDivElement>;
|
|
4957
|
+
type ImpersonateSectionProps = {
|
|
4958
|
+
className?: string;
|
|
4959
|
+
style?: React__default.CSSProperties;
|
|
4960
|
+
children: React__default.ReactNode;
|
|
4961
|
+
role?: string;
|
|
4962
|
+
'aria-label'?: string;
|
|
4963
|
+
impersonateData: ImpersonateSectionData;
|
|
4964
|
+
selectionsData: ConnectorsSelectionsData;
|
|
4965
|
+
} & React__default.RefAttributes<HTMLDivElement>;
|
|
4966
|
+
type ImpersonateTitleProps = {
|
|
4967
|
+
className?: string;
|
|
4968
|
+
style?: React__default.CSSProperties;
|
|
4969
|
+
children: React__default.ReactNode;
|
|
4970
|
+
impersonateData: ImpersonateSectionData;
|
|
4971
|
+
selectionsData: ConnectorsSelectionsData;
|
|
4972
|
+
} & React__default.RefAttributes<HTMLParagraphElement>;
|
|
4973
|
+
type EmptyStateProps = {
|
|
4974
|
+
className?: string;
|
|
4975
|
+
style?: React__default.CSSProperties;
|
|
4976
|
+
children: React__default.ReactNode;
|
|
4977
|
+
role?: string;
|
|
4978
|
+
'aria-live'?: 'polite' | 'assertive' | 'off';
|
|
4979
|
+
onClick?: () => void;
|
|
4980
|
+
selectionsData: ConnectorsSelectionsData;
|
|
4981
|
+
} & React__default.RefAttributes<HTMLDivElement>;
|
|
4982
|
+
type DisclaimerSectionProps = {
|
|
4983
|
+
className?: string;
|
|
4984
|
+
style?: React__default.CSSProperties;
|
|
4985
|
+
children: React__default.ReactNode;
|
|
4986
|
+
selectionsData: ConnectorsSelectionsData;
|
|
4987
|
+
} & React__default.RefAttributes<HTMLDivElement>;
|
|
4988
|
+
/**
|
|
4989
|
+
* Customization options for ConnectorsSelections component
|
|
4990
|
+
*/
|
|
4991
|
+
type ConnectorsSelectionsCustomization = {
|
|
4992
|
+
/** Custom components */
|
|
4993
|
+
components?: {
|
|
4994
|
+
/** Custom container wrapper */
|
|
4995
|
+
Container?: ComponentType<ContainerProps$7>;
|
|
4996
|
+
/** Custom content wrapper */
|
|
4997
|
+
ContentWrapper?: ComponentType<ContentWrapperProps>;
|
|
4998
|
+
/** Custom connectors area wrapper */
|
|
4999
|
+
ConnectorsArea?: ComponentType<ConnectorsAreaProps>;
|
|
5000
|
+
/** Custom impersonate section */
|
|
5001
|
+
ImpersonateSection?: ComponentType<ImpersonateSectionProps>;
|
|
5002
|
+
/** Custom impersonate title */
|
|
5003
|
+
ImpersonateTitle?: ComponentType<ImpersonateTitleProps>;
|
|
5004
|
+
/** Custom empty state */
|
|
5005
|
+
EmptyState?: ComponentType<EmptyStateProps>;
|
|
5006
|
+
/** Custom disclaimer section */
|
|
5007
|
+
DisclaimerSection?: ComponentType<DisclaimerSectionProps>;
|
|
5008
|
+
};
|
|
5009
|
+
/** Custom class name generators */
|
|
5010
|
+
classNames?: {
|
|
5011
|
+
/** Function to generate container classes */
|
|
5012
|
+
container?: (params: {
|
|
5013
|
+
selectionsData: ConnectorsSelectionsData;
|
|
5014
|
+
}) => string;
|
|
5015
|
+
/** Function to generate content wrapper classes */
|
|
5016
|
+
contentWrapper?: (params: {
|
|
5017
|
+
selectionsData: ConnectorsSelectionsData;
|
|
5018
|
+
}) => string;
|
|
5019
|
+
/** Function to generate connectors area classes */
|
|
5020
|
+
connectorsArea?: (params: {
|
|
5021
|
+
selectionsData: ConnectorsSelectionsData;
|
|
5022
|
+
}) => string;
|
|
5023
|
+
/** Function to generate impersonate section classes */
|
|
5024
|
+
impersonateSection?: (params: {
|
|
5025
|
+
impersonateData: ImpersonateSectionData;
|
|
5026
|
+
selectionsData: ConnectorsSelectionsData;
|
|
5027
|
+
}) => string;
|
|
5028
|
+
/** Function to generate impersonate title classes */
|
|
5029
|
+
impersonateTitle?: (params: {
|
|
5030
|
+
impersonateData: ImpersonateSectionData;
|
|
5031
|
+
selectionsData: ConnectorsSelectionsData;
|
|
5032
|
+
}) => string;
|
|
5033
|
+
/** Function to generate empty state classes */
|
|
5034
|
+
emptyState?: (params: {
|
|
5035
|
+
selectionsData: ConnectorsSelectionsData;
|
|
5036
|
+
}) => string;
|
|
5037
|
+
/** Function to generate disclaimer section classes */
|
|
5038
|
+
disclaimerSection?: (params: {
|
|
5039
|
+
selectionsData: ConnectorsSelectionsData;
|
|
5040
|
+
}) => string;
|
|
5041
|
+
};
|
|
5042
|
+
/** Custom style generators */
|
|
5043
|
+
styles?: {
|
|
5044
|
+
/** Function to generate container styles */
|
|
5045
|
+
container?: (params: {
|
|
5046
|
+
selectionsData: ConnectorsSelectionsData;
|
|
5047
|
+
}) => React__default.CSSProperties;
|
|
5048
|
+
/** Function to generate content wrapper styles */
|
|
5049
|
+
contentWrapper?: (params: {
|
|
5050
|
+
selectionsData: ConnectorsSelectionsData;
|
|
5051
|
+
}) => React__default.CSSProperties;
|
|
5052
|
+
/** Function to generate connectors area styles */
|
|
5053
|
+
connectorsArea?: (params: {
|
|
5054
|
+
selectionsData: ConnectorsSelectionsData;
|
|
5055
|
+
}) => React__default.CSSProperties;
|
|
5056
|
+
/** Function to generate impersonate section styles */
|
|
5057
|
+
impersonateSection?: (params: {
|
|
5058
|
+
impersonateData: ImpersonateSectionData;
|
|
5059
|
+
selectionsData: ConnectorsSelectionsData;
|
|
5060
|
+
}) => React__default.CSSProperties;
|
|
5061
|
+
/** Function to generate impersonate title styles */
|
|
5062
|
+
impersonateTitle?: (params: {
|
|
5063
|
+
impersonateData: ImpersonateSectionData;
|
|
5064
|
+
selectionsData: ConnectorsSelectionsData;
|
|
5065
|
+
}) => React__default.CSSProperties;
|
|
5066
|
+
/** Function to generate empty state styles */
|
|
5067
|
+
emptyState?: (params: {
|
|
5068
|
+
selectionsData: ConnectorsSelectionsData;
|
|
5069
|
+
}) => React__default.CSSProperties;
|
|
5070
|
+
/** Function to generate disclaimer section styles */
|
|
5071
|
+
disclaimerSection?: (params: {
|
|
5072
|
+
selectionsData: ConnectorsSelectionsData;
|
|
5073
|
+
}) => React__default.CSSProperties;
|
|
5074
|
+
};
|
|
5075
|
+
/** Custom event handlers */
|
|
5076
|
+
handlers?: {
|
|
5077
|
+
/** Custom impersonate click handler */
|
|
5078
|
+
onImpersonateClick?: (impersonateData: ImpersonateSectionData, selectionsData: ConnectorsSelectionsData, originalHandler: () => void) => void;
|
|
5079
|
+
/** Custom empty state action handler */
|
|
5080
|
+
onEmptyStateAction?: (selectionsData: ConnectorsSelectionsData) => void;
|
|
5081
|
+
};
|
|
5082
|
+
/** Configuration options */
|
|
5083
|
+
config?: {
|
|
5084
|
+
/** Custom ARIA labels */
|
|
5085
|
+
ariaLabels?: {
|
|
5086
|
+
container?: (selectionsData: ConnectorsSelectionsData) => string;
|
|
5087
|
+
connectorsArea?: (selectionsData: ConnectorsSelectionsData) => string;
|
|
5088
|
+
impersonateSection?: (impersonateData: ImpersonateSectionData) => string;
|
|
5089
|
+
};
|
|
5090
|
+
/** Layout configuration */
|
|
5091
|
+
layout?: {
|
|
5092
|
+
/** Touch device classes for connectors area */
|
|
5093
|
+
touchConnectorsClasses?: string[];
|
|
5094
|
+
/** Mouse device classes for connectors area */
|
|
5095
|
+
mouseConnectorsClasses?: string[];
|
|
5096
|
+
/** Touch device classes for content wrapper */
|
|
5097
|
+
touchContentClasses?: string[];
|
|
5098
|
+
/** Mouse device classes for content wrapper */
|
|
5099
|
+
mouseContentClasses?: string[];
|
|
5100
|
+
};
|
|
5101
|
+
/** Show/hide features */
|
|
5102
|
+
features?: {
|
|
5103
|
+
/** Whether to show empty state */
|
|
5104
|
+
showEmptyState?: boolean;
|
|
5105
|
+
/** Whether to show disclaimer on touch devices */
|
|
5106
|
+
showDisclaimer?: boolean;
|
|
5107
|
+
/** Whether to show impersonate section */
|
|
5108
|
+
showImpersonate?: boolean;
|
|
5109
|
+
};
|
|
5110
|
+
};
|
|
5111
|
+
/** ConnectorsBlock customization for each connector block */
|
|
5112
|
+
connectorsBlock?: {
|
|
5113
|
+
/** Customization for installed connectors block */
|
|
5114
|
+
installed?: ConnectorsBlockCustomization;
|
|
5115
|
+
/** Customization for popular connectors block */
|
|
5116
|
+
popular?: ConnectorsBlockCustomization;
|
|
5117
|
+
};
|
|
5118
|
+
/** ConnectCard customization for impersonate card */
|
|
5119
|
+
impersonateCard?: ConnectCardCustomization;
|
|
5120
|
+
};
|
|
4914
5121
|
/**
|
|
4915
5122
|
* Props for the ConnectorsSelections component
|
|
4916
5123
|
*/
|
|
@@ -4918,9 +5125,9 @@ interface ConnectorsSelectionsProps extends Pick<ConnectButtonProps, 'withImpers
|
|
|
4918
5125
|
/** Currently selected network adapter */
|
|
4919
5126
|
selectedAdapter: OrbitAdapter | undefined;
|
|
4920
5127
|
/** Array of grouped wallet connectors */
|
|
4921
|
-
connectors: GroupedConnector
|
|
5128
|
+
connectors: GroupedConnector[];
|
|
4922
5129
|
/** Click handler for connector selection */
|
|
4923
|
-
onClick: (connector: GroupedConnector
|
|
5130
|
+
onClick: (connector: GroupedConnector) => void;
|
|
4924
5131
|
/** Function to set connection status */
|
|
4925
5132
|
setIsConnected: (value: boolean) => void;
|
|
4926
5133
|
/** Function to control modal open state */
|
|
@@ -4931,6 +5138,8 @@ interface ConnectorsSelectionsProps extends Pick<ConnectButtonProps, 'withImpers
|
|
|
4931
5138
|
setContentType: (contentType: ConnectContentType) => void;
|
|
4932
5139
|
/** Whether only one network is available */
|
|
4933
5140
|
isOnlyOneNetwork?: boolean;
|
|
5141
|
+
/** Customization options */
|
|
5142
|
+
customization?: ConnectorsSelectionsCustomization;
|
|
4934
5143
|
}
|
|
4935
5144
|
/**
|
|
4936
5145
|
* ConnectorsSelections component - Main wallet selection interface with categorized connectors
|
|
@@ -4942,6 +5151,7 @@ interface ConnectorsSelectionsProps extends Pick<ConnectButtonProps, 'withImpers
|
|
|
4942
5151
|
* - Empty state handling for missing connectors
|
|
4943
5152
|
* - Educational content integration for touch devices
|
|
4944
5153
|
* - Full accessibility support with semantic structure
|
|
5154
|
+
* - Complete customization of all child components and styling
|
|
4945
5155
|
*
|
|
4946
5156
|
* Wallet categorization:
|
|
4947
5157
|
* - Installed: Detected browser extension wallets (excluding popular ones)
|
|
@@ -4954,12 +5164,14 @@ interface ConnectorsSelectionsProps extends Pick<ConnectButtonProps, 'withImpers
|
|
|
4954
5164
|
* - Mouse devices: Vertical scrolling with fixed height container
|
|
4955
5165
|
* - Responsive grid adapting to screen size and device capabilities
|
|
4956
5166
|
* - Custom scrollbar styling with NovaCustomScroll class
|
|
5167
|
+
* - Customizable layout parameters and responsive behavior
|
|
4957
5168
|
*
|
|
4958
5169
|
* Empty state handling:
|
|
4959
5170
|
* - Clear error messaging when no connectors found
|
|
4960
5171
|
* - Contextual help text explaining the issue
|
|
4961
5172
|
* - Visual indicators with warning icons
|
|
4962
5173
|
* - Proper error state accessibility
|
|
5174
|
+
* - Customizable empty state content and styling
|
|
4963
5175
|
*
|
|
4964
5176
|
* Accessibility features:
|
|
4965
5177
|
* - Semantic HTML structure with proper headings
|
|
@@ -4967,21 +5179,9 @@ interface ConnectorsSelectionsProps extends Pick<ConnectButtonProps, 'withImpers
|
|
|
4967
5179
|
* - Role-based navigation support
|
|
4968
5180
|
* - Focus management for keyboard users
|
|
4969
5181
|
* - Error states with descriptive messaging
|
|
5182
|
+
* - Customizable ARIA labels and descriptions
|
|
4970
5183
|
*
|
|
4971
|
-
* @
|
|
4972
|
-
* @param connectors - Array of available wallet connectors
|
|
4973
|
-
* @param onClick - Handler for wallet connector selection
|
|
4974
|
-
* @param setIsConnected - Function to update connection status
|
|
4975
|
-
* @param setIsOpen - Function to control modal visibility
|
|
4976
|
-
* @param waitForPredict - Function for connection state prediction
|
|
4977
|
-
* @param setContentType - Function to change modal content
|
|
4978
|
-
* @param withImpersonated - Whether to show impersonation option
|
|
4979
|
-
* @param isOnlyOneNetwork - Whether only one network is available
|
|
4980
|
-
* @param appChains - Configuration for supported blockchain networks
|
|
4981
|
-
* @param solanaRPCUrls - Solana RPC endpoints configuration
|
|
4982
|
-
* @returns JSX element representing the connector selection interface
|
|
4983
|
-
*
|
|
4984
|
-
* @example
|
|
5184
|
+
* @example Basic usage
|
|
4985
5185
|
* ```tsx
|
|
4986
5186
|
* <ConnectorsSelections
|
|
4987
5187
|
* selectedAdapter={OrbitAdapter.EVM}
|
|
@@ -4995,12 +5195,12 @@ interface ConnectorsSelectionsProps extends Pick<ConnectButtonProps, 'withImpers
|
|
|
4995
5195
|
* isOnlyOneNetwork={false}
|
|
4996
5196
|
* appChains={chainConfiguration}
|
|
4997
5197
|
* solanaRPCUrls={solanaConfig}
|
|
5198
|
+
* store={walletStore}
|
|
4998
5199
|
* />
|
|
4999
5200
|
* ```
|
|
5000
5201
|
*
|
|
5001
|
-
* @example
|
|
5202
|
+
* @example With full customization
|
|
5002
5203
|
* ```tsx
|
|
5003
|
-
* // Touch device optimized with educational content
|
|
5004
5204
|
* <ConnectorsSelections
|
|
5005
5205
|
* selectedAdapter={undefined}
|
|
5006
5206
|
* connectors={allConnectors}
|
|
@@ -5011,198 +5211,178 @@ interface ConnectorsSelectionsProps extends Pick<ConnectButtonProps, 'withImpers
|
|
|
5011
5211
|
* setContentType={changeContent}
|
|
5012
5212
|
* withImpersonated={false}
|
|
5013
5213
|
* isOnlyOneNetwork={true}
|
|
5214
|
+
* customization={{
|
|
5215
|
+
* components: {
|
|
5216
|
+
* Container: CustomSelectionsContainer,
|
|
5217
|
+
* EmptyState: CustomEmptyStateComponent
|
|
5218
|
+
* },
|
|
5219
|
+
* classNames: {
|
|
5220
|
+
* connectorsArea: ({ selectionsData }) =>
|
|
5221
|
+
* selectionsData.isTouch ? 'horizontal-scroll' : 'vertical-stack',
|
|
5222
|
+
* impersonateSection: ({ impersonateData }) =>
|
|
5223
|
+
* impersonateData.isTouch ? 'touch-impersonate' : 'mouse-impersonate'
|
|
5224
|
+
* },
|
|
5225
|
+
* handlers: {
|
|
5226
|
+
* onImpersonateClick: (impersonateData, selectionsData, originalHandler) => {
|
|
5227
|
+
* analytics.track('impersonate_clicked');
|
|
5228
|
+
* originalHandler();
|
|
5229
|
+
* }
|
|
5230
|
+
* },
|
|
5231
|
+
* connectorsBlock: {
|
|
5232
|
+
* installed: {
|
|
5233
|
+
* classNames: {
|
|
5234
|
+
* title: () => 'custom-installed-title'
|
|
5235
|
+
* }
|
|
5236
|
+
* }
|
|
5237
|
+
* }
|
|
5238
|
+
* }}
|
|
5014
5239
|
* />
|
|
5015
5240
|
* ```
|
|
5016
|
-
*
|
|
5017
|
-
* @public
|
|
5018
5241
|
*/
|
|
5019
|
-
declare
|
|
5242
|
+
declare const ConnectorsSelections: React__default.NamedExoticComponent<ConnectorsSelectionsProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
5020
5243
|
|
|
5021
5244
|
/**
|
|
5022
|
-
*
|
|
5023
|
-
*/
|
|
5024
|
-
interface ConnectorsBlockProps extends Pick<ConnectorsSelectionsProps, 'waitForPredict' | 'setIsOpen' | 'setIsConnected' | 'onClick' | 'appChains' | 'solanaRPCUrls'>, Pick<ConnectButtonProps, 'store'> {
|
|
5025
|
-
/** Currently selected network adapter */
|
|
5026
|
-
selectedAdapter: OrbitAdapter | undefined;
|
|
5027
|
-
/** Array of grouped wallet connectors to display */
|
|
5028
|
-
connectors: GroupedConnector$1[];
|
|
5029
|
-
/** Title text for the connector group */
|
|
5030
|
-
title: string;
|
|
5031
|
-
/** Whether to render the title in bold accent color */
|
|
5032
|
-
isTitleBold?: boolean;
|
|
5033
|
-
/** Whether only one network is available */
|
|
5034
|
-
isOnlyOneNetwork?: boolean;
|
|
5035
|
-
}
|
|
5036
|
-
/**
|
|
5037
|
-
* ConnectorsBlock component - Displays a grouped section of wallet connectors
|
|
5038
|
-
*
|
|
5039
|
-
* This component renders a section of wallet connectors with:
|
|
5040
|
-
* - Responsive layout adapting to touch/mouse interfaces
|
|
5041
|
-
* - Support for multi-network wallet selection
|
|
5042
|
-
* - Automatic connection handling for single-network wallets
|
|
5043
|
-
* - Recent wallet indicators and prioritization
|
|
5044
|
-
* - Full accessibility support with proper labeling
|
|
5045
|
-
* - Error handling and connection retry logic
|
|
5046
|
-
*
|
|
5047
|
-
* Layout features:
|
|
5048
|
-
* - Touch devices: Horizontal scrolling layout with cards
|
|
5049
|
-
* - Mouse devices: Vertical stacked layout for better readability
|
|
5050
|
-
* - Dynamic title styling based on section importance
|
|
5051
|
-
* - Consistent spacing and visual hierarchy
|
|
5052
|
-
*
|
|
5053
|
-
* Connection flow:
|
|
5054
|
-
* - Single adapter: Direct connection attempt
|
|
5055
|
-
* - Multiple adapters without selection: Triggers network selection
|
|
5056
|
-
* - Selected adapter: Uses specific adapter for connection
|
|
5057
|
-
* - Recent wallets: Visual indicators for previously used wallets
|
|
5058
|
-
*
|
|
5059
|
-
* Accessibility features:
|
|
5060
|
-
* - Semantic heading structure with proper levels
|
|
5061
|
-
* - Group labeling for related connector sets
|
|
5062
|
-
* - Screen reader friendly section descriptions
|
|
5063
|
-
* - Proper focus management and keyboard navigation
|
|
5064
|
-
*
|
|
5065
|
-
* @param selectedAdapter - Currently selected network adapter
|
|
5066
|
-
* @param connectors - Array of grouped wallet connectors
|
|
5067
|
-
* @param title - Section title for the connector group
|
|
5068
|
-
* @param isTitleBold - Whether to style title as accent/important
|
|
5069
|
-
* @param isOnlyOneNetwork - Whether only one network is available
|
|
5070
|
-
* @param waitForPredict - Function to wait for connection prediction
|
|
5071
|
-
* @param setIsOpen - Function to control modal open state
|
|
5072
|
-
* @param setIsConnected - Function to set connection status
|
|
5073
|
-
* @param onClick - Click handler for connector selection
|
|
5074
|
-
* @param appChains - Configuration for supported chains
|
|
5075
|
-
* @param solanaRPCUrls - Solana RPC URL configuration
|
|
5076
|
-
* @returns JSX element representing the connectors block
|
|
5077
|
-
*
|
|
5078
|
-
* @example
|
|
5079
|
-
* ```tsx
|
|
5080
|
-
* <ConnectorsBlock
|
|
5081
|
-
* selectedAdapter={OrbitAdapter.EVM}
|
|
5082
|
-
* connectors={installedConnectors}
|
|
5083
|
-
* title="Installed"
|
|
5084
|
-
* isTitleBold={true}
|
|
5085
|
-
* isOnlyOneNetwork={false}
|
|
5086
|
-
* onClick={(group) => handleWalletSelection(group)}
|
|
5087
|
-
* appChains={appConfiguration}
|
|
5088
|
-
* solanaRPCUrls={rpcConfig}
|
|
5089
|
-
* />
|
|
5090
|
-
* ```
|
|
5091
|
-
*
|
|
5092
|
-
* @example
|
|
5093
|
-
* ```tsx
|
|
5094
|
-
* // Popular wallets section without network selection
|
|
5095
|
-
* <ConnectorsBlock
|
|
5096
|
-
* selectedAdapter={undefined}
|
|
5097
|
-
* connectors={popularConnectors}
|
|
5098
|
-
* title="Popular"
|
|
5099
|
-
* isTitleBold={false}
|
|
5100
|
-
* isOnlyOneNetwork={true}
|
|
5101
|
-
* onClick={(group) => initiateConnection(group)}
|
|
5102
|
-
* appChains={appConfiguration}
|
|
5103
|
-
* solanaRPCUrls={rpcConfig}
|
|
5104
|
-
* />
|
|
5105
|
-
* ```
|
|
5106
|
-
*
|
|
5107
|
-
* @public
|
|
5108
|
-
*/
|
|
5109
|
-
declare function ConnectorsBlock({ selectedAdapter, connectors, solanaRPCUrls, appChains, waitForPredict, setIsConnected, setIsOpen, onClick, title, isTitleBold, isOnlyOneNetwork, store, }: ConnectorsBlockProps): react_jsx_runtime.JSX.Element;
|
|
5110
|
-
|
|
5111
|
-
/**
|
|
5112
|
-
* @file Disclaimer component with comprehensive customization options.
|
|
5245
|
+
* @file GetWallet component with comprehensive customization options and staggered animations.
|
|
5113
5246
|
*/
|
|
5114
5247
|
|
|
5115
5248
|
/**
|
|
5116
|
-
*
|
|
5117
|
-
* Can be either a URL string for external links or a callback function
|
|
5249
|
+
* Configuration for wallet icons in the animation
|
|
5118
5250
|
*/
|
|
5119
|
-
|
|
5120
|
-
|
|
5251
|
+
interface WalletIconConfig {
|
|
5252
|
+
/** Wallet key for Web3Icon component */
|
|
5253
|
+
walletKey: string;
|
|
5254
|
+
/** Position configuration using predefined position classes */
|
|
5255
|
+
position: {
|
|
5256
|
+
/** Top position class (e.g., 'top-[5%]', 'top-4') */
|
|
5257
|
+
top?: string;
|
|
5258
|
+
/** Bottom position class (e.g., 'bottom-[10%]', 'bottom-4') */
|
|
5259
|
+
bottom?: string;
|
|
5260
|
+
/** Left position class (e.g., 'left-[5%]', 'left-4') */
|
|
5261
|
+
left?: string;
|
|
5262
|
+
/** Right position class (e.g., 'right-[10%]', 'right-4') */
|
|
5263
|
+
right?: string;
|
|
5264
|
+
/** Transform classes for centering */
|
|
5265
|
+
transform?: string;
|
|
5266
|
+
};
|
|
5267
|
+
/** Size configuration using predefined size classes */
|
|
5268
|
+
size: {
|
|
5269
|
+
/** Width and height classes for mobile */
|
|
5270
|
+
mobile: {
|
|
5271
|
+
width: string;
|
|
5272
|
+
height: string;
|
|
5273
|
+
};
|
|
5274
|
+
/** Width and height classes for desktop */
|
|
5275
|
+
desktop: {
|
|
5276
|
+
width: string;
|
|
5277
|
+
height: string;
|
|
5278
|
+
};
|
|
5279
|
+
};
|
|
5280
|
+
/** Animation configuration */
|
|
5281
|
+
animation: {
|
|
5282
|
+
/** Animation duration in milliseconds */
|
|
5283
|
+
duration: number;
|
|
5284
|
+
/** Animation delay in milliseconds */
|
|
5285
|
+
delay: number;
|
|
5286
|
+
/** Whether to reverse animation direction */
|
|
5287
|
+
reverse?: boolean;
|
|
5288
|
+
/** Animation easing function */
|
|
5289
|
+
ease?: string;
|
|
5290
|
+
};
|
|
5291
|
+
/** ARIA label for the wallet icon */
|
|
5292
|
+
ariaLabel?: string;
|
|
5293
|
+
}
|
|
5294
|
+
type ContainerProps$6 = {
|
|
5121
5295
|
className?: string;
|
|
5122
5296
|
style?: React__default.CSSProperties;
|
|
5123
5297
|
children: React__default.ReactNode;
|
|
5124
5298
|
role?: string;
|
|
5125
5299
|
'aria-label'?: string;
|
|
5126
|
-
'aria-describedby'?: string;
|
|
5127
5300
|
'data-testid'?: string;
|
|
5128
|
-
|
|
5129
|
-
|
|
5130
|
-
type ContentSectionProps$1 = {
|
|
5301
|
+
} & React__default.RefAttributes<HTMLElement>;
|
|
5302
|
+
type AnimationSectionProps = {
|
|
5131
5303
|
className?: string;
|
|
5132
5304
|
style?: React__default.CSSProperties;
|
|
5133
5305
|
children: React__default.ReactNode;
|
|
5134
5306
|
role?: string;
|
|
5135
|
-
'aria-
|
|
5307
|
+
'aria-label'?: string;
|
|
5136
5308
|
};
|
|
5137
|
-
type
|
|
5138
|
-
id: string;
|
|
5309
|
+
type StarsBackgroundProps = {
|
|
5139
5310
|
className?: string;
|
|
5140
5311
|
style?: React__default.CSSProperties;
|
|
5141
|
-
|
|
5142
|
-
|
|
5143
|
-
'aria-level'?: number;
|
|
5312
|
+
show: boolean;
|
|
5313
|
+
'aria-hidden'?: boolean;
|
|
5144
5314
|
};
|
|
5145
|
-
type
|
|
5146
|
-
id: string;
|
|
5315
|
+
type GradientOverlayProps = {
|
|
5147
5316
|
className?: string;
|
|
5148
5317
|
style?: React__default.CSSProperties;
|
|
5149
|
-
|
|
5150
|
-
role?: string;
|
|
5318
|
+
'aria-hidden'?: boolean;
|
|
5151
5319
|
};
|
|
5152
|
-
type
|
|
5320
|
+
type AnimationWrapperProps = {
|
|
5153
5321
|
className?: string;
|
|
5154
5322
|
style?: React__default.CSSProperties;
|
|
5155
5323
|
children: React__default.ReactNode;
|
|
5156
5324
|
role?: string;
|
|
5157
5325
|
'aria-label'?: string;
|
|
5326
|
+
enableAnimations: boolean;
|
|
5327
|
+
animationDelay?: number;
|
|
5328
|
+
animationDuration?: number;
|
|
5158
5329
|
};
|
|
5159
|
-
type
|
|
5330
|
+
type WalletIconProps = {
|
|
5331
|
+
config: WalletIconConfig;
|
|
5332
|
+
enableAnimations: boolean;
|
|
5333
|
+
className?: string;
|
|
5334
|
+
style?: React__default.CSSProperties;
|
|
5335
|
+
};
|
|
5336
|
+
type ContentSectionProps$1 = {
|
|
5160
5337
|
className?: string;
|
|
5161
5338
|
style?: React__default.CSSProperties;
|
|
5162
5339
|
children: React__default.ReactNode;
|
|
5163
5340
|
role?: string;
|
|
5164
|
-
'aria-label'?: string;
|
|
5165
5341
|
};
|
|
5166
|
-
type
|
|
5167
|
-
action: ButtonAction;
|
|
5168
|
-
children: React__default.ReactNode;
|
|
5169
|
-
'aria-label'?: string;
|
|
5342
|
+
type TitleProps$2 = {
|
|
5170
5343
|
className?: string;
|
|
5171
|
-
'data-testid'?: string;
|
|
5172
5344
|
style?: React__default.CSSProperties;
|
|
5345
|
+
children: React__default.ReactNode;
|
|
5346
|
+
role?: string;
|
|
5347
|
+
'aria-level'?: number;
|
|
5173
5348
|
};
|
|
5174
|
-
type
|
|
5349
|
+
type DescriptionProps$1 = {
|
|
5175
5350
|
className?: string;
|
|
5176
5351
|
style?: React__default.CSSProperties;
|
|
5177
|
-
children
|
|
5178
|
-
'aria-live'?: 'polite' | 'assertive' | 'off';
|
|
5179
|
-
'aria-atomic'?: boolean;
|
|
5352
|
+
children: React__default.ReactNode;
|
|
5180
5353
|
role?: string;
|
|
5181
5354
|
};
|
|
5355
|
+
type ScreenReaderProps = {
|
|
5356
|
+
className?: string;
|
|
5357
|
+
style?: React__default.CSSProperties;
|
|
5358
|
+
children: React__default.ReactNode;
|
|
5359
|
+
};
|
|
5182
5360
|
/**
|
|
5183
|
-
* Customization options for
|
|
5361
|
+
* Customization options for GetWallet component
|
|
5184
5362
|
*/
|
|
5185
|
-
type
|
|
5363
|
+
type GetWalletCustomization = {
|
|
5186
5364
|
/** Custom components */
|
|
5187
5365
|
components?: {
|
|
5188
5366
|
/** Custom container wrapper */
|
|
5189
|
-
Container?: ComponentType<ContainerProps$
|
|
5367
|
+
Container?: ComponentType<ContainerProps$6>;
|
|
5368
|
+
/** Custom animation section */
|
|
5369
|
+
AnimationSection?: ComponentType<AnimationSectionProps>;
|
|
5370
|
+
/** Custom stars background */
|
|
5371
|
+
StarsBackground?: ComponentType<StarsBackgroundProps>;
|
|
5372
|
+
/** Custom gradient overlay */
|
|
5373
|
+
GradientOverlay?: ComponentType<GradientOverlayProps>;
|
|
5374
|
+
/** Custom animation wrapper */
|
|
5375
|
+
AnimationWrapper?: ComponentType<AnimationWrapperProps>;
|
|
5376
|
+
/** Custom wallet icon display */
|
|
5377
|
+
WalletIcon?: ComponentType<WalletIconProps>;
|
|
5190
5378
|
/** Custom content section */
|
|
5191
5379
|
ContentSection?: ComponentType<ContentSectionProps$1>;
|
|
5192
5380
|
/** Custom title component */
|
|
5193
5381
|
Title?: ComponentType<TitleProps$2>;
|
|
5194
5382
|
/** Custom description component */
|
|
5195
5383
|
Description?: ComponentType<DescriptionProps$1>;
|
|
5196
|
-
/** Custom
|
|
5197
|
-
|
|
5198
|
-
/** Custom actions section */
|
|
5199
|
-
Actions?: ComponentType<ActionsProps>;
|
|
5200
|
-
/** Custom link button */
|
|
5201
|
-
LinkButton?: ComponentType<ButtonProps>;
|
|
5202
|
-
/** Custom action button */
|
|
5203
|
-
ActionButton?: ComponentType<ButtonProps>;
|
|
5204
|
-
/** Custom status component */
|
|
5205
|
-
Status?: ComponentType<StatusProps>;
|
|
5384
|
+
/** Custom screen reader component */
|
|
5385
|
+
ScreenReader?: ComponentType<ScreenReaderProps>;
|
|
5206
5386
|
};
|
|
5207
5387
|
/** Custom class name generators */
|
|
5208
5388
|
classNames?: {
|
|
@@ -5210,6 +5390,21 @@ type DisclaimerCustomization = {
|
|
|
5210
5390
|
container?: (params: {
|
|
5211
5391
|
compact: boolean;
|
|
5212
5392
|
}) => string;
|
|
5393
|
+
/** Function to generate animation section classes */
|
|
5394
|
+
animationSection?: (params: {
|
|
5395
|
+
compact: boolean;
|
|
5396
|
+
}) => string;
|
|
5397
|
+
/** Function to generate stars background classes */
|
|
5398
|
+
starsBackground?: () => string;
|
|
5399
|
+
/** Function to generate gradient overlay classes */
|
|
5400
|
+
gradientOverlay?: () => string;
|
|
5401
|
+
/** Function to generate animation wrapper classes */
|
|
5402
|
+
animationWrapper?: () => string;
|
|
5403
|
+
/** Function to generate wallet icon classes */
|
|
5404
|
+
walletIcon?: (params: {
|
|
5405
|
+
config: WalletIconConfig;
|
|
5406
|
+
enableAnimations: boolean;
|
|
5407
|
+
}) => string;
|
|
5213
5408
|
/** Function to generate content section classes */
|
|
5214
5409
|
contentSection?: (params: {
|
|
5215
5410
|
compact: boolean;
|
|
@@ -5220,17 +5415,8 @@ type DisclaimerCustomization = {
|
|
|
5220
5415
|
}) => string;
|
|
5221
5416
|
/** Function to generate description classes */
|
|
5222
5417
|
description?: () => string;
|
|
5223
|
-
/** Function to generate
|
|
5224
|
-
|
|
5225
|
-
/** Function to generate actions classes */
|
|
5226
|
-
actions?: () => string;
|
|
5227
|
-
/** Function to generate button classes */
|
|
5228
|
-
button?: (params: {
|
|
5229
|
-
isLink: boolean;
|
|
5230
|
-
isPrimary: boolean;
|
|
5231
|
-
}) => string;
|
|
5232
|
-
/** Function to generate status classes */
|
|
5233
|
-
status?: () => string;
|
|
5418
|
+
/** Function to generate screen reader classes */
|
|
5419
|
+
screenReader?: () => string;
|
|
5234
5420
|
};
|
|
5235
5421
|
/** Custom style generators */
|
|
5236
5422
|
styles?: {
|
|
@@ -5238,6 +5424,21 @@ type DisclaimerCustomization = {
|
|
|
5238
5424
|
container?: (params: {
|
|
5239
5425
|
compact: boolean;
|
|
5240
5426
|
}) => React__default.CSSProperties;
|
|
5427
|
+
/** Function to generate animation section styles */
|
|
5428
|
+
animationSection?: (params: {
|
|
5429
|
+
compact: boolean;
|
|
5430
|
+
}) => React__default.CSSProperties;
|
|
5431
|
+
/** Function to generate stars background styles */
|
|
5432
|
+
starsBackground?: () => React__default.CSSProperties;
|
|
5433
|
+
/** Function to generate gradient overlay styles */
|
|
5434
|
+
gradientOverlay?: () => React__default.CSSProperties;
|
|
5435
|
+
/** Function to generate animation wrapper styles */
|
|
5436
|
+
animationWrapper?: () => React__default.CSSProperties;
|
|
5437
|
+
/** Function to generate wallet icon styles */
|
|
5438
|
+
walletIcon?: (params: {
|
|
5439
|
+
config: WalletIconConfig;
|
|
5440
|
+
enableAnimations: boolean;
|
|
5441
|
+
}) => React__default.CSSProperties;
|
|
5241
5442
|
/** Function to generate content section styles */
|
|
5242
5443
|
contentSection?: (params: {
|
|
5243
5444
|
compact: boolean;
|
|
@@ -5248,109 +5449,91 @@ type DisclaimerCustomization = {
|
|
|
5248
5449
|
}) => React__default.CSSProperties;
|
|
5249
5450
|
/** Function to generate description styles */
|
|
5250
5451
|
description?: () => React__default.CSSProperties;
|
|
5251
|
-
/** Function to generate
|
|
5252
|
-
|
|
5253
|
-
/** Function to generate actions styles */
|
|
5254
|
-
actions?: () => React__default.CSSProperties;
|
|
5255
|
-
/** Function to generate button styles */
|
|
5256
|
-
button?: (params: {
|
|
5257
|
-
isLink: boolean;
|
|
5258
|
-
isPrimary: boolean;
|
|
5259
|
-
}) => React__default.CSSProperties;
|
|
5260
|
-
/** Function to generate status styles */
|
|
5261
|
-
status?: () => React__default.CSSProperties;
|
|
5452
|
+
/** Function to generate screen reader styles */
|
|
5453
|
+
screenReader?: () => React__default.CSSProperties;
|
|
5262
5454
|
};
|
|
5263
5455
|
/** Custom event handlers */
|
|
5264
5456
|
handlers?: {
|
|
5265
|
-
/** Custom handler for primary button action */
|
|
5266
|
-
onLearnMoreAction?: () => void;
|
|
5267
|
-
/** Custom handler for secondary button action */
|
|
5268
|
-
onListAction?: () => void;
|
|
5269
5457
|
/** Custom handler for component mount */
|
|
5270
5458
|
onMount?: () => void;
|
|
5271
5459
|
/** Custom handler for component unmount */
|
|
5272
5460
|
onUnmount?: () => void;
|
|
5461
|
+
/** Custom handler for animation start */
|
|
5462
|
+
onAnimationStart?: () => void;
|
|
5463
|
+
/** Custom handler for animation complete */
|
|
5464
|
+
onAnimationComplete?: () => void;
|
|
5273
5465
|
};
|
|
5274
5466
|
/** Configuration options */
|
|
5275
5467
|
config?: {
|
|
5276
|
-
/** Custom button labels */
|
|
5277
|
-
buttonLabels?: {
|
|
5278
|
-
learnMore?: string;
|
|
5279
|
-
listAction?: string;
|
|
5280
|
-
};
|
|
5281
5468
|
/** Custom ARIA labels */
|
|
5282
5469
|
ariaLabels?: {
|
|
5283
5470
|
container?: string;
|
|
5471
|
+
animationSection?: string;
|
|
5472
|
+
animationWrapper?: string;
|
|
5284
5473
|
contentSection?: string;
|
|
5285
|
-
|
|
5286
|
-
|
|
5474
|
+
};
|
|
5475
|
+
/** Animation configuration overrides */
|
|
5476
|
+
animation?: {
|
|
5477
|
+
/** Global animation duration multiplier */
|
|
5478
|
+
durationMultiplier?: number;
|
|
5479
|
+
/** Global animation delay multiplier */
|
|
5480
|
+
delayMultiplier?: number;
|
|
5481
|
+
/** Default easing function */
|
|
5482
|
+
defaultEase?: string;
|
|
5287
5483
|
};
|
|
5288
5484
|
};
|
|
5289
5485
|
};
|
|
5290
5486
|
/**
|
|
5291
|
-
* Props for the
|
|
5487
|
+
* Props for the GetWallet component
|
|
5292
5488
|
*/
|
|
5293
|
-
interface
|
|
5294
|
-
/**
|
|
5295
|
-
title: string;
|
|
5296
|
-
/** Descriptive text explaining the disclaimer content */
|
|
5297
|
-
description: string;
|
|
5298
|
-
/** Action for the primary "Learn More" button - can be URL or callback */
|
|
5299
|
-
learnMoreAction: ButtonAction;
|
|
5300
|
-
/** Optional action for the secondary "List of Networks" button */
|
|
5301
|
-
listAction?: ButtonAction;
|
|
5302
|
-
/** Custom CSS classes for styling the disclaimer container */
|
|
5489
|
+
interface GetWalletProps {
|
|
5490
|
+
/** Custom CSS classes for styling the container */
|
|
5303
5491
|
className?: string;
|
|
5304
5492
|
/** Optional custom ARIA label for enhanced accessibility */
|
|
5305
5493
|
'aria-label'?: string;
|
|
5306
|
-
/** Whether to show the disclaimer in compact mode */
|
|
5307
|
-
compact?: boolean;
|
|
5308
|
-
/** Additional content to display below the description */
|
|
5309
|
-
children?: React__default.ReactNode;
|
|
5310
5494
|
/** Custom test ID for testing purposes */
|
|
5311
5495
|
'data-testid'?: string;
|
|
5312
|
-
/** Whether
|
|
5313
|
-
|
|
5496
|
+
/** Whether to show the component in compact mode */
|
|
5497
|
+
compact?: boolean;
|
|
5498
|
+
/** Whether animations should be enabled */
|
|
5499
|
+
enableAnimations?: boolean;
|
|
5500
|
+
/** Custom wallet icons to display instead of defaults */
|
|
5501
|
+
customWalletIcons?: WalletIconConfig[];
|
|
5502
|
+
/** Whether to show the background stars animation */
|
|
5503
|
+
showStarsBackground?: boolean;
|
|
5314
5504
|
/** Customization options */
|
|
5315
|
-
customization?:
|
|
5505
|
+
customization?: GetWalletCustomization;
|
|
5316
5506
|
}
|
|
5317
5507
|
/**
|
|
5318
|
-
* Educational
|
|
5508
|
+
* Educational wallet introduction component with animated icons and comprehensive customization
|
|
5319
5509
|
*
|
|
5320
|
-
* This component provides
|
|
5321
|
-
* -
|
|
5322
|
-
* - Educational content
|
|
5323
|
-
* -
|
|
5324
|
-
* -
|
|
5325
|
-
* -
|
|
5326
|
-
* -
|
|
5327
|
-
* -
|
|
5328
|
-
* -
|
|
5329
|
-
* -
|
|
5330
|
-
* - Flexible content areas with optional children support
|
|
5510
|
+
* This component provides an engaging introduction to Web3 wallets featuring:
|
|
5511
|
+
* - Animated floating wallet icons with individual staggered animations and delays
|
|
5512
|
+
* - Educational content explaining Web3 wallet importance
|
|
5513
|
+
* - Responsive design with mobile-first approach
|
|
5514
|
+
* - Full accessibility support with proper ARIA labeling
|
|
5515
|
+
* - Internationalization support for all text content
|
|
5516
|
+
* - Performance optimizations with memoized calculations
|
|
5517
|
+
* - Customizable animations and icon configurations
|
|
5518
|
+
* - Semantic HTML structure for screen readers
|
|
5519
|
+
* - Proper focus management and keyboard navigation
|
|
5331
5520
|
* - Full customization of all child components
|
|
5332
5521
|
*
|
|
5333
|
-
*
|
|
5334
|
-
* -
|
|
5335
|
-
* -
|
|
5336
|
-
* -
|
|
5522
|
+
* Animation features:
|
|
5523
|
+
* - Individual animation delays for each wallet icon using CSS custom properties
|
|
5524
|
+
* - Customizable duration, easing, and direction per icon
|
|
5525
|
+
* - Staggered floating animations for visual appeal
|
|
5526
|
+
* - Motion reduction respect (prefers-reduced-motion)
|
|
5527
|
+
* - Smooth entrance animations with framer-motion
|
|
5337
5528
|
*
|
|
5338
5529
|
* @example Basic usage
|
|
5339
5530
|
* ```tsx
|
|
5340
|
-
* <
|
|
5341
|
-
* title="What is a wallet?"
|
|
5342
|
-
* description="Wallets are essential for managing your crypto..."
|
|
5343
|
-
* learnMoreAction={() => setContentType('about')}
|
|
5344
|
-
* listAction="https://example.com/networks"
|
|
5345
|
-
* />
|
|
5531
|
+
* <GetWallet />
|
|
5346
5532
|
* ```
|
|
5347
5533
|
*
|
|
5348
5534
|
* @example With customization
|
|
5349
5535
|
* ```tsx
|
|
5350
|
-
* <
|
|
5351
|
-
* title="Network Information"
|
|
5352
|
-
* description="Choose the right network for your transactions"
|
|
5353
|
-
* learnMoreAction={handleLearnMore}
|
|
5536
|
+
* <GetWallet
|
|
5354
5537
|
* compact
|
|
5355
5538
|
* customization={{
|
|
5356
5539
|
* classNames: {
|
|
@@ -5358,393 +5541,85 @@ interface DisclaimerProps {
|
|
|
5358
5541
|
* title: () => 'custom-title-styling'
|
|
5359
5542
|
* },
|
|
5360
5543
|
* components: {
|
|
5361
|
-
*
|
|
5544
|
+
* WalletIcon: CustomWalletIcon
|
|
5545
|
+
* },
|
|
5546
|
+
* config: {
|
|
5547
|
+
* animation: {
|
|
5548
|
+
* durationMultiplier: 1.5,
|
|
5549
|
+
* delayMultiplier: 0.8
|
|
5550
|
+
* }
|
|
5362
5551
|
* }
|
|
5363
5552
|
* }}
|
|
5364
5553
|
* />
|
|
5365
5554
|
* ```
|
|
5366
5555
|
*/
|
|
5367
|
-
declare const
|
|
5556
|
+
declare const GetWallet: React__default.ForwardRefExoticComponent<GetWalletProps & React__default.RefAttributes<HTMLElement>>;
|
|
5368
5557
|
|
|
5369
5558
|
/**
|
|
5370
|
-
* @file
|
|
5559
|
+
* @file ImpersonateForm component with comprehensive customization options and validation.
|
|
5371
5560
|
*/
|
|
5372
5561
|
|
|
5373
5562
|
/**
|
|
5374
|
-
*
|
|
5563
|
+
* Validation configuration
|
|
5375
5564
|
*/
|
|
5376
|
-
interface
|
|
5377
|
-
/**
|
|
5378
|
-
|
|
5379
|
-
/**
|
|
5380
|
-
|
|
5381
|
-
|
|
5382
|
-
|
|
5383
|
-
|
|
5384
|
-
|
|
5385
|
-
/** Left position class (e.g., 'left-[5%]', 'left-4') */
|
|
5386
|
-
left?: string;
|
|
5387
|
-
/** Right position class (e.g., 'right-[10%]', 'right-4') */
|
|
5388
|
-
right?: string;
|
|
5389
|
-
/** Transform classes for centering */
|
|
5390
|
-
transform?: string;
|
|
5391
|
-
};
|
|
5392
|
-
/** Size configuration using predefined size classes */
|
|
5393
|
-
size: {
|
|
5394
|
-
/** Width and height classes for mobile */
|
|
5395
|
-
mobile: {
|
|
5396
|
-
width: string;
|
|
5397
|
-
height: string;
|
|
5398
|
-
};
|
|
5399
|
-
/** Width and height classes for desktop */
|
|
5400
|
-
desktop: {
|
|
5401
|
-
width: string;
|
|
5402
|
-
height: string;
|
|
5403
|
-
};
|
|
5404
|
-
};
|
|
5405
|
-
/** Animation configuration */
|
|
5406
|
-
animation: {
|
|
5407
|
-
/** Animation duration in milliseconds */
|
|
5408
|
-
duration: number;
|
|
5409
|
-
/** Animation delay in milliseconds */
|
|
5410
|
-
delay: number;
|
|
5411
|
-
/** Whether to reverse animation direction */
|
|
5412
|
-
reverse?: boolean;
|
|
5413
|
-
/** Animation easing function */
|
|
5414
|
-
ease?: string;
|
|
5415
|
-
};
|
|
5416
|
-
/** ARIA label for the wallet icon */
|
|
5417
|
-
ariaLabel?: string;
|
|
5565
|
+
interface ValidationConfig {
|
|
5566
|
+
/** Debounce delay in milliseconds */
|
|
5567
|
+
debounceDelay: number;
|
|
5568
|
+
/** Whether to validate on blur */
|
|
5569
|
+
validateOnBlur: boolean;
|
|
5570
|
+
/** Whether to validate on change */
|
|
5571
|
+
validateOnChange: boolean;
|
|
5572
|
+
/** Custom validation function */
|
|
5573
|
+
customValidator?: (address: string) => string | null;
|
|
5418
5574
|
}
|
|
5419
|
-
type ContainerProps$
|
|
5420
|
-
className?: string;
|
|
5421
|
-
style?: React__default.CSSProperties;
|
|
5422
|
-
children: React__default.ReactNode;
|
|
5423
|
-
role?: string;
|
|
5424
|
-
'aria-label'?: string;
|
|
5425
|
-
'data-testid'?: string;
|
|
5426
|
-
} & React__default.RefAttributes<HTMLElement>;
|
|
5427
|
-
type AnimationSectionProps = {
|
|
5428
|
-
className?: string;
|
|
5429
|
-
style?: React__default.CSSProperties;
|
|
5430
|
-
children: React__default.ReactNode;
|
|
5431
|
-
role?: string;
|
|
5432
|
-
'aria-label'?: string;
|
|
5433
|
-
};
|
|
5434
|
-
type StarsBackgroundProps = {
|
|
5435
|
-
className?: string;
|
|
5436
|
-
style?: React__default.CSSProperties;
|
|
5437
|
-
show: boolean;
|
|
5438
|
-
'aria-hidden'?: boolean;
|
|
5439
|
-
};
|
|
5440
|
-
type GradientOverlayProps = {
|
|
5441
|
-
className?: string;
|
|
5442
|
-
style?: React__default.CSSProperties;
|
|
5443
|
-
'aria-hidden'?: boolean;
|
|
5444
|
-
};
|
|
5445
|
-
type AnimationWrapperProps = {
|
|
5575
|
+
type ContainerProps$5 = {
|
|
5446
5576
|
className?: string;
|
|
5447
5577
|
style?: React__default.CSSProperties;
|
|
5448
5578
|
children: React__default.ReactNode;
|
|
5449
|
-
|
|
5450
|
-
|
|
5451
|
-
enableAnimations: boolean;
|
|
5452
|
-
animationDelay?: number;
|
|
5453
|
-
animationDuration?: number;
|
|
5454
|
-
};
|
|
5455
|
-
type WalletIconProps = {
|
|
5456
|
-
config: WalletIconConfig;
|
|
5457
|
-
enableAnimations: boolean;
|
|
5458
|
-
className?: string;
|
|
5459
|
-
style?: React__default.CSSProperties;
|
|
5460
|
-
};
|
|
5461
|
-
type ContentSectionProps = {
|
|
5579
|
+
} & React__default.RefAttributes<HTMLDivElement>;
|
|
5580
|
+
type LabelProps = {
|
|
5462
5581
|
className?: string;
|
|
5463
5582
|
style?: React__default.CSSProperties;
|
|
5464
5583
|
children: React__default.ReactNode;
|
|
5465
|
-
|
|
5466
|
-
}
|
|
5467
|
-
type
|
|
5584
|
+
htmlFor?: string;
|
|
5585
|
+
} & React__default.RefAttributes<HTMLLabelElement>;
|
|
5586
|
+
type InputProps = {
|
|
5468
5587
|
className?: string;
|
|
5469
5588
|
style?: React__default.CSSProperties;
|
|
5470
|
-
|
|
5471
|
-
|
|
5472
|
-
|
|
5473
|
-
|
|
5474
|
-
|
|
5589
|
+
id?: string;
|
|
5590
|
+
type?: string;
|
|
5591
|
+
value: string;
|
|
5592
|
+
onChange: (event: React__default.ChangeEvent<HTMLInputElement>) => void;
|
|
5593
|
+
onBlur: () => void;
|
|
5594
|
+
placeholder?: string;
|
|
5595
|
+
'aria-describedby'?: string;
|
|
5596
|
+
'aria-invalid'?: 'true' | 'false';
|
|
5597
|
+
autoComplete?: string;
|
|
5598
|
+
spellCheck?: boolean;
|
|
5599
|
+
hasError: boolean;
|
|
5600
|
+
} & React__default.RefAttributes<HTMLInputElement>;
|
|
5601
|
+
type ErrorMessageProps$2 = {
|
|
5475
5602
|
className?: string;
|
|
5476
5603
|
style?: React__default.CSSProperties;
|
|
5477
5604
|
children: React__default.ReactNode;
|
|
5605
|
+
id?: string;
|
|
5478
5606
|
role?: string;
|
|
5479
|
-
|
|
5480
|
-
|
|
5481
|
-
className?: string;
|
|
5482
|
-
style?: React__default.CSSProperties;
|
|
5483
|
-
children: React__default.ReactNode;
|
|
5484
|
-
};
|
|
5607
|
+
'aria-live'?: 'polite' | 'assertive';
|
|
5608
|
+
} & React__default.RefAttributes<HTMLParagraphElement>;
|
|
5485
5609
|
/**
|
|
5486
|
-
* Customization options for
|
|
5610
|
+
* Customization options for ImpersonateForm component
|
|
5487
5611
|
*/
|
|
5488
|
-
type
|
|
5612
|
+
type ImpersonateFormCustomization = {
|
|
5489
5613
|
/** Custom components */
|
|
5490
5614
|
components?: {
|
|
5491
5615
|
/** Custom container wrapper */
|
|
5492
|
-
Container?: ComponentType<ContainerProps$
|
|
5493
|
-
/** Custom animation section */
|
|
5494
|
-
AnimationSection?: ComponentType<AnimationSectionProps>;
|
|
5495
|
-
/** Custom stars background */
|
|
5496
|
-
StarsBackground?: ComponentType<StarsBackgroundProps>;
|
|
5497
|
-
/** Custom gradient overlay */
|
|
5498
|
-
GradientOverlay?: ComponentType<GradientOverlayProps>;
|
|
5499
|
-
/** Custom animation wrapper */
|
|
5500
|
-
AnimationWrapper?: ComponentType<AnimationWrapperProps>;
|
|
5501
|
-
/** Custom wallet icon display */
|
|
5502
|
-
WalletIcon?: ComponentType<WalletIconProps>;
|
|
5503
|
-
/** Custom content section */
|
|
5504
|
-
ContentSection?: ComponentType<ContentSectionProps>;
|
|
5505
|
-
/** Custom title component */
|
|
5506
|
-
Title?: ComponentType<TitleProps$1>;
|
|
5507
|
-
/** Custom description component */
|
|
5508
|
-
Description?: ComponentType<DescriptionProps>;
|
|
5509
|
-
/** Custom screen reader component */
|
|
5510
|
-
ScreenReader?: ComponentType<ScreenReaderProps>;
|
|
5511
|
-
};
|
|
5512
|
-
/** Custom class name generators */
|
|
5513
|
-
classNames?: {
|
|
5514
|
-
/** Function to generate container classes */
|
|
5515
|
-
container?: (params: {
|
|
5516
|
-
compact: boolean;
|
|
5517
|
-
}) => string;
|
|
5518
|
-
/** Function to generate animation section classes */
|
|
5519
|
-
animationSection?: (params: {
|
|
5520
|
-
compact: boolean;
|
|
5521
|
-
}) => string;
|
|
5522
|
-
/** Function to generate stars background classes */
|
|
5523
|
-
starsBackground?: () => string;
|
|
5524
|
-
/** Function to generate gradient overlay classes */
|
|
5525
|
-
gradientOverlay?: () => string;
|
|
5526
|
-
/** Function to generate animation wrapper classes */
|
|
5527
|
-
animationWrapper?: () => string;
|
|
5528
|
-
/** Function to generate wallet icon classes */
|
|
5529
|
-
walletIcon?: (params: {
|
|
5530
|
-
config: WalletIconConfig;
|
|
5531
|
-
enableAnimations: boolean;
|
|
5532
|
-
}) => string;
|
|
5533
|
-
/** Function to generate content section classes */
|
|
5534
|
-
contentSection?: (params: {
|
|
5535
|
-
compact: boolean;
|
|
5536
|
-
}) => string;
|
|
5537
|
-
/** Function to generate title classes */
|
|
5538
|
-
title?: (params: {
|
|
5539
|
-
compact: boolean;
|
|
5540
|
-
}) => string;
|
|
5541
|
-
/** Function to generate description classes */
|
|
5542
|
-
description?: () => string;
|
|
5543
|
-
/** Function to generate screen reader classes */
|
|
5544
|
-
screenReader?: () => string;
|
|
5545
|
-
};
|
|
5546
|
-
/** Custom style generators */
|
|
5547
|
-
styles?: {
|
|
5548
|
-
/** Function to generate container styles */
|
|
5549
|
-
container?: (params: {
|
|
5550
|
-
compact: boolean;
|
|
5551
|
-
}) => React__default.CSSProperties;
|
|
5552
|
-
/** Function to generate animation section styles */
|
|
5553
|
-
animationSection?: (params: {
|
|
5554
|
-
compact: boolean;
|
|
5555
|
-
}) => React__default.CSSProperties;
|
|
5556
|
-
/** Function to generate stars background styles */
|
|
5557
|
-
starsBackground?: () => React__default.CSSProperties;
|
|
5558
|
-
/** Function to generate gradient overlay styles */
|
|
5559
|
-
gradientOverlay?: () => React__default.CSSProperties;
|
|
5560
|
-
/** Function to generate animation wrapper styles */
|
|
5561
|
-
animationWrapper?: () => React__default.CSSProperties;
|
|
5562
|
-
/** Function to generate wallet icon styles */
|
|
5563
|
-
walletIcon?: (params: {
|
|
5564
|
-
config: WalletIconConfig;
|
|
5565
|
-
enableAnimations: boolean;
|
|
5566
|
-
}) => React__default.CSSProperties;
|
|
5567
|
-
/** Function to generate content section styles */
|
|
5568
|
-
contentSection?: (params: {
|
|
5569
|
-
compact: boolean;
|
|
5570
|
-
}) => React__default.CSSProperties;
|
|
5571
|
-
/** Function to generate title styles */
|
|
5572
|
-
title?: (params: {
|
|
5573
|
-
compact: boolean;
|
|
5574
|
-
}) => React__default.CSSProperties;
|
|
5575
|
-
/** Function to generate description styles */
|
|
5576
|
-
description?: () => React__default.CSSProperties;
|
|
5577
|
-
/** Function to generate screen reader styles */
|
|
5578
|
-
screenReader?: () => React__default.CSSProperties;
|
|
5579
|
-
};
|
|
5580
|
-
/** Custom event handlers */
|
|
5581
|
-
handlers?: {
|
|
5582
|
-
/** Custom handler for component mount */
|
|
5583
|
-
onMount?: () => void;
|
|
5584
|
-
/** Custom handler for component unmount */
|
|
5585
|
-
onUnmount?: () => void;
|
|
5586
|
-
/** Custom handler for animation start */
|
|
5587
|
-
onAnimationStart?: () => void;
|
|
5588
|
-
/** Custom handler for animation complete */
|
|
5589
|
-
onAnimationComplete?: () => void;
|
|
5590
|
-
};
|
|
5591
|
-
/** Configuration options */
|
|
5592
|
-
config?: {
|
|
5593
|
-
/** Custom ARIA labels */
|
|
5594
|
-
ariaLabels?: {
|
|
5595
|
-
container?: string;
|
|
5596
|
-
animationSection?: string;
|
|
5597
|
-
animationWrapper?: string;
|
|
5598
|
-
contentSection?: string;
|
|
5599
|
-
};
|
|
5600
|
-
/** Animation configuration overrides */
|
|
5601
|
-
animation?: {
|
|
5602
|
-
/** Global animation duration multiplier */
|
|
5603
|
-
durationMultiplier?: number;
|
|
5604
|
-
/** Global animation delay multiplier */
|
|
5605
|
-
delayMultiplier?: number;
|
|
5606
|
-
/** Default easing function */
|
|
5607
|
-
defaultEase?: string;
|
|
5608
|
-
};
|
|
5609
|
-
};
|
|
5610
|
-
};
|
|
5611
|
-
/**
|
|
5612
|
-
* Props for the GetWallet component
|
|
5613
|
-
*/
|
|
5614
|
-
interface GetWalletProps {
|
|
5615
|
-
/** Custom CSS classes for styling the container */
|
|
5616
|
-
className?: string;
|
|
5617
|
-
/** Optional custom ARIA label for enhanced accessibility */
|
|
5618
|
-
'aria-label'?: string;
|
|
5619
|
-
/** Custom test ID for testing purposes */
|
|
5620
|
-
'data-testid'?: string;
|
|
5621
|
-
/** Whether to show the component in compact mode */
|
|
5622
|
-
compact?: boolean;
|
|
5623
|
-
/** Whether animations should be enabled */
|
|
5624
|
-
enableAnimations?: boolean;
|
|
5625
|
-
/** Custom wallet icons to display instead of defaults */
|
|
5626
|
-
customWalletIcons?: WalletIconConfig[];
|
|
5627
|
-
/** Whether to show the background stars animation */
|
|
5628
|
-
showStarsBackground?: boolean;
|
|
5629
|
-
/** Customization options */
|
|
5630
|
-
customization?: GetWalletCustomization;
|
|
5631
|
-
}
|
|
5632
|
-
/**
|
|
5633
|
-
* Educational wallet introduction component with animated icons and comprehensive customization
|
|
5634
|
-
*
|
|
5635
|
-
* This component provides an engaging introduction to Web3 wallets featuring:
|
|
5636
|
-
* - Animated floating wallet icons with individual staggered animations and delays
|
|
5637
|
-
* - Educational content explaining Web3 wallet importance
|
|
5638
|
-
* - Responsive design with mobile-first approach
|
|
5639
|
-
* - Full accessibility support with proper ARIA labeling
|
|
5640
|
-
* - Internationalization support for all text content
|
|
5641
|
-
* - Performance optimizations with memoized calculations
|
|
5642
|
-
* - Customizable animations and icon configurations
|
|
5643
|
-
* - Semantic HTML structure for screen readers
|
|
5644
|
-
* - Proper focus management and keyboard navigation
|
|
5645
|
-
* - Full customization of all child components
|
|
5646
|
-
*
|
|
5647
|
-
* Animation features:
|
|
5648
|
-
* - Individual animation delays for each wallet icon using CSS custom properties
|
|
5649
|
-
* - Customizable duration, easing, and direction per icon
|
|
5650
|
-
* - Staggered floating animations for visual appeal
|
|
5651
|
-
* - Motion reduction respect (prefers-reduced-motion)
|
|
5652
|
-
* - Smooth entrance animations with framer-motion
|
|
5653
|
-
*
|
|
5654
|
-
* @example Basic usage
|
|
5655
|
-
* ```tsx
|
|
5656
|
-
* <GetWallet />
|
|
5657
|
-
* ```
|
|
5658
|
-
*
|
|
5659
|
-
* @example With customization
|
|
5660
|
-
* ```tsx
|
|
5661
|
-
* <GetWallet
|
|
5662
|
-
* compact
|
|
5663
|
-
* customization={{
|
|
5664
|
-
* classNames: {
|
|
5665
|
-
* container: ({ compact }) => compact ? 'custom-compact' : 'custom-full',
|
|
5666
|
-
* title: () => 'custom-title-styling'
|
|
5667
|
-
* },
|
|
5668
|
-
* components: {
|
|
5669
|
-
* WalletIcon: CustomWalletIcon
|
|
5670
|
-
* },
|
|
5671
|
-
* config: {
|
|
5672
|
-
* animation: {
|
|
5673
|
-
* durationMultiplier: 1.5,
|
|
5674
|
-
* delayMultiplier: 0.8
|
|
5675
|
-
* }
|
|
5676
|
-
* }
|
|
5677
|
-
* }}
|
|
5678
|
-
* />
|
|
5679
|
-
* ```
|
|
5680
|
-
*/
|
|
5681
|
-
declare const GetWallet: React__default.ForwardRefExoticComponent<GetWalletProps & React__default.RefAttributes<HTMLElement>>;
|
|
5682
|
-
|
|
5683
|
-
/**
|
|
5684
|
-
* @file ImpersonateForm component with comprehensive customization options and validation.
|
|
5685
|
-
*/
|
|
5686
|
-
|
|
5687
|
-
/**
|
|
5688
|
-
* Validation configuration
|
|
5689
|
-
*/
|
|
5690
|
-
interface ValidationConfig {
|
|
5691
|
-
/** Debounce delay in milliseconds */
|
|
5692
|
-
debounceDelay: number;
|
|
5693
|
-
/** Whether to validate on blur */
|
|
5694
|
-
validateOnBlur: boolean;
|
|
5695
|
-
/** Whether to validate on change */
|
|
5696
|
-
validateOnChange: boolean;
|
|
5697
|
-
/** Custom validation function */
|
|
5698
|
-
customValidator?: (address: string) => string | null;
|
|
5699
|
-
}
|
|
5700
|
-
type ContainerProps$3 = {
|
|
5701
|
-
className?: string;
|
|
5702
|
-
style?: React__default.CSSProperties;
|
|
5703
|
-
children: React__default.ReactNode;
|
|
5704
|
-
} & React__default.RefAttributes<HTMLDivElement>;
|
|
5705
|
-
type LabelProps = {
|
|
5706
|
-
className?: string;
|
|
5707
|
-
style?: React__default.CSSProperties;
|
|
5708
|
-
children: React__default.ReactNode;
|
|
5709
|
-
htmlFor?: string;
|
|
5710
|
-
} & React__default.RefAttributes<HTMLLabelElement>;
|
|
5711
|
-
type InputProps = {
|
|
5712
|
-
className?: string;
|
|
5713
|
-
style?: React__default.CSSProperties;
|
|
5714
|
-
id?: string;
|
|
5715
|
-
type?: string;
|
|
5716
|
-
value: string;
|
|
5717
|
-
onChange: (event: React__default.ChangeEvent<HTMLInputElement>) => void;
|
|
5718
|
-
onBlur: () => void;
|
|
5719
|
-
placeholder?: string;
|
|
5720
|
-
'aria-describedby'?: string;
|
|
5721
|
-
'aria-invalid'?: 'true' | 'false';
|
|
5722
|
-
autoComplete?: string;
|
|
5723
|
-
spellCheck?: boolean;
|
|
5724
|
-
hasError: boolean;
|
|
5725
|
-
} & React__default.RefAttributes<HTMLInputElement>;
|
|
5726
|
-
type ErrorMessageProps$1 = {
|
|
5727
|
-
className?: string;
|
|
5728
|
-
style?: React__default.CSSProperties;
|
|
5729
|
-
children: React__default.ReactNode;
|
|
5730
|
-
id?: string;
|
|
5731
|
-
role?: string;
|
|
5732
|
-
'aria-live'?: 'polite' | 'assertive';
|
|
5733
|
-
} & React__default.RefAttributes<HTMLParagraphElement>;
|
|
5734
|
-
/**
|
|
5735
|
-
* Customization options for ImpersonateForm component
|
|
5736
|
-
*/
|
|
5737
|
-
type ImpersonateFormCustomization = {
|
|
5738
|
-
/** Custom components */
|
|
5739
|
-
components?: {
|
|
5740
|
-
/** Custom container wrapper */
|
|
5741
|
-
Container?: ComponentType<ContainerProps$3>;
|
|
5616
|
+
Container?: ComponentType<ContainerProps$5>;
|
|
5742
5617
|
/** Custom label component */
|
|
5743
5618
|
Label?: ComponentType<LabelProps>;
|
|
5744
5619
|
/** Custom input component */
|
|
5745
5620
|
Input?: ComponentType<InputProps>;
|
|
5746
5621
|
/** Custom error message component */
|
|
5747
|
-
ErrorMessage?: ComponentType<ErrorMessageProps$
|
|
5622
|
+
ErrorMessage?: ComponentType<ErrorMessageProps$2>;
|
|
5748
5623
|
};
|
|
5749
5624
|
/** Custom class name generators */
|
|
5750
5625
|
classNames?: {
|
|
@@ -5901,461 +5776,719 @@ interface ImpersonateFormProps extends Pick<ConnectButtonProps, 'store'> {
|
|
|
5901
5776
|
declare const ImpersonateForm: React__default.ForwardRefExoticComponent<ImpersonateFormProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
5902
5777
|
|
|
5903
5778
|
/**
|
|
5904
|
-
* @file
|
|
5779
|
+
* @file Disclaimer component with comprehensive customization options.
|
|
5905
5780
|
*/
|
|
5906
5781
|
|
|
5907
5782
|
/**
|
|
5908
|
-
*
|
|
5783
|
+
* Type definition for button actions
|
|
5784
|
+
* Can be either a URL string for external links or a callback function
|
|
5909
5785
|
*/
|
|
5910
|
-
|
|
5911
|
-
|
|
5912
|
-
adapter: OrbitAdapter;
|
|
5913
|
-
/** Chain ID for icon display */
|
|
5914
|
-
chainId?: number | string;
|
|
5915
|
-
/** Network display name */
|
|
5916
|
-
name: string;
|
|
5917
|
-
/** Network info link URL */
|
|
5918
|
-
infoLink?: string;
|
|
5919
|
-
/** Network index in list */
|
|
5920
|
-
index: number;
|
|
5921
|
-
}
|
|
5922
|
-
/**
|
|
5923
|
-
* Network selections data for customization context
|
|
5924
|
-
*/
|
|
5925
|
-
interface NetworkSelectionsData {
|
|
5926
|
-
/** Currently active connector name */
|
|
5927
|
-
activeConnector?: string;
|
|
5928
|
-
/** Available grouped connectors */
|
|
5929
|
-
connectors: GroupedConnector$1[];
|
|
5930
|
-
/** Whether device is touch-enabled */
|
|
5931
|
-
isTouch: boolean;
|
|
5932
|
-
/** Whether in error state */
|
|
5933
|
-
isError: boolean;
|
|
5934
|
-
/** Available networks */
|
|
5935
|
-
networks: NetworkData[];
|
|
5936
|
-
}
|
|
5937
|
-
type ContainerProps$2 = {
|
|
5786
|
+
type ButtonAction = string | (() => void);
|
|
5787
|
+
type ContainerProps$4 = {
|
|
5938
5788
|
className?: string;
|
|
5939
5789
|
style?: React__default.CSSProperties;
|
|
5940
5790
|
children: React__default.ReactNode;
|
|
5941
5791
|
role?: string;
|
|
5942
|
-
'aria-
|
|
5943
|
-
|
|
5792
|
+
'aria-label'?: string;
|
|
5793
|
+
'aria-describedby'?: string;
|
|
5794
|
+
'data-testid'?: string;
|
|
5795
|
+
'aria-live'?: 'polite' | 'assertive' | 'off';
|
|
5944
5796
|
} & React__default.RefAttributes<HTMLDivElement>;
|
|
5945
|
-
type
|
|
5797
|
+
type ContentSectionProps = {
|
|
5946
5798
|
className?: string;
|
|
5947
5799
|
style?: React__default.CSSProperties;
|
|
5948
5800
|
children: React__default.ReactNode;
|
|
5949
|
-
id?: string;
|
|
5950
5801
|
role?: string;
|
|
5951
|
-
'aria-
|
|
5952
|
-
|
|
5953
|
-
|
|
5954
|
-
|
|
5802
|
+
'aria-labelledby'?: string;
|
|
5803
|
+
};
|
|
5804
|
+
type TitleProps$1 = {
|
|
5805
|
+
id: string;
|
|
5955
5806
|
className?: string;
|
|
5956
5807
|
style?: React__default.CSSProperties;
|
|
5957
5808
|
children: React__default.ReactNode;
|
|
5958
5809
|
role?: string;
|
|
5959
|
-
'aria-
|
|
5960
|
-
|
|
5961
|
-
|
|
5962
|
-
|
|
5810
|
+
'aria-level'?: number;
|
|
5811
|
+
};
|
|
5812
|
+
type DescriptionProps = {
|
|
5813
|
+
id: string;
|
|
5963
5814
|
className?: string;
|
|
5964
5815
|
style?: React__default.CSSProperties;
|
|
5965
5816
|
children: React__default.ReactNode;
|
|
5966
5817
|
role?: string;
|
|
5967
|
-
|
|
5968
|
-
|
|
5969
|
-
} & React__default.RefAttributes<HTMLDivElement>;
|
|
5970
|
-
type NetworkIconProps = {
|
|
5818
|
+
};
|
|
5819
|
+
type AdditionalContentProps = {
|
|
5971
5820
|
className?: string;
|
|
5972
5821
|
style?: React__default.CSSProperties;
|
|
5973
5822
|
children: React__default.ReactNode;
|
|
5974
5823
|
role?: string;
|
|
5975
5824
|
'aria-label'?: string;
|
|
5976
|
-
|
|
5977
|
-
|
|
5978
|
-
} & React__default.RefAttributes<HTMLDivElement>;
|
|
5979
|
-
type ErrorContainerProps = {
|
|
5825
|
+
};
|
|
5826
|
+
type ActionsProps = {
|
|
5980
5827
|
className?: string;
|
|
5981
5828
|
style?: React__default.CSSProperties;
|
|
5982
5829
|
children: React__default.ReactNode;
|
|
5983
5830
|
role?: string;
|
|
5984
|
-
'aria-
|
|
5985
|
-
|
|
5986
|
-
|
|
5987
|
-
|
|
5988
|
-
className?: string;
|
|
5989
|
-
style?: React__default.CSSProperties;
|
|
5831
|
+
'aria-label'?: string;
|
|
5832
|
+
};
|
|
5833
|
+
type ButtonProps = {
|
|
5834
|
+
action: ButtonAction;
|
|
5990
5835
|
children: React__default.ReactNode;
|
|
5991
|
-
'aria-
|
|
5992
|
-
selectionsData: NetworkSelectionsData;
|
|
5993
|
-
} & React__default.RefAttributes<HTMLDivElement>;
|
|
5994
|
-
type ErrorTitleProps = {
|
|
5836
|
+
'aria-label'?: string;
|
|
5995
5837
|
className?: string;
|
|
5838
|
+
'data-testid'?: string;
|
|
5996
5839
|
style?: React__default.CSSProperties;
|
|
5997
|
-
|
|
5998
|
-
|
|
5999
|
-
'aria-level'?: number;
|
|
6000
|
-
selectionsData: NetworkSelectionsData;
|
|
6001
|
-
} & React__default.RefAttributes<HTMLHeadingElement>;
|
|
6002
|
-
type ErrorMessageProps = {
|
|
5840
|
+
};
|
|
5841
|
+
type StatusProps = {
|
|
6003
5842
|
className?: string;
|
|
6004
5843
|
style?: React__default.CSSProperties;
|
|
6005
|
-
children
|
|
5844
|
+
children?: React__default.ReactNode;
|
|
5845
|
+
'aria-live'?: 'polite' | 'assertive' | 'off';
|
|
5846
|
+
'aria-atomic'?: boolean;
|
|
6006
5847
|
role?: string;
|
|
6007
|
-
|
|
6008
|
-
} & React__default.RefAttributes<HTMLParagraphElement>;
|
|
5848
|
+
};
|
|
6009
5849
|
/**
|
|
6010
|
-
*
|
|
5850
|
+
* Customization options for Disclaimer component
|
|
6011
5851
|
*/
|
|
6012
|
-
type
|
|
5852
|
+
type DisclaimerCustomization = {
|
|
6013
5853
|
/** Custom components */
|
|
6014
5854
|
components?: {
|
|
6015
5855
|
/** Custom container wrapper */
|
|
6016
|
-
Container?: ComponentType<ContainerProps$
|
|
6017
|
-
/** Custom
|
|
6018
|
-
|
|
6019
|
-
/** Custom
|
|
6020
|
-
|
|
6021
|
-
/** Custom
|
|
6022
|
-
|
|
6023
|
-
/** Custom
|
|
6024
|
-
|
|
6025
|
-
/** Custom
|
|
6026
|
-
|
|
6027
|
-
/** Custom
|
|
6028
|
-
|
|
6029
|
-
/** Custom
|
|
6030
|
-
|
|
6031
|
-
/** Custom
|
|
6032
|
-
|
|
5856
|
+
Container?: ComponentType<ContainerProps$4>;
|
|
5857
|
+
/** Custom content section */
|
|
5858
|
+
ContentSection?: ComponentType<ContentSectionProps>;
|
|
5859
|
+
/** Custom title component */
|
|
5860
|
+
Title?: ComponentType<TitleProps$1>;
|
|
5861
|
+
/** Custom description component */
|
|
5862
|
+
Description?: ComponentType<DescriptionProps>;
|
|
5863
|
+
/** Custom additional content wrapper */
|
|
5864
|
+
AdditionalContent?: ComponentType<AdditionalContentProps>;
|
|
5865
|
+
/** Custom actions section */
|
|
5866
|
+
Actions?: ComponentType<ActionsProps>;
|
|
5867
|
+
/** Custom link button */
|
|
5868
|
+
LinkButton?: ComponentType<ButtonProps>;
|
|
5869
|
+
/** Custom action button */
|
|
5870
|
+
ActionButton?: ComponentType<ButtonProps>;
|
|
5871
|
+
/** Custom status component */
|
|
5872
|
+
Status?: ComponentType<StatusProps>;
|
|
6033
5873
|
};
|
|
6034
5874
|
/** Custom class name generators */
|
|
6035
5875
|
classNames?: {
|
|
6036
5876
|
/** Function to generate container classes */
|
|
6037
5877
|
container?: (params: {
|
|
6038
|
-
|
|
5878
|
+
compact: boolean;
|
|
5879
|
+
}) => string;
|
|
5880
|
+
/** Function to generate content section classes */
|
|
5881
|
+
contentSection?: (params: {
|
|
5882
|
+
compact: boolean;
|
|
6039
5883
|
}) => string;
|
|
6040
5884
|
/** Function to generate title classes */
|
|
6041
5885
|
title?: (params: {
|
|
6042
|
-
|
|
6043
|
-
}) => string;
|
|
6044
|
-
/** Function to generate network list classes */
|
|
6045
|
-
networkList?: (params: {
|
|
6046
|
-
selectionsData: NetworkSelectionsData;
|
|
6047
|
-
}) => string;
|
|
6048
|
-
/** Function to generate network item classes */
|
|
6049
|
-
networkItem?: (params: {
|
|
6050
|
-
networkData: NetworkData;
|
|
6051
|
-
selectionsData: NetworkSelectionsData;
|
|
6052
|
-
}) => string;
|
|
6053
|
-
/** Function to generate network icon classes */
|
|
6054
|
-
networkIcon?: (params: {
|
|
6055
|
-
networkData: NetworkData;
|
|
6056
|
-
selectionsData: NetworkSelectionsData;
|
|
6057
|
-
}) => string;
|
|
6058
|
-
/** Function to generate error container classes */
|
|
6059
|
-
errorContainer?: (params: {
|
|
6060
|
-
selectionsData: NetworkSelectionsData;
|
|
6061
|
-
}) => string;
|
|
6062
|
-
/** Function to generate error icon classes */
|
|
6063
|
-
errorIcon?: (params: {
|
|
6064
|
-
selectionsData: NetworkSelectionsData;
|
|
6065
|
-
}) => string;
|
|
6066
|
-
/** Function to generate error title classes */
|
|
6067
|
-
errorTitle?: (params: {
|
|
6068
|
-
selectionsData: NetworkSelectionsData;
|
|
5886
|
+
compact: boolean;
|
|
6069
5887
|
}) => string;
|
|
6070
|
-
/** Function to generate
|
|
6071
|
-
|
|
6072
|
-
|
|
5888
|
+
/** Function to generate description classes */
|
|
5889
|
+
description?: () => string;
|
|
5890
|
+
/** Function to generate additional content classes */
|
|
5891
|
+
additionalContent?: () => string;
|
|
5892
|
+
/** Function to generate actions classes */
|
|
5893
|
+
actions?: () => string;
|
|
5894
|
+
/** Function to generate button classes */
|
|
5895
|
+
button?: (params: {
|
|
5896
|
+
isLink: boolean;
|
|
5897
|
+
isPrimary: boolean;
|
|
6073
5898
|
}) => string;
|
|
5899
|
+
/** Function to generate status classes */
|
|
5900
|
+
status?: () => string;
|
|
6074
5901
|
};
|
|
6075
5902
|
/** Custom style generators */
|
|
6076
5903
|
styles?: {
|
|
6077
5904
|
/** Function to generate container styles */
|
|
6078
5905
|
container?: (params: {
|
|
6079
|
-
|
|
5906
|
+
compact: boolean;
|
|
5907
|
+
}) => React__default.CSSProperties;
|
|
5908
|
+
/** Function to generate content section styles */
|
|
5909
|
+
contentSection?: (params: {
|
|
5910
|
+
compact: boolean;
|
|
6080
5911
|
}) => React__default.CSSProperties;
|
|
6081
5912
|
/** Function to generate title styles */
|
|
6082
5913
|
title?: (params: {
|
|
6083
|
-
|
|
6084
|
-
}) => React__default.CSSProperties;
|
|
6085
|
-
/** Function to generate network list styles */
|
|
6086
|
-
networkList?: (params: {
|
|
6087
|
-
selectionsData: NetworkSelectionsData;
|
|
6088
|
-
}) => React__default.CSSProperties;
|
|
6089
|
-
/** Function to generate network item styles */
|
|
6090
|
-
networkItem?: (params: {
|
|
6091
|
-
networkData: NetworkData;
|
|
6092
|
-
selectionsData: NetworkSelectionsData;
|
|
6093
|
-
}) => React__default.CSSProperties;
|
|
6094
|
-
/** Function to generate network icon styles */
|
|
6095
|
-
networkIcon?: (params: {
|
|
6096
|
-
networkData: NetworkData;
|
|
6097
|
-
selectionsData: NetworkSelectionsData;
|
|
6098
|
-
}) => React__default.CSSProperties;
|
|
6099
|
-
/** Function to generate error container styles */
|
|
6100
|
-
errorContainer?: (params: {
|
|
6101
|
-
selectionsData: NetworkSelectionsData;
|
|
6102
|
-
}) => React__default.CSSProperties;
|
|
6103
|
-
/** Function to generate error icon styles */
|
|
6104
|
-
errorIcon?: (params: {
|
|
6105
|
-
selectionsData: NetworkSelectionsData;
|
|
6106
|
-
}) => React__default.CSSProperties;
|
|
6107
|
-
/** Function to generate error title styles */
|
|
6108
|
-
errorTitle?: (params: {
|
|
6109
|
-
selectionsData: NetworkSelectionsData;
|
|
5914
|
+
compact: boolean;
|
|
6110
5915
|
}) => React__default.CSSProperties;
|
|
6111
|
-
/** Function to generate
|
|
6112
|
-
|
|
6113
|
-
|
|
5916
|
+
/** Function to generate description styles */
|
|
5917
|
+
description?: () => React__default.CSSProperties;
|
|
5918
|
+
/** Function to generate additional content styles */
|
|
5919
|
+
additionalContent?: () => React__default.CSSProperties;
|
|
5920
|
+
/** Function to generate actions styles */
|
|
5921
|
+
actions?: () => React__default.CSSProperties;
|
|
5922
|
+
/** Function to generate button styles */
|
|
5923
|
+
button?: (params: {
|
|
5924
|
+
isLink: boolean;
|
|
5925
|
+
isPrimary: boolean;
|
|
6114
5926
|
}) => React__default.CSSProperties;
|
|
5927
|
+
/** Function to generate status styles */
|
|
5928
|
+
status?: () => React__default.CSSProperties;
|
|
6115
5929
|
};
|
|
6116
5930
|
/** Custom event handlers */
|
|
6117
5931
|
handlers?: {
|
|
6118
|
-
/** Custom
|
|
6119
|
-
|
|
6120
|
-
/** Custom
|
|
6121
|
-
|
|
5932
|
+
/** Custom handler for primary button action */
|
|
5933
|
+
onLearnMoreAction?: () => void;
|
|
5934
|
+
/** Custom handler for secondary button action */
|
|
5935
|
+
onListAction?: () => void;
|
|
5936
|
+
/** Custom handler for component mount */
|
|
5937
|
+
onMount?: () => void;
|
|
5938
|
+
/** Custom handler for component unmount */
|
|
5939
|
+
onUnmount?: () => void;
|
|
6122
5940
|
};
|
|
6123
5941
|
/** Configuration options */
|
|
6124
5942
|
config?: {
|
|
5943
|
+
/** Custom button labels */
|
|
5944
|
+
buttonLabels?: {
|
|
5945
|
+
learnMore?: string;
|
|
5946
|
+
listAction?: string;
|
|
5947
|
+
};
|
|
6125
5948
|
/** Custom ARIA labels */
|
|
6126
5949
|
ariaLabels?: {
|
|
6127
|
-
container?:
|
|
6128
|
-
|
|
6129
|
-
|
|
6130
|
-
|
|
6131
|
-
};
|
|
6132
|
-
/** Custom scroll behavior */
|
|
6133
|
-
scroll?: {
|
|
6134
|
-
touchMaxHeight?: string;
|
|
6135
|
-
mouseMaxHeight?: string;
|
|
6136
|
-
gap?: {
|
|
6137
|
-
touch?: string;
|
|
6138
|
-
mouse?: string;
|
|
6139
|
-
};
|
|
5950
|
+
container?: string;
|
|
5951
|
+
contentSection?: string;
|
|
5952
|
+
actions?: string;
|
|
5953
|
+
additionalContent?: string;
|
|
6140
5954
|
};
|
|
6141
5955
|
};
|
|
6142
|
-
/** ConnectCard customization for network cards */
|
|
6143
|
-
connectCard?: ConnectCardCustomization;
|
|
6144
|
-
/** Disclaimer customization */
|
|
6145
|
-
disclaimer?: DisclaimerCustomization;
|
|
6146
5956
|
};
|
|
6147
5957
|
/**
|
|
6148
|
-
* Props for the
|
|
5958
|
+
* Props for the Disclaimer component
|
|
6149
5959
|
*/
|
|
6150
|
-
interface
|
|
6151
|
-
/**
|
|
6152
|
-
|
|
6153
|
-
/**
|
|
6154
|
-
|
|
6155
|
-
/**
|
|
6156
|
-
|
|
5960
|
+
interface DisclaimerProps {
|
|
5961
|
+
/** Main title text for the disclaimer */
|
|
5962
|
+
title: string;
|
|
5963
|
+
/** Descriptive text explaining the disclaimer content */
|
|
5964
|
+
description: string;
|
|
5965
|
+
/** Action for the primary "Learn More" button - can be URL or callback */
|
|
5966
|
+
learnMoreAction: ButtonAction;
|
|
5967
|
+
/** Optional action for the secondary "List of Networks" button */
|
|
5968
|
+
listAction?: ButtonAction;
|
|
5969
|
+
/** Custom CSS classes for styling the disclaimer container */
|
|
5970
|
+
className?: string;
|
|
5971
|
+
/** Optional custom ARIA label for enhanced accessibility */
|
|
5972
|
+
'aria-label'?: string;
|
|
5973
|
+
/** Whether to show the disclaimer in compact mode */
|
|
5974
|
+
compact?: boolean;
|
|
5975
|
+
/** Additional content to display below the description */
|
|
5976
|
+
children?: React__default.ReactNode;
|
|
5977
|
+
/** Custom test ID for testing purposes */
|
|
5978
|
+
'data-testid'?: string;
|
|
5979
|
+
/** Whether the disclaimer should be announced to screen readers */
|
|
5980
|
+
announceToScreenReader?: boolean;
|
|
6157
5981
|
/** Customization options */
|
|
6158
|
-
customization?:
|
|
5982
|
+
customization?: DisclaimerCustomization;
|
|
6159
5983
|
}
|
|
6160
5984
|
/**
|
|
6161
|
-
*
|
|
6162
|
-
*
|
|
6163
|
-
* This component provides a network selection interface when a wallet supports multiple blockchains:
|
|
6164
|
-
* - Visual network cards with blockchain icons and names
|
|
6165
|
-
* - Responsive layout adapting to touch/mouse interfaces
|
|
6166
|
-
* - Error handling for invalid connector states
|
|
6167
|
-
* - Educational content about blockchain networks
|
|
6168
|
-
* - Full accessibility support with semantic structure
|
|
6169
|
-
* - External documentation links for each network
|
|
6170
|
-
* - Complete customization of all child components and styling
|
|
6171
|
-
*
|
|
6172
|
-
* Use cases:
|
|
6173
|
-
* - Multi-network wallets (e.g., MetaMask supporting EVM chains)
|
|
6174
|
-
* - Cross-chain wallets supporting both EVM and Solana
|
|
6175
|
-
* - Network-specific connection requirements
|
|
6176
|
-
* - User education about blockchain differences
|
|
6177
|
-
*
|
|
6178
|
-
* Layout features:
|
|
6179
|
-
* - Touch devices: Horizontal scrolling layout for easy mobile navigation
|
|
6180
|
-
* - Mouse devices: Vertical layout with fixed height scrolling
|
|
6181
|
-
* - Network icons with Web3Icon integration for consistency
|
|
6182
|
-
* - External links for additional network information
|
|
5985
|
+
* Educational disclaimer component with call-to-action buttons
|
|
6183
5986
|
*
|
|
6184
|
-
*
|
|
6185
|
-
* -
|
|
6186
|
-
* -
|
|
6187
|
-
* -
|
|
6188
|
-
* -
|
|
5987
|
+
* This component provides educational content with actionable buttons for:
|
|
5988
|
+
* - Informational disclaimers about wallets, networks, or other concepts
|
|
5989
|
+
* - Educational content with "Learn More" functionality
|
|
5990
|
+
* - Network information with optional "List of Networks" access
|
|
5991
|
+
* - Responsive layout with proper spacing and visual hierarchy
|
|
5992
|
+
* - Full WCAG accessibility compliance with screen reader support
|
|
5993
|
+
* - Keyboard navigation with proper focus management
|
|
5994
|
+
* - Semantic HTML structure with comprehensive ARIA labeling
|
|
5995
|
+
* - Internationalization support for button labels
|
|
5996
|
+
* - Support for both internal callbacks and external links
|
|
5997
|
+
* - Flexible content areas with optional children support
|
|
5998
|
+
* - Full customization of all child components
|
|
6189
5999
|
*
|
|
6190
|
-
*
|
|
6191
|
-
* -
|
|
6192
|
-
* -
|
|
6193
|
-
* -
|
|
6194
|
-
* - Keyboard navigation support for all interactive elements
|
|
6195
|
-
* - Error announcements with live regions
|
|
6000
|
+
* The component automatically handles different action types:
|
|
6001
|
+
* - **String actions**: Rendered as external links with security attributes
|
|
6002
|
+
* - **Function actions**: Rendered as buttons with callback execution
|
|
6003
|
+
* - **Mixed actions**: Can combine both types for different buttons
|
|
6196
6004
|
*
|
|
6197
6005
|
* @example Basic usage
|
|
6198
6006
|
* ```tsx
|
|
6199
|
-
* <
|
|
6200
|
-
*
|
|
6201
|
-
*
|
|
6202
|
-
*
|
|
6203
|
-
*
|
|
6204
|
-
* }}
|
|
6007
|
+
* <Disclaimer
|
|
6008
|
+
* title="What is a wallet?"
|
|
6009
|
+
* description="Wallets are essential for managing your crypto..."
|
|
6010
|
+
* learnMoreAction={() => setContentType('about')}
|
|
6011
|
+
* listAction="https://example.com/networks"
|
|
6205
6012
|
* />
|
|
6206
6013
|
* ```
|
|
6207
6014
|
*
|
|
6208
6015
|
* @example With customization
|
|
6209
6016
|
* ```tsx
|
|
6210
|
-
* <
|
|
6211
|
-
*
|
|
6212
|
-
*
|
|
6213
|
-
*
|
|
6017
|
+
* <Disclaimer
|
|
6018
|
+
* title="Network Information"
|
|
6019
|
+
* description="Choose the right network for your transactions"
|
|
6020
|
+
* learnMoreAction={handleLearnMore}
|
|
6021
|
+
* compact
|
|
6214
6022
|
* customization={{
|
|
6215
|
-
* components: {
|
|
6216
|
-
* Container: CustomNetworkContainer,
|
|
6217
|
-
* NetworkIcon: CustomNetworkIcon
|
|
6218
|
-
* },
|
|
6219
6023
|
* classNames: {
|
|
6220
|
-
*
|
|
6221
|
-
*
|
|
6024
|
+
* container: ({ compact }) => compact ? 'custom-compact' : 'custom-full',
|
|
6025
|
+
* title: () => 'custom-title-styling'
|
|
6222
6026
|
* },
|
|
6223
|
-
*
|
|
6224
|
-
*
|
|
6225
|
-
* analytics.track('network_selected', { network: networkData.name });
|
|
6226
|
-
* originalHandler(networkData.adapter);
|
|
6227
|
-
* }
|
|
6027
|
+
* components: {
|
|
6028
|
+
* LinkButton: CustomLinkButton
|
|
6228
6029
|
* }
|
|
6229
6030
|
* }}
|
|
6230
6031
|
* />
|
|
6231
6032
|
* ```
|
|
6232
6033
|
*/
|
|
6233
|
-
declare const
|
|
6034
|
+
declare const Disclaimer: React__default.ForwardRefExoticComponent<DisclaimerProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
6234
6035
|
|
|
6235
6036
|
/**
|
|
6236
|
-
*
|
|
6237
|
-
*
|
|
6238
|
-
* Combines chain configuration with wallet-specific requirements to determine
|
|
6239
|
-
* which chains should be available for a given wallet type.
|
|
6240
|
-
*
|
|
6241
|
-
* @interface GetChainsListParams
|
|
6242
|
-
* @extends InitialChains
|
|
6243
|
-
* @since 1.0.0
|
|
6244
|
-
*
|
|
6245
|
-
* @example
|
|
6246
|
-
* ```typescript
|
|
6247
|
-
* const params: GetChainsListParams = {
|
|
6248
|
-
* walletType: WalletType.EVM_METAMASK,
|
|
6249
|
-
* appChains: [
|
|
6250
|
-
* { id: 1, name: 'Ethereum' },
|
|
6251
|
-
* { id: 137, name: 'Polygon' }
|
|
6252
|
-
* ],
|
|
6253
|
-
* chains: [1, 137] // Optional filter
|
|
6254
|
-
* };
|
|
6255
|
-
* ```
|
|
6256
|
-
*/
|
|
6257
|
-
interface GetChainsListParams extends InitialChains {
|
|
6258
|
-
/** The wallet type to determine chain compatibility */
|
|
6259
|
-
walletType: WalletType;
|
|
6260
|
-
/** Optional array of specific chain identifiers to filter or validate */
|
|
6261
|
-
chains?: ChainIdentifierArray;
|
|
6262
|
-
}
|
|
6263
|
-
/**
|
|
6264
|
-
* Retrieves chain list for a specific wallet type with automatic adapter loading.
|
|
6265
|
-
*
|
|
6266
|
-
* This is the primary function for getting blockchain-compatible chains based on
|
|
6267
|
-
* wallet type and configuration. It automatically determines the correct adapter,
|
|
6268
|
-
* loads it if necessary, and falls back to safe defaults if loading fails.
|
|
6269
|
-
*
|
|
6270
|
-
* The function supports all major blockchain types:
|
|
6271
|
-
* - EVM chains: Returns numeric chain IDs from app configuration
|
|
6272
|
-
* - Solana clusters: Returns string cluster names from RPC configuration
|
|
6273
|
-
* - Future blockchains: Extensible through the adapter pattern
|
|
6274
|
-
*
|
|
6275
|
-
* @param params - Configuration object with wallet type and chain data
|
|
6276
|
-
* @returns Promise resolving to array of chain identifiers
|
|
6277
|
-
*
|
|
6278
|
-
* @example
|
|
6279
|
-
* ```typescript
|
|
6280
|
-
* // Get EVM chains for MetaMask
|
|
6281
|
-
* const evmChains = await getChainsListByWalletType({
|
|
6282
|
-
* walletType: WalletType.EVM_METAMASK,
|
|
6283
|
-
* appChains: [
|
|
6284
|
-
* { id: 1, name: 'Ethereum' },
|
|
6285
|
-
* { id: 137, name: 'Polygon' }
|
|
6286
|
-
* ]
|
|
6287
|
-
* });
|
|
6288
|
-
* // Returns: [1, 137]
|
|
6289
|
-
*
|
|
6290
|
-
* // Get Solana clusters for Phantom
|
|
6291
|
-
* const solanaClusters = await getChainsListByWalletType({
|
|
6292
|
-
* walletType: WalletType.SOLANA_PHANTOM,
|
|
6293
|
-
* solanaRPCUrls: {
|
|
6294
|
-
* 'mainnet-beta': 'https://api.mainnet-beta.solana.com',
|
|
6295
|
-
* 'devnet': 'https://api.devnet.solana.com'
|
|
6296
|
-
* }
|
|
6297
|
-
* });
|
|
6298
|
-
* // Returns: ['mainnet-beta', 'devnet']
|
|
6299
|
-
* ```
|
|
6300
|
-
*
|
|
6301
|
-
* @since 1.0.0
|
|
6037
|
+
* @file NetworkSelections component with comprehensive customization options for network selection.
|
|
6302
6038
|
*/
|
|
6303
|
-
|
|
6039
|
+
|
|
6304
6040
|
/**
|
|
6305
|
-
*
|
|
6306
|
-
*
|
|
6307
|
-
* This function provides immediate results by using only adapters that have
|
|
6308
|
-
* already been loaded into the registry cache. It will not trigger new
|
|
6309
|
-
* loading operations, making it safe for synchronous contexts but potentially
|
|
6310
|
-
* less complete than the async version.
|
|
6311
|
-
*
|
|
6312
|
-
* Use this function when:
|
|
6313
|
-
* - You've pre-loaded adapters during app initialization
|
|
6314
|
-
* - You need immediate results without async overhead
|
|
6315
|
-
* - You're in a synchronous context where async calls aren't feasible
|
|
6316
|
-
*
|
|
6317
|
-
* @param params - Configuration object with wallet type and chain data
|
|
6318
|
-
* @returns Array of chain identifiers (empty if adapter not loaded)
|
|
6319
|
-
*
|
|
6320
|
-
* @example
|
|
6321
|
-
* ```typescript
|
|
6322
|
-
* // Pre-load adapters first
|
|
6323
|
-
* await preloadChainAdapters([OrbitAdapter.EVM, OrbitAdapter.SOLANA]);
|
|
6324
|
-
*
|
|
6325
|
-
* // Now safe to use sync version
|
|
6326
|
-
* const chains = getChainsListByWalletTypeSync({
|
|
6327
|
-
* walletType: WalletType.EVM_METAMASK,
|
|
6328
|
-
* appChains: evmConfiguration
|
|
6329
|
-
* });
|
|
6330
|
-
* ```
|
|
6331
|
-
*
|
|
6332
|
-
* @since 1.0.0
|
|
6041
|
+
* Network data for display
|
|
6333
6042
|
*/
|
|
6334
|
-
|
|
6043
|
+
interface NetworkData {
|
|
6044
|
+
/** Network adapter */
|
|
6045
|
+
adapter: OrbitAdapter;
|
|
6046
|
+
/** Chain ID for icon display */
|
|
6047
|
+
chainId?: number | string;
|
|
6048
|
+
/** Network display name */
|
|
6049
|
+
name: string;
|
|
6050
|
+
/** Network info link URL */
|
|
6051
|
+
infoLink?: string;
|
|
6052
|
+
/** Network index in list */
|
|
6053
|
+
index: number;
|
|
6054
|
+
}
|
|
6335
6055
|
/**
|
|
6336
|
-
*
|
|
6337
|
-
*
|
|
6338
|
-
* Uses the EVM adapter to perform comprehensive validation, falling back to
|
|
6339
|
-
* basic type checking if the adapter isn't available. EVM chains typically
|
|
6340
|
-
* use numeric identifiers.
|
|
6341
|
-
*
|
|
6342
|
-
* @param chains - Array of chain identifiers to validate
|
|
6343
|
-
* @returns Promise resolving to true if chains are valid for EVM
|
|
6344
|
-
*
|
|
6345
|
-
* @example
|
|
6346
|
-
* ```typescript
|
|
6347
|
-
* const isEvm = await isEvmChainList([1, 137, 56]); // true
|
|
6348
|
-
* const notEvm = await isEvmChainList(['mainnet-beta']); // false
|
|
6349
|
-
* ```
|
|
6350
|
-
*
|
|
6351
|
-
* @since 1.0.0
|
|
6056
|
+
* Network selections data for customization context
|
|
6352
6057
|
*/
|
|
6353
|
-
|
|
6354
|
-
/**
|
|
6355
|
-
|
|
6356
|
-
|
|
6357
|
-
|
|
6358
|
-
|
|
6058
|
+
interface NetworkSelectionsData {
|
|
6059
|
+
/** Currently active connector name */
|
|
6060
|
+
activeConnector?: string;
|
|
6061
|
+
/** Available grouped connectors */
|
|
6062
|
+
connectors: GroupedConnector[];
|
|
6063
|
+
/** Whether device is touch-enabled */
|
|
6064
|
+
isTouch: boolean;
|
|
6065
|
+
/** Whether in error state */
|
|
6066
|
+
isError: boolean;
|
|
6067
|
+
/** Available networks */
|
|
6068
|
+
networks: NetworkData[];
|
|
6069
|
+
}
|
|
6070
|
+
type ContainerProps$3 = {
|
|
6071
|
+
className?: string;
|
|
6072
|
+
style?: React__default.CSSProperties;
|
|
6073
|
+
children: React__default.ReactNode;
|
|
6074
|
+
role?: string;
|
|
6075
|
+
'aria-labelledby'?: string;
|
|
6076
|
+
selectionsData: NetworkSelectionsData;
|
|
6077
|
+
} & React__default.RefAttributes<HTMLDivElement>;
|
|
6078
|
+
type TitleProps = {
|
|
6079
|
+
className?: string;
|
|
6080
|
+
style?: React__default.CSSProperties;
|
|
6081
|
+
children: React__default.ReactNode;
|
|
6082
|
+
id?: string;
|
|
6083
|
+
role?: string;
|
|
6084
|
+
'aria-level'?: number;
|
|
6085
|
+
selectionsData: NetworkSelectionsData;
|
|
6086
|
+
} & React__default.RefAttributes<HTMLHeadingElement>;
|
|
6087
|
+
type NetworkListProps = {
|
|
6088
|
+
className?: string;
|
|
6089
|
+
style?: React__default.CSSProperties;
|
|
6090
|
+
children: React__default.ReactNode;
|
|
6091
|
+
role?: string;
|
|
6092
|
+
'aria-label'?: string;
|
|
6093
|
+
selectionsData: NetworkSelectionsData;
|
|
6094
|
+
} & React__default.RefAttributes<HTMLDivElement>;
|
|
6095
|
+
type NetworkItemProps = {
|
|
6096
|
+
className?: string;
|
|
6097
|
+
style?: React__default.CSSProperties;
|
|
6098
|
+
children: React__default.ReactNode;
|
|
6099
|
+
role?: string;
|
|
6100
|
+
networkData: NetworkData;
|
|
6101
|
+
selectionsData: NetworkSelectionsData;
|
|
6102
|
+
} & React__default.RefAttributes<HTMLDivElement>;
|
|
6103
|
+
type NetworkIconProps = {
|
|
6104
|
+
className?: string;
|
|
6105
|
+
style?: React__default.CSSProperties;
|
|
6106
|
+
children: React__default.ReactNode;
|
|
6107
|
+
role?: string;
|
|
6108
|
+
'aria-label'?: string;
|
|
6109
|
+
networkData: NetworkData;
|
|
6110
|
+
selectionsData: NetworkSelectionsData;
|
|
6111
|
+
} & React__default.RefAttributes<HTMLDivElement>;
|
|
6112
|
+
type ErrorContainerProps = {
|
|
6113
|
+
className?: string;
|
|
6114
|
+
style?: React__default.CSSProperties;
|
|
6115
|
+
children: React__default.ReactNode;
|
|
6116
|
+
role?: string;
|
|
6117
|
+
'aria-live'?: 'polite' | 'assertive';
|
|
6118
|
+
selectionsData: NetworkSelectionsData;
|
|
6119
|
+
} & React__default.RefAttributes<HTMLDivElement>;
|
|
6120
|
+
type ErrorIconProps = {
|
|
6121
|
+
className?: string;
|
|
6122
|
+
style?: React__default.CSSProperties;
|
|
6123
|
+
children: React__default.ReactNode;
|
|
6124
|
+
'aria-hidden'?: boolean;
|
|
6125
|
+
selectionsData: NetworkSelectionsData;
|
|
6126
|
+
} & React__default.RefAttributes<HTMLDivElement>;
|
|
6127
|
+
type ErrorTitleProps = {
|
|
6128
|
+
className?: string;
|
|
6129
|
+
style?: React__default.CSSProperties;
|
|
6130
|
+
children: React__default.ReactNode;
|
|
6131
|
+
role?: string;
|
|
6132
|
+
'aria-level'?: number;
|
|
6133
|
+
selectionsData: NetworkSelectionsData;
|
|
6134
|
+
} & React__default.RefAttributes<HTMLHeadingElement>;
|
|
6135
|
+
type ErrorMessageProps$1 = {
|
|
6136
|
+
className?: string;
|
|
6137
|
+
style?: React__default.CSSProperties;
|
|
6138
|
+
children: React__default.ReactNode;
|
|
6139
|
+
role?: string;
|
|
6140
|
+
selectionsData: NetworkSelectionsData;
|
|
6141
|
+
} & React__default.RefAttributes<HTMLParagraphElement>;
|
|
6142
|
+
/**
|
|
6143
|
+
* NetworkSelections customization options
|
|
6144
|
+
*/
|
|
6145
|
+
type NetworkSelectionsCustomization = {
|
|
6146
|
+
/** Custom components */
|
|
6147
|
+
components?: {
|
|
6148
|
+
/** Custom container wrapper */
|
|
6149
|
+
Container?: ComponentType<ContainerProps$3>;
|
|
6150
|
+
/** Custom title */
|
|
6151
|
+
Title?: ComponentType<TitleProps>;
|
|
6152
|
+
/** Custom network list */
|
|
6153
|
+
NetworkList?: ComponentType<NetworkListProps>;
|
|
6154
|
+
/** Custom network item wrapper */
|
|
6155
|
+
NetworkItem?: ComponentType<NetworkItemProps>;
|
|
6156
|
+
/** Custom network icon wrapper */
|
|
6157
|
+
NetworkIcon?: ComponentType<NetworkIconProps>;
|
|
6158
|
+
/** Custom error container */
|
|
6159
|
+
ErrorContainer?: ComponentType<ErrorContainerProps>;
|
|
6160
|
+
/** Custom error icon wrapper */
|
|
6161
|
+
ErrorIcon?: ComponentType<ErrorIconProps>;
|
|
6162
|
+
/** Custom error title */
|
|
6163
|
+
ErrorTitle?: ComponentType<ErrorTitleProps>;
|
|
6164
|
+
/** Custom error message */
|
|
6165
|
+
ErrorMessage?: ComponentType<ErrorMessageProps$1>;
|
|
6166
|
+
};
|
|
6167
|
+
/** Custom class name generators */
|
|
6168
|
+
classNames?: {
|
|
6169
|
+
/** Function to generate container classes */
|
|
6170
|
+
container?: (params: {
|
|
6171
|
+
selectionsData: NetworkSelectionsData;
|
|
6172
|
+
}) => string;
|
|
6173
|
+
/** Function to generate title classes */
|
|
6174
|
+
title?: (params: {
|
|
6175
|
+
selectionsData: NetworkSelectionsData;
|
|
6176
|
+
}) => string;
|
|
6177
|
+
/** Function to generate network list classes */
|
|
6178
|
+
networkList?: (params: {
|
|
6179
|
+
selectionsData: NetworkSelectionsData;
|
|
6180
|
+
}) => string;
|
|
6181
|
+
/** Function to generate network item classes */
|
|
6182
|
+
networkItem?: (params: {
|
|
6183
|
+
networkData: NetworkData;
|
|
6184
|
+
selectionsData: NetworkSelectionsData;
|
|
6185
|
+
}) => string;
|
|
6186
|
+
/** Function to generate network icon classes */
|
|
6187
|
+
networkIcon?: (params: {
|
|
6188
|
+
networkData: NetworkData;
|
|
6189
|
+
selectionsData: NetworkSelectionsData;
|
|
6190
|
+
}) => string;
|
|
6191
|
+
/** Function to generate error container classes */
|
|
6192
|
+
errorContainer?: (params: {
|
|
6193
|
+
selectionsData: NetworkSelectionsData;
|
|
6194
|
+
}) => string;
|
|
6195
|
+
/** Function to generate error icon classes */
|
|
6196
|
+
errorIcon?: (params: {
|
|
6197
|
+
selectionsData: NetworkSelectionsData;
|
|
6198
|
+
}) => string;
|
|
6199
|
+
/** Function to generate error title classes */
|
|
6200
|
+
errorTitle?: (params: {
|
|
6201
|
+
selectionsData: NetworkSelectionsData;
|
|
6202
|
+
}) => string;
|
|
6203
|
+
/** Function to generate error message classes */
|
|
6204
|
+
errorMessage?: (params: {
|
|
6205
|
+
selectionsData: NetworkSelectionsData;
|
|
6206
|
+
}) => string;
|
|
6207
|
+
};
|
|
6208
|
+
/** Custom style generators */
|
|
6209
|
+
styles?: {
|
|
6210
|
+
/** Function to generate container styles */
|
|
6211
|
+
container?: (params: {
|
|
6212
|
+
selectionsData: NetworkSelectionsData;
|
|
6213
|
+
}) => React__default.CSSProperties;
|
|
6214
|
+
/** Function to generate title styles */
|
|
6215
|
+
title?: (params: {
|
|
6216
|
+
selectionsData: NetworkSelectionsData;
|
|
6217
|
+
}) => React__default.CSSProperties;
|
|
6218
|
+
/** Function to generate network list styles */
|
|
6219
|
+
networkList?: (params: {
|
|
6220
|
+
selectionsData: NetworkSelectionsData;
|
|
6221
|
+
}) => React__default.CSSProperties;
|
|
6222
|
+
/** Function to generate network item styles */
|
|
6223
|
+
networkItem?: (params: {
|
|
6224
|
+
networkData: NetworkData;
|
|
6225
|
+
selectionsData: NetworkSelectionsData;
|
|
6226
|
+
}) => React__default.CSSProperties;
|
|
6227
|
+
/** Function to generate network icon styles */
|
|
6228
|
+
networkIcon?: (params: {
|
|
6229
|
+
networkData: NetworkData;
|
|
6230
|
+
selectionsData: NetworkSelectionsData;
|
|
6231
|
+
}) => React__default.CSSProperties;
|
|
6232
|
+
/** Function to generate error container styles */
|
|
6233
|
+
errorContainer?: (params: {
|
|
6234
|
+
selectionsData: NetworkSelectionsData;
|
|
6235
|
+
}) => React__default.CSSProperties;
|
|
6236
|
+
/** Function to generate error icon styles */
|
|
6237
|
+
errorIcon?: (params: {
|
|
6238
|
+
selectionsData: NetworkSelectionsData;
|
|
6239
|
+
}) => React__default.CSSProperties;
|
|
6240
|
+
/** Function to generate error title styles */
|
|
6241
|
+
errorTitle?: (params: {
|
|
6242
|
+
selectionsData: NetworkSelectionsData;
|
|
6243
|
+
}) => React__default.CSSProperties;
|
|
6244
|
+
/** Function to generate error message styles */
|
|
6245
|
+
errorMessage?: (params: {
|
|
6246
|
+
selectionsData: NetworkSelectionsData;
|
|
6247
|
+
}) => React__default.CSSProperties;
|
|
6248
|
+
};
|
|
6249
|
+
/** Custom event handlers */
|
|
6250
|
+
handlers?: {
|
|
6251
|
+
/** Custom network click handler */
|
|
6252
|
+
onNetworkClick?: (networkData: NetworkData, selectionsData: NetworkSelectionsData, originalHandler: (network: OrbitAdapter) => void) => void;
|
|
6253
|
+
/** Custom error retry handler */
|
|
6254
|
+
onErrorRetry?: (selectionsData: NetworkSelectionsData) => void;
|
|
6255
|
+
};
|
|
6256
|
+
/** Configuration options */
|
|
6257
|
+
config?: {
|
|
6258
|
+
/** Custom ARIA labels */
|
|
6259
|
+
ariaLabels?: {
|
|
6260
|
+
container?: (selectionsData: NetworkSelectionsData) => string;
|
|
6261
|
+
networkList?: (selectionsData: NetworkSelectionsData) => string;
|
|
6262
|
+
networkIcon?: (networkData: NetworkData) => string;
|
|
6263
|
+
errorContainer?: (selectionsData: NetworkSelectionsData) => string;
|
|
6264
|
+
};
|
|
6265
|
+
/** Custom scroll behavior */
|
|
6266
|
+
scroll?: {
|
|
6267
|
+
touchMaxHeight?: string;
|
|
6268
|
+
mouseMaxHeight?: string;
|
|
6269
|
+
gap?: {
|
|
6270
|
+
touch?: string;
|
|
6271
|
+
mouse?: string;
|
|
6272
|
+
};
|
|
6273
|
+
};
|
|
6274
|
+
};
|
|
6275
|
+
/** ConnectCard customization for network cards */
|
|
6276
|
+
connectCard?: ConnectCardCustomization;
|
|
6277
|
+
/** Disclaimer customization */
|
|
6278
|
+
disclaimer?: DisclaimerCustomization;
|
|
6279
|
+
};
|
|
6280
|
+
/**
|
|
6281
|
+
* Props for the NetworkSelections component
|
|
6282
|
+
*/
|
|
6283
|
+
interface NetworkSelectionsProps {
|
|
6284
|
+
/** Name of the currently active wallet connector */
|
|
6285
|
+
activeConnector: string | undefined;
|
|
6286
|
+
/** Array of grouped wallet connectors with their supported networks */
|
|
6287
|
+
connectors: GroupedConnector[];
|
|
6288
|
+
/** Click handler for network selection */
|
|
6289
|
+
onClick: (adapter: OrbitAdapter, walletType: WalletType) => Promise<void>;
|
|
6290
|
+
/** Customization options */
|
|
6291
|
+
customization?: NetworkSelectionsCustomization;
|
|
6292
|
+
}
|
|
6293
|
+
/**
|
|
6294
|
+
* NetworkSelections component - Network/blockchain selection interface for multi-network wallets with full customization
|
|
6295
|
+
*
|
|
6296
|
+
* This component provides a network selection interface when a wallet supports multiple blockchains:
|
|
6297
|
+
* - Visual network cards with blockchain icons and names
|
|
6298
|
+
* - Responsive layout adapting to touch/mouse interfaces
|
|
6299
|
+
* - Error handling for invalid connector states
|
|
6300
|
+
* - Educational content about blockchain networks
|
|
6301
|
+
* - Full accessibility support with semantic structure
|
|
6302
|
+
* - External documentation links for each network
|
|
6303
|
+
* - Complete customization of all child components and styling
|
|
6304
|
+
*
|
|
6305
|
+
* Use cases:
|
|
6306
|
+
* - Multi-network wallets (e.g., MetaMask supporting EVM chains)
|
|
6307
|
+
* - Cross-chain wallets supporting both EVM and Solana
|
|
6308
|
+
* - Network-specific connection requirements
|
|
6309
|
+
* - User education about blockchain differences
|
|
6310
|
+
*
|
|
6311
|
+
* Layout features:
|
|
6312
|
+
* - Touch devices: Horizontal scrolling layout for easy mobile navigation
|
|
6313
|
+
* - Mouse devices: Vertical layout with fixed height scrolling
|
|
6314
|
+
* - Network icons with Web3Icon integration for consistency
|
|
6315
|
+
* - External links for additional network information
|
|
6316
|
+
*
|
|
6317
|
+
* Error handling:
|
|
6318
|
+
* - Graceful fallback when active connector is not found
|
|
6319
|
+
* - Clear error messaging with actionable guidance
|
|
6320
|
+
* - Visual error indicators with warning icons
|
|
6321
|
+
* - Accessible error state announcements
|
|
6322
|
+
*
|
|
6323
|
+
* Accessibility features:
|
|
6324
|
+
* - Semantic heading structure for network selection
|
|
6325
|
+
* - Proper ARIA labels for error states and selections
|
|
6326
|
+
* - Screen reader friendly network descriptions
|
|
6327
|
+
* - Keyboard navigation support for all interactive elements
|
|
6328
|
+
* - Error announcements with live regions
|
|
6329
|
+
*
|
|
6330
|
+
* @example Basic usage
|
|
6331
|
+
* ```tsx
|
|
6332
|
+
* <NetworkSelections
|
|
6333
|
+
* activeConnector="metamask"
|
|
6334
|
+
* connectors={multiNetworkConnectors}
|
|
6335
|
+
* onClick={async (adapter, walletType) => {
|
|
6336
|
+
* await connectToNetwork(adapter, walletType);
|
|
6337
|
+
* }}
|
|
6338
|
+
* />
|
|
6339
|
+
* ```
|
|
6340
|
+
*
|
|
6341
|
+
* @example With customization
|
|
6342
|
+
* ```tsx
|
|
6343
|
+
* <NetworkSelections
|
|
6344
|
+
* activeConnector="phantom"
|
|
6345
|
+
* connectors={crossChainConnectors}
|
|
6346
|
+
* onClick={(adapter, type) => handleNetworkConnection(adapter, type)}
|
|
6347
|
+
* customization={{
|
|
6348
|
+
* components: {
|
|
6349
|
+
* Container: CustomNetworkContainer,
|
|
6350
|
+
* NetworkIcon: CustomNetworkIcon
|
|
6351
|
+
* },
|
|
6352
|
+
* classNames: {
|
|
6353
|
+
* networkList: ({ selectionsData }) =>
|
|
6354
|
+
* selectionsData.isTouch ? 'touch-network-list' : 'desktop-network-list'
|
|
6355
|
+
* },
|
|
6356
|
+
* handlers: {
|
|
6357
|
+
* onNetworkClick: (networkData, selectionsData, originalHandler) => {
|
|
6358
|
+
* analytics.track('network_selected', { network: networkData.name });
|
|
6359
|
+
* originalHandler(networkData.adapter);
|
|
6360
|
+
* }
|
|
6361
|
+
* }
|
|
6362
|
+
* }}
|
|
6363
|
+
* />
|
|
6364
|
+
* ```
|
|
6365
|
+
*/
|
|
6366
|
+
declare const NetworkSelections: React__default.NamedExoticComponent<NetworkSelectionsProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
6367
|
+
|
|
6368
|
+
/**
|
|
6369
|
+
* Parameters for retrieving chain lists based on wallet configuration.
|
|
6370
|
+
*
|
|
6371
|
+
* Combines chain configuration with wallet-specific requirements to determine
|
|
6372
|
+
* which chains should be available for a given wallet type.
|
|
6373
|
+
*
|
|
6374
|
+
* @interface GetChainsListParams
|
|
6375
|
+
* @extends InitialChains
|
|
6376
|
+
* @since 1.0.0
|
|
6377
|
+
*
|
|
6378
|
+
* @example
|
|
6379
|
+
* ```typescript
|
|
6380
|
+
* const params: GetChainsListParams = {
|
|
6381
|
+
* walletType: WalletType.EVM_METAMASK,
|
|
6382
|
+
* appChains: [
|
|
6383
|
+
* { id: 1, name: 'Ethereum' },
|
|
6384
|
+
* { id: 137, name: 'Polygon' }
|
|
6385
|
+
* ],
|
|
6386
|
+
* chains: [1, 137] // Optional filter
|
|
6387
|
+
* };
|
|
6388
|
+
* ```
|
|
6389
|
+
*/
|
|
6390
|
+
interface GetChainsListParams extends InitialChains {
|
|
6391
|
+
/** The wallet type to determine chain compatibility */
|
|
6392
|
+
walletType: WalletType;
|
|
6393
|
+
/** Optional array of specific chain identifiers to filter or validate */
|
|
6394
|
+
chains?: ChainIdentifierArray;
|
|
6395
|
+
}
|
|
6396
|
+
/**
|
|
6397
|
+
* Retrieves chain list for a specific wallet type with automatic adapter loading.
|
|
6398
|
+
*
|
|
6399
|
+
* This is the primary function for getting blockchain-compatible chains based on
|
|
6400
|
+
* wallet type and configuration. It automatically determines the correct adapter,
|
|
6401
|
+
* loads it if necessary, and falls back to safe defaults if loading fails.
|
|
6402
|
+
*
|
|
6403
|
+
* The function supports all major blockchain types:
|
|
6404
|
+
* - EVM chains: Returns numeric chain IDs from app configuration
|
|
6405
|
+
* - Solana clusters: Returns string cluster names from RPC configuration
|
|
6406
|
+
* - Future blockchains: Extensible through the adapter pattern
|
|
6407
|
+
*
|
|
6408
|
+
* @param params - Configuration object with wallet type and chain data
|
|
6409
|
+
* @returns Promise resolving to array of chain identifiers
|
|
6410
|
+
*
|
|
6411
|
+
* @example
|
|
6412
|
+
* ```typescript
|
|
6413
|
+
* // Get EVM chains for MetaMask
|
|
6414
|
+
* const evmChains = await getChainsListByWalletType({
|
|
6415
|
+
* walletType: WalletType.EVM_METAMASK,
|
|
6416
|
+
* appChains: [
|
|
6417
|
+
* { id: 1, name: 'Ethereum' },
|
|
6418
|
+
* { id: 137, name: 'Polygon' }
|
|
6419
|
+
* ]
|
|
6420
|
+
* });
|
|
6421
|
+
* // Returns: [1, 137]
|
|
6422
|
+
*
|
|
6423
|
+
* // Get Solana clusters for Phantom
|
|
6424
|
+
* const solanaClusters = await getChainsListByWalletType({
|
|
6425
|
+
* walletType: WalletType.SOLANA_PHANTOM,
|
|
6426
|
+
* solanaRPCUrls: {
|
|
6427
|
+
* 'mainnet-beta': 'https://api.mainnet-beta.solana.com',
|
|
6428
|
+
* 'devnet': 'https://api.devnet.solana.com'
|
|
6429
|
+
* }
|
|
6430
|
+
* });
|
|
6431
|
+
* // Returns: ['mainnet-beta', 'devnet']
|
|
6432
|
+
* ```
|
|
6433
|
+
*
|
|
6434
|
+
* @since 1.0.0
|
|
6435
|
+
*/
|
|
6436
|
+
declare function getChainsListByWalletType(params: GetChainsListParams): Promise<(string | number)[]>;
|
|
6437
|
+
/**
|
|
6438
|
+
* Synchronous version that only works with pre-loaded adapters.
|
|
6439
|
+
*
|
|
6440
|
+
* This function provides immediate results by using only adapters that have
|
|
6441
|
+
* already been loaded into the registry cache. It will not trigger new
|
|
6442
|
+
* loading operations, making it safe for synchronous contexts but potentially
|
|
6443
|
+
* less complete than the async version.
|
|
6444
|
+
*
|
|
6445
|
+
* Use this function when:
|
|
6446
|
+
* - You've pre-loaded adapters during app initialization
|
|
6447
|
+
* - You need immediate results without async overhead
|
|
6448
|
+
* - You're in a synchronous context where async calls aren't feasible
|
|
6449
|
+
*
|
|
6450
|
+
* @param params - Configuration object with wallet type and chain data
|
|
6451
|
+
* @returns Array of chain identifiers (empty if adapter not loaded)
|
|
6452
|
+
*
|
|
6453
|
+
* @example
|
|
6454
|
+
* ```typescript
|
|
6455
|
+
* // Pre-load adapters first
|
|
6456
|
+
* await preloadChainAdapters([OrbitAdapter.EVM, OrbitAdapter.SOLANA]);
|
|
6457
|
+
*
|
|
6458
|
+
* // Now safe to use sync version
|
|
6459
|
+
* const chains = getChainsListByWalletTypeSync({
|
|
6460
|
+
* walletType: WalletType.EVM_METAMASK,
|
|
6461
|
+
* appChains: evmConfiguration
|
|
6462
|
+
* });
|
|
6463
|
+
* ```
|
|
6464
|
+
*
|
|
6465
|
+
* @since 1.0.0
|
|
6466
|
+
*/
|
|
6467
|
+
declare function getChainsListByWalletTypeSync(params: GetChainsListParams): (string | number)[];
|
|
6468
|
+
/**
|
|
6469
|
+
* Validates if a chain list conforms to EVM format (with adapter loading).
|
|
6470
|
+
*
|
|
6471
|
+
* Uses the EVM adapter to perform comprehensive validation, falling back to
|
|
6472
|
+
* basic type checking if the adapter isn't available. EVM chains typically
|
|
6473
|
+
* use numeric identifiers.
|
|
6474
|
+
*
|
|
6475
|
+
* @param chains - Array of chain identifiers to validate
|
|
6476
|
+
* @returns Promise resolving to true if chains are valid for EVM
|
|
6477
|
+
*
|
|
6478
|
+
* @example
|
|
6479
|
+
* ```typescript
|
|
6480
|
+
* const isEvm = await isEvmChainList([1, 137, 56]); // true
|
|
6481
|
+
* const notEvm = await isEvmChainList(['mainnet-beta']); // false
|
|
6482
|
+
* ```
|
|
6483
|
+
*
|
|
6484
|
+
* @since 1.0.0
|
|
6485
|
+
*/
|
|
6486
|
+
declare function isEvmChainList(chains: (string | number)[]): Promise<boolean>;
|
|
6487
|
+
/**
|
|
6488
|
+
* Validates if a chain list conforms to Solana format (with adapter loading).
|
|
6489
|
+
*
|
|
6490
|
+
* Uses the Solana adapter to perform comprehensive validation, falling back to
|
|
6491
|
+
* basic type checking if the adapter isn't available. Solana chains typically
|
|
6359
6492
|
* use string cluster names.
|
|
6360
6493
|
*
|
|
6361
6494
|
* @param chains - Array of chain identifiers to validate
|
|
@@ -6794,176 +6927,497 @@ declare function getAvailableChainIds({ selectedAdapter, appChains, solanaRPCUrl
|
|
|
6794
6927
|
selectedAdapter: OrbitAdapter;
|
|
6795
6928
|
} & InitialChains): Array<number | string>;
|
|
6796
6929
|
|
|
6797
|
-
interface GroupedConnector {
|
|
6930
|
+
interface GroupedConnector$1 {
|
|
6798
6931
|
name: string;
|
|
6799
6932
|
icon?: string;
|
|
6800
6933
|
adapters: OrbitAdapter[];
|
|
6801
|
-
connectors: (Connector
|
|
6934
|
+
connectors: (Connector & {
|
|
6802
6935
|
adapter: OrbitAdapter;
|
|
6803
6936
|
})[];
|
|
6804
6937
|
}
|
|
6805
6938
|
interface GetGroupedConnectorsParams {
|
|
6806
|
-
connectors: Partial<Record<OrbitAdapter, Connector
|
|
6939
|
+
connectors: Partial<Record<OrbitAdapter, Connector[]>>;
|
|
6807
6940
|
excludeConnectors?: string[];
|
|
6808
6941
|
}
|
|
6809
6942
|
/**
|
|
6810
|
-
* Groups wallet connectors by their formatted names across different adapters.
|
|
6811
|
-
* Filters out specified excluded connectors (like 'injected' wallets).
|
|
6943
|
+
* Groups wallet connectors by their formatted names across different adapters.
|
|
6944
|
+
* Filters out specified excluded connectors (like 'injected' wallets).
|
|
6945
|
+
*/
|
|
6946
|
+
declare function getGroupedConnectors({ connectors, excludeConnectors }?: GetGroupedConnectorsParams): GroupedConnector$1[];
|
|
6947
|
+
/**
|
|
6948
|
+
* Quick helper to check if connectors are available
|
|
6949
|
+
*/
|
|
6950
|
+
declare function hasAvailableConnectors(connectors: Partial<Record<OrbitAdapter, Connector[]>>): boolean;
|
|
6951
|
+
|
|
6952
|
+
interface GetFilteredConnectorsParams {
|
|
6953
|
+
connectors: Partial<Record<OrbitAdapter, Connector[]>>;
|
|
6954
|
+
selectedAdapter?: OrbitAdapter;
|
|
6955
|
+
}
|
|
6956
|
+
/**
|
|
6957
|
+
* Filters grouped connectors by the selected adapter.
|
|
6958
|
+
* Returns all connectors if no adapter is selected, or only connectors
|
|
6959
|
+
* that support the specified adapter if one is provided.
|
|
6960
|
+
*
|
|
6961
|
+
* @param params Configuration object with connectors and optional adapter filter
|
|
6962
|
+
* @returns Filtered array of grouped connectors
|
|
6963
|
+
*/
|
|
6964
|
+
declare function getFilteredConnectors({ connectors, selectedAdapter, }: GetFilteredConnectorsParams): GroupedConnector$1[];
|
|
6965
|
+
/**
|
|
6966
|
+
* Quick helper to check if any connectors exist for an adapter
|
|
6967
|
+
*/
|
|
6968
|
+
declare function hasConnectorsForAdapter(connectors: Partial<Record<OrbitAdapter, Connector[]>>, adapter: OrbitAdapter): boolean;
|
|
6969
|
+
|
|
6970
|
+
declare const getNetworkIcon: (adapter: OrbitAdapter) => {
|
|
6971
|
+
chainId: number;
|
|
6972
|
+
name: string;
|
|
6973
|
+
} | {
|
|
6974
|
+
chainId: string;
|
|
6975
|
+
name: string;
|
|
6976
|
+
} | undefined;
|
|
6977
|
+
|
|
6978
|
+
declare const networksLinks: Partial<Record<OrbitAdapter, {
|
|
6979
|
+
aboutNetwork: string;
|
|
6980
|
+
choseWallet: string;
|
|
6981
|
+
about: string;
|
|
6982
|
+
}>>;
|
|
6983
|
+
|
|
6984
|
+
/**
|
|
6985
|
+
* @fileoverview Central export hub for blockchain utility functions and types.
|
|
6986
|
+
*
|
|
6987
|
+
* This module provides a unified interface for accessing blockchain-related utilities,
|
|
6988
|
+
* offering both synchronous and asynchronous versions of functions to support different
|
|
6989
|
+
* usage patterns and performance requirements.
|
|
6990
|
+
*
|
|
6991
|
+
* Export Strategy:
|
|
6992
|
+
* - Synchronous functions by default for backward compatibility
|
|
6993
|
+
* - Asynchronous versions with "Async" suffix for better performance
|
|
6994
|
+
* - Adapter management functions for system control
|
|
6995
|
+
* - Type exports for TypeScript integration
|
|
6996
|
+
*
|
|
6997
|
+
* @example
|
|
6998
|
+
* ```typescript
|
|
6999
|
+
* // Import synchronous version (backward compatible)
|
|
7000
|
+
* import { getChainsListByWalletType, isEvmChainList } from './utils';
|
|
7001
|
+
*
|
|
7002
|
+
* // Import asynchronous version (better performance)
|
|
7003
|
+
* import {
|
|
7004
|
+
* getChainsListByWalletTypeAsync,
|
|
7005
|
+
* isEvmChainListAsync
|
|
7006
|
+
* } from './utils';
|
|
7007
|
+
*
|
|
7008
|
+
* // Import adapter management
|
|
7009
|
+
* import { preloadChainAdapters, getAdapterStatus } from './utils';
|
|
7010
|
+
*
|
|
7011
|
+
* // Import types
|
|
7012
|
+
* import type { ChainAdapter, AdapterLoadStatus } from './utils';
|
|
7013
|
+
* ```
|
|
7014
|
+
*
|
|
7015
|
+
* @since 1.0.0
|
|
7016
|
+
*/
|
|
7017
|
+
/**
|
|
7018
|
+
* Re-export all functions from the main chain utilities module.
|
|
7019
|
+
* This includes both sync and async versions with proper naming.
|
|
7020
|
+
*/
|
|
7021
|
+
|
|
7022
|
+
/**
|
|
7023
|
+
* Synchronous fallback for getting available Solana clusters.
|
|
7024
|
+
*
|
|
7025
|
+
* This function provides immediate results but with limited functionality.
|
|
7026
|
+
* It serves as a compatibility layer for synchronous contexts where the
|
|
7027
|
+
* async version cannot be used.
|
|
7028
|
+
*
|
|
7029
|
+
* @returns Empty array with warning (use async version for real results)
|
|
7030
|
+
*
|
|
7031
|
+
* @example
|
|
7032
|
+
* ```typescript
|
|
7033
|
+
* // Synchronous fallback (limited functionality)
|
|
7034
|
+
* const clusters = getAvailableSolanaClusters(); // []
|
|
7035
|
+
*
|
|
7036
|
+
* // Preferred async version (full functionality)
|
|
7037
|
+
* const clustersAsync = await getAvailableSolanaClustersAsync();
|
|
7038
|
+
* ```
|
|
7039
|
+
*
|
|
7040
|
+
* @since 1.0.0
|
|
7041
|
+
* @deprecated Use getAvailableSolanaClustersAsync for full functionality
|
|
7042
|
+
*/
|
|
7043
|
+
declare function getAvailableSolanaClusters(): string[];
|
|
7044
|
+
/**
|
|
7045
|
+
* Synchronous fallback for Solana cluster validation.
|
|
7046
|
+
*
|
|
7047
|
+
* This function provides basic validation against known cluster names but
|
|
7048
|
+
* lacks the comprehensive validation logic of the async version. It performs
|
|
7049
|
+
* a simple lookup against standard Solana cluster monikers.
|
|
7050
|
+
*
|
|
7051
|
+
* @param cluster - Cluster name to validate
|
|
7052
|
+
* @returns True if cluster name matches known standard clusters
|
|
7053
|
+
*
|
|
7054
|
+
* @example
|
|
7055
|
+
* ```typescript
|
|
7056
|
+
* // Synchronous fallback (basic validation)
|
|
7057
|
+
* const isValid = isValidSolanaCluster('mainnet-beta'); // true
|
|
7058
|
+
* const isCustom = isValidSolanaCluster('custom-cluster'); // false
|
|
7059
|
+
*
|
|
7060
|
+
* // Preferred async version (comprehensive validation)
|
|
7061
|
+
* const isValidAsync = await isValidSolanaClusterAsync('custom-cluster');
|
|
7062
|
+
* ```
|
|
7063
|
+
*
|
|
7064
|
+
* @since 1.0.0
|
|
7065
|
+
* @deprecated Use isValidSolanaClusterAsync for comprehensive validation
|
|
7066
|
+
*/
|
|
7067
|
+
declare function isValidSolanaCluster(cluster: string): boolean;
|
|
7068
|
+
|
|
7069
|
+
/**
|
|
7070
|
+
* @file NetworkTabs component with comprehensive customization options and animated transitions.
|
|
7071
|
+
*/
|
|
7072
|
+
|
|
7073
|
+
/**
|
|
7074
|
+
* Animation configuration
|
|
7075
|
+
*/
|
|
7076
|
+
interface AnimationConfig {
|
|
7077
|
+
/** Layout animation duration */
|
|
7078
|
+
layoutDuration: number;
|
|
7079
|
+
/** Layout animation easing */
|
|
7080
|
+
layoutEasing: number[];
|
|
7081
|
+
/** Text transition duration */
|
|
7082
|
+
textDuration: number;
|
|
7083
|
+
/** Text transition delay */
|
|
7084
|
+
textDelay?: number;
|
|
7085
|
+
}
|
|
7086
|
+
/**
|
|
7087
|
+
* Network tab data
|
|
7088
|
+
*/
|
|
7089
|
+
interface NetworkTabData {
|
|
7090
|
+
/** Network adapter (undefined for "All") */
|
|
7091
|
+
network: OrbitAdapter | undefined;
|
|
7092
|
+
/** Display name */
|
|
7093
|
+
displayName: string;
|
|
7094
|
+
/** Network info from utils */
|
|
7095
|
+
networkInfo: ReturnType<typeof getNetworkIcon> | null;
|
|
7096
|
+
/** Whether this tab is selected */
|
|
7097
|
+
isSelected: boolean;
|
|
7098
|
+
/** Tab index */
|
|
7099
|
+
index: number;
|
|
7100
|
+
}
|
|
7101
|
+
type ContainerProps$2 = {
|
|
7102
|
+
className?: string;
|
|
7103
|
+
style?: React__default.CSSProperties;
|
|
7104
|
+
children: React__default.ReactNode;
|
|
7105
|
+
role?: string;
|
|
7106
|
+
'aria-label'?: string;
|
|
7107
|
+
} & React__default.RefAttributes<HTMLDivElement>;
|
|
7108
|
+
type TabListProps = {
|
|
7109
|
+
className?: string;
|
|
7110
|
+
style?: React__default.CSSProperties;
|
|
7111
|
+
children: React__default.ReactNode;
|
|
7112
|
+
} & React__default.RefAttributes<HTMLDivElement>;
|
|
7113
|
+
type TabProps = {
|
|
7114
|
+
className?: string;
|
|
7115
|
+
style?: React__default.CSSProperties;
|
|
7116
|
+
children: React__default.ReactNode;
|
|
7117
|
+
'data-network': string;
|
|
7118
|
+
} & React__default.RefAttributes<HTMLDivElement>;
|
|
7119
|
+
type TabButtonProps = {
|
|
7120
|
+
className?: string;
|
|
7121
|
+
style?: React__default.CSSProperties;
|
|
7122
|
+
children: React__default.ReactNode;
|
|
7123
|
+
type?: 'button';
|
|
7124
|
+
role?: string;
|
|
7125
|
+
'aria-selected'?: boolean;
|
|
7126
|
+
'aria-controls'?: string;
|
|
7127
|
+
onClick: () => void;
|
|
7128
|
+
onMouseEnter?: () => void;
|
|
7129
|
+
onFocus?: () => void;
|
|
7130
|
+
title?: string;
|
|
7131
|
+
'aria-label'?: string;
|
|
7132
|
+
tabData: NetworkTabData;
|
|
7133
|
+
} & React__default.RefAttributes<HTMLButtonElement>;
|
|
7134
|
+
type IconContainerProps = {
|
|
7135
|
+
className?: string;
|
|
7136
|
+
style?: React__default.CSSProperties;
|
|
7137
|
+
children: React__default.ReactNode;
|
|
7138
|
+
role?: string;
|
|
7139
|
+
'aria-label'?: string;
|
|
7140
|
+
tabData: NetworkTabData;
|
|
7141
|
+
} & React__default.RefAttributes<HTMLDivElement>;
|
|
7142
|
+
type TabTextProps = {
|
|
7143
|
+
className?: string;
|
|
7144
|
+
style?: React__default.CSSProperties;
|
|
7145
|
+
children: React__default.ReactNode;
|
|
7146
|
+
variants?: Variants;
|
|
7147
|
+
animate?: string;
|
|
7148
|
+
'aria-hidden'?: boolean;
|
|
7149
|
+
tabData: NetworkTabData;
|
|
7150
|
+
} & React__default.RefAttributes<HTMLSpanElement>;
|
|
7151
|
+
type IndicatorProps = {
|
|
7152
|
+
className?: string;
|
|
7153
|
+
style?: React__default.CSSProperties;
|
|
7154
|
+
'aria-hidden'?: boolean;
|
|
7155
|
+
tabData: NetworkTabData;
|
|
7156
|
+
} & React__default.RefAttributes<HTMLDivElement>;
|
|
7157
|
+
/**
|
|
7158
|
+
* Customization options for NetworkTabs component
|
|
6812
7159
|
*/
|
|
6813
|
-
|
|
7160
|
+
type NetworkTabsCustomization = {
|
|
7161
|
+
/** Custom components */
|
|
7162
|
+
components?: {
|
|
7163
|
+
/** Custom container wrapper */
|
|
7164
|
+
Container?: ComponentType<ContainerProps$2>;
|
|
7165
|
+
/** Custom tab list container */
|
|
7166
|
+
TabList?: ComponentType<TabListProps>;
|
|
7167
|
+
/** Custom tab wrapper */
|
|
7168
|
+
Tab?: ComponentType<TabProps>;
|
|
7169
|
+
/** Custom tab button */
|
|
7170
|
+
TabButton?: ComponentType<TabButtonProps>;
|
|
7171
|
+
/** Custom icon container */
|
|
7172
|
+
IconContainer?: ComponentType<IconContainerProps>;
|
|
7173
|
+
/** Custom tab text */
|
|
7174
|
+
TabText?: ComponentType<TabTextProps>;
|
|
7175
|
+
/** Custom selection indicator */
|
|
7176
|
+
Indicator?: ComponentType<IndicatorProps>;
|
|
7177
|
+
};
|
|
7178
|
+
/** Custom class name generators */
|
|
7179
|
+
classNames?: {
|
|
7180
|
+
/** Function to generate container classes */
|
|
7181
|
+
container?: () => string;
|
|
7182
|
+
/** Function to generate tab list classes */
|
|
7183
|
+
tabList?: () => string;
|
|
7184
|
+
/** Function to generate tab classes */
|
|
7185
|
+
tab?: (params: {
|
|
7186
|
+
isSelected: boolean;
|
|
7187
|
+
index: number;
|
|
7188
|
+
}) => string;
|
|
7189
|
+
/** Function to generate tab button classes */
|
|
7190
|
+
tabButton?: (params: {
|
|
7191
|
+
isSelected: boolean;
|
|
7192
|
+
tabData: NetworkTabData;
|
|
7193
|
+
}) => string;
|
|
7194
|
+
/** Function to generate icon container classes */
|
|
7195
|
+
iconContainer?: (params: {
|
|
7196
|
+
tabData: NetworkTabData;
|
|
7197
|
+
}) => string;
|
|
7198
|
+
/** Function to generate tab text classes */
|
|
7199
|
+
tabText?: (params: {
|
|
7200
|
+
isSelected: boolean;
|
|
7201
|
+
tabData: NetworkTabData;
|
|
7202
|
+
}) => string;
|
|
7203
|
+
/** Function to generate indicator classes */
|
|
7204
|
+
indicator?: (params: {
|
|
7205
|
+
tabData: NetworkTabData;
|
|
7206
|
+
}) => string;
|
|
7207
|
+
};
|
|
7208
|
+
/** Custom style generators */
|
|
7209
|
+
styles?: {
|
|
7210
|
+
/** Function to generate container styles */
|
|
7211
|
+
container?: () => React__default.CSSProperties;
|
|
7212
|
+
/** Function to generate tab list styles */
|
|
7213
|
+
tabList?: () => React__default.CSSProperties;
|
|
7214
|
+
/** Function to generate tab styles */
|
|
7215
|
+
tab?: (params: {
|
|
7216
|
+
isSelected: boolean;
|
|
7217
|
+
index: number;
|
|
7218
|
+
}) => React__default.CSSProperties;
|
|
7219
|
+
/** Function to generate tab button styles */
|
|
7220
|
+
tabButton?: (params: {
|
|
7221
|
+
isSelected: boolean;
|
|
7222
|
+
tabData: NetworkTabData;
|
|
7223
|
+
}) => React__default.CSSProperties;
|
|
7224
|
+
/** Function to generate icon container styles */
|
|
7225
|
+
iconContainer?: (params: {
|
|
7226
|
+
tabData: NetworkTabData;
|
|
7227
|
+
}) => React__default.CSSProperties;
|
|
7228
|
+
/** Function to generate tab text styles */
|
|
7229
|
+
tabText?: (params: {
|
|
7230
|
+
isSelected: boolean;
|
|
7231
|
+
tabData: NetworkTabData;
|
|
7232
|
+
}) => React__default.CSSProperties;
|
|
7233
|
+
/** Function to generate indicator styles */
|
|
7234
|
+
indicator?: (params: {
|
|
7235
|
+
tabData: NetworkTabData;
|
|
7236
|
+
}) => React__default.CSSProperties;
|
|
7237
|
+
};
|
|
7238
|
+
/** Custom event handlers */
|
|
7239
|
+
handlers?: {
|
|
7240
|
+
/** Custom handler for tab selection (called after default logic) */
|
|
7241
|
+
onTabSelect?: (network: OrbitAdapter | undefined, tabData: NetworkTabData) => void;
|
|
7242
|
+
/** Custom handler for tab hover */
|
|
7243
|
+
onTabHover?: (network: OrbitAdapter | undefined, tabData: NetworkTabData) => void;
|
|
7244
|
+
/** Custom handler for tab focus */
|
|
7245
|
+
onTabFocus?: (network: OrbitAdapter | undefined, tabData: NetworkTabData) => void;
|
|
7246
|
+
/** Custom handler for component mount */
|
|
7247
|
+
onMount?: () => void;
|
|
7248
|
+
/** Custom handler for component unmount */
|
|
7249
|
+
onUnmount?: () => void;
|
|
7250
|
+
};
|
|
7251
|
+
/** Configuration options */
|
|
7252
|
+
config?: {
|
|
7253
|
+
/** Custom animation configuration */
|
|
7254
|
+
animation?: Partial<AnimationConfig>;
|
|
7255
|
+
/** Custom ARIA labels */
|
|
7256
|
+
ariaLabels?: {
|
|
7257
|
+
container?: string;
|
|
7258
|
+
tabPrefix?: string;
|
|
7259
|
+
iconSuffix?: string;
|
|
7260
|
+
selectedSuffix?: string;
|
|
7261
|
+
};
|
|
7262
|
+
/** Whether to show "All" option */
|
|
7263
|
+
showAllOption?: boolean;
|
|
7264
|
+
/** Custom network display names */
|
|
7265
|
+
networkNames?: {
|
|
7266
|
+
[key: string]: string;
|
|
7267
|
+
};
|
|
7268
|
+
/** Minimum networks to show tabs */
|
|
7269
|
+
minNetworksToShow?: number;
|
|
7270
|
+
};
|
|
7271
|
+
};
|
|
6814
7272
|
/**
|
|
6815
|
-
*
|
|
7273
|
+
* Props for the NetworkTabs component
|
|
6816
7274
|
*/
|
|
6817
|
-
|
|
6818
|
-
|
|
6819
|
-
|
|
6820
|
-
|
|
6821
|
-
selectedAdapter
|
|
7275
|
+
interface NetworkTabsProps {
|
|
7276
|
+
/** Array of available network adapters */
|
|
7277
|
+
networks: OrbitAdapter[];
|
|
7278
|
+
/** Currently selected network adapter (undefined means "All" is selected) */
|
|
7279
|
+
selectedAdapter: OrbitAdapter | undefined;
|
|
7280
|
+
/** Handler for network selection changes */
|
|
7281
|
+
onSelect: (adapter: OrbitAdapter | undefined) => void;
|
|
7282
|
+
/** Custom CSS classes for styling the container */
|
|
7283
|
+
className?: string;
|
|
7284
|
+
/** Customization options */
|
|
7285
|
+
customization?: NetworkTabsCustomization;
|
|
6822
7286
|
}
|
|
6823
7287
|
/**
|
|
6824
|
-
*
|
|
6825
|
-
* Returns all connectors if no adapter is selected, or only connectors
|
|
6826
|
-
* that support the specified adapter if one is provided.
|
|
6827
|
-
*
|
|
6828
|
-
* @param params Configuration object with connectors and optional adapter filter
|
|
6829
|
-
* @returns Filtered array of grouped connectors
|
|
6830
|
-
*/
|
|
6831
|
-
declare function getFilteredConnectors({ connectors, selectedAdapter, }: GetFilteredConnectorsParams): GroupedConnector[];
|
|
6832
|
-
/**
|
|
6833
|
-
* Quick helper to check if any connectors exist for an adapter
|
|
6834
|
-
*/
|
|
6835
|
-
declare function hasConnectorsForAdapter(connectors: Partial<Record<OrbitAdapter, Connector$1[]>>, adapter: OrbitAdapter): boolean;
|
|
6836
|
-
|
|
6837
|
-
declare const getNetworkIcon: (adapter: OrbitAdapter) => {
|
|
6838
|
-
chainId: number;
|
|
6839
|
-
name: string;
|
|
6840
|
-
} | {
|
|
6841
|
-
chainId: string;
|
|
6842
|
-
name: string;
|
|
6843
|
-
} | undefined;
|
|
6844
|
-
|
|
6845
|
-
declare const networksLinks: Partial<Record<OrbitAdapter, {
|
|
6846
|
-
aboutNetwork: string;
|
|
6847
|
-
choseWallet: string;
|
|
6848
|
-
about: string;
|
|
6849
|
-
}>>;
|
|
6850
|
-
|
|
6851
|
-
/**
|
|
6852
|
-
* @fileoverview Central export hub for blockchain utility functions and types.
|
|
6853
|
-
*
|
|
6854
|
-
* This module provides a unified interface for accessing blockchain-related utilities,
|
|
6855
|
-
* offering both synchronous and asynchronous versions of functions to support different
|
|
6856
|
-
* usage patterns and performance requirements.
|
|
7288
|
+
* NetworkTabs component - Animated tab navigation for network selection with comprehensive customization
|
|
6857
7289
|
*
|
|
6858
|
-
*
|
|
6859
|
-
* -
|
|
6860
|
-
* -
|
|
6861
|
-
* -
|
|
6862
|
-
* -
|
|
7290
|
+
* This component provides an animated tab interface for selecting blockchain networks:
|
|
7291
|
+
* - Animated tab transitions with smooth layouts powered by Framer Motion
|
|
7292
|
+
* - Visual network icons with Web3Icon integration and fallbacks
|
|
7293
|
+
* - Configurable "All networks" option for viewing all connectors
|
|
7294
|
+
* - Responsive horizontal scrolling for mobile-friendly experience
|
|
7295
|
+
* - Full accessibility support with proper ARIA labels and keyboard navigation
|
|
7296
|
+
* - Motion-based UI feedback with customizable animation timing
|
|
7297
|
+
* - Complete customization of all child components and animations
|
|
6863
7298
|
*
|
|
6864
|
-
*
|
|
6865
|
-
*
|
|
6866
|
-
*
|
|
6867
|
-
*
|
|
7299
|
+
* Key features:
|
|
7300
|
+
* - Framer Motion powered animations with configurable timing and easing
|
|
7301
|
+
* - Dynamic tab indicator that smoothly morphs between selections
|
|
7302
|
+
* - Network icons with proper Web3Icon integration and fallback support
|
|
7303
|
+
* - Conditional rendering based on configurable minimum network threshold
|
|
7304
|
+
* - Touch-friendly interface with horizontal scrolling support
|
|
7305
|
+
* - Full component tree customization through render prop pattern
|
|
6868
7306
|
*
|
|
6869
|
-
*
|
|
6870
|
-
*
|
|
6871
|
-
*
|
|
6872
|
-
*
|
|
6873
|
-
*
|
|
7307
|
+
* Animation system:
|
|
7308
|
+
* - Layout animations for smooth tab movement with configurable duration
|
|
7309
|
+
* - Text fade transitions with customizable timing when switching tabs
|
|
7310
|
+
* - Morphing background indicator with layoutId for smooth transitions
|
|
7311
|
+
* - Optimized animation durations tuned for natural feel
|
|
7312
|
+
* - Support for reduced motion preferences
|
|
6874
7313
|
*
|
|
6875
|
-
*
|
|
6876
|
-
*
|
|
7314
|
+
* Accessibility features:
|
|
7315
|
+
* - Proper tablist and tab ARIA semantics for screen readers
|
|
7316
|
+
* - Keyboard navigation support (Tab, Space, Enter, Arrow keys)
|
|
7317
|
+
* - Dynamic ARIA labels with selection state announcements
|
|
7318
|
+
* - Focus management with visible focus indicators
|
|
7319
|
+
* - Meaningful tooltips and descriptions for each network
|
|
7320
|
+
* - Screen reader friendly icon descriptions
|
|
6877
7321
|
*
|
|
6878
|
-
*
|
|
6879
|
-
*
|
|
7322
|
+
* @example Basic usage
|
|
7323
|
+
* ```tsx
|
|
7324
|
+
* <NetworkTabs
|
|
7325
|
+
* networks={[OrbitAdapter.EVM, OrbitAdapter.SOLANA]}
|
|
7326
|
+
* selectedAdapter={OrbitAdapter.EVM}
|
|
7327
|
+
* onSelect={(adapter) => handleNetworkChange(adapter)}
|
|
7328
|
+
* />
|
|
6880
7329
|
* ```
|
|
6881
7330
|
*
|
|
6882
|
-
* @
|
|
6883
|
-
|
|
6884
|
-
|
|
6885
|
-
*
|
|
6886
|
-
*
|
|
6887
|
-
|
|
6888
|
-
|
|
6889
|
-
|
|
6890
|
-
*
|
|
6891
|
-
*
|
|
6892
|
-
*
|
|
6893
|
-
*
|
|
6894
|
-
*
|
|
6895
|
-
*
|
|
6896
|
-
*
|
|
6897
|
-
*
|
|
6898
|
-
* @example
|
|
6899
|
-
* ```typescript
|
|
6900
|
-
* // Synchronous fallback (limited functionality)
|
|
6901
|
-
* const clusters = getAvailableSolanaClusters(); // []
|
|
6902
|
-
*
|
|
6903
|
-
* // Preferred async version (full functionality)
|
|
6904
|
-
* const clustersAsync = await getAvailableSolanaClustersAsync();
|
|
7331
|
+
* @example With custom animation timing
|
|
7332
|
+
* ```tsx
|
|
7333
|
+
* <NetworkTabs
|
|
7334
|
+
* networks={networks}
|
|
7335
|
+
* selectedAdapter={selectedNetwork}
|
|
7336
|
+
* onSelect={setSelectedNetwork}
|
|
7337
|
+
* customization={{
|
|
7338
|
+
* config: {
|
|
7339
|
+
* animation: {
|
|
7340
|
+
* layoutDuration: 0.3,
|
|
7341
|
+
* textDuration: 0.15
|
|
7342
|
+
* }
|
|
7343
|
+
* }
|
|
7344
|
+
* }}
|
|
7345
|
+
* />
|
|
6905
7346
|
* ```
|
|
6906
7347
|
*
|
|
6907
|
-
* @
|
|
6908
|
-
*
|
|
7348
|
+
* @example With full customization
|
|
7349
|
+
* ```tsx
|
|
7350
|
+
* <NetworkTabs
|
|
7351
|
+
* networks={networks}
|
|
7352
|
+
* selectedAdapter={selectedNetwork}
|
|
7353
|
+
* onSelect={setSelectedNetwork}
|
|
7354
|
+
* customization={{
|
|
7355
|
+
* components: {
|
|
7356
|
+
* TabButton: CustomTabButton,
|
|
7357
|
+
* Indicator: CustomIndicator
|
|
7358
|
+
* },
|
|
7359
|
+
* classNames: {
|
|
7360
|
+
* tabButton: ({ isSelected }) => isSelected ? 'custom-selected' : 'custom-normal'
|
|
7361
|
+
* },
|
|
7362
|
+
* handlers: {
|
|
7363
|
+
* onTabSelect: (network, tabData) => {
|
|
7364
|
+
* analytics.track('network_tab_selected', { network: network?.name });
|
|
7365
|
+
* }
|
|
7366
|
+
* },
|
|
7367
|
+
* config: {
|
|
7368
|
+
* minNetworksToShow: 2,
|
|
7369
|
+
* showAllOption: false
|
|
7370
|
+
* }
|
|
7371
|
+
* }}
|
|
7372
|
+
* />
|
|
7373
|
+
* ```
|
|
6909
7374
|
*/
|
|
6910
|
-
declare
|
|
7375
|
+
declare const NetworkTabs: React__default.NamedExoticComponent<NetworkTabsProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
7376
|
+
|
|
6911
7377
|
/**
|
|
6912
|
-
*
|
|
6913
|
-
*
|
|
6914
|
-
* This function provides basic validation against known cluster names but
|
|
6915
|
-
* lacks the comprehensive validation logic of the async version. It performs
|
|
6916
|
-
* a simple lookup against standard Solana cluster monikers.
|
|
6917
|
-
*
|
|
6918
|
-
* @param cluster - Cluster name to validate
|
|
6919
|
-
* @returns True if cluster name matches known standard clusters
|
|
6920
|
-
*
|
|
6921
|
-
* @example
|
|
6922
|
-
* ```typescript
|
|
6923
|
-
* // Synchronous fallback (basic validation)
|
|
6924
|
-
* const isValid = isValidSolanaCluster('mainnet-beta'); // true
|
|
6925
|
-
* const isCustom = isValidSolanaCluster('custom-cluster'); // false
|
|
6926
|
-
*
|
|
6927
|
-
* // Preferred async version (comprehensive validation)
|
|
6928
|
-
* const isValidAsync = await isValidSolanaClusterAsync('custom-cluster');
|
|
6929
|
-
* ```
|
|
6930
|
-
*
|
|
6931
|
-
* @since 1.0.0
|
|
6932
|
-
* @deprecated Use isValidSolanaClusterAsync for comprehensive validation
|
|
7378
|
+
* Interface for grouped wallet connectors
|
|
6933
7379
|
*/
|
|
6934
|
-
|
|
7380
|
+
interface GroupedConnector {
|
|
7381
|
+
/** Name of the wallet connector */
|
|
7382
|
+
name: string;
|
|
7383
|
+
/** Optional icon for the wallet */
|
|
7384
|
+
icon?: string;
|
|
7385
|
+
/** Array of supported network adapters */
|
|
7386
|
+
adapters: OrbitAdapter[];
|
|
7387
|
+
/** Array of connectors with their associated adapters */
|
|
7388
|
+
connectors: (Connector & {
|
|
7389
|
+
adapter: OrbitAdapter;
|
|
7390
|
+
})[];
|
|
7391
|
+
}
|
|
6935
7392
|
|
|
6936
7393
|
/**
|
|
6937
|
-
* @file
|
|
7394
|
+
* @file Connecting component with comprehensive customization options and connection status display.
|
|
6938
7395
|
*/
|
|
6939
7396
|
|
|
6940
7397
|
/**
|
|
6941
|
-
*
|
|
7398
|
+
* Connection states
|
|
6942
7399
|
*/
|
|
6943
|
-
|
|
6944
|
-
/** Layout animation duration */
|
|
6945
|
-
layoutDuration: number;
|
|
6946
|
-
/** Layout animation easing */
|
|
6947
|
-
layoutEasing: number[];
|
|
6948
|
-
/** Text transition duration */
|
|
6949
|
-
textDuration: number;
|
|
6950
|
-
/** Text transition delay */
|
|
6951
|
-
textDelay?: number;
|
|
6952
|
-
}
|
|
7400
|
+
type ConnectionState = 'connecting' | 'success' | 'error';
|
|
6953
7401
|
/**
|
|
6954
|
-
*
|
|
7402
|
+
* Connection status data
|
|
6955
7403
|
*/
|
|
6956
|
-
interface
|
|
6957
|
-
/**
|
|
6958
|
-
|
|
6959
|
-
/** Display
|
|
6960
|
-
|
|
6961
|
-
/**
|
|
6962
|
-
|
|
6963
|
-
/**
|
|
6964
|
-
|
|
6965
|
-
/**
|
|
6966
|
-
|
|
7404
|
+
interface ConnectingStatusData {
|
|
7405
|
+
/** Connection state */
|
|
7406
|
+
state: ConnectionState;
|
|
7407
|
+
/** Display message */
|
|
7408
|
+
message: string;
|
|
7409
|
+
/** Error message if any */
|
|
7410
|
+
errorMessage: string | null;
|
|
7411
|
+
/** Currently active connector */
|
|
7412
|
+
activeConnector: string | undefined;
|
|
7413
|
+
/** Selected adapter */
|
|
7414
|
+
selectedAdapter: OrbitAdapter | undefined;
|
|
7415
|
+
/** Current connector configuration */
|
|
7416
|
+
currentConnector: GroupedConnector | null;
|
|
7417
|
+
/** Whether to show detailed error */
|
|
7418
|
+
showDetailedError: boolean;
|
|
7419
|
+
/** Raw error object */
|
|
7420
|
+
rawError: unknown;
|
|
6967
7421
|
}
|
|
6968
7422
|
type ContainerProps$1 = {
|
|
6969
7423
|
className?: string;
|
|
@@ -6971,275 +7425,309 @@ type ContainerProps$1 = {
|
|
|
6971
7425
|
children: React__default.ReactNode;
|
|
6972
7426
|
role?: string;
|
|
6973
7427
|
'aria-label'?: string;
|
|
7428
|
+
'aria-live'?: 'polite' | 'assertive' | 'off';
|
|
7429
|
+
'aria-atomic'?: boolean;
|
|
7430
|
+
statusData: ConnectingStatusData;
|
|
7431
|
+
} & React__default.RefAttributes<HTMLElement>;
|
|
7432
|
+
type StatusContainerProps = {
|
|
7433
|
+
className?: string;
|
|
7434
|
+
style?: React__default.CSSProperties;
|
|
7435
|
+
children: React__default.ReactNode;
|
|
7436
|
+
statusData: ConnectingStatusData;
|
|
7437
|
+
} & React__default.RefAttributes<HTMLDivElement>;
|
|
7438
|
+
type SpinnerProps = {
|
|
7439
|
+
className?: string;
|
|
7440
|
+
style?: React__default.CSSProperties;
|
|
7441
|
+
role?: string;
|
|
7442
|
+
'aria-label'?: string;
|
|
7443
|
+
'aria-describedby'?: string;
|
|
7444
|
+
statusData: ConnectingStatusData;
|
|
6974
7445
|
} & React__default.RefAttributes<HTMLDivElement>;
|
|
6975
|
-
type
|
|
7446
|
+
type StatusIconProps = {
|
|
7447
|
+
className?: string;
|
|
7448
|
+
style?: React__default.CSSProperties;
|
|
7449
|
+
role?: string;
|
|
7450
|
+
'aria-label'?: string;
|
|
7451
|
+
statusData: ConnectingStatusData;
|
|
7452
|
+
} & React__default.RefAttributes<HTMLDivElement>;
|
|
7453
|
+
type WalletIconContainerProps = {
|
|
6976
7454
|
className?: string;
|
|
6977
7455
|
style?: React__default.CSSProperties;
|
|
6978
7456
|
children: React__default.ReactNode;
|
|
7457
|
+
statusData: ConnectingStatusData;
|
|
6979
7458
|
} & React__default.RefAttributes<HTMLDivElement>;
|
|
6980
|
-
type
|
|
7459
|
+
type MessageContainerProps = {
|
|
6981
7460
|
className?: string;
|
|
6982
7461
|
style?: React__default.CSSProperties;
|
|
6983
7462
|
children: React__default.ReactNode;
|
|
6984
|
-
|
|
7463
|
+
statusData: ConnectingStatusData;
|
|
6985
7464
|
} & React__default.RefAttributes<HTMLDivElement>;
|
|
6986
|
-
type
|
|
7465
|
+
type StatusMessageProps = {
|
|
6987
7466
|
className?: string;
|
|
6988
7467
|
style?: React__default.CSSProperties;
|
|
6989
7468
|
children: React__default.ReactNode;
|
|
6990
|
-
|
|
7469
|
+
id?: string;
|
|
6991
7470
|
role?: string;
|
|
6992
|
-
'aria-
|
|
6993
|
-
|
|
6994
|
-
|
|
6995
|
-
|
|
6996
|
-
onFocus?: () => void;
|
|
6997
|
-
title?: string;
|
|
6998
|
-
'aria-label'?: string;
|
|
6999
|
-
tabData: NetworkTabData;
|
|
7000
|
-
} & React__default.RefAttributes<HTMLButtonElement>;
|
|
7001
|
-
type IconContainerProps = {
|
|
7471
|
+
'aria-level'?: number;
|
|
7472
|
+
statusData: ConnectingStatusData;
|
|
7473
|
+
} & React__default.RefAttributes<HTMLHeadingElement>;
|
|
7474
|
+
type ErrorMessageProps = {
|
|
7002
7475
|
className?: string;
|
|
7003
7476
|
style?: React__default.CSSProperties;
|
|
7004
7477
|
children: React__default.ReactNode;
|
|
7005
7478
|
role?: string;
|
|
7006
|
-
'aria-
|
|
7007
|
-
|
|
7008
|
-
} & React__default.RefAttributes<
|
|
7009
|
-
type
|
|
7479
|
+
'aria-describedby'?: string;
|
|
7480
|
+
statusData: ConnectingStatusData;
|
|
7481
|
+
} & React__default.RefAttributes<HTMLParagraphElement>;
|
|
7482
|
+
type ErrorDetailsProps = {
|
|
7010
7483
|
className?: string;
|
|
7011
7484
|
style?: React__default.CSSProperties;
|
|
7012
7485
|
children: React__default.ReactNode;
|
|
7013
|
-
|
|
7014
|
-
|
|
7015
|
-
|
|
7016
|
-
tabData: NetworkTabData;
|
|
7017
|
-
} & React__default.RefAttributes<HTMLSpanElement>;
|
|
7018
|
-
type IndicatorProps = {
|
|
7486
|
+
statusData: ConnectingStatusData;
|
|
7487
|
+
} & React__default.RefAttributes<HTMLDetailsElement>;
|
|
7488
|
+
type LoadingPlaceholderProps = {
|
|
7019
7489
|
className?: string;
|
|
7020
7490
|
style?: React__default.CSSProperties;
|
|
7021
|
-
|
|
7022
|
-
|
|
7491
|
+
role?: string;
|
|
7492
|
+
'aria-label'?: string;
|
|
7493
|
+
statusData: ConnectingStatusData;
|
|
7023
7494
|
} & React__default.RefAttributes<HTMLDivElement>;
|
|
7024
7495
|
/**
|
|
7025
|
-
* Customization options for
|
|
7496
|
+
* Customization options for Connecting component
|
|
7026
7497
|
*/
|
|
7027
|
-
type
|
|
7498
|
+
type ConnectingCustomization = {
|
|
7028
7499
|
/** Custom components */
|
|
7029
7500
|
components?: {
|
|
7030
7501
|
/** Custom container wrapper */
|
|
7031
7502
|
Container?: ComponentType<ContainerProps$1>;
|
|
7032
|
-
/** Custom
|
|
7033
|
-
|
|
7034
|
-
/** Custom
|
|
7035
|
-
|
|
7036
|
-
/** Custom
|
|
7037
|
-
|
|
7038
|
-
/** Custom icon container */
|
|
7039
|
-
|
|
7040
|
-
/** Custom
|
|
7041
|
-
|
|
7042
|
-
/** Custom
|
|
7043
|
-
|
|
7503
|
+
/** Custom status container */
|
|
7504
|
+
StatusContainer?: ComponentType<StatusContainerProps>;
|
|
7505
|
+
/** Custom loading spinner */
|
|
7506
|
+
Spinner?: ComponentType<SpinnerProps>;
|
|
7507
|
+
/** Custom status icon */
|
|
7508
|
+
StatusIcon?: ComponentType<StatusIconProps>;
|
|
7509
|
+
/** Custom wallet icon container */
|
|
7510
|
+
WalletIconContainer?: ComponentType<WalletIconContainerProps>;
|
|
7511
|
+
/** Custom message container */
|
|
7512
|
+
MessageContainer?: ComponentType<MessageContainerProps>;
|
|
7513
|
+
/** Custom status message */
|
|
7514
|
+
StatusMessage?: ComponentType<StatusMessageProps>;
|
|
7515
|
+
/** Custom error message */
|
|
7516
|
+
ErrorMessage?: ComponentType<ErrorMessageProps>;
|
|
7517
|
+
/** Custom error details */
|
|
7518
|
+
ErrorDetails?: ComponentType<ErrorDetailsProps>;
|
|
7519
|
+
/** Custom loading placeholder */
|
|
7520
|
+
LoadingPlaceholder?: ComponentType<LoadingPlaceholderProps>;
|
|
7044
7521
|
};
|
|
7045
7522
|
/** Custom class name generators */
|
|
7046
7523
|
classNames?: {
|
|
7047
7524
|
/** Function to generate container classes */
|
|
7048
|
-
container?: (
|
|
7049
|
-
|
|
7050
|
-
tabList?: () => string;
|
|
7051
|
-
/** Function to generate tab classes */
|
|
7052
|
-
tab?: (params: {
|
|
7053
|
-
isSelected: boolean;
|
|
7054
|
-
index: number;
|
|
7525
|
+
container?: (params: {
|
|
7526
|
+
statusData: ConnectingStatusData;
|
|
7055
7527
|
}) => string;
|
|
7056
|
-
/** Function to generate
|
|
7057
|
-
|
|
7058
|
-
|
|
7059
|
-
tabData: NetworkTabData;
|
|
7528
|
+
/** Function to generate status container classes */
|
|
7529
|
+
statusContainer?: (params: {
|
|
7530
|
+
statusData: ConnectingStatusData;
|
|
7060
7531
|
}) => string;
|
|
7061
|
-
/** Function to generate
|
|
7062
|
-
|
|
7063
|
-
|
|
7532
|
+
/** Function to generate spinner classes */
|
|
7533
|
+
spinner?: (params: {
|
|
7534
|
+
statusData: ConnectingStatusData;
|
|
7535
|
+
}) => string;
|
|
7536
|
+
/** Function to generate status icon classes */
|
|
7537
|
+
statusIcon?: (params: {
|
|
7538
|
+
statusData: ConnectingStatusData;
|
|
7539
|
+
}) => string;
|
|
7540
|
+
/** Function to generate wallet icon container classes */
|
|
7541
|
+
walletIconContainer?: (params: {
|
|
7542
|
+
statusData: ConnectingStatusData;
|
|
7543
|
+
}) => string;
|
|
7544
|
+
/** Function to generate message container classes */
|
|
7545
|
+
messageContainer?: (params: {
|
|
7546
|
+
statusData: ConnectingStatusData;
|
|
7547
|
+
}) => string;
|
|
7548
|
+
/** Function to generate status message classes */
|
|
7549
|
+
statusMessage?: (params: {
|
|
7550
|
+
statusData: ConnectingStatusData;
|
|
7551
|
+
}) => string;
|
|
7552
|
+
/** Function to generate error message classes */
|
|
7553
|
+
errorMessage?: (params: {
|
|
7554
|
+
statusData: ConnectingStatusData;
|
|
7064
7555
|
}) => string;
|
|
7065
|
-
/** Function to generate
|
|
7066
|
-
|
|
7067
|
-
|
|
7068
|
-
tabData: NetworkTabData;
|
|
7556
|
+
/** Function to generate error details classes */
|
|
7557
|
+
errorDetails?: (params: {
|
|
7558
|
+
statusData: ConnectingStatusData;
|
|
7069
7559
|
}) => string;
|
|
7070
|
-
/** Function to generate
|
|
7071
|
-
|
|
7072
|
-
|
|
7560
|
+
/** Function to generate loading placeholder classes */
|
|
7561
|
+
loadingPlaceholder?: (params: {
|
|
7562
|
+
statusData: ConnectingStatusData;
|
|
7073
7563
|
}) => string;
|
|
7074
7564
|
};
|
|
7075
7565
|
/** Custom style generators */
|
|
7076
7566
|
styles?: {
|
|
7077
7567
|
/** Function to generate container styles */
|
|
7078
|
-
container?: (
|
|
7079
|
-
|
|
7080
|
-
tabList?: () => React__default.CSSProperties;
|
|
7081
|
-
/** Function to generate tab styles */
|
|
7082
|
-
tab?: (params: {
|
|
7083
|
-
isSelected: boolean;
|
|
7084
|
-
index: number;
|
|
7568
|
+
container?: (params: {
|
|
7569
|
+
statusData: ConnectingStatusData;
|
|
7085
7570
|
}) => React__default.CSSProperties;
|
|
7086
|
-
/** Function to generate
|
|
7087
|
-
|
|
7088
|
-
|
|
7089
|
-
tabData: NetworkTabData;
|
|
7571
|
+
/** Function to generate status container styles */
|
|
7572
|
+
statusContainer?: (params: {
|
|
7573
|
+
statusData: ConnectingStatusData;
|
|
7090
7574
|
}) => React__default.CSSProperties;
|
|
7091
|
-
/** Function to generate
|
|
7092
|
-
|
|
7093
|
-
|
|
7575
|
+
/** Function to generate spinner styles */
|
|
7576
|
+
spinner?: (params: {
|
|
7577
|
+
statusData: ConnectingStatusData;
|
|
7094
7578
|
}) => React__default.CSSProperties;
|
|
7095
|
-
/** Function to generate
|
|
7096
|
-
|
|
7097
|
-
|
|
7098
|
-
tabData: NetworkTabData;
|
|
7579
|
+
/** Function to generate status icon styles */
|
|
7580
|
+
statusIcon?: (params: {
|
|
7581
|
+
statusData: ConnectingStatusData;
|
|
7099
7582
|
}) => React__default.CSSProperties;
|
|
7100
|
-
/** Function to generate
|
|
7101
|
-
|
|
7102
|
-
|
|
7583
|
+
/** Function to generate wallet icon container styles */
|
|
7584
|
+
walletIconContainer?: (params: {
|
|
7585
|
+
statusData: ConnectingStatusData;
|
|
7586
|
+
}) => React__default.CSSProperties;
|
|
7587
|
+
/** Function to generate message container styles */
|
|
7588
|
+
messageContainer?: (params: {
|
|
7589
|
+
statusData: ConnectingStatusData;
|
|
7590
|
+
}) => React__default.CSSProperties;
|
|
7591
|
+
/** Function to generate status message styles */
|
|
7592
|
+
statusMessage?: (params: {
|
|
7593
|
+
statusData: ConnectingStatusData;
|
|
7594
|
+
}) => React__default.CSSProperties;
|
|
7595
|
+
/** Function to generate error message styles */
|
|
7596
|
+
errorMessage?: (params: {
|
|
7597
|
+
statusData: ConnectingStatusData;
|
|
7598
|
+
}) => React__default.CSSProperties;
|
|
7599
|
+
/** Function to generate error details styles */
|
|
7600
|
+
errorDetails?: (params: {
|
|
7601
|
+
statusData: ConnectingStatusData;
|
|
7602
|
+
}) => React__default.CSSProperties;
|
|
7603
|
+
/** Function to generate loading placeholder styles */
|
|
7604
|
+
loadingPlaceholder?: (params: {
|
|
7605
|
+
statusData: ConnectingStatusData;
|
|
7103
7606
|
}) => React__default.CSSProperties;
|
|
7104
7607
|
};
|
|
7105
7608
|
/** Custom event handlers */
|
|
7106
7609
|
handlers?: {
|
|
7107
|
-
/** Custom handler for
|
|
7108
|
-
|
|
7109
|
-
/** Custom handler for
|
|
7110
|
-
|
|
7111
|
-
/** Custom handler for
|
|
7112
|
-
|
|
7113
|
-
/** Custom handler for
|
|
7114
|
-
|
|
7115
|
-
/** Custom handler
|
|
7116
|
-
|
|
7610
|
+
/** Custom handler for state change */
|
|
7611
|
+
onStateChange?: (state: ConnectionState, statusData: ConnectingStatusData) => void;
|
|
7612
|
+
/** Custom handler for error occurrence */
|
|
7613
|
+
onError?: (error: unknown, statusData: ConnectingStatusData) => void;
|
|
7614
|
+
/** Custom handler for successful connection */
|
|
7615
|
+
onSuccess?: (statusData: ConnectingStatusData) => void;
|
|
7616
|
+
/** Custom handler for connection start */
|
|
7617
|
+
onConnectingStart?: (statusData: ConnectingStatusData) => void;
|
|
7618
|
+
/** Custom cleanup handler called on unmount */
|
|
7619
|
+
onCleanup?: (statusData: ConnectingStatusData) => void;
|
|
7117
7620
|
};
|
|
7118
7621
|
/** Configuration options */
|
|
7119
7622
|
config?: {
|
|
7120
|
-
/** Custom animation configuration */
|
|
7121
|
-
animation?: Partial<AnimationConfig>;
|
|
7122
7623
|
/** Custom ARIA labels */
|
|
7123
7624
|
ariaLabels?: {
|
|
7124
7625
|
container?: string;
|
|
7125
|
-
|
|
7126
|
-
|
|
7127
|
-
|
|
7626
|
+
spinner?: string;
|
|
7627
|
+
successIcon?: string;
|
|
7628
|
+
errorIcon?: string;
|
|
7629
|
+
loading?: string;
|
|
7128
7630
|
};
|
|
7129
|
-
/**
|
|
7130
|
-
|
|
7131
|
-
|
|
7132
|
-
|
|
7133
|
-
|
|
7631
|
+
/** Custom animation settings */
|
|
7632
|
+
animation?: {
|
|
7633
|
+
spinnerDuration?: string;
|
|
7634
|
+
transitionDuration?: string;
|
|
7635
|
+
};
|
|
7636
|
+
/** Custom icon settings */
|
|
7637
|
+
icons?: {
|
|
7638
|
+
showSuccessIcon?: boolean;
|
|
7639
|
+
showErrorIcon?: boolean;
|
|
7640
|
+
customSuccessIcon?: ComponentType<{
|
|
7641
|
+
className?: string;
|
|
7642
|
+
}>;
|
|
7643
|
+
customErrorIcon?: ComponentType<{
|
|
7644
|
+
className?: string;
|
|
7645
|
+
}>;
|
|
7134
7646
|
};
|
|
7135
|
-
/** Minimum networks to show tabs */
|
|
7136
|
-
minNetworksToShow?: number;
|
|
7137
7647
|
};
|
|
7138
7648
|
};
|
|
7139
7649
|
/**
|
|
7140
|
-
*
|
|
7650
|
+
* Connection status component props interface
|
|
7141
7651
|
*/
|
|
7142
|
-
interface
|
|
7143
|
-
/**
|
|
7144
|
-
|
|
7145
|
-
/**
|
|
7652
|
+
interface ConnectingProps {
|
|
7653
|
+
/** Currently active connector identifier */
|
|
7654
|
+
activeConnector: string | undefined;
|
|
7655
|
+
/** Selected orbit adapter for the connection */
|
|
7146
7656
|
selectedAdapter: OrbitAdapter | undefined;
|
|
7147
|
-
/**
|
|
7148
|
-
|
|
7657
|
+
/** Array of available wallet connectors */
|
|
7658
|
+
connectors: GroupedConnector[];
|
|
7659
|
+
/** Whether the wallet connection is successfully established */
|
|
7660
|
+
isConnected: boolean;
|
|
7661
|
+
/** Optional custom error message to display */
|
|
7662
|
+
customErrorMessage?: string;
|
|
7663
|
+
/** Whether to show detailed error information */
|
|
7664
|
+
showDetailedError?: boolean;
|
|
7149
7665
|
/** Custom CSS classes for styling the container */
|
|
7150
7666
|
className?: string;
|
|
7151
7667
|
/** Customization options */
|
|
7152
|
-
customization?:
|
|
7668
|
+
customization?: ConnectingCustomization;
|
|
7153
7669
|
}
|
|
7154
7670
|
/**
|
|
7155
|
-
*
|
|
7156
|
-
*
|
|
7157
|
-
* This component provides an animated tab interface for selecting blockchain networks:
|
|
7158
|
-
* - Animated tab transitions with smooth layouts powered by Framer Motion
|
|
7159
|
-
* - Visual network icons with Web3Icon integration and fallbacks
|
|
7160
|
-
* - Configurable "All networks" option for viewing all connectors
|
|
7161
|
-
* - Responsive horizontal scrolling for mobile-friendly experience
|
|
7162
|
-
* - Full accessibility support with proper ARIA labels and keyboard navigation
|
|
7163
|
-
* - Motion-based UI feedback with customizable animation timing
|
|
7164
|
-
* - Complete customization of all child components and animations
|
|
7671
|
+
* Connection status display component for wallet connection flow
|
|
7165
7672
|
*
|
|
7166
|
-
*
|
|
7167
|
-
* -
|
|
7168
|
-
* -
|
|
7169
|
-
* -
|
|
7170
|
-
* -
|
|
7171
|
-
* -
|
|
7172
|
-
* -
|
|
7673
|
+
* This component provides comprehensive visual feedback during wallet connection:
|
|
7674
|
+
* - Animated loading spinner for connection in progress
|
|
7675
|
+
* - Success state with checkmark icon for completed connections
|
|
7676
|
+
* - Error state with warning icon and detailed error messages
|
|
7677
|
+
* - Fully internationalized text content with translation support
|
|
7678
|
+
* - WCAG compliant accessibility with proper ARIA labels and live regions
|
|
7679
|
+
* - Responsive design that adapts to different screen sizes
|
|
7680
|
+
* - Visual status indicators with semantic colors and icons
|
|
7681
|
+
* - Screen reader announcements for state changes
|
|
7173
7682
|
*
|
|
7174
|
-
*
|
|
7175
|
-
*
|
|
7176
|
-
* - Text fade transitions with customizable timing when switching tabs
|
|
7177
|
-
* - Morphing background indicator with layoutId for smooth transitions
|
|
7178
|
-
* - Optimized animation durations tuned for natural feel
|
|
7179
|
-
* - Support for reduced motion preferences
|
|
7683
|
+
* The component automatically detects connection state and displays appropriate
|
|
7684
|
+
* visual feedback with proper semantic markup for accessibility tools.
|
|
7180
7685
|
*
|
|
7181
|
-
*
|
|
7182
|
-
*
|
|
7183
|
-
*
|
|
7184
|
-
*
|
|
7185
|
-
* -
|
|
7186
|
-
* -
|
|
7187
|
-
*
|
|
7686
|
+
* @param activeConnector - Identifier of the currently connecting wallet
|
|
7687
|
+
* @param selectedAdapter - Orbit adapter instance for the connection
|
|
7688
|
+
* @param connectors - Array of available wallet connector options
|
|
7689
|
+
* @param isConnected - Boolean flag indicating successful connection
|
|
7690
|
+
* @param customErrorMessage - Optional custom error message override
|
|
7691
|
+
* @param showDetailedError - Flag to show detailed error information
|
|
7692
|
+
* @returns JSX element displaying connection status with visual feedback
|
|
7188
7693
|
*
|
|
7189
|
-
* @example
|
|
7694
|
+
* @example
|
|
7190
7695
|
* ```tsx
|
|
7191
|
-
* <
|
|
7192
|
-
*
|
|
7193
|
-
* selectedAdapter={
|
|
7194
|
-
*
|
|
7696
|
+
* <Connecting
|
|
7697
|
+
* activeConnector="metamask"
|
|
7698
|
+
* selectedAdapter={ethereumAdapter}
|
|
7699
|
+
* connectors={availableConnectors}
|
|
7700
|
+
* isConnected={false}
|
|
7195
7701
|
* />
|
|
7196
7702
|
* ```
|
|
7197
7703
|
*
|
|
7198
|
-
* @example
|
|
7704
|
+
* @example
|
|
7199
7705
|
* ```tsx
|
|
7200
|
-
*
|
|
7201
|
-
*
|
|
7202
|
-
*
|
|
7203
|
-
*
|
|
7204
|
-
*
|
|
7205
|
-
*
|
|
7206
|
-
*
|
|
7207
|
-
*
|
|
7208
|
-
* textDuration: 0.15
|
|
7209
|
-
* }
|
|
7210
|
-
* }
|
|
7211
|
-
* }}
|
|
7706
|
+
* // With custom error handling
|
|
7707
|
+
* <Connecting
|
|
7708
|
+
* activeConnector="walletconnect"
|
|
7709
|
+
* selectedAdapter={polygonAdapter}
|
|
7710
|
+
* connectors={connectors}
|
|
7711
|
+
* isConnected={false}
|
|
7712
|
+
* customErrorMessage="Custom connection error occurred"
|
|
7713
|
+
* showDetailedError={true}
|
|
7212
7714
|
* />
|
|
7213
7715
|
* ```
|
|
7214
7716
|
*
|
|
7215
|
-
* @example
|
|
7717
|
+
* @example
|
|
7216
7718
|
* ```tsx
|
|
7217
|
-
*
|
|
7218
|
-
*
|
|
7219
|
-
*
|
|
7220
|
-
*
|
|
7221
|
-
*
|
|
7222
|
-
*
|
|
7223
|
-
* TabButton: CustomTabButton,
|
|
7224
|
-
* Indicator: CustomIndicator
|
|
7225
|
-
* },
|
|
7226
|
-
* classNames: {
|
|
7227
|
-
* tabButton: ({ isSelected }) => isSelected ? 'custom-selected' : 'custom-normal'
|
|
7228
|
-
* },
|
|
7229
|
-
* handlers: {
|
|
7230
|
-
* onTabSelect: (network, tabData) => {
|
|
7231
|
-
* analytics.track('network_tab_selected', { network: network?.name });
|
|
7232
|
-
* }
|
|
7233
|
-
* },
|
|
7234
|
-
* config: {
|
|
7235
|
-
* minNetworksToShow: 2,
|
|
7236
|
-
* showAllOption: false
|
|
7237
|
-
* }
|
|
7238
|
-
* }}
|
|
7719
|
+
* // Successful connection state
|
|
7720
|
+
* <Connecting
|
|
7721
|
+
* activeConnector="phantom"
|
|
7722
|
+
* selectedAdapter={solanaAdapter}
|
|
7723
|
+
* connectors={solanaConnectors}
|
|
7724
|
+
* isConnected={true}
|
|
7239
7725
|
* />
|
|
7240
7726
|
* ```
|
|
7727
|
+
*
|
|
7728
|
+
* @public
|
|
7241
7729
|
*/
|
|
7242
|
-
declare const
|
|
7730
|
+
declare const Connecting: React__default.NamedExoticComponent<ConnectingProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
7243
7731
|
|
|
7244
7732
|
/**
|
|
7245
7733
|
* @file RecentBadge component with comprehensive customization options and animated gradient border.
|
|
@@ -7757,4 +8245,4 @@ declare function initializeBlockchainSupport(): Promise<InitializationResult>;
|
|
|
7757
8245
|
*/
|
|
7758
8246
|
declare function isAdapterSupported(adapter: OrbitAdapter): Promise<boolean>;
|
|
7759
8247
|
|
|
7760
|
-
export { AboutWallets, type AboutWalletsCustomization, type AboutWalletsProps, type AdapterInfo, type AdapterLoadStatus, type AllChainConfigs, type AllConnectors, type AllWallets, type AnimationConfig, type BadgeAnimationConfig, type BadgeGradientConfig, type BlockchainUtilities, type BlockchainUtilityResult, type ChainAdapter, type ChainIdentifierArray, ChainListRenderer, type ChainListRendererCustomization, type ChainListRendererProps, ChainSelector, type ChainSelectorCustomization, type ChainSelectorProps, type ChainTriggerButtonCustomization, ConnectButton, type ConnectButtonProps, ConnectCard, type ConnectCardCustomization, type ConnectCardData, ConnectedContent, type ConnectedContentCustomization, type ConnectedContentProps, ConnectedModal, type ConnectedModalCustomization, ConnectedModalFooter, type ConnectedModalFooterCustomization, type ConnectedModalFooterProps, ConnectedModalMainContent, type ConnectedModalMainContentCustomization, type ConnectedModalMainContentProps, ConnectedModalNameAndBalance, type ConnectedModalNameAndBalanceCustomization, type ConnectedModalNameAndBalanceProps, type ConnectedModalProps, ConnectedModalTxHistory, type ConnectedModalTxHistoryCustomization, type ConnectedModalTxHistoryProps, Connecting, type ConnectingCustomization, type ConnectingProps, type ConnectingStatusData, type ConnectionState, type Connector, ConnectorsBlock, ConnectorsSelections, type ConnectorsSelectionsProps, Disclaimer, type DisclaimerCustomization, type DisclaimerProps, GetWallet, type GetWalletCustomization, type GetWalletProps, type GroupedConnector, IconButton, type IconButtonCustomization, type IconButtonProps, ImpersonateForm, type ImpersonateFormCustomization, type ImpersonateFormProps, type InitialChains, type InitializationResult, type NetworkIconsCustomization, NetworkSelections, type NetworkSelectionsCustomization, type NetworkSelectionsData, type NetworkTabData, NetworkTabs, type NetworkTabsCustomization, type NetworkTabsProps, type NovaConnectLabels, RecentBadge, type RecentBadgeCustomization, type RecentBadgeProps, ScrollableChainList, type ScrollableChainListCustomization, type ScrollableChainListProps, SelectContentAnimated, type SelectContentAnimatedProps, StatusIcon, type StatusIconCustomization, type StatusIconProps$1 as StatusIconProps, ToBottomButton, type ToBottomButtonCustomization, type ToBottomButtonProps, ToTopButton, type ToTopButtonCustomization, type ToTopButtonProps, ToastError, type ToastErrorCustomization, type ToastErrorProps, type ValidationConfig, WaitForConnectionContent, type WaitForConnectionContentCustomization, type WaitForConnectionContentProps, type Wallet, WalletAvatar, type WalletAvatarCustomization, type WalletAvatarProps, type WalletAvatarSize, WalletIcon, type WalletIconConfig, type WalletIconCustomization, type WalletIconProps$1 as WalletIconProps, defaultLabels, getAdapterStatus, getAllAdaptersStatus, getAvailableChainIds, getAvailableSolanaClusters, getAvailableSolanaClusters$1 as getAvailableSolanaClustersAsync, getBlockchainUtilities, getChainsListByWalletTypeSync as getChainsListByWalletType, getChainsListByWalletType as getChainsListByWalletTypeAsync, getChainsListByWalletTypeSync, getConnectChainId, getEvmUtils, getFilteredConnectors, getGroupedConnectors, getNetworkIcon, getSolanaUtils, getWalletChains, hasAvailableConnectors, hasConnectorsForAdapter, initializeBlockchainSupport, isAdapterSupported, isEvmChainListSync as isEvmChainList, isEvmChainList as isEvmChainListAsync, isEvmChainListSync, isSolanaChainListSync as isSolanaChainList, isSolanaChainList as isSolanaChainListAsync, isSolanaChainListSync, isValidSolanaCluster, isValidSolanaCluster$1 as isValidSolanaClusterAsync, networksLinks, preloadChainAdapters, ukrainianLabels };
|
|
8248
|
+
export { AboutWallets, type AboutWalletsCustomization, type AboutWalletsProps, type AdapterInfo, type AdapterLoadStatus, type AllChainConfigs, type AllConnectors, type AllWallets, type AnimationConfig, type BadgeAnimationConfig, type BadgeGradientConfig, type BlockchainUtilities, type BlockchainUtilityResult, type ChainAdapter, type ChainIdentifierArray, ChainListRenderer, type ChainListRendererCustomization, type ChainListRendererProps, ChainSelector, type ChainSelectorCustomization, type ChainSelectorProps, type ChainTriggerButtonCustomization, ConnectButton, type ConnectButtonProps, ConnectCard, type ConnectCardCustomization, type ConnectCardData, ConnectedContent, type ConnectedContentCustomization, type ConnectedContentProps, ConnectedModal, type ConnectedModalCustomization, ConnectedModalFooter, type ConnectedModalFooterCustomization, type ConnectedModalFooterProps, ConnectedModalMainContent, type ConnectedModalMainContentCustomization, type ConnectedModalMainContentProps, ConnectedModalNameAndBalance, type ConnectedModalNameAndBalanceCustomization, type ConnectedModalNameAndBalanceProps, type ConnectedModalProps, ConnectedModalTxHistory, type ConnectedModalTxHistoryCustomization, type ConnectedModalTxHistoryProps, Connecting, type ConnectingCustomization, type ConnectingProps, type ConnectingStatusData, type ConnectionState, type Connector, type ConnectorItemData, ConnectorsBlock, type ConnectorsBlockCustomization, type ConnectorsBlockData, ConnectorsSelections, type ConnectorsSelectionsCustomization, type ConnectorsSelectionsData, type ConnectorsSelectionsProps, Disclaimer, type DisclaimerCustomization, type DisclaimerProps, GetWallet, type GetWalletCustomization, type GetWalletProps, type GroupedConnector$1 as GroupedConnector, IconButton, type IconButtonCustomization, type IconButtonProps, ImpersonateForm, type ImpersonateFormCustomization, type ImpersonateFormProps, type ImpersonateSectionData, type InitialChains, type InitializationResult, type NetworkIconsCustomization, NetworkSelections, type NetworkSelectionsCustomization, type NetworkSelectionsData, type NetworkTabData, NetworkTabs, type NetworkTabsCustomization, type NetworkTabsProps, type NovaConnectLabels, RecentBadge, type RecentBadgeCustomization, type RecentBadgeProps, ScrollableChainList, type ScrollableChainListCustomization, type ScrollableChainListProps, SelectContentAnimated, type SelectContentAnimatedProps, StatusIcon, type StatusIconCustomization, type StatusIconProps$1 as StatusIconProps, ToBottomButton, type ToBottomButtonCustomization, type ToBottomButtonProps, ToTopButton, type ToTopButtonCustomization, type ToTopButtonProps, ToastError, type ToastErrorCustomization, type ToastErrorProps, type ValidationConfig, WaitForConnectionContent, type WaitForConnectionContentCustomization, type WaitForConnectionContentProps, type Wallet, WalletAvatar, type WalletAvatarCustomization, type WalletAvatarProps, type WalletAvatarSize, WalletIcon, type WalletIconConfig, type WalletIconCustomization, type WalletIconProps$1 as WalletIconProps, defaultLabels, getAdapterStatus, getAllAdaptersStatus, getAvailableChainIds, getAvailableSolanaClusters, getAvailableSolanaClusters$1 as getAvailableSolanaClustersAsync, getBlockchainUtilities, getChainsListByWalletTypeSync as getChainsListByWalletType, getChainsListByWalletType as getChainsListByWalletTypeAsync, getChainsListByWalletTypeSync, getConnectChainId, getEvmUtils, getFilteredConnectors, getGroupedConnectors, getNetworkIcon, getSolanaUtils, getWalletChains, hasAvailableConnectors, hasConnectorsForAdapter, initializeBlockchainSupport, isAdapterSupported, isEvmChainListSync as isEvmChainList, isEvmChainList as isEvmChainListAsync, isEvmChainListSync, isSolanaChainListSync as isSolanaChainList, isSolanaChainList as isSolanaChainListAsync, isSolanaChainListSync, isValidSolanaCluster, isValidSolanaCluster$1 as isValidSolanaClusterAsync, networksLinks, preloadChainAdapters, ukrainianLabels };
|