@tuwaio/nova-connect 1.0.0-fix-test-alpha.54.7152f59 → 1.0.0-fix-test-alpha.56.a984de3
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 +7 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +38 -3
- package/dist/index.d.cts +1231 -131
- package/dist/index.d.ts +1231 -131
- package/dist/index.js +7 -7
- 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.d.cts +387 -33
- package/dist/providers/index.d.ts +387 -33
- package/dist/providers/index.js +2 -2
- package/dist/providers/index.js.map +1 -1
- package/package.json +10 -10
package/dist/index.d.ts
CHANGED
|
@@ -1,26 +1,225 @@
|
|
|
1
1
|
import { OrbitAdapter, WalletType } from '@tuwaio/orbit-core';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import { TargetAndTransition, VariantLabels, LegacyAnimationControls, Transition, AnyResolvedKeyframe } from 'framer-motion';
|
|
3
|
+
import * as React$1 from 'react';
|
|
4
|
+
import React__default, { ComponentType, ReactNode, ComponentPropsWithoutRef, FC } from 'react';
|
|
4
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
|
+
import * as Select from '@radix-ui/react-select';
|
|
5
7
|
import { TransactionPool, Transaction, TxAdapter } from '@tuwaio/pulsar-core';
|
|
6
8
|
import { ISatelliteConnectStore } from '@tuwaio/satellite-core';
|
|
7
9
|
import { StoreApi } from 'zustand/index';
|
|
8
10
|
import { Connector as Connector$1 } from '@tuwaio/satellite-react';
|
|
9
|
-
import * as Select from '@radix-ui/react-select';
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
/**
|
|
13
|
+
* @file Highly customizable chain list renderer with comprehensive styling and behavior control.
|
|
14
|
+
* @module ChainListRenderer
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Chain data structure returned by getChainData function
|
|
19
|
+
*/
|
|
20
|
+
interface ChainData$1 {
|
|
12
21
|
formattedChainId: string | number;
|
|
13
22
|
chain: string | number;
|
|
14
23
|
}
|
|
24
|
+
/**
|
|
25
|
+
* Props for custom chain icon component
|
|
26
|
+
*/
|
|
27
|
+
interface CustomChainIconProps {
|
|
28
|
+
chainId: string | number;
|
|
29
|
+
className?: string;
|
|
30
|
+
style?: React__default.CSSProperties;
|
|
31
|
+
'aria-hidden'?: boolean;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Props for custom chain content component
|
|
35
|
+
*/
|
|
36
|
+
interface CustomChainContentProps {
|
|
37
|
+
chainId: string | number;
|
|
38
|
+
isActive: boolean;
|
|
39
|
+
icon: ReactNode;
|
|
40
|
+
children?: ReactNode;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Props for custom active indicator component
|
|
44
|
+
*/
|
|
45
|
+
interface CustomActiveIndicatorProps {
|
|
46
|
+
isActive: boolean;
|
|
47
|
+
label: string;
|
|
48
|
+
className?: string;
|
|
49
|
+
style?: React__default.CSSProperties;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Animation configuration for container
|
|
53
|
+
*/
|
|
54
|
+
interface ContainerAnimationConfig {
|
|
55
|
+
initial?: TargetAndTransition | VariantLabels | LegacyAnimationControls | undefined;
|
|
56
|
+
animate?: TargetAndTransition | VariantLabels | LegacyAnimationControls | undefined;
|
|
57
|
+
exit?: TargetAndTransition | VariantLabels | LegacyAnimationControls | undefined;
|
|
58
|
+
transition?: Transition<AnyResolvedKeyframe>;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Animation configuration for items
|
|
62
|
+
*/
|
|
63
|
+
interface ItemAnimationConfig {
|
|
64
|
+
initial?: TargetAndTransition | VariantLabels | LegacyAnimationControls | undefined;
|
|
65
|
+
animate?: TargetAndTransition | VariantLabels | LegacyAnimationControls | undefined;
|
|
66
|
+
transition?: Transition<AnyResolvedKeyframe>;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Comprehensive customization options for ChainListRenderer
|
|
70
|
+
*/
|
|
71
|
+
interface ChainListRendererCustomization {
|
|
72
|
+
/** Custom components */
|
|
73
|
+
components?: {
|
|
74
|
+
/** Custom chain icon component */
|
|
75
|
+
ChainIcon?: ComponentType<CustomChainIconProps>;
|
|
76
|
+
/** Custom chain content layout component */
|
|
77
|
+
ChainContent?: ComponentType<CustomChainContentProps>;
|
|
78
|
+
/** Custom active indicator component */
|
|
79
|
+
ActiveIndicator?: ComponentType<CustomActiveIndicatorProps>;
|
|
80
|
+
};
|
|
81
|
+
/** Custom class name generators */
|
|
82
|
+
classNames?: {
|
|
83
|
+
/** Container classes */
|
|
84
|
+
container?: (params: {
|
|
85
|
+
isMobile: boolean;
|
|
86
|
+
itemCount: number;
|
|
87
|
+
}) => string;
|
|
88
|
+
/** Item classes */
|
|
89
|
+
item?: (params: {
|
|
90
|
+
isActive: boolean;
|
|
91
|
+
isMobile: boolean;
|
|
92
|
+
chainId: string | number;
|
|
93
|
+
}) => string;
|
|
94
|
+
/** Content wrapper classes */
|
|
95
|
+
content?: (params: {
|
|
96
|
+
isActive: boolean;
|
|
97
|
+
isMobile: boolean;
|
|
98
|
+
}) => string;
|
|
99
|
+
/** Icon classes */
|
|
100
|
+
icon?: (params: {
|
|
101
|
+
isActive: boolean;
|
|
102
|
+
chainId: string | number;
|
|
103
|
+
}) => string;
|
|
104
|
+
/** Chain name classes */
|
|
105
|
+
chainName?: (params: {
|
|
106
|
+
isActive: boolean;
|
|
107
|
+
isMobile: boolean;
|
|
108
|
+
}) => string;
|
|
109
|
+
/** Active indicator classes */
|
|
110
|
+
activeIndicator?: (params: {
|
|
111
|
+
isMobile: boolean;
|
|
112
|
+
}) => string;
|
|
113
|
+
};
|
|
114
|
+
/** Custom style generators */
|
|
115
|
+
styles?: {
|
|
116
|
+
/** Container styles */
|
|
117
|
+
container?: (params: {
|
|
118
|
+
isMobile: boolean;
|
|
119
|
+
itemCount: number;
|
|
120
|
+
}) => React__default.CSSProperties;
|
|
121
|
+
/** Item styles */
|
|
122
|
+
item?: (params: {
|
|
123
|
+
isActive: boolean;
|
|
124
|
+
isMobile: boolean;
|
|
125
|
+
chainId: string | number;
|
|
126
|
+
}) => React__default.CSSProperties;
|
|
127
|
+
/** Content wrapper styles */
|
|
128
|
+
content?: (params: {
|
|
129
|
+
isActive: boolean;
|
|
130
|
+
isMobile: boolean;
|
|
131
|
+
}) => React__default.CSSProperties;
|
|
132
|
+
/** Icon styles */
|
|
133
|
+
icon?: (params: {
|
|
134
|
+
isActive: boolean;
|
|
135
|
+
chainId: string | number;
|
|
136
|
+
}) => React__default.CSSProperties;
|
|
137
|
+
/** Chain name styles */
|
|
138
|
+
chainName?: (params: {
|
|
139
|
+
isActive: boolean;
|
|
140
|
+
isMobile: boolean;
|
|
141
|
+
}) => React__default.CSSProperties;
|
|
142
|
+
/** Active indicator styles */
|
|
143
|
+
activeIndicator?: (params: {
|
|
144
|
+
isMobile: boolean;
|
|
145
|
+
}) => React__default.CSSProperties;
|
|
146
|
+
};
|
|
147
|
+
/** Custom event handlers */
|
|
148
|
+
handlers?: {
|
|
149
|
+
/** Custom click handler wrapper */
|
|
150
|
+
onClick?: (originalHandler: () => void, context: {
|
|
151
|
+
chainId: string | number;
|
|
152
|
+
chainName: string;
|
|
153
|
+
isActive: boolean;
|
|
154
|
+
}) => void;
|
|
155
|
+
/** Custom keydown handler wrapper */
|
|
156
|
+
onKeyDown?: (originalHandler: (event: React__default.KeyboardEvent) => void, event: React__default.KeyboardEvent, context: {
|
|
157
|
+
chainId: string | number;
|
|
158
|
+
chainName: string;
|
|
159
|
+
isActive: boolean;
|
|
160
|
+
}) => void;
|
|
161
|
+
/** Chain selection handler wrapper */
|
|
162
|
+
onSelect?: (originalHandler: (chainId: string) => void, chainId: string, context: {
|
|
163
|
+
chainName: string;
|
|
164
|
+
isActive: boolean;
|
|
165
|
+
}) => void;
|
|
166
|
+
};
|
|
167
|
+
/** Animation configuration */
|
|
168
|
+
animations?: {
|
|
169
|
+
/** Container animation */
|
|
170
|
+
container?: ContainerAnimationConfig;
|
|
171
|
+
/** Item animation */
|
|
172
|
+
item?: ItemAnimationConfig;
|
|
173
|
+
};
|
|
174
|
+
/** Behavior configuration */
|
|
175
|
+
behavior?: {
|
|
176
|
+
/** Auto-focus first item */
|
|
177
|
+
autoFocus?: boolean;
|
|
178
|
+
/** Enable animation on mount */
|
|
179
|
+
animateOnMount?: boolean;
|
|
180
|
+
/** Show loading states */
|
|
181
|
+
showLoading?: boolean;
|
|
182
|
+
/** Custom loading message */
|
|
183
|
+
loadingMessage?: string;
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Props for the ChainListRenderer component
|
|
188
|
+
*/
|
|
15
189
|
interface ChainListRendererProps {
|
|
190
|
+
/** List of chain identifiers to render */
|
|
16
191
|
chainsList: (string | number)[];
|
|
192
|
+
/** Currently selected chain value */
|
|
17
193
|
selectValue: string;
|
|
194
|
+
/** Handler for chain selection changes */
|
|
18
195
|
handleValueChange: (newChainId: string) => void;
|
|
19
|
-
|
|
196
|
+
/** Function to get formatted chain data */
|
|
197
|
+
getChainData: (chain: string | number) => ChainData$1;
|
|
198
|
+
/** Handler called when list should close */
|
|
20
199
|
onClose: () => void;
|
|
200
|
+
/** Whether this is being rendered on mobile */
|
|
21
201
|
isMobile?: boolean;
|
|
202
|
+
/** Custom CSS classes for container (added to defaults) */
|
|
203
|
+
className?: string;
|
|
204
|
+
/** Custom CSS classes for individual items (added to defaults) */
|
|
205
|
+
itemClassName?: string;
|
|
206
|
+
/** Custom inline styles for container */
|
|
207
|
+
style?: React__default.CSSProperties;
|
|
208
|
+
/** Custom inline styles for individual items */
|
|
209
|
+
itemStyle?: React__default.CSSProperties;
|
|
210
|
+
/** Comprehensive customization options */
|
|
211
|
+
customization?: ChainListRendererCustomization;
|
|
212
|
+
/** ARIA label for the list container */
|
|
213
|
+
'aria-label'?: string;
|
|
214
|
+
/** Loading state */
|
|
215
|
+
isLoading?: boolean;
|
|
216
|
+
/** Error state */
|
|
217
|
+
error?: string | null;
|
|
22
218
|
}
|
|
23
|
-
|
|
219
|
+
/**
|
|
220
|
+
* Highly customizable chain list renderer with comprehensive styling and behavior control.
|
|
221
|
+
*/
|
|
222
|
+
declare const ChainListRenderer: React__default.FC<ChainListRendererProps>;
|
|
24
223
|
|
|
25
224
|
/**
|
|
26
225
|
* @description
|
|
@@ -212,69 +411,788 @@ type ConnectButtonProps = InitialChains & Pick<NovaConnectProviderProps, 'store'
|
|
|
212
411
|
|
|
213
412
|
declare function ConnectButton({ store, labels, ...props }: Pick<NovaConnectProviderProps, 'labels'> & ConnectButtonProps): react_jsx_runtime.JSX.Element;
|
|
214
413
|
|
|
414
|
+
type CustomIconProps$2 = {
|
|
415
|
+
disabled: boolean;
|
|
416
|
+
className?: string;
|
|
417
|
+
style?: React.CSSProperties;
|
|
418
|
+
'aria-hidden'?: boolean;
|
|
419
|
+
};
|
|
420
|
+
type CustomContentProps$1 = {
|
|
421
|
+
icon: ReactNode;
|
|
422
|
+
disabled: boolean;
|
|
423
|
+
ariaLabel?: string;
|
|
424
|
+
};
|
|
425
|
+
/**
|
|
426
|
+
* Customization options for ToBottomButton component
|
|
427
|
+
*/
|
|
428
|
+
type ToBottomButtonCustomization = {
|
|
429
|
+
/** Override button element props */
|
|
430
|
+
buttonProps?: Partial<ComponentPropsWithoutRef<'button'>>;
|
|
431
|
+
/** Custom components */
|
|
432
|
+
components?: {
|
|
433
|
+
/** Custom icon component */
|
|
434
|
+
Icon?: ComponentType<CustomIconProps$2>;
|
|
435
|
+
/** Custom button content component (wraps the icon) */
|
|
436
|
+
Content?: ComponentType<CustomContentProps$1>;
|
|
437
|
+
};
|
|
438
|
+
/** Custom class name generators */
|
|
439
|
+
classNames?: {
|
|
440
|
+
/** Function to generate button classes */
|
|
441
|
+
button?: (params: {
|
|
442
|
+
disabled: boolean;
|
|
443
|
+
hasOnClick: boolean;
|
|
444
|
+
}) => string;
|
|
445
|
+
/** Function to generate icon classes */
|
|
446
|
+
icon?: (params: {
|
|
447
|
+
disabled: boolean;
|
|
448
|
+
}) => string;
|
|
449
|
+
};
|
|
450
|
+
/** Custom style generators */
|
|
451
|
+
styles?: {
|
|
452
|
+
/** Function to generate button styles */
|
|
453
|
+
button?: (params: {
|
|
454
|
+
disabled: boolean;
|
|
455
|
+
hasOnClick: boolean;
|
|
456
|
+
}) => React.CSSProperties;
|
|
457
|
+
/** Function to generate icon styles */
|
|
458
|
+
icon?: (params: {
|
|
459
|
+
disabled: boolean;
|
|
460
|
+
}) => React.CSSProperties;
|
|
461
|
+
};
|
|
462
|
+
/** Custom event handlers */
|
|
463
|
+
handlers?: {
|
|
464
|
+
/** Custom click handler wrapper */
|
|
465
|
+
onClick?: (originalHandler: (event: React.MouseEvent<HTMLButtonElement>) => void, event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
466
|
+
/** Custom keydown handler wrapper */
|
|
467
|
+
onKeyDown?: (originalHandler: (event: React.KeyboardEvent<HTMLButtonElement>) => void, event: React.KeyboardEvent<HTMLButtonElement>) => void;
|
|
468
|
+
};
|
|
469
|
+
};
|
|
470
|
+
interface ToBottomButtonProps extends Omit<ComponentPropsWithoutRef<'button'>, 'type' | 'onClick' | 'onKeyDown'> {
|
|
471
|
+
/** Custom CSS classes for the button */
|
|
472
|
+
className?: string;
|
|
473
|
+
/** Custom aria-label for the button */
|
|
474
|
+
'aria-label'?: string;
|
|
475
|
+
/** Callback fired when button is clicked */
|
|
476
|
+
onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
477
|
+
/** Whether the button is disabled */
|
|
478
|
+
disabled?: boolean;
|
|
479
|
+
/** Customization options */
|
|
480
|
+
customization?: ToBottomButtonCustomization;
|
|
481
|
+
}
|
|
482
|
+
/**
|
|
483
|
+
* A highly customizable scroll-to-bottom button component with extensive styling options and accessibility features.
|
|
484
|
+
* Provides comprehensive customization for appearance, behavior, and event handling while maintaining keyboard navigation support.
|
|
485
|
+
*/
|
|
486
|
+
declare const ToBottomButton: React$1.ForwardRefExoticComponent<ToBottomButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
487
|
+
|
|
488
|
+
type CustomIconProps$1 = {
|
|
489
|
+
disabled: boolean;
|
|
490
|
+
className?: string;
|
|
491
|
+
style?: React.CSSProperties;
|
|
492
|
+
'aria-hidden'?: boolean;
|
|
493
|
+
};
|
|
494
|
+
type CustomContentProps = {
|
|
495
|
+
icon: ReactNode;
|
|
496
|
+
disabled: boolean;
|
|
497
|
+
ariaLabel?: string;
|
|
498
|
+
};
|
|
499
|
+
/**
|
|
500
|
+
* Customization options for ToTopButton component
|
|
501
|
+
*/
|
|
502
|
+
type ToTopButtonCustomization = {
|
|
503
|
+
/** Override button element props */
|
|
504
|
+
buttonProps?: Partial<ComponentPropsWithoutRef<'button'>>;
|
|
505
|
+
/** Custom components */
|
|
506
|
+
components?: {
|
|
507
|
+
/** Custom icon component */
|
|
508
|
+
Icon?: ComponentType<CustomIconProps$1>;
|
|
509
|
+
/** Custom button content component (wraps the icon) */
|
|
510
|
+
Content?: ComponentType<CustomContentProps>;
|
|
511
|
+
};
|
|
512
|
+
/** Custom class name generators */
|
|
513
|
+
classNames?: {
|
|
514
|
+
/** Function to generate button classes */
|
|
515
|
+
button?: (params: {
|
|
516
|
+
disabled: boolean;
|
|
517
|
+
hasOnClick: boolean;
|
|
518
|
+
}) => string;
|
|
519
|
+
/** Function to generate icon classes */
|
|
520
|
+
icon?: (params: {
|
|
521
|
+
disabled: boolean;
|
|
522
|
+
}) => string;
|
|
523
|
+
};
|
|
524
|
+
/** Custom style generators */
|
|
525
|
+
styles?: {
|
|
526
|
+
/** Function to generate button styles */
|
|
527
|
+
button?: (params: {
|
|
528
|
+
disabled: boolean;
|
|
529
|
+
hasOnClick: boolean;
|
|
530
|
+
}) => React.CSSProperties;
|
|
531
|
+
/** Function to generate icon styles */
|
|
532
|
+
icon?: (params: {
|
|
533
|
+
disabled: boolean;
|
|
534
|
+
}) => React.CSSProperties;
|
|
535
|
+
};
|
|
536
|
+
/** Custom event handlers */
|
|
537
|
+
handlers?: {
|
|
538
|
+
/** Custom click handler wrapper */
|
|
539
|
+
onClick?: (originalHandler: (event: React.MouseEvent<HTMLButtonElement>) => void, event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
540
|
+
/** Custom keydown handler wrapper */
|
|
541
|
+
onKeyDown?: (originalHandler: (event: React.KeyboardEvent<HTMLButtonElement>) => void, event: React.KeyboardEvent<HTMLButtonElement>) => void;
|
|
542
|
+
};
|
|
543
|
+
};
|
|
544
|
+
interface ToTopButtonProps extends Omit<ComponentPropsWithoutRef<'button'>, 'type' | 'onClick' | 'onKeyDown'> {
|
|
545
|
+
/** Custom CSS classes for the button */
|
|
546
|
+
className?: string;
|
|
547
|
+
/** Custom aria-label for the button */
|
|
548
|
+
'aria-label'?: string;
|
|
549
|
+
/** Callback fired when button is clicked */
|
|
550
|
+
onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
551
|
+
/** Whether the button is disabled */
|
|
552
|
+
disabled?: boolean;
|
|
553
|
+
/** Customization options */
|
|
554
|
+
customization?: ToTopButtonCustomization;
|
|
555
|
+
}
|
|
556
|
+
/**
|
|
557
|
+
* A highly customizable scroll-to-top button component with extensive styling options and accessibility features.
|
|
558
|
+
* Provides comprehensive customization for appearance, behavior, and event handling while maintaining keyboard navigation support.
|
|
559
|
+
*/
|
|
560
|
+
declare const ToTopButton: React$1.ForwardRefExoticComponent<ToTopButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
561
|
+
|
|
215
562
|
/**
|
|
216
|
-
*
|
|
563
|
+
* Props for the SelectContentAnimated component
|
|
564
|
+
*/
|
|
565
|
+
interface SelectContentAnimatedProps extends ComponentPropsWithoutRef<typeof Select.Content> {
|
|
566
|
+
/** Custom CSS classes to apply to the select content container (added to defaults) */
|
|
567
|
+
className?: string;
|
|
568
|
+
/** Custom CSS classes to apply to the animated inner content (added to defaults) */
|
|
569
|
+
contentClassName?: string;
|
|
570
|
+
/** Custom CSS classes to apply to the viewport (added to defaults) */
|
|
571
|
+
viewportClassName?: string;
|
|
572
|
+
/** ARIA label for the select content */
|
|
573
|
+
'aria-label'?: string;
|
|
574
|
+
/** Whether the select content should have reduced motion for accessibility */
|
|
575
|
+
reduceMotion?: boolean;
|
|
576
|
+
/** Maximum height for the content in pixels */
|
|
577
|
+
maxHeight?: number;
|
|
578
|
+
/** Custom animation duration in seconds */
|
|
579
|
+
animationDuration?: number;
|
|
580
|
+
/** Whether to show scroll buttons */
|
|
581
|
+
showScrollButtons?: boolean;
|
|
582
|
+
/** Custom props for the ToTopButton */
|
|
583
|
+
topButtonProps?: Omit<ComponentPropsWithoutRef<typeof ToTopButton>, 'ref'>;
|
|
584
|
+
/** Custom props for the ToBottomButton */
|
|
585
|
+
bottomButtonProps?: Omit<ComponentPropsWithoutRef<typeof ToBottomButton>, 'ref'>;
|
|
586
|
+
/** Customization options for ToTopButton */
|
|
587
|
+
topButtonCustomization?: ToTopButtonCustomization;
|
|
588
|
+
/** Customization options for ToBottomButton */
|
|
589
|
+
bottomButtonCustomization?: ToBottomButtonCustomization;
|
|
590
|
+
/** Custom inline styles for select content container */
|
|
591
|
+
style?: React.CSSProperties;
|
|
592
|
+
/** Custom inline styles for animated inner content */
|
|
593
|
+
contentStyle?: React.CSSProperties;
|
|
594
|
+
/** Custom inline styles for viewport */
|
|
595
|
+
viewportStyle?: React.CSSProperties;
|
|
596
|
+
}
|
|
597
|
+
/**
|
|
598
|
+
* Animated select content component with smooth enter/exit animations.
|
|
217
599
|
*
|
|
218
|
-
* This component provides
|
|
219
|
-
*
|
|
220
|
-
* wallet configuration and renders an appropriate selector interface.
|
|
600
|
+
* This component provides animated dropdown content for select components
|
|
601
|
+
* with accessibility support and extensive customization capabilities.
|
|
221
602
|
*
|
|
222
|
-
*
|
|
223
|
-
* -
|
|
224
|
-
* -
|
|
225
|
-
* -
|
|
226
|
-
* -
|
|
227
|
-
* -
|
|
228
|
-
* -
|
|
229
|
-
* -
|
|
230
|
-
*
|
|
231
|
-
* Architecture:
|
|
232
|
-
* - Uses dynamic imports for better performance
|
|
233
|
-
* - Supports both sync and async chain resolution
|
|
234
|
-
* - Provides fallback behavior when adapters fail
|
|
235
|
-
* - Integrates with existing store and state management
|
|
236
|
-
*
|
|
237
|
-
* Visual behavior:
|
|
238
|
-
* - Desktop: Dropdown select with animated content
|
|
239
|
-
* - Mobile: Modal dialog with scrollable list
|
|
240
|
-
* - Single chain: Simple display with icon and name
|
|
241
|
-
* - Multiple chains: Full selector with network switching
|
|
603
|
+
* Features:
|
|
604
|
+
* - Smooth enter/exit animations with Framer Motion
|
|
605
|
+
* - Accessibility-first design with ARIA support
|
|
606
|
+
* - Fully customizable scroll buttons with ToTopButton/ToBottomButton
|
|
607
|
+
* - Reduced motion support for accessibility
|
|
608
|
+
* - Customizable max height and animation duration
|
|
609
|
+
* - Full control over styling via className props (additive, not replacement)
|
|
610
|
+
* - Separate styling for container, content, and viewport
|
|
611
|
+
* - Custom button props and customization options
|
|
242
612
|
*
|
|
243
|
-
* @
|
|
244
|
-
*
|
|
245
|
-
*
|
|
246
|
-
*
|
|
613
|
+
* @example Basic usage
|
|
614
|
+
* ```tsx
|
|
615
|
+
* <Select.Root>
|
|
616
|
+
* <Select.Trigger>Select an option</Select.Trigger>
|
|
617
|
+
* <SelectContentAnimated>
|
|
618
|
+
* <Select.Item value="option1">Option 1</Select.Item>
|
|
619
|
+
* <Select.Item value="option2">Option 2</Select.Item>
|
|
620
|
+
* </SelectContentAnimated>
|
|
621
|
+
* </Select.Root>
|
|
622
|
+
* ```
|
|
247
623
|
*
|
|
248
|
-
* @example
|
|
624
|
+
* @example With full customization
|
|
249
625
|
* ```tsx
|
|
250
|
-
* <
|
|
251
|
-
*
|
|
252
|
-
*
|
|
253
|
-
*
|
|
254
|
-
*
|
|
255
|
-
*
|
|
256
|
-
*
|
|
626
|
+
* <SelectContentAnimated
|
|
627
|
+
* className="novacon:shadow-2xl novacon:border-2"
|
|
628
|
+
* contentClassName="novacon:p-4 novacon:bg-gradient-to-b"
|
|
629
|
+
* viewportClassName="novacon:scrollbar-thin"
|
|
630
|
+
* maxHeight={400}
|
|
631
|
+
* animationDuration={0.3}
|
|
632
|
+
* reduceMotion={false}
|
|
633
|
+
* showScrollButtons={true}
|
|
634
|
+
* topButtonProps={{
|
|
635
|
+
* className: "novacon:bg-blue-500",
|
|
636
|
+
* onClick: () => console.log("Top button clicked"),
|
|
257
637
|
* }}
|
|
258
|
-
*
|
|
259
|
-
*
|
|
638
|
+
* topButtonCustomization={{
|
|
639
|
+
* classNames: {
|
|
640
|
+
* button: () => "novacon:bg-red-500 novacon:hover:bg-red-600",
|
|
641
|
+
* },
|
|
642
|
+
* }}
|
|
643
|
+
* bottomButtonCustomization={{
|
|
644
|
+
* components: {
|
|
645
|
+
* Icon: ({ className }) => <div className={className}>⬇️</div>,
|
|
646
|
+
* },
|
|
647
|
+
* }}
|
|
648
|
+
* >
|
|
649
|
+
* <Select.Item value="item1">Item 1</Select.Item>
|
|
650
|
+
* </SelectContentAnimated>
|
|
260
651
|
* ```
|
|
261
|
-
*
|
|
262
|
-
* @public
|
|
263
|
-
* @since 1.0.0
|
|
264
652
|
*/
|
|
265
|
-
declare
|
|
653
|
+
declare const SelectContentAnimated: React$1.ForwardRefExoticComponent<SelectContentAnimatedProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
654
|
+
|
|
655
|
+
/**
|
|
656
|
+
* @file Highly customizable scrollable chain list with comprehensive styling and behavior control.
|
|
657
|
+
* @module ScrollableChainList
|
|
658
|
+
*/
|
|
266
659
|
|
|
267
|
-
|
|
660
|
+
/**
|
|
661
|
+
* Chain data structure returned by getChainData function
|
|
662
|
+
*/
|
|
663
|
+
interface ChainData {
|
|
664
|
+
formattedChainId: string | number;
|
|
665
|
+
chain: string | number;
|
|
666
|
+
}
|
|
667
|
+
/**
|
|
668
|
+
* Scroll button state context
|
|
669
|
+
*/
|
|
670
|
+
interface ScrollButtonContext {
|
|
671
|
+
showTopButton: boolean;
|
|
672
|
+
showBottomButton: boolean;
|
|
673
|
+
isScrolling: boolean;
|
|
674
|
+
scrollTop: number;
|
|
675
|
+
scrollHeight: number;
|
|
676
|
+
clientHeight: number;
|
|
677
|
+
}
|
|
678
|
+
/**
|
|
679
|
+
* Props for custom scroll container component
|
|
680
|
+
*/
|
|
681
|
+
interface CustomScrollContainerProps {
|
|
682
|
+
children: ReactNode;
|
|
683
|
+
ref: React__default.RefObject<HTMLDivElement | null>;
|
|
684
|
+
onKeyDown: (event: React__default.KeyboardEvent<HTMLDivElement>) => void;
|
|
685
|
+
className?: string;
|
|
686
|
+
style?: React__default.CSSProperties;
|
|
687
|
+
role: string;
|
|
688
|
+
'aria-label': string;
|
|
689
|
+
tabIndex: number;
|
|
690
|
+
}
|
|
691
|
+
/**
|
|
692
|
+
* Props for custom wrapper component
|
|
693
|
+
*/
|
|
694
|
+
interface CustomWrapperProps {
|
|
695
|
+
children: ReactNode;
|
|
696
|
+
className?: string;
|
|
697
|
+
style?: React__default.CSSProperties;
|
|
698
|
+
role: string;
|
|
699
|
+
'aria-label': string;
|
|
700
|
+
}
|
|
701
|
+
/**
|
|
702
|
+
* Props for custom button animations wrapper
|
|
703
|
+
*/
|
|
704
|
+
interface CustomButtonAnimationWrapperProps {
|
|
705
|
+
children: ReactNode;
|
|
706
|
+
isVisible: boolean;
|
|
707
|
+
position: 'top' | 'bottom';
|
|
708
|
+
animationKey: string;
|
|
709
|
+
}
|
|
710
|
+
/**
|
|
711
|
+
* Animation configuration for scroll buttons
|
|
712
|
+
*/
|
|
713
|
+
interface ScrollButtonAnimationConfig {
|
|
714
|
+
initial?: TargetAndTransition | VariantLabels | LegacyAnimationControls | undefined;
|
|
715
|
+
animate?: TargetAndTransition | VariantLabels | LegacyAnimationControls | undefined;
|
|
716
|
+
exit?: TargetAndTransition | VariantLabels | LegacyAnimationControls | undefined;
|
|
717
|
+
transition?: Transition<AnyResolvedKeyframe>;
|
|
718
|
+
}
|
|
719
|
+
/**
|
|
720
|
+
* Comprehensive customization options for ScrollableChainList
|
|
721
|
+
*/
|
|
722
|
+
interface ScrollableChainListCustomization {
|
|
723
|
+
/** Custom components */
|
|
724
|
+
components?: {
|
|
725
|
+
/** Custom scroll container component */
|
|
726
|
+
ScrollContainer?: ComponentType<CustomScrollContainerProps>;
|
|
727
|
+
/** Custom wrapper component */
|
|
728
|
+
Wrapper?: ComponentType<CustomWrapperProps>;
|
|
729
|
+
/** Custom button animation wrapper */
|
|
730
|
+
ButtonAnimationWrapper?: ComponentType<CustomButtonAnimationWrapperProps>;
|
|
731
|
+
};
|
|
732
|
+
/** Custom class name generators */
|
|
733
|
+
classNames?: {
|
|
734
|
+
/** Wrapper classes */
|
|
735
|
+
wrapper?: (params: {
|
|
736
|
+
itemCount: number;
|
|
737
|
+
hasScrollableContent: boolean;
|
|
738
|
+
}) => string;
|
|
739
|
+
/** Scroll container classes */
|
|
740
|
+
container?: (params: {
|
|
741
|
+
itemCount: number;
|
|
742
|
+
hasScrollableContent: boolean;
|
|
743
|
+
showTopButton: boolean;
|
|
744
|
+
showBottomButton: boolean;
|
|
745
|
+
}) => string;
|
|
746
|
+
/** Button animation wrapper classes */
|
|
747
|
+
buttonWrapper?: (params: {
|
|
748
|
+
position: 'top' | 'bottom';
|
|
749
|
+
isVisible: boolean;
|
|
750
|
+
}) => string;
|
|
751
|
+
};
|
|
752
|
+
/** Custom style generators */
|
|
753
|
+
styles?: {
|
|
754
|
+
/** Wrapper styles */
|
|
755
|
+
wrapper?: (params: {
|
|
756
|
+
itemCount: number;
|
|
757
|
+
hasScrollableContent: boolean;
|
|
758
|
+
}) => React__default.CSSProperties;
|
|
759
|
+
/** Scroll container styles */
|
|
760
|
+
container?: (params: {
|
|
761
|
+
itemCount: number;
|
|
762
|
+
hasScrollableContent: boolean;
|
|
763
|
+
showTopButton: boolean;
|
|
764
|
+
showBottomButton: boolean;
|
|
765
|
+
}) => React__default.CSSProperties;
|
|
766
|
+
/** Button animation wrapper styles */
|
|
767
|
+
buttonWrapper?: (params: {
|
|
768
|
+
position: 'top' | 'bottom';
|
|
769
|
+
isVisible: boolean;
|
|
770
|
+
}) => React__default.CSSProperties;
|
|
771
|
+
/** Top button styles */
|
|
772
|
+
topButton?: (params: {
|
|
773
|
+
isVisible: boolean;
|
|
774
|
+
context: ScrollButtonContext;
|
|
775
|
+
}) => React__default.CSSProperties;
|
|
776
|
+
/** Bottom button styles */
|
|
777
|
+
bottomButton?: (params: {
|
|
778
|
+
isVisible: boolean;
|
|
779
|
+
context: ScrollButtonContext;
|
|
780
|
+
}) => React__default.CSSProperties;
|
|
781
|
+
};
|
|
782
|
+
/** Custom event handlers */
|
|
783
|
+
handlers?: {
|
|
784
|
+
/** Custom scroll handler wrapper */
|
|
785
|
+
onScroll?: (originalHandler: () => void, event: Event, context: ScrollButtonContext) => void;
|
|
786
|
+
/** Custom key handler wrapper for container */
|
|
787
|
+
onKeyDown?: (originalHandler: (event: React__default.KeyboardEvent<HTMLDivElement>) => void, event: React__default.KeyboardEvent<HTMLDivElement>, context: {
|
|
788
|
+
scrollContainer: HTMLDivElement | null;
|
|
789
|
+
}) => void;
|
|
790
|
+
/** Custom top button click handler wrapper */
|
|
791
|
+
onTopButtonClick?: (originalHandler: () => void, context: ScrollButtonContext) => void;
|
|
792
|
+
/** Custom bottom button click handler wrapper */
|
|
793
|
+
onBottomButtonClick?: (originalHandler: () => void, context: ScrollButtonContext) => void;
|
|
794
|
+
};
|
|
795
|
+
/** Animation configuration */
|
|
796
|
+
animations?: {
|
|
797
|
+
/** Button animation */
|
|
798
|
+
scrollButtons?: ScrollButtonAnimationConfig;
|
|
799
|
+
};
|
|
800
|
+
/** Scroll behavior configuration */
|
|
801
|
+
scrollBehavior?: {
|
|
802
|
+
/** Scroll behavior type */
|
|
803
|
+
behavior?: ScrollBehavior;
|
|
804
|
+
/** Page scroll percentage (0-1) */
|
|
805
|
+
pageScrollPercentage?: number;
|
|
806
|
+
/** Scroll update throttle in ms */
|
|
807
|
+
updateThrottle?: number;
|
|
808
|
+
/** Enable auto-scroll to active item */
|
|
809
|
+
autoScrollToActive?: boolean;
|
|
810
|
+
};
|
|
811
|
+
/** Button customization */
|
|
812
|
+
buttons?: {
|
|
813
|
+
/** Top button customization */
|
|
814
|
+
topButton?: ToTopButtonCustomization;
|
|
815
|
+
/** Bottom button customization */
|
|
816
|
+
bottomButton?: ToBottomButtonCustomization;
|
|
817
|
+
/** Hide buttons when content fits */
|
|
818
|
+
hideWhenContentFits?: boolean;
|
|
819
|
+
/** Custom button positioning */
|
|
820
|
+
positioning?: {
|
|
821
|
+
/** Top button position offset */
|
|
822
|
+
topOffset?: string | number;
|
|
823
|
+
/** Bottom button position offset */
|
|
824
|
+
bottomOffset?: string | number;
|
|
825
|
+
/** Button z-index */
|
|
826
|
+
zIndex?: number;
|
|
827
|
+
};
|
|
828
|
+
};
|
|
829
|
+
/** Chain list renderer customization */
|
|
830
|
+
chainListRenderer?: ChainListRendererCustomization;
|
|
831
|
+
}
|
|
832
|
+
/**
|
|
833
|
+
* Props for the ScrollableChainList component
|
|
834
|
+
*/
|
|
835
|
+
interface ScrollableChainListProps {
|
|
836
|
+
/** List of chain identifiers to render */
|
|
268
837
|
chainsList: (string | number)[];
|
|
838
|
+
/** Currently selected chain value */
|
|
269
839
|
selectValue: string;
|
|
840
|
+
/** Handler for chain selection changes */
|
|
270
841
|
handleValueChange: (newChainId: string) => void;
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
842
|
+
/** Function to get formatted chain data */
|
|
843
|
+
getChainData: (chain: string | number) => ChainData;
|
|
844
|
+
/** Handler called when list should close */
|
|
845
|
+
onClose: () => void;
|
|
846
|
+
/** Custom inline styles for wrapper */
|
|
847
|
+
style?: React__default.CSSProperties;
|
|
848
|
+
/** Custom inline styles for scroll container */
|
|
849
|
+
containerStyle?: React__default.CSSProperties;
|
|
850
|
+
/** Comprehensive customization options */
|
|
851
|
+
customization?: ScrollableChainListCustomization;
|
|
852
|
+
/** ARIA label for the wrapper */
|
|
853
|
+
'aria-label'?: string;
|
|
854
|
+
/** Loading state */
|
|
855
|
+
isLoading?: boolean;
|
|
856
|
+
/** Error state */
|
|
857
|
+
error?: string | null;
|
|
858
|
+
}
|
|
859
|
+
/**
|
|
860
|
+
* Highly customizable scrollable chain list with comprehensive styling and behavior control.
|
|
861
|
+
*/
|
|
862
|
+
declare const ScrollableChainList: React__default.FC<ScrollableChainListProps>;
|
|
863
|
+
|
|
864
|
+
/**
|
|
865
|
+
* Context for the chain selection trigger button.
|
|
866
|
+
*/
|
|
867
|
+
type ChainTriggerButtonContext = {
|
|
868
|
+
/** The currently formatted chain ID */
|
|
869
|
+
currentFormattedChainId: string | number;
|
|
870
|
+
/** Value for the Select component */
|
|
871
|
+
selectValue: string;
|
|
872
|
+
/** Whether the chain list is open */
|
|
873
|
+
isChainsListOpen: boolean;
|
|
874
|
+
/** Whether the device is mobile */
|
|
875
|
+
isMobile: boolean;
|
|
876
|
+
/** The name of the chain */
|
|
877
|
+
chainName: string;
|
|
878
|
+
};
|
|
879
|
+
/**
|
|
880
|
+
* Props for a custom trigger icon component.
|
|
881
|
+
*/
|
|
882
|
+
type CustomTriggerIconProps = {
|
|
883
|
+
/** Chain ID */
|
|
884
|
+
chainId: string | number;
|
|
885
|
+
/** CSS class */
|
|
886
|
+
className?: string;
|
|
887
|
+
/** Inline styles */
|
|
888
|
+
style?: React__default.CSSProperties;
|
|
889
|
+
/** Whether hidden from screen readers */
|
|
890
|
+
'aria-hidden'?: boolean;
|
|
891
|
+
};
|
|
892
|
+
/**
|
|
893
|
+
* Props for a custom trigger content component.
|
|
894
|
+
*/
|
|
895
|
+
type CustomTriggerContentProps = {
|
|
896
|
+
/** Chain icon */
|
|
897
|
+
icon: ReactNode;
|
|
898
|
+
/** Chain name */
|
|
899
|
+
chainName: string;
|
|
900
|
+
/** Whether the device is mobile */
|
|
901
|
+
isMobile: boolean;
|
|
902
|
+
/** Whether the list is open */
|
|
903
|
+
isOpen: boolean;
|
|
904
|
+
/** The currently formatted chain ID */
|
|
905
|
+
currentFormattedChainId: string | number;
|
|
906
|
+
};
|
|
907
|
+
/**
|
|
908
|
+
* Props for a custom trigger arrow component.
|
|
909
|
+
*/
|
|
910
|
+
type CustomTriggerArrowProps = {
|
|
911
|
+
/** Whether the list is open */
|
|
912
|
+
isOpen: boolean;
|
|
913
|
+
/** CSS class */
|
|
914
|
+
className?: string;
|
|
915
|
+
/** Inline styles */
|
|
916
|
+
style?: React__default.CSSProperties;
|
|
917
|
+
/** Whether hidden from screen readers */
|
|
918
|
+
'aria-hidden'?: boolean;
|
|
919
|
+
};
|
|
920
|
+
/**
|
|
921
|
+
* Props for a custom loading state display.
|
|
922
|
+
*/
|
|
923
|
+
type CustomLoadingStateProps = {
|
|
924
|
+
/** CSS class */
|
|
925
|
+
className?: string;
|
|
926
|
+
/** Inline styles */
|
|
927
|
+
style?: React__default.CSSProperties;
|
|
928
|
+
/** ARIA label */
|
|
929
|
+
'aria-label': string;
|
|
930
|
+
};
|
|
931
|
+
/**
|
|
932
|
+
* Props for a custom display for a single chain (when no selector is needed).
|
|
933
|
+
*/
|
|
934
|
+
type CustomSingleChainDisplayProps = {
|
|
935
|
+
/** Chain ID */
|
|
936
|
+
chainId: string | number;
|
|
937
|
+
/** Chain name */
|
|
938
|
+
chainName: string;
|
|
939
|
+
/** CSS class */
|
|
940
|
+
className?: string;
|
|
941
|
+
/** Inline styles */
|
|
942
|
+
style?: React__default.CSSProperties;
|
|
943
|
+
/** ARIA label */
|
|
944
|
+
'aria-label': string;
|
|
945
|
+
};
|
|
946
|
+
/**
|
|
947
|
+
* Props for a custom desktop selector wrapper.
|
|
948
|
+
*/
|
|
949
|
+
type CustomDesktopSelectorProps = {
|
|
950
|
+
/** Child elements */
|
|
951
|
+
children: ReactNode;
|
|
952
|
+
/** CSS class */
|
|
953
|
+
className?: string;
|
|
954
|
+
/** Inline styles */
|
|
955
|
+
style?: React__default.CSSProperties;
|
|
956
|
+
/** ARIA label */
|
|
957
|
+
'aria-label': string;
|
|
958
|
+
};
|
|
959
|
+
/**
|
|
960
|
+
* Props for a custom mobile selector wrapper.
|
|
961
|
+
*/
|
|
962
|
+
type CustomMobileSelectorProps = {
|
|
963
|
+
/** Child elements */
|
|
964
|
+
children: ReactNode;
|
|
965
|
+
/** CSS class */
|
|
966
|
+
className?: string;
|
|
967
|
+
/** Inline styles */
|
|
968
|
+
style?: React__default.CSSProperties;
|
|
969
|
+
/** ARIA label */
|
|
970
|
+
'aria-label': string;
|
|
971
|
+
};
|
|
972
|
+
/**
|
|
973
|
+
* Props for a custom dialog header component.
|
|
974
|
+
*/
|
|
975
|
+
type CustomDialogHeaderProps = {
|
|
976
|
+
/** Title text */
|
|
977
|
+
title: string;
|
|
978
|
+
/** Close handler */
|
|
275
979
|
onClose: () => void;
|
|
980
|
+
/** CSS class */
|
|
981
|
+
className?: string;
|
|
982
|
+
/** Inline styles */
|
|
983
|
+
style?: React__default.CSSProperties;
|
|
984
|
+
};
|
|
985
|
+
/**
|
|
986
|
+
* Animation easing parameters for framer-motion.
|
|
987
|
+
*/
|
|
988
|
+
type AnimationEasing = [number, number, number, number] | string;
|
|
989
|
+
/**
|
|
990
|
+
* Customization options for the ChainTriggerButton.
|
|
991
|
+
*/
|
|
992
|
+
type ChainTriggerButtonCustomization = {
|
|
993
|
+
/** Overrides for the button/trigger props */
|
|
994
|
+
buttonProps?: Partial<ComponentPropsWithoutRef<'button'>>;
|
|
995
|
+
/** Overrides for the Select.Trigger props (desktop only) */
|
|
996
|
+
selectTriggerProps?: Partial<ComponentPropsWithoutRef<typeof Select.Trigger>>;
|
|
997
|
+
/** Custom component overrides */
|
|
998
|
+
components?: {
|
|
999
|
+
/** Custom chain icon component */
|
|
1000
|
+
Icon?: ComponentType<CustomTriggerIconProps>;
|
|
1001
|
+
/** Custom trigger content wrapper */
|
|
1002
|
+
Content?: ComponentType<CustomTriggerContentProps>;
|
|
1003
|
+
/** Custom arrow/chevron component */
|
|
1004
|
+
Arrow?: ComponentType<CustomTriggerArrowProps>;
|
|
1005
|
+
};
|
|
1006
|
+
/** Custom CSS class generators */
|
|
1007
|
+
classNames?: {
|
|
1008
|
+
/** Function to generate wrapper classes */
|
|
1009
|
+
wrapper?: (params: {
|
|
1010
|
+
isMobile: boolean;
|
|
1011
|
+
isOpen: boolean;
|
|
1012
|
+
}) => string;
|
|
1013
|
+
/** Function to generate button/trigger classes */
|
|
1014
|
+
button?: (params: {
|
|
1015
|
+
isMobile: boolean;
|
|
1016
|
+
isOpen: boolean;
|
|
1017
|
+
hasMultipleChains: boolean;
|
|
1018
|
+
}) => string;
|
|
1019
|
+
/** Function to generate inner content classes */
|
|
1020
|
+
innerContent?: (params: {
|
|
1021
|
+
isMobile: boolean;
|
|
1022
|
+
isOpen: boolean;
|
|
1023
|
+
}) => string;
|
|
1024
|
+
/** Function to generate icon wrapper classes */
|
|
1025
|
+
iconWrapper?: (params: {
|
|
1026
|
+
isMobile: boolean;
|
|
1027
|
+
}) => string;
|
|
1028
|
+
/** Function to generate chain name classes */
|
|
1029
|
+
chainName?: (params: {
|
|
1030
|
+
isMobile: boolean;
|
|
1031
|
+
isVisible: boolean;
|
|
1032
|
+
}) => string;
|
|
1033
|
+
/** Function to generate arrow wrapper classes */
|
|
1034
|
+
arrowWrapper?: (params: {
|
|
1035
|
+
isMobile: boolean;
|
|
1036
|
+
}) => string;
|
|
1037
|
+
};
|
|
1038
|
+
/** Custom style generators */
|
|
1039
|
+
styles?: {
|
|
1040
|
+
/** Function to generate wrapper styles */
|
|
1041
|
+
wrapper?: (params: {
|
|
1042
|
+
isMobile: boolean;
|
|
1043
|
+
isOpen: boolean;
|
|
1044
|
+
}) => React__default.CSSProperties;
|
|
1045
|
+
/** Function to generate button/trigger styles */
|
|
1046
|
+
button?: (params: {
|
|
1047
|
+
isMobile: boolean;
|
|
1048
|
+
isOpen: boolean;
|
|
1049
|
+
hasMultipleChains: boolean;
|
|
1050
|
+
}) => React__default.CSSProperties;
|
|
1051
|
+
/** Function to generate inner content styles */
|
|
1052
|
+
innerContent?: (params: {
|
|
1053
|
+
isMobile: boolean;
|
|
1054
|
+
isOpen: boolean;
|
|
1055
|
+
}) => React__default.CSSProperties;
|
|
1056
|
+
/** Function to generate icon wrapper styles */
|
|
1057
|
+
iconWrapper?: (params: {
|
|
1058
|
+
isMobile: boolean;
|
|
1059
|
+
}) => React__default.CSSProperties;
|
|
1060
|
+
/** Function to generate chain name styles */
|
|
1061
|
+
chainName?: (params: {
|
|
1062
|
+
isMobile: boolean;
|
|
1063
|
+
isVisible: boolean;
|
|
1064
|
+
}) => React__default.CSSProperties;
|
|
1065
|
+
/** Function to generate arrow wrapper styles */
|
|
1066
|
+
arrowWrapper?: (params: {
|
|
1067
|
+
isMobile: boolean;
|
|
1068
|
+
}) => React__default.CSSProperties;
|
|
1069
|
+
};
|
|
1070
|
+
/** Custom event handlers */
|
|
1071
|
+
handlers?: {
|
|
1072
|
+
/** Wrapper for the click handler */
|
|
1073
|
+
onClick?: (originalHandler: () => void, event: React__default.MouseEvent<HTMLButtonElement>, context: ChainTriggerButtonContext) => void;
|
|
1074
|
+
/** Wrapper for the key down handler */
|
|
1075
|
+
onKeyDown?: (originalHandler: (event: React__default.KeyboardEvent) => void, event: React__default.KeyboardEvent, context: ChainTriggerButtonContext) => void;
|
|
1076
|
+
};
|
|
1077
|
+
/** Animation settings */
|
|
1078
|
+
animations?: {
|
|
1079
|
+
/** Layout animation settings */
|
|
1080
|
+
layout?: {
|
|
1081
|
+
duration?: number;
|
|
1082
|
+
ease?: AnimationEasing;
|
|
1083
|
+
};
|
|
1084
|
+
/** Inner content animation settings */
|
|
1085
|
+
innerContent?: {
|
|
1086
|
+
duration?: number;
|
|
1087
|
+
};
|
|
1088
|
+
};
|
|
1089
|
+
};
|
|
1090
|
+
/**
|
|
1091
|
+
* Comprehensive customization options for the ChainSelector.
|
|
1092
|
+
*/
|
|
1093
|
+
type ChainSelectorCustomization = {
|
|
1094
|
+
/** Custom component overrides */
|
|
1095
|
+
components?: {
|
|
1096
|
+
/** Custom loading state component */
|
|
1097
|
+
LoadingState?: ComponentType<CustomLoadingStateProps>;
|
|
1098
|
+
/** Custom component for displaying a single chain */
|
|
1099
|
+
SingleChainDisplay?: ComponentType<CustomSingleChainDisplayProps>;
|
|
1100
|
+
/** Custom wrapper for the desktop selector */
|
|
1101
|
+
DesktopSelector?: ComponentType<CustomDesktopSelectorProps>;
|
|
1102
|
+
/** Custom wrapper for the mobile selector */
|
|
1103
|
+
MobileSelector?: ComponentType<CustomMobileSelectorProps>;
|
|
1104
|
+
/** Custom dialog header component */
|
|
1105
|
+
DialogHeader?: ComponentType<CustomDialogHeaderProps>;
|
|
1106
|
+
};
|
|
1107
|
+
/** Custom CSS class generators */
|
|
1108
|
+
classNames?: {
|
|
1109
|
+
/** Classes for the main container */
|
|
1110
|
+
container?: (params: {
|
|
1111
|
+
hasMultipleChains: boolean;
|
|
1112
|
+
isLoading: boolean;
|
|
1113
|
+
}) => string;
|
|
1114
|
+
/** Classes for the desktop wrapper */
|
|
1115
|
+
desktopWrapper?: (params: {
|
|
1116
|
+
chainCount: number;
|
|
1117
|
+
}) => string;
|
|
1118
|
+
/** Classes for the mobile wrapper */
|
|
1119
|
+
mobileWrapper?: (params: {
|
|
1120
|
+
chainCount: number;
|
|
1121
|
+
}) => string;
|
|
1122
|
+
/** Classes for the loading state */
|
|
1123
|
+
loadingState?: () => string;
|
|
1124
|
+
/** Classes for the single chain display */
|
|
1125
|
+
singleChainDisplay?: () => string;
|
|
1126
|
+
/** Classes for the dialog content */
|
|
1127
|
+
dialogContent?: (params: {
|
|
1128
|
+
chainCount: number;
|
|
1129
|
+
}) => string;
|
|
1130
|
+
/** Classes for the dialog inner container */
|
|
1131
|
+
dialogInnerContainer?: () => string;
|
|
1132
|
+
};
|
|
1133
|
+
/** Custom style generators */
|
|
1134
|
+
styles?: {
|
|
1135
|
+
/** Styles for the main container */
|
|
1136
|
+
container?: (params: {
|
|
1137
|
+
hasMultipleChains: boolean;
|
|
1138
|
+
isLoading: boolean;
|
|
1139
|
+
}) => React__default.CSSProperties;
|
|
1140
|
+
/** Styles for the desktop wrapper */
|
|
1141
|
+
desktopWrapper?: (params: {
|
|
1142
|
+
chainCount: number;
|
|
1143
|
+
}) => React__default.CSSProperties;
|
|
1144
|
+
/** Styles for the mobile wrapper */
|
|
1145
|
+
mobileWrapper?: (params: {
|
|
1146
|
+
chainCount: number;
|
|
1147
|
+
}) => React__default.CSSProperties;
|
|
1148
|
+
/** Styles for the loading state */
|
|
1149
|
+
loadingState?: () => React__default.CSSProperties;
|
|
1150
|
+
/** Styles for the single chain display */
|
|
1151
|
+
singleChainDisplay?: () => React__default.CSSProperties;
|
|
1152
|
+
/** Styles for the dialog content */
|
|
1153
|
+
dialogContent?: (params: {
|
|
1154
|
+
chainCount: number;
|
|
1155
|
+
}) => React__default.CSSProperties;
|
|
1156
|
+
/** Styles for the dialog inner container */
|
|
1157
|
+
dialogInnerContainer?: () => React__default.CSSProperties;
|
|
1158
|
+
};
|
|
1159
|
+
/** Custom event handlers */
|
|
1160
|
+
handlers?: {
|
|
1161
|
+
/** Wrapper for the chain change handler */
|
|
1162
|
+
onChainChange?: (originalHandler: (newChainId: string) => void, newChainId: string) => void;
|
|
1163
|
+
/** Wrapper for the dialog close handler */
|
|
1164
|
+
onDialogClose?: (originalHandler: () => void) => void;
|
|
1165
|
+
};
|
|
1166
|
+
/** Customization for sub-components */
|
|
1167
|
+
triggerButton?: ChainTriggerButtonCustomization;
|
|
1168
|
+
/** Customization for the Select content */
|
|
1169
|
+
selectContent?: Partial<SelectContentAnimatedProps>;
|
|
1170
|
+
/** Customization for the chain list renderer (desktop) */
|
|
1171
|
+
chainListRenderer?: ChainListRendererCustomization;
|
|
1172
|
+
/** Customization for the scrollable chain list (mobile) */
|
|
1173
|
+
scrollableChainList?: ScrollableChainListCustomization;
|
|
1174
|
+
};
|
|
1175
|
+
/**
|
|
1176
|
+
* Props for the ChainSelector component.
|
|
1177
|
+
*/
|
|
1178
|
+
interface ChainSelectorProps extends InitialChains, Pick<ConnectButtonProps, 'store'> {
|
|
1179
|
+
/** Comprehensive customization options */
|
|
1180
|
+
customization?: ChainSelectorCustomization;
|
|
1181
|
+
/** Custom CSS classes for the main container */
|
|
1182
|
+
className?: string;
|
|
1183
|
+
/** Custom inline styles for the main container */
|
|
1184
|
+
style?: React__default.CSSProperties;
|
|
1185
|
+
/** Custom ARIA label for the selector */
|
|
1186
|
+
'aria-label'?: string;
|
|
276
1187
|
}
|
|
277
|
-
|
|
1188
|
+
/**
|
|
1189
|
+
* The main chain selector component.
|
|
1190
|
+
* Supports both desktop (dropdown) and mobile (dialog modal) interfaces.
|
|
1191
|
+
*
|
|
1192
|
+
* @param props - Props for the ChainSelector component
|
|
1193
|
+
* @returns The chain selector component or null if no wallet is connected
|
|
1194
|
+
*/
|
|
1195
|
+
declare function ChainSelector({ appChains, solanaRPCUrls, store, customization, className, style, 'aria-label': ariaLabel, }: ChainSelectorProps): react_jsx_runtime.JSX.Element | null;
|
|
278
1196
|
|
|
279
1197
|
declare function ConnectedContent({ transactionPool, withBalance, store, }: Pick<ConnectButtonProps, 'transactionPool' | 'store' | 'withBalance'>): react_jsx_runtime.JSX.Element | null;
|
|
280
1198
|
|
|
@@ -544,7 +1462,7 @@ interface IconButtonProps {
|
|
|
544
1462
|
*
|
|
545
1463
|
* @public
|
|
546
1464
|
*/
|
|
547
|
-
declare const IconButton:
|
|
1465
|
+
declare const IconButton: React$1.ForwardRefExoticComponent<IconButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
548
1466
|
|
|
549
1467
|
/**
|
|
550
1468
|
* Educational carousel component about wallet functionality
|
|
@@ -596,7 +1514,7 @@ interface ConnectCardProps extends NetworkIconsProps {
|
|
|
596
1514
|
/** Click handler for the connect card */
|
|
597
1515
|
onClick: () => void;
|
|
598
1516
|
/** Icon element to display for the wallet/connector */
|
|
599
|
-
icon:
|
|
1517
|
+
icon: React__default.ReactNode;
|
|
600
1518
|
/** Primary title/name of the wallet/connector */
|
|
601
1519
|
title: string;
|
|
602
1520
|
/** Optional subtitle/description text */
|
|
@@ -988,7 +1906,7 @@ interface DisclaimerProps {
|
|
|
988
1906
|
/** Whether to show the disclaimer in compact mode */
|
|
989
1907
|
compact?: boolean;
|
|
990
1908
|
/** Additional content to display below the description */
|
|
991
|
-
children?:
|
|
1909
|
+
children?: React__default.ReactNode;
|
|
992
1910
|
/** Custom test ID for testing purposes */
|
|
993
1911
|
'data-testid'?: string;
|
|
994
1912
|
/** Whether the disclaimer should be announced to screen readers */
|
|
@@ -1416,25 +2334,116 @@ declare function NetworkTabs({ networks, selectedAdapter, onSelect }: NetworkTab
|
|
|
1416
2334
|
|
|
1417
2335
|
interface RecentBadgeProps {
|
|
1418
2336
|
className?: string;
|
|
1419
|
-
children?:
|
|
2337
|
+
children?: React__default.ReactNode;
|
|
1420
2338
|
animated?: boolean;
|
|
1421
2339
|
}
|
|
1422
2340
|
/**
|
|
1423
2341
|
* Badge component with animated gradient border effect
|
|
1424
2342
|
*/
|
|
1425
|
-
declare const RecentBadge:
|
|
2343
|
+
declare const RecentBadge: React__default.NamedExoticComponent<RecentBadgeProps>;
|
|
1426
2344
|
|
|
1427
|
-
|
|
1428
|
-
|
|
2345
|
+
type CustomIconProps = {
|
|
2346
|
+
isCopied: boolean;
|
|
1429
2347
|
className?: string;
|
|
1430
|
-
|
|
1431
|
-
'aria-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
2348
|
+
style?: React.CSSProperties;
|
|
2349
|
+
'aria-hidden'?: boolean;
|
|
2350
|
+
};
|
|
2351
|
+
type CustomTitleProps = {
|
|
2352
|
+
title: string;
|
|
2353
|
+
titleId: string;
|
|
2354
|
+
className?: string;
|
|
2355
|
+
style?: React.CSSProperties;
|
|
2356
|
+
};
|
|
2357
|
+
type CustomDescriptionProps = {
|
|
2358
|
+
rawError: string;
|
|
2359
|
+
descriptionId: string;
|
|
2360
|
+
className?: string;
|
|
2361
|
+
style?: React.CSSProperties;
|
|
2362
|
+
};
|
|
2363
|
+
type CustomButtonContentProps = {
|
|
2364
|
+
icon: ReactNode;
|
|
2365
|
+
isCopied: boolean;
|
|
2366
|
+
copyLabel: string;
|
|
2367
|
+
copiedLabel: string;
|
|
2368
|
+
};
|
|
2369
|
+
/**
|
|
2370
|
+
* Customization options for ToastError component
|
|
2371
|
+
*/
|
|
2372
|
+
type ToastErrorCustomization = {
|
|
2373
|
+
/** Override container element props */
|
|
2374
|
+
containerProps?: Partial<ComponentPropsWithoutRef<'div'>>;
|
|
2375
|
+
/** Override button element props */
|
|
2376
|
+
buttonProps?: Partial<ComponentPropsWithoutRef<'button'>>;
|
|
2377
|
+
/** Custom components */
|
|
2378
|
+
components?: {
|
|
2379
|
+
/** Custom icon component */
|
|
2380
|
+
Icon?: ComponentType<CustomIconProps>;
|
|
2381
|
+
/** Custom title component */
|
|
2382
|
+
Title?: ComponentType<CustomTitleProps>;
|
|
2383
|
+
/** Custom description component */
|
|
2384
|
+
Description?: ComponentType<CustomDescriptionProps>;
|
|
2385
|
+
/** Custom button content component */
|
|
2386
|
+
ButtonContent?: ComponentType<CustomButtonContentProps>;
|
|
2387
|
+
};
|
|
2388
|
+
/** Custom class name generators */
|
|
2389
|
+
classNames?: {
|
|
2390
|
+
/** Function to generate container classes */
|
|
2391
|
+
container?: (params: {
|
|
2392
|
+
hasTitle: boolean;
|
|
2393
|
+
hasError: boolean;
|
|
2394
|
+
}) => string;
|
|
2395
|
+
/** Function to generate title classes */
|
|
2396
|
+
title?: (params: {
|
|
2397
|
+
title: string;
|
|
2398
|
+
}) => string;
|
|
2399
|
+
/** Function to generate description classes */
|
|
2400
|
+
description?: (params: {
|
|
2401
|
+
rawError: string;
|
|
2402
|
+
}) => string;
|
|
2403
|
+
/** Function to generate button classes */
|
|
2404
|
+
button?: (params: {
|
|
2405
|
+
isCopied: boolean;
|
|
2406
|
+
disabled: boolean;
|
|
2407
|
+
}) => string;
|
|
2408
|
+
/** Function to generate icon classes */
|
|
2409
|
+
icon?: (params: {
|
|
2410
|
+
isCopied: boolean;
|
|
2411
|
+
}) => string;
|
|
2412
|
+
};
|
|
2413
|
+
/** Custom style generators */
|
|
2414
|
+
styles?: {
|
|
2415
|
+
/** Function to generate container styles */
|
|
2416
|
+
container?: (params: {
|
|
2417
|
+
hasTitle: boolean;
|
|
2418
|
+
hasError: boolean;
|
|
2419
|
+
}) => React.CSSProperties;
|
|
2420
|
+
/** Function to generate title styles */
|
|
2421
|
+
title?: (params: {
|
|
2422
|
+
title: string;
|
|
2423
|
+
}) => React.CSSProperties;
|
|
2424
|
+
/** Function to generate description styles */
|
|
2425
|
+
description?: (params: {
|
|
2426
|
+
rawError: string;
|
|
2427
|
+
}) => React.CSSProperties;
|
|
2428
|
+
/** Function to generate button styles */
|
|
2429
|
+
button?: (params: {
|
|
2430
|
+
isCopied: boolean;
|
|
2431
|
+
disabled: boolean;
|
|
2432
|
+
}) => React.CSSProperties;
|
|
2433
|
+
/** Function to generate icon styles */
|
|
2434
|
+
icon?: (params: {
|
|
2435
|
+
isCopied: boolean;
|
|
2436
|
+
}) => React.CSSProperties;
|
|
2437
|
+
};
|
|
2438
|
+
/** Custom event handlers */
|
|
2439
|
+
handlers?: {
|
|
2440
|
+
/** Custom click handler wrapper */
|
|
2441
|
+
onClick?: (originalHandler: (event: React.MouseEvent<HTMLButtonElement>) => void, event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
2442
|
+
/** Custom keydown handler wrapper */
|
|
2443
|
+
onKeyDown?: (originalHandler: (event: React.KeyboardEvent<HTMLButtonElement>) => void, event: React.KeyboardEvent<HTMLButtonElement>) => void;
|
|
2444
|
+
};
|
|
2445
|
+
};
|
|
2446
|
+
interface ToastErrorProps extends Omit<ComponentPropsWithoutRef<'div'>, 'role' | 'aria-live'> {
|
|
1438
2447
|
/** Error title to display */
|
|
1439
2448
|
title: string;
|
|
1440
2449
|
/** Raw error message to display and copy */
|
|
@@ -1445,47 +2454,107 @@ interface ToastErrorProps {
|
|
|
1445
2454
|
'aria-label'?: string;
|
|
1446
2455
|
/** Callback fired when copy operation completes */
|
|
1447
2456
|
onCopyComplete?: (success: boolean) => void;
|
|
2457
|
+
/** Customization options */
|
|
2458
|
+
customization?: ToastErrorCustomization;
|
|
1448
2459
|
}
|
|
1449
|
-
declare function ToastError({ title, rawError, className, 'aria-label': ariaLabel, onCopyComplete }: ToastErrorProps): react_jsx_runtime.JSX.Element;
|
|
1450
|
-
|
|
1451
|
-
interface ToBottomButtonProps {
|
|
1452
|
-
/** Custom CSS classes for the button */
|
|
1453
|
-
className?: string;
|
|
1454
|
-
/** Custom aria-label for the button */
|
|
1455
|
-
'aria-label'?: string;
|
|
1456
|
-
/** Callback fired when button is clicked */
|
|
1457
|
-
onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
1458
|
-
/** Whether the button is disabled */
|
|
1459
|
-
disabled?: boolean;
|
|
1460
|
-
}
|
|
1461
|
-
declare const ToBottomButton: react.ForwardRefExoticComponent<ToBottomButtonProps & react.RefAttributes<HTMLButtonElement>>;
|
|
1462
|
-
|
|
1463
|
-
interface ToTopButtonProps {
|
|
1464
|
-
/** Custom CSS classes for the button */
|
|
1465
|
-
className?: string;
|
|
1466
|
-
/** Custom aria-label for the button */
|
|
1467
|
-
'aria-label'?: string;
|
|
1468
|
-
/** Callback fired when button is clicked */
|
|
1469
|
-
onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
1470
|
-
/** Whether the button is disabled */
|
|
1471
|
-
disabled?: boolean;
|
|
1472
|
-
}
|
|
1473
|
-
declare const ToTopButton: react.ForwardRefExoticComponent<ToTopButtonProps & react.RefAttributes<HTMLButtonElement>>;
|
|
1474
|
-
|
|
1475
2460
|
/**
|
|
1476
|
-
*
|
|
2461
|
+
* A highly customizable error toast component with copy functionality and extensive styling options.
|
|
2462
|
+
* Provides comprehensive customization for appearance, behavior, and event handling while maintaining accessibility.
|
|
1477
2463
|
*/
|
|
1478
|
-
|
|
2464
|
+
declare const ToastError: React$1.ForwardRefExoticComponent<ToastErrorProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
2465
|
+
|
|
2466
|
+
type CustomLoadingOverlayProps$1 = {
|
|
2467
|
+
isLoading: boolean;
|
|
2468
|
+
showLoading: boolean;
|
|
2469
|
+
disableAnimation: boolean;
|
|
2470
|
+
size: WalletAvatarSize;
|
|
2471
|
+
};
|
|
2472
|
+
type CustomAvatarImageProps = {
|
|
2473
|
+
src: string;
|
|
2474
|
+
isLoading: boolean;
|
|
2475
|
+
onLoad: () => void;
|
|
2476
|
+
onError: (event: React.SyntheticEvent<HTMLImageElement, Event>) => void;
|
|
2477
|
+
address: string;
|
|
2478
|
+
ensAvatar?: string | null;
|
|
2479
|
+
size: WalletAvatarSize;
|
|
2480
|
+
};
|
|
2481
|
+
type CustomFallbackContentProps = {
|
|
2482
|
+
address: string;
|
|
2483
|
+
formattedAddress: string;
|
|
2484
|
+
size: WalletAvatarSize;
|
|
2485
|
+
};
|
|
2486
|
+
type WalletAvatarSize = 'sm' | 'md' | 'lg' | 'xl';
|
|
2487
|
+
/**
|
|
2488
|
+
* Customization options for WalletAvatar component
|
|
2489
|
+
*/
|
|
2490
|
+
type WalletAvatarCustomization = {
|
|
2491
|
+
/** Override container element props */
|
|
2492
|
+
containerProps?: Partial<ComponentPropsWithoutRef<'div'>>;
|
|
2493
|
+
/** Override image element props */
|
|
2494
|
+
imageProps?: Partial<ComponentPropsWithoutRef<'img'>>;
|
|
2495
|
+
/** Custom components */
|
|
2496
|
+
components?: {
|
|
2497
|
+
/** Custom loading overlay component */
|
|
2498
|
+
LoadingOverlay?: ComponentType<CustomLoadingOverlayProps$1>;
|
|
2499
|
+
/** Custom avatar image component */
|
|
2500
|
+
AvatarImage?: ComponentType<CustomAvatarImageProps>;
|
|
2501
|
+
/** Custom fallback content component for extreme error cases */
|
|
2502
|
+
FallbackContent?: ComponentType<CustomFallbackContentProps>;
|
|
2503
|
+
};
|
|
2504
|
+
/** Custom class name generators */
|
|
2505
|
+
classNames?: {
|
|
2506
|
+
/** Function to generate container classes */
|
|
2507
|
+
container?: (params: {
|
|
2508
|
+
size: WalletAvatarSize;
|
|
2509
|
+
bgColor: string;
|
|
2510
|
+
address: string;
|
|
2511
|
+
}) => string;
|
|
2512
|
+
/** Function to generate loading overlay classes */
|
|
2513
|
+
loadingOverlay?: (params: {
|
|
2514
|
+
isLoading: boolean;
|
|
2515
|
+
showLoading: boolean;
|
|
2516
|
+
disableAnimation: boolean;
|
|
2517
|
+
}) => string;
|
|
2518
|
+
/** Function to generate image classes */
|
|
2519
|
+
image?: (params: {
|
|
2520
|
+
isLoading: boolean;
|
|
2521
|
+
size: WalletAvatarSize;
|
|
2522
|
+
hasError: boolean;
|
|
2523
|
+
}) => string;
|
|
2524
|
+
/** Function to generate fallback content classes */
|
|
2525
|
+
fallbackContent?: (params: {
|
|
2526
|
+
size: WalletAvatarSize;
|
|
2527
|
+
address: string;
|
|
2528
|
+
}) => string;
|
|
2529
|
+
};
|
|
2530
|
+
/** Custom style generators */
|
|
2531
|
+
styles?: {
|
|
2532
|
+
/** Function to generate container styles */
|
|
2533
|
+
container?: (params: {
|
|
2534
|
+
bgColor: string;
|
|
2535
|
+
size: WalletAvatarSize;
|
|
2536
|
+
address: string;
|
|
2537
|
+
}) => React.CSSProperties;
|
|
2538
|
+
};
|
|
2539
|
+
/** Custom utilities */
|
|
2540
|
+
utils?: {
|
|
2541
|
+
/** Custom blockie generator function */
|
|
2542
|
+
generateBlockie?: (address: string) => string | null;
|
|
2543
|
+
/** Custom background color generator function */
|
|
2544
|
+
generateBgColor?: (address: string) => string;
|
|
2545
|
+
/** Custom address formatter function */
|
|
2546
|
+
formatAddress?: (address: string, labels: any) => string;
|
|
2547
|
+
};
|
|
2548
|
+
};
|
|
2549
|
+
interface WalletAvatarProps extends Omit<ComponentPropsWithoutRef<'div'>, 'role'> {
|
|
1479
2550
|
/** The user's wallet address, used for the blockie fallback and background color. */
|
|
1480
2551
|
address: string;
|
|
1481
2552
|
/** An optional URL for the user's ENS avatar image. */
|
|
1482
2553
|
ensAvatar?: string | null;
|
|
1483
|
-
/** Optional additional CSS classes for the container. */
|
|
1484
|
-
className?: string;
|
|
1485
2554
|
/** Custom alt text for the avatar image */
|
|
1486
2555
|
altText?: string;
|
|
1487
2556
|
/** Size variant for the avatar */
|
|
1488
|
-
size?:
|
|
2557
|
+
size?: WalletAvatarSize;
|
|
1489
2558
|
/** Whether to show loading animation */
|
|
1490
2559
|
showLoading?: boolean;
|
|
1491
2560
|
/** Callback fired when image loads successfully */
|
|
@@ -1494,25 +2563,69 @@ type WalletAvatarProps = {
|
|
|
1494
2563
|
onImageError?: (error: Event) => void;
|
|
1495
2564
|
/** Whether to disable the pulse animation */
|
|
1496
2565
|
disableAnimation?: boolean;
|
|
1497
|
-
|
|
2566
|
+
/** Customization options */
|
|
2567
|
+
customization?: WalletAvatarCustomization;
|
|
2568
|
+
}
|
|
1498
2569
|
/**
|
|
1499
|
-
* A component
|
|
1500
|
-
*
|
|
1501
|
-
* It prioritizes showing the provided `ensAvatar`. If unavailable or if the image fails to load,
|
|
1502
|
-
* it falls back to a procedurally generated "blockie" based on the user's address.
|
|
1503
|
-
* It also generates a unique background color from the address as a placeholder.
|
|
2570
|
+
* A highly customizable wallet avatar component with ENS support, blockie fallback, and extensive styling options.
|
|
2571
|
+
* Provides comprehensive customization for container, image, loading states, and fallback content while maintaining accessibility.
|
|
1504
2572
|
*/
|
|
1505
|
-
declare const WalletAvatar:
|
|
2573
|
+
declare const WalletAvatar: React$1.ForwardRefExoticComponent<WalletAvatarProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1506
2574
|
|
|
1507
|
-
|
|
2575
|
+
type CustomLoadingOverlayProps = {
|
|
2576
|
+
size: number;
|
|
2577
|
+
isLoading: boolean;
|
|
2578
|
+
};
|
|
2579
|
+
type CustomErrorIndicatorProps = {
|
|
2580
|
+
walletName: string;
|
|
2581
|
+
hasError: boolean;
|
|
2582
|
+
};
|
|
2583
|
+
type CustomFallbackIconProps = {
|
|
2584
|
+
walletName: string;
|
|
2585
|
+
size: number;
|
|
2586
|
+
className?: string;
|
|
2587
|
+
style?: React.CSSProperties;
|
|
2588
|
+
};
|
|
2589
|
+
/**
|
|
2590
|
+
* Customization options for WalletIcon component
|
|
2591
|
+
*/
|
|
2592
|
+
type WalletIconCustomization = {
|
|
2593
|
+
/** Override container element props */
|
|
2594
|
+
containerProps?: Partial<ComponentPropsWithoutRef<'div'>>;
|
|
2595
|
+
/** Override image element props */
|
|
2596
|
+
imageProps?: Partial<ComponentPropsWithoutRef<'img'>>;
|
|
2597
|
+
/** Custom components */
|
|
2598
|
+
components?: {
|
|
2599
|
+
/** Custom loading overlay component */
|
|
2600
|
+
LoadingOverlay?: ComponentType<CustomLoadingOverlayProps>;
|
|
2601
|
+
/** Custom error indicator component (only shown in development) */
|
|
2602
|
+
ErrorIndicator?: ComponentType<CustomErrorIndicatorProps>;
|
|
2603
|
+
/** Custom fallback icon component */
|
|
2604
|
+
FallbackIcon?: ComponentType<CustomFallbackIconProps>;
|
|
2605
|
+
};
|
|
2606
|
+
/** Custom class name generators */
|
|
2607
|
+
classNames?: {
|
|
2608
|
+
/** Function to generate container classes */
|
|
2609
|
+
container?: (params: {
|
|
2610
|
+
isLoading: boolean;
|
|
2611
|
+
showLoading: boolean;
|
|
2612
|
+
size: number;
|
|
2613
|
+
}) => string;
|
|
2614
|
+
/** Function to generate image classes */
|
|
2615
|
+
image?: (params: {
|
|
2616
|
+
isLoading: boolean;
|
|
2617
|
+
showLoading: boolean;
|
|
2618
|
+
hasError: boolean;
|
|
2619
|
+
}) => string;
|
|
2620
|
+
};
|
|
2621
|
+
};
|
|
2622
|
+
interface WalletIconProps extends Omit<ComponentPropsWithoutRef<'div'>, 'role'> {
|
|
1508
2623
|
/** Custom icon URL for the wallet */
|
|
1509
2624
|
icon?: string;
|
|
1510
2625
|
/** Name of the wallet */
|
|
1511
2626
|
name: string;
|
|
1512
2627
|
/** Size of the icon in pixels */
|
|
1513
2628
|
size?: number;
|
|
1514
|
-
/** Additional CSS classes */
|
|
1515
|
-
className?: string;
|
|
1516
2629
|
/** Custom alt text for the icon */
|
|
1517
2630
|
altText?: string;
|
|
1518
2631
|
/** Whether to show loading state */
|
|
@@ -1523,8 +2636,14 @@ interface WalletIconProps {
|
|
|
1523
2636
|
onImageError?: () => void;
|
|
1524
2637
|
/** Enable lazy loading for non-critical images */
|
|
1525
2638
|
lazy?: boolean;
|
|
2639
|
+
/** Customization options */
|
|
2640
|
+
customization?: WalletIconCustomization;
|
|
1526
2641
|
}
|
|
1527
|
-
|
|
2642
|
+
/**
|
|
2643
|
+
* A highly customizable wallet icon component with loading states, error handling, and fallback support.
|
|
2644
|
+
* Provides extensive customization options for container, image, and sub-components while maintaining accessibility.
|
|
2645
|
+
*/
|
|
2646
|
+
declare const WalletIcon: React$1.ForwardRefExoticComponent<WalletIconProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1528
2647
|
|
|
1529
2648
|
/**
|
|
1530
2649
|
* Default English translations for NovaConnect component
|
|
@@ -2148,25 +3267,6 @@ declare const getNetworkIcon: (adapter: OrbitAdapter) => {
|
|
|
2148
3267
|
name: string;
|
|
2149
3268
|
} | undefined;
|
|
2150
3269
|
|
|
2151
|
-
/**
|
|
2152
|
-
* @fileoverview Utility function to determine if the current environment supports touch input.
|
|
2153
|
-
* This is safe to use in Next.js applications as it checks for the `window` object existence.
|
|
2154
|
-
*/
|
|
2155
|
-
/**
|
|
2156
|
-
* Determines if the current browsing device supports touch input,
|
|
2157
|
-
* while also excluding large screens (typically desktop-sized touch monitors).
|
|
2158
|
-
*
|
|
2159
|
-
* It checks for:
|
|
2160
|
-
* 1. The presence of 'ontouchstart' or navigator.maxTouchPoints > 0 or '(pointer: coarse)'.
|
|
2161
|
-
* 2. ONLY returns true if the screen width is less than or equal to the specified threshold (e.g., 1200px).
|
|
2162
|
-
*
|
|
2163
|
-
* This function is safe for server-side rendering (SSR) environments like Next.js.
|
|
2164
|
-
*
|
|
2165
|
-
* @param {number} [maxWidth=1200] The maximum screen width (in pixels) for a device to be considered 'touch' (default is 1200).
|
|
2166
|
-
* @returns {boolean} Returns true if the environment is determined to support touch input AND is within the width limit, otherwise false.
|
|
2167
|
-
*/
|
|
2168
|
-
declare function isTouchDevice(maxWidth?: number): boolean;
|
|
2169
|
-
|
|
2170
3270
|
declare const networksLinks: Partial<Record<OrbitAdapter, {
|
|
2171
3271
|
aboutNetwork: string;
|
|
2172
3272
|
choseWallet: string;
|
|
@@ -2425,4 +3525,4 @@ declare function initializeBlockchainSupport(): Promise<InitializationResult>;
|
|
|
2425
3525
|
*/
|
|
2426
3526
|
declare function isAdapterSupported(adapter: OrbitAdapter): Promise<boolean>;
|
|
2427
3527
|
|
|
2428
|
-
export { AboutWallets, type AdapterInfo, type AdapterLoadStatus, type AllChainConfigs, type AllConnectors, type AllWallets, type BlockchainUtilities, type BlockchainUtilityResult, type ChainAdapter, type ChainIdentifierArray, ChainListRenderer, ChainSelector, ConnectButton, type ConnectButtonProps, ConnectCard, ConnectedContent, ConnectedModal, ConnectedModalFooter, ConnectedModalMainContent, type ConnectedModalMainContentProps, ConnectedModalNameAndBalance, ConnectedModalTxHistory, Connecting, type Connector, ConnectorsBlock, ConnectorsSelections, type ConnectorsSelectionsProps, Disclaimer, GetWallet, type GroupedConnector, IconButton, ImpersonateForm, type InitialChains, type InitializationResult, NetworkSelections, NetworkTabs, type NovaConnectLabels, RecentBadge, ScrollableChainList, SelectContentAnimated, StatusIcon, ToBottomButton, ToTopButton, ToastError, WaitForConnectionContent, type Wallet, WalletAvatar, type WalletAvatarProps, WalletIcon, 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,
|
|
3528
|
+
export { AboutWallets, type AdapterInfo, type AdapterLoadStatus, type AllChainConfigs, type AllConnectors, type AllWallets, type BlockchainUtilities, type BlockchainUtilityResult, type ChainAdapter, type ChainIdentifierArray, ChainListRenderer, type ChainListRendererCustomization, type ChainListRendererProps, ChainSelector, type ChainSelectorCustomization, type ChainSelectorProps, type ChainTriggerButtonCustomization, ConnectButton, type ConnectButtonProps, ConnectCard, ConnectedContent, ConnectedModal, ConnectedModalFooter, ConnectedModalMainContent, type ConnectedModalMainContentProps, ConnectedModalNameAndBalance, ConnectedModalTxHistory, Connecting, type Connector, ConnectorsBlock, ConnectorsSelections, type ConnectorsSelectionsProps, Disclaimer, GetWallet, type GroupedConnector, IconButton, ImpersonateForm, type InitialChains, type InitializationResult, NetworkSelections, NetworkTabs, type NovaConnectLabels, RecentBadge, ScrollableChainList, type ScrollableChainListCustomization, type ScrollableChainListProps, SelectContentAnimated, type SelectContentAnimatedProps, StatusIcon, ToBottomButton, type ToBottomButtonCustomization, type ToBottomButtonProps, ToTopButton, type ToTopButtonCustomization, type ToTopButtonProps, ToastError, type ToastErrorCustomization, type ToastErrorProps, WaitForConnectionContent, type Wallet, WalletAvatar, type WalletAvatarCustomization, type WalletAvatarProps, type WalletAvatarSize, WalletIcon, type WalletIconCustomization, type 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 };
|