@tuwaio/nova-connect 1.0.0-fix-packages-alpha.2.4da4f4c → 1.0.0-fix-packages-alpha.4.a65039b

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/dist/{ToastError-Dsvd_ihU.d.cts → ToastError-AjNQOETK.d.cts} +291 -2
  2. package/dist/{ToastError-DYsDxJFa.d.ts → ToastError-B6QhCVuG.d.ts} +291 -2
  3. package/dist/chunk-ALPKQFNU.js +2 -0
  4. package/dist/chunk-ALPKQFNU.js.map +1 -0
  5. package/dist/chunk-DZWQDCOJ.cjs +2 -0
  6. package/dist/chunk-DZWQDCOJ.cjs.map +1 -0
  7. package/dist/chunk-G5ZR2T4P.js +3 -0
  8. package/dist/chunk-G5ZR2T4P.js.map +1 -0
  9. package/dist/chunk-PGDNEHRC.cjs +3 -0
  10. package/dist/chunk-PGDNEHRC.cjs.map +1 -0
  11. package/dist/chunk-UJKDTNLR.cjs +6 -0
  12. package/dist/chunk-UJKDTNLR.cjs.map +1 -0
  13. package/dist/chunk-XUQIDROF.js +6 -0
  14. package/dist/chunk-XUQIDROF.js.map +1 -0
  15. package/dist/components/index.cjs +1 -1
  16. package/dist/components/index.d.cts +3 -3
  17. package/dist/components/index.d.ts +3 -3
  18. package/dist/components/index.js +1 -1
  19. package/dist/hooks/index.cjs +1 -1
  20. package/dist/hooks/index.d.cts +2 -2
  21. package/dist/hooks/index.d.ts +2 -2
  22. package/dist/hooks/index.js +1 -1
  23. package/dist/i18n/index.cjs +1 -1
  24. package/dist/i18n/index.d.cts +1 -1
  25. package/dist/i18n/index.d.ts +1 -1
  26. package/dist/i18n/index.js +1 -1
  27. package/dist/index.cjs +1 -1
  28. package/dist/index.css +78 -13
  29. package/dist/index.d.cts +5 -5
  30. package/dist/index.d.ts +5 -5
  31. package/dist/index.js +1 -1
  32. package/dist/index.js.map +1 -1
  33. package/dist/{types-C81YJbpy.d.cts → types-TxPFIK95.d.cts} +3 -0
  34. package/dist/{types-C81YJbpy.d.ts → types-TxPFIK95.d.ts} +3 -0
  35. package/dist/{useWalletNativeBalance-9YgoXwBH.d.cts → useWalletNativeBalance-B2bM7E7d.d.cts} +1 -1
  36. package/dist/{useWalletNativeBalance-DSYfGV0p.d.ts → useWalletNativeBalance-CpWY0Xnr.d.ts} +1 -1
  37. package/package.json +7 -7
  38. package/dist/chunk-6DTDABLH.js +0 -6
  39. package/dist/chunk-6DTDABLH.js.map +0 -1
  40. package/dist/chunk-7OWIFKZE.cjs +0 -3
  41. package/dist/chunk-7OWIFKZE.cjs.map +0 -1
  42. package/dist/chunk-CZLELKCK.js +0 -3
  43. package/dist/chunk-CZLELKCK.js.map +0 -1
  44. package/dist/chunk-HWK6XNDD.cjs +0 -2
  45. package/dist/chunk-HWK6XNDD.cjs.map +0 -1
  46. package/dist/chunk-Q646MQX2.cjs +0 -6
  47. package/dist/chunk-Q646MQX2.cjs.map +0 -1
  48. package/dist/chunk-ZKENDEEY.js +0 -2
  49. package/dist/chunk-ZKENDEEY.js.map +0 -1
@@ -2,13 +2,13 @@ import { Dialog, DialogContent, StarsBackground } from '@tuwaio/nova-core';
2
2
  import { TargetAndTransition, VariantLabels, LegacyAnimationControls, Transition, AnyResolvedKeyframe, HTMLMotionProps, Variants, Easing, motion } from 'framer-motion';
3
3
  import * as React$1 from 'react';
4
4
  import React__default, { ComponentType, ReactNode, ComponentPropsWithoutRef } from 'react';
5
- import { B as ButtonTxStatus, b as NovaConnectProviderProps, h as useNovaConnectLabels, p as NativeBalanceResult, a as ConnectedContentType, C as ConnectContentType } from './useWalletNativeBalance-9YgoXwBH.cjs';
5
+ import { B as ButtonTxStatus, b as NovaConnectProviderProps, h as useNovaConnectLabels, p as NativeBalanceResult, a as ConnectedContentType, C as ConnectContentType } from './useWalletNativeBalance-B2bM7E7d.cjs';
6
6
  import { BaseConnector } from '@tuwaio/satellite-core';
7
7
  import * as react_jsx_runtime from 'react/jsx-runtime';
8
8
  import * as Select from '@radix-ui/react-select';
9
9
  import { I as InitialChains } from './types-DGsiEwne.cjs';
10
10
  import { Transaction } from '@tuwaio/pulsar-core';
11
- import { OrbitAdapter, RecentlyConnectedConnectorData, ConnectorType } from '@tuwaio/orbit-core';
11
+ import { ConnectorType, OrbitAdapter, RecentlyConnectedConnectorData } from '@tuwaio/orbit-core';
12
12
  import { Connector } from '@tuwaio/satellite-react';
13
13
 
14
14
  /**
@@ -1915,6 +1915,7 @@ type CopyButtonProps = {
1915
1915
  type BalanceDisplayProps = {
1916
1916
  balance?: ConnectedModalMainContentProps['balance'];
1917
1917
  balanceLoading: boolean;
1918
+ refetch: () => void;
1918
1919
  labels: Record<string, string>;
1919
1920
  className?: string;
1920
1921
  };
@@ -2069,6 +2070,8 @@ type ConnectedModalNameAndBalanceCustomization = {
2069
2070
  * Props for the ConnectedModalNameAndBalance component
2070
2071
  */
2071
2072
  interface ConnectedModalNameAndBalanceProps extends Pick<ConnectedModalMainContentProps, 'balanceLoading' | 'ensNameAbbreviated' | 'balance'> {
2073
+ /** Function to manually trigger a balance refresh */
2074
+ refetch: () => void;
2072
2075
  /** Additional CSS classes for the container */
2073
2076
  className?: string;
2074
2077
  /** Custom aria-label for the container */
@@ -2099,6 +2102,7 @@ interface ConnectedModalNameAndBalanceProps extends Pick<ConnectedModalMainConte
2099
2102
  * ensNameAbbreviated="wallet.eth"
2100
2103
  * balanceLoading={false}
2101
2104
  * balance={{ value: "1.23", symbol: "ETH" }}
2105
+ * refetch={() => {}}
2102
2106
  * />
2103
2107
  * ```
2104
2108
  *
@@ -2108,6 +2112,7 @@ interface ConnectedModalNameAndBalanceProps extends Pick<ConnectedModalMainConte
2108
2112
  * ensNameAbbreviated="wallet.eth"
2109
2113
  * balanceLoading={false}
2110
2114
  * balance={{ value: "1.23", symbol: "ETH" }}
2115
+ * refetch={() => {}}
2111
2116
  * customization={{
2112
2117
  * classNames: {
2113
2118
  * container: ({ hasActiveWallet }) =>
@@ -2496,6 +2501,7 @@ type AvatarSectionProps = {
2496
2501
  type InfoSectionProps = {
2497
2502
  balanceLoading: boolean;
2498
2503
  balance: NativeBalanceResult | null;
2504
+ refetch: () => void;
2499
2505
  ensNameAbbreviated: string | undefined;
2500
2506
  labels: Record<string, string>;
2501
2507
  className?: string;
@@ -2684,6 +2690,7 @@ interface ConnectedModalMainContentProps extends Pick<NovaConnectProviderProps,
2684
2690
  balanceLoading: boolean;
2685
2691
  ensNameAbbreviated: string | undefined;
2686
2692
  balance: NativeBalanceResult | null;
2693
+ refetch: () => void;
2687
2694
  /** Additional CSS classes for the container */
2688
2695
  className?: string;
2689
2696
  /** Custom aria-label for the container */
@@ -3003,6 +3010,284 @@ interface ConnectedModalTxHistoryProps extends Pick<NovaConnectProviderProps, 't
3003
3010
  */
3004
3011
  declare const ConnectedModalTxHistory: React__default.ForwardRefExoticComponent<ConnectedModalTxHistoryProps & React__default.RefAttributes<HTMLDivElement>>;
3005
3012
 
3013
+ /**
3014
+ * @file ConnectionsContent component for managing multiple wallet connections.
3015
+ */
3016
+
3017
+ type CustomContainerProps = {
3018
+ className?: string;
3019
+ children: ReactNode;
3020
+ isEmpty?: boolean;
3021
+ connectionsCount?: number;
3022
+ recentCount?: number;
3023
+ role?: string;
3024
+ 'aria-label'?: string;
3025
+ 'data-testid'?: string;
3026
+ };
3027
+ type CustomSectionHeaderProps = {
3028
+ title: string;
3029
+ count?: number;
3030
+ className?: string;
3031
+ 'aria-level'?: number;
3032
+ };
3033
+ type CustomActiveSectionProps = {
3034
+ className?: string;
3035
+ children: ReactNode;
3036
+ count: number;
3037
+ labels?: Record<string, string>;
3038
+ };
3039
+ type CustomRecentSectionProps = {
3040
+ className?: string;
3041
+ children: ReactNode;
3042
+ labels?: Record<string, string>;
3043
+ };
3044
+ type CustomActiveRowProps = {
3045
+ connectorType: ConnectorType;
3046
+ address: string;
3047
+ fullAddress?: string;
3048
+ chainId?: number | string;
3049
+ onDisconnect: (e: React.MouseEvent) => void;
3050
+ className?: string;
3051
+ explorerLink?: string;
3052
+ icon?: string;
3053
+ labels?: Record<string, string>;
3054
+ isCopied?: boolean;
3055
+ onCopy?: () => void;
3056
+ onExplorer?: () => void;
3057
+ };
3058
+ type CustomConnectedRowProps = {
3059
+ connectorType: ConnectorType;
3060
+ address: string;
3061
+ chainId?: number | string;
3062
+ onSwitch: () => void;
3063
+ onDisconnect: (e: React.MouseEvent) => void;
3064
+ className?: string;
3065
+ icon?: string;
3066
+ labels?: Record<string, string>;
3067
+ isHovered?: boolean;
3068
+ };
3069
+ type CustomRecentRowProps = {
3070
+ connectorType: ConnectorType;
3071
+ address: string;
3072
+ timestamp: number;
3073
+ onConnect?: () => void;
3074
+ onRemove: (e: React.MouseEvent) => void;
3075
+ className?: string;
3076
+ icon?: string;
3077
+ isConnecting?: boolean;
3078
+ labels?: Record<string, string>;
3079
+ };
3080
+ type CustomActionButtonProps = {
3081
+ onClick: (e: React.MouseEvent) => void;
3082
+ label: string;
3083
+ icon?: ReactNode;
3084
+ disabled?: boolean;
3085
+ loading?: boolean;
3086
+ className?: string;
3087
+ 'aria-label'?: string;
3088
+ 'aria-describedby'?: string;
3089
+ variant?: 'primary' | 'secondary' | 'danger';
3090
+ };
3091
+ type CustomAddWalletButtonProps = {
3092
+ onClick: () => void;
3093
+ label: string;
3094
+ className?: string;
3095
+ disabled?: boolean;
3096
+ };
3097
+ type CustomEmptyStateProps = {
3098
+ message: string;
3099
+ className?: string;
3100
+ };
3101
+ /**
3102
+ * Customization options for ConnectionsContent component
3103
+ */
3104
+ type ConnectionsContentCustomization = {
3105
+ /** Override container element props */
3106
+ containerProps?: Partial<ComponentPropsWithoutRef<'div'>>;
3107
+ /** Custom components */
3108
+ components?: {
3109
+ /** Custom container component */
3110
+ Container?: ComponentType<CustomContainerProps>;
3111
+ /** Custom section header component */
3112
+ SectionHeader?: ComponentType<CustomSectionHeaderProps>;
3113
+ /** Custom active connectors section */
3114
+ ActiveConnectorsSection?: ComponentType<CustomActiveSectionProps>;
3115
+ /** Custom recently connected section */
3116
+ RecentlyConnectedSection?: ComponentType<CustomRecentSectionProps>;
3117
+ /** Custom active connector row */
3118
+ ActiveConnectorRow?: ComponentType<CustomActiveRowProps>;
3119
+ /** Custom connected connector row */
3120
+ ConnectedConnectorRow?: ComponentType<CustomConnectedRowProps>;
3121
+ /** Custom recently connected row */
3122
+ RecentlyConnectedRow?: ComponentType<CustomRecentRowProps>;
3123
+ /** Custom action button */
3124
+ ActionButton?: ComponentType<CustomActionButtonProps>;
3125
+ /** Custom add wallet button */
3126
+ AddWalletButton?: ComponentType<CustomAddWalletButtonProps>;
3127
+ /** Custom empty state */
3128
+ EmptyState?: ComponentType<CustomEmptyStateProps>;
3129
+ };
3130
+ /** Custom class name generators */
3131
+ classNames?: {
3132
+ /** Function to generate container classes */
3133
+ container?: (params: {
3134
+ isEmpty: boolean;
3135
+ connectionsCount: number;
3136
+ recentCount: number;
3137
+ }) => string;
3138
+ /** Function to generate section header classes */
3139
+ sectionHeader?: (params: {
3140
+ sectionType: 'active' | 'recent';
3141
+ }) => string;
3142
+ /** Function to generate active section classes */
3143
+ activeSection?: (params: {
3144
+ count: number;
3145
+ }) => string;
3146
+ /** Function to generate recent section classes */
3147
+ recentSection?: (params: {
3148
+ count: number;
3149
+ }) => string;
3150
+ /** Function to generate active row classes */
3151
+ activeRow?: (params: {
3152
+ connectorType: ConnectorType;
3153
+ hasExplorer: boolean;
3154
+ }) => string;
3155
+ /** Function to generate connected row classes */
3156
+ connectedRow?: (params: {
3157
+ connectorType: ConnectorType;
3158
+ isHovered: boolean;
3159
+ }) => string;
3160
+ /** Function to generate recent row classes */
3161
+ recentRow?: (params: {
3162
+ connectorType: ConnectorType;
3163
+ isConnecting: boolean;
3164
+ }) => string;
3165
+ /** Function to generate action button classes */
3166
+ actionButton?: (params: {
3167
+ variant?: 'primary' | 'secondary' | 'danger';
3168
+ disabled?: boolean;
3169
+ loading?: boolean;
3170
+ }) => string;
3171
+ /** Function to generate add wallet button classes */
3172
+ addWalletButton?: (params: {
3173
+ disabled?: boolean;
3174
+ }) => string;
3175
+ /** Function to generate empty state classes */
3176
+ emptyState?: () => string;
3177
+ };
3178
+ /** Custom event handlers */
3179
+ handlers?: {
3180
+ /** Custom handler before switching connection */
3181
+ onBeforeSwitch?: (connectorType: ConnectorType) => boolean | Promise<boolean>;
3182
+ /** Custom handler after switching connection */
3183
+ onAfterSwitch?: (connectorType: ConnectorType) => void;
3184
+ /** Custom handler when switch fails */
3185
+ onSwitchError?: (connectorType: ConnectorType, error: Error) => void;
3186
+ /** Custom handler before disconnect */
3187
+ onBeforeDisconnect?: (connectorType: ConnectorType) => boolean | Promise<boolean>;
3188
+ /** Custom handler after disconnect */
3189
+ onAfterDisconnect?: (connectorType: ConnectorType) => void;
3190
+ /** Custom handler when disconnect fails */
3191
+ onDisconnectError?: (connectorType: ConnectorType, error: Error) => void;
3192
+ /** Custom handler before connecting recent */
3193
+ onBeforeConnect?: (connectorType: ConnectorType) => boolean | Promise<boolean>;
3194
+ /** Custom handler after connecting recent */
3195
+ onAfterConnect?: (connectorType: ConnectorType) => void;
3196
+ /** Custom handler when connect fails */
3197
+ onConnectError?: (connectorType: ConnectorType, error: Error) => void;
3198
+ /** Custom handler before removing recent */
3199
+ onBeforeRemove?: (connectorType: ConnectorType) => boolean | Promise<boolean>;
3200
+ /** Custom handler after removing recent */
3201
+ onAfterRemove?: (connectorType: ConnectorType) => void;
3202
+ /** Custom handler for copy address */
3203
+ onCopyAddress?: (address: string, connectorType: ConnectorType) => void;
3204
+ /** Custom handler for explorer click */
3205
+ onExplorerClick?: (url: string, address: string, connectorType: ConnectorType) => void;
3206
+ /** Custom handler for add wallet click */
3207
+ onAddWalletClick?: () => void;
3208
+ };
3209
+ /** Custom text and ARIA labels */
3210
+ labels?: {
3211
+ /** Custom empty state message */
3212
+ emptyStateMessage?: string;
3213
+ /** Custom active section title */
3214
+ activeSectionTitle?: string;
3215
+ /** Custom recent section title */
3216
+ recentSectionTitle?: string;
3217
+ /** Custom disconnect button label */
3218
+ disconnectLabel?: string;
3219
+ /** Custom switch button label */
3220
+ switchLabel?: string;
3221
+ /** Custom connect button label */
3222
+ connectLabel?: string;
3223
+ /** Custom remove button label */
3224
+ removeLabel?: string;
3225
+ /** Custom copy button label */
3226
+ copyLabel?: string;
3227
+ /** Custom copied success label */
3228
+ copiedLabel?: string;
3229
+ /** Custom explorer button label */
3230
+ explorerLabel?: string;
3231
+ /** Custom add wallet button label */
3232
+ addWalletLabel?: string;
3233
+ /** Custom ARIA label for container */
3234
+ containerAriaLabel?: string;
3235
+ /** Custom ARIA label for active section */
3236
+ activeSectionAriaLabel?: string;
3237
+ /** Custom ARIA label for recent section */
3238
+ recentSectionAriaLabel?: string;
3239
+ /** Custom ARIA description for switch action */
3240
+ switchAriaDescription?: string;
3241
+ /** Custom ARIA description for disconnect action */
3242
+ disconnectAriaDescription?: string;
3243
+ /** Custom ARIA description for connect action */
3244
+ connectAriaDescription?: string;
3245
+ /** Custom ARIA description for remove action */
3246
+ removeAriaDescription?: string;
3247
+ /** Custom ARIA live region announcement for switch */
3248
+ switchAnnouncement?: (walletName: string) => string;
3249
+ /** Custom ARIA live region announcement for disconnect */
3250
+ disconnectAnnouncement?: (walletName: string) => string;
3251
+ /** Custom ARIA live region announcement for connect */
3252
+ connectAnnouncement?: (walletName: string) => string;
3253
+ };
3254
+ /** Configuration options */
3255
+ config?: {
3256
+ /** Whether to disable animations */
3257
+ disableAnimation?: boolean;
3258
+ /** Whether to reduce motion for accessibility */
3259
+ reduceMotion?: boolean;
3260
+ /** Whether to show empty state */
3261
+ showEmptyState?: boolean;
3262
+ /** Whether to show add wallet button */
3263
+ showAddWalletButton?: boolean;
3264
+ /** Whether to show recently connected section */
3265
+ showRecentSection?: boolean;
3266
+ /** Whether to enable keyboard shortcuts */
3267
+ enableKeyboardShortcuts?: boolean;
3268
+ /** Custom keyboard shortcuts map */
3269
+ keyboardShortcuts?: {
3270
+ /** Key for switching to next connection */
3271
+ nextConnection?: string;
3272
+ /** Key for switching to previous connection */
3273
+ prevConnection?: string;
3274
+ /** Key for disconnecting active wallet */
3275
+ disconnect?: string;
3276
+ };
3277
+ /** Maximum recent connections to show */
3278
+ maxRecentConnections?: number;
3279
+ /** Whether to auto-focus first interactive element */
3280
+ autoFocus?: boolean;
3281
+ /** Custom test IDs */
3282
+ testIds?: {
3283
+ container?: string;
3284
+ activeSection?: string;
3285
+ recentSection?: string;
3286
+ addWalletButton?: string;
3287
+ };
3288
+ };
3289
+ };
3290
+
3006
3291
  /**
3007
3292
  * @file ConnectedModal component with comprehensive customization options for all child components.
3008
3293
  */
@@ -3032,6 +3317,7 @@ type CloseButtonProps$1 = {
3032
3317
  type MainContentProps$1 = Pick<NovaConnectProviderProps, 'transactionPool' | 'pulsarAdapter'> & {
3033
3318
  contentType: ConnectedContentType;
3034
3319
  balance: NativeBalanceResult | null;
3320
+ refetch: () => void;
3035
3321
  ensNameAbbreviated: string | undefined;
3036
3322
  avatarIsLoading: boolean;
3037
3323
  balanceLoading: boolean;
@@ -3044,6 +3330,7 @@ type MainContentProps$1 = Pick<NovaConnectProviderProps, 'transactionPool' | 'pu
3044
3330
  chain: string | number;
3045
3331
  };
3046
3332
  className?: string;
3333
+ childCustomizations?: ConnectedModalCustomization['childCustomizations'];
3047
3334
  };
3048
3335
  type WalletNameConfig = {
3049
3336
  abbreviateSymbols?: number;
@@ -3176,6 +3463,8 @@ type ConnectedModalCustomization = {
3176
3463
  childCustomizations?: {
3177
3464
  /** Customization for ConnectedModalMainContent component */
3178
3465
  mainContent?: ConnectedModalMainContentCustomization;
3466
+ /** Customization for ConnectionsContent component */
3467
+ connections?: ConnectionsContentCustomization;
3179
3468
  /** Customization for ConnectedModalTxHistory component */
3180
3469
  txHistory?: Record<string, unknown>;
3181
3470
  /** Customization for ScrollableChainList component */