@tuwaio/nova-connect 1.0.0-fix-test-alpha.53.a751bf7 → 1.0.0-fix-test-alpha.55.f5b462c

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.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/i18n/en.ts","../../src/hooks/useNovaConnectLabels.ts","../../src/components/Chains/ChainListRenderer.tsx","../../src/hooks/useNovaConnect.ts","../../src/utils/getConnectedChainId.ts","../../src/utils/isTouchDevice.ts","../../src/utils/networksLinks.ts","../../src/components/ToBottomButton.tsx","../../src/components/ToTopButton.tsx","../../src/components/SelectContentAnimated.tsx","../../src/components/WalletAvatar.tsx","../../src/components/WalletIcon.tsx","../../src/components/ConnectedModal/IconButton.tsx","../../src/components/ConnectedModal/ConnectedModalTxHistory.tsx","../../src/components/ConnectModal/RecentBadge.tsx","../../src/components/ToastError.tsx","../../src/providers/ErrorsProvider.tsx","../../src/providers/NovaConnectLabelsProvider.tsx","../../src/providers/NovaConnectProvider.tsx"],"names":["defaultLabels","NovaConnectLabelsContext","createContext","useNovaConnectLabels","useContext","SelectItemBase","forwardRef","children","className","props","forwardedRef","labels","isActive","jsxs","go","cn","Fragment","jsx","NovaConnectProviderError","message","NovaConnectProviderContext","useNovaConnect","context","OrbitAdapter","isTouchDevice","maxWidth","hasTouchStart","hasMaxTouchPoints","hasCoarsePointer","supportsTouch","isSmallScreen","ToBottomButton","ariaLabel","onClick","disabled","ref","event","ChevronDownIcon","ToTopButton","ChevronUpIcon","SelectContentAnimated","position","reduceMotion","animationConfig","useMemo","layoutTransition","contentClasses","selectContentClasses","AnimatePresence","motion","isHex","value","strict","zeroAddress","sizeClasses","WalletAvatar","address","ensAvatar","altText","size","showLoading","onImageLoad","onImageError","disableAnimation","imageSrc","setImageSrc","useState","isLoading","setIsLoading","hasError","setHasError","imgRef","useRef","blockie","makeBlockie","error","bgColor","colorHex","formattedAddress","imageAltText","currentEnsAvatar","handleImageLoad","useCallback","handleImageError","containerClasses","loadingClasses","currentImageSrc","WalletIcon","icon","name","lazy","walletName","formatWalletName","cleanIconUrl","trimmedIcon","imageClasses","imageStyle","Web3Icon","IconButton","walletIcon","walletChainId","items","loading","title","isClickable","formattedChainId","accessibleLabel","parts","tooltipText","buttonClasses","ChevronArrowWithAnim","module","RecentBadge","memo","animated","isTouch","gradientBackground","idCounter","ToastError","rawError","onCopyComplete","isCopied","copy","useCopyToClipboard","uniqueId","titleId","descriptionId","errorToCopy","handleCopy","e","handleKeyDown","DocumentDuplicateIcon","ErrorsProvider","store","containerId","autoClose","draggable","activeWallet","walletConnectionError","switchNetworkError","displayedErrorsRef","currentToastIdRef","errorState","hasWalletError","hasSwitchError","isConnected","errorTitle","errorHash","dismissCurrentToast","toast","showErrorToast","errorKey","success","useEffect","hasAnyError","primaryError","containerProps","ToastCloseButton","Bounce","ToastContainer","NovaConnectLabelsProvider","memoizedLabels","missingLabels","key","NovaConnectProvider","mergedLabels","deepMerge","setActiveWallet","setWalletConnectionError","isConnectModalOpen","setIsConnectModalOpen","isConnectedModalOpen","setIsConnectedModalOpen","isChainsListOpen","setIsChainsListOpen","isChainsListOpenMobile","setIsChainsListOpenMobile","connectedButtonStatus","setConnectedButtonStatus","connectModalContentType","setConnectModalContentType","selectedAdapter","setSelectedAdapter","activeConnector","setActiveConnector","impersonatedAddress","setImpersonatedAddress","setIsConnected","connectedModalContentType","setConnectedModalContentType","state","contextValue"],"mappings":"mzBAMO,IAAMA,CAAAA,CAAmC,CAE9C,aAAA,CAAe,gBAAA,CACf,WAAY,YAAA,CACZ,UAAA,CAAY,eAAA,CACZ,SAAA,CAAW,YACX,QAAA,CAAU,WAAA,CACV,KAAM,MAAA,CACN,OAAA,CAAS,UACT,KAAA,CAAO,OAAA,CACP,GAAA,CAAK,KAAA,CAGL,gBAAiB,kBAAA,CACjB,qBAAA,CAAuB,0BACvB,YAAA,CAAc,eAAA,CACd,sBAAuB,yBAAA,CACvB,uBAAA,CAAyB,6BAC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,CAAAA,CAAyBsB,GAAM,qBAAqB,EACtD,CAAC,CAAA,CAGA,EAAE,CAAA,CAEL,IAAMC,EAAAA,CAAwC,CAC5C,qBAAA,CAAArD,CAAAA,CACA,YAAA,CAAAD,CAAAA,CACA,mBAAAgC,CAAAA,CACA,qBAAA,CAAAC,CAAAA,CACA,oBAAA,CAAAC,EACA,uBAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,oBAAAC,CAAAA,CACA,sBAAA,CAAAC,CAAAA,CACA,yBAAA,CAAAC,EACA,qBAAA,CAAAC,CAAAA,CACA,wBAAA,CAAAC,CAAAA,CACA,0BAAAU,CAAAA,CACA,4BAAA,CAAAC,CAAAA,CACA,uBAAA,CAAAV,EACA,0BAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,mBAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,kBAAA,CAAAC,EACA,mBAAA,CAAAC,CAAAA,CACA,sBAAA,CAAAC,CAAAA,CACA,YAAAzC,CAAAA,CACA,cAAA,CAAA0C,CACF,CAAA,CAEA,OACE9K,IAAAA,CAACO,CAAAA,CAA2B,QAAA,CAA3B,CAAoC,MAAO2K,EAAAA,CAC1C,QAAA,CAAA,CAAA9K,GAAAA,CAACmH,EAAAA,CAAA,CAAe,KAAA,CAAOC,CAAAA,CAAO,CAAA,CAC9BpH,GAAAA,CAAC+I,GAAA,CAA0B,MAAA,CAAQK,EAAe,QAAA,CAAA9J,CAAAA,CAAS,GAC7D,CAEJ","file":"index.js","sourcesContent":["import { NovaConnectLabels } from './types';\n\n/**\n * Default English translations for NovaConnect component\n * All text strings extracted from component files\n */\nexport const defaultLabels: NovaConnectLabels = {\n // Core actions - Primary user interactions\n connectWallet: 'Connect Wallet',\n disconnect: 'Disconnect',\n connecting: 'Connecting...',\n connected: 'Connected',\n tryAgain: 'Try again',\n back: 'Back',\n connect: 'Connect',\n close: 'Close',\n all: 'All',\n\n // Connection states - Status messages for wallet connection flow\n connectionError: 'Connection error',\n connectedSuccessfully: 'Connected successfully!',\n connectingTo: 'Connecting to',\n walletConnectionError: 'Wallet connection error',\n errorWhenChainSwitching: 'Error when chain switching',\n cannotConnectWallet: 'Cannot connect to the wallet. Please try again or use another connector.',\n\n // Transaction states - Status indicators for blockchain transactions\n success: 'Success',\n error: 'Error',\n replaced: 'Replaced',\n recent: 'Recent',\n transactionLoading: 'Transaction loading',\n transactionSuccess: 'Transaction successful',\n transactionError: 'Transaction failed',\n transactionReplaced: 'Transaction replaced',\n\n // Modal titles - Headers for different modal dialogs\n aboutWallets: 'About wallets',\n getWallet: 'Get a wallet',\n connectImpersonatedWallet: 'Connect impersonated wallet',\n transactionsInApp: 'Transactions in app',\n switchNetwork: 'Switch network',\n switchNetworks: 'Switch Networks',\n connectingEllipsis: 'Connecting...',\n\n // Wallet sections - Categories for wallet connector grouping\n installed: 'Installed',\n popular: 'Popular',\n impersonate: 'Impersonate',\n readOnlyMode: 'Read-only mode',\n\n // Information and descriptions - Educational content and explanations\n whatIsWallet: 'What is a wallet?',\n walletDescription:\n 'Wallets are essential for managing your crypto—they let you send, receive, and securely hold digital assets. Connecting your wallet grants you safe access and interaction with decentralized applications (dApps).',\n whatIsNetwork: 'What is a network?',\n networkDescription:\n 'A network (or blockchain) is a decentralized digital ledger that records transactions. Selecting a network lets you choose which blockchain you want to connect to.',\n learnMore: 'Learn more',\n listOfNetworks: 'List of networks',\n viewOnExplorer: 'View on explorer',\n viewTransactions: 'View transactions',\n\n // Impersonation form - Labels for wallet address impersonation feature\n enterWalletAddress: 'Enter wallet address to impersonate',\n walletAddressPlaceholder: '0x...',\n\n // Error messages - User-facing error notifications and descriptions\n noConnectorsFound: 'No Connectors Found',\n noConnectorsDescription: \"We couldn't find any wallets or connection methods for the selected network.\",\n somethingWentWrong: 'Something went wrong',\n networkPickingError: 'Something went wrong with wallet network selection. Please go back and try again.',\n pulsarAdapterRequired: 'Pulsar Adapter Required',\n pulsarAdapterDescription:\n 'Additional configuration is needed for viewing transactions in app. Please contact your admin.',\n selectAvailableNetwork: 'Select one of available network',\n\n // Get Wallet section - Onboarding content for new users without wallets\n startExploringWeb3: 'Start Exploring Web3',\n walletKeyToDigitalWorld:\n 'Your wallet is the key to the digital world and the technology that makes exploring web3 possible.',\n iDontHaveWallet: \"I don't have a wallet\",\n choseWallet: 'Choose a wallet',\n\n // About Wallets slides - Educational carousel content explaining wallet benefits\n keyToNewInternet: 'The Key to a New Internet',\n keyToNewInternetDescription:\n 'Your wallet is more than just storage. Think of it as your digital passport that lets you truly own, display, and exchange every digital asset you hold, from crypto tokens to unique NFTs.',\n logInWithoutHassle: 'Log In Without the Hassle',\n logInWithoutHassleDescription:\n 'Skip the endless sign-up forms! Your wallet is your unique access pass. Just connect it, and the website instantly recognizes you. It saves you time and protects your privacy.',\n\n // Copy functionality and UI feedback - Clipboard operations and user feedback\n copyRawError: 'Copy raw error',\n copied: 'Copied!',\n\n // Accessibility labels - Screen reader and ARIA labels for better accessibility\n chainSelector: 'Chain Selector',\n closeModal: 'Close modal',\n selectChain: 'Select chain',\n chainOption: 'Chain option',\n openChainSelector: 'Open chain selector',\n currentChain: 'Current chain',\n scrollToTop: 'Scroll to top',\n scrollToBottom: 'Scroll to bottom',\n chainListContainer: 'Chain list container',\n walletControls: 'Wallet controls',\n openWalletModal: 'Open wallet modal',\n walletConnected: 'Wallet connected',\n walletNotConnected: 'Wallet not connected',\n walletBalance: 'Wallet balance',\n walletAddress: 'Wallet address',\n transactionStatus: 'Transaction status',\n successIcon: 'Success icon',\n errorIcon: 'Error icon',\n replacedIcon: 'Replaced icon',\n statusIcon: 'Status icon',\n\n // Additional states - Supplementary status indicators\n loading: 'Loading',\n idle: 'Idle',\n\n // Wallet Avatar labels\n unknownWallet: 'Unknown wallet',\n walletAvatar: 'Wallet avatar',\n ensAvatar: 'ENS avatar',\n walletIcon: 'Wallet icon',\n\n // Impersonate errors\n impersonateAddressEmpty: 'Enter a wallet address to impersonate.',\n impersonateAddressNotCorrect: 'Entered wallet address is not correct. Please try again.',\n impersonateAddressConnected: 'First disconnect the wallet to impersonate another address.',\n};\n","import { createContext, useContext } from 'react';\n\nimport { defaultLabels } from '../i18n/en';\nimport { NovaConnectLabels } from '../i18n/types';\n\n/**\n * React Context for storing and providing the UI labels.\n * It is initialized with the default English labels, ensuring that components\n * work even without an explicit provider.\n */\nexport const NovaConnectLabelsContext = createContext<NovaConnectLabels>(defaultLabels);\n\n/**\n * A custom hook to easily access the i18n labels from any component\n * within the `NovaConnectLabelsProvider` tree.\n *\n * This hook provides type-safe access to all UI labels and automatically\n * falls back to default English labels if no provider is found.\n *\n * @returns {NovaConnectLabels} The complete object of UI labels for the current locale.\n *\n * @example\n * ```typescript\n * import { useNovaConnectLabels } from './hooks/useNovaConnectLabels';\n *\n * function MyComponent() {\n * const labels = useNovaConnectLabels();\n *\n * return (\n * <div>\n * <h1>{labels.connectWallet}</h1>\n * <button>{labels.connect}</button>\n * <p aria-label={labels.walletBalance}>{formattedBalance}</p>\n * </div>\n * );\n * }\n * ```\n *\n * @example\n * ```typescript\n * // Destructuring specific labels for better performance\n * function ConnectButton() {\n * const { connectWallet, connecting, connected } = useNovaConnectLabels();\n *\n * return (\n * <button>\n * {isConnecting ? connecting : isConnected ? connected : connectWallet}\n * </button>\n * );\n * }\n * ```\n */\nexport const useNovaConnectLabels = (): NovaConnectLabels => {\n return useContext(NovaConnectLabelsContext);\n};\n\n/**\n * Hook to get a specific label by key path with type safety\n *\n * @param key The label key to retrieve\n * @returns The specific label value\n *\n * @example\n * ```typescript\n * function MyComponent() {\n * const connectLabel = useNovaConnectLabel('connectWallet');\n * const errorLabel = useNovaConnectLabel('connectionError');\n *\n * return <button>{connectLabel}</button>;\n * }\n * ```\n */\nexport const useNovaConnectLabel = <K extends keyof NovaConnectLabels>(key: K): NovaConnectLabels[K] => {\n const labels = useNovaConnectLabels();\n return labels[key];\n};\n\n/**\n * Hook to get multiple specific labels for better performance\n *\n * @param keys Array of label keys to retrieve\n * @returns Object with only the requested labels\n *\n * @example\n * ```typescript\n * function ConnectModal() {\n * const { connectWallet, connecting, disconnect } = useNovaConnectLabelsSubset(['connectWallet', 'connecting', 'disconnect']);\n *\n * return (\n * <div>\n * <h2>{connectWallet}</h2>\n * <span>{connecting}</span>\n * <button>{disconnect}</button>\n * </div>\n * );\n * }\n * ```\n */\nexport const useNovaConnectLabelsSubset = <K extends keyof NovaConnectLabels>(\n keys: K[],\n): Pick<NovaConnectLabels, K> => {\n const allLabels = useNovaConnectLabels();\n\n const subset = {} as Pick<NovaConnectLabels, K>;\n for (const key of keys) {\n subset[key] = allLabels[key];\n }\n\n return subset;\n};\n\n/**\n * Type-safe helper to check if a label exists\n *\n * @param labels The labels object\n * @param key The key to check\n * @returns Whether the key exists and has a non-empty value\n */\nexport const hasLabel = (labels: NovaConnectLabels, key: keyof NovaConnectLabels): boolean => {\n return Boolean(labels[key]?.trim());\n};\n\n/**\n * Utility type for extracting label keys by category\n */\nexport type LabelCategory = {\n actions: Extract<\n keyof NovaConnectLabels,\n 'connectWallet' | 'disconnect' | 'connecting' | 'connected' | 'tryAgain' | 'back' | 'connect' | 'close'\n >;\n states: Extract<keyof NovaConnectLabels, 'success' | 'error' | 'replaced' | 'loading' | 'idle'>;\n accessibility: Extract<\n keyof NovaConnectLabels,\n 'chainSelector' | 'closeModal' | 'selectChain' | 'walletControls' | 'openWalletModal'\n >;\n transactions: Extract<\n keyof NovaConnectLabels,\n 'transactionLoading' | 'transactionSuccess' | 'transactionError' | 'transactionReplaced' | 'recent'\n >;\n};\n\n/**\n * Hook to get labels by category for better organization\n *\n * @param category The category of labels to retrieve\n * @returns Object with labels from the specified category\n */\nexport const useLabelsByCategory = <T extends keyof LabelCategory>(\n category: T,\n): Pick<NovaConnectLabels, LabelCategory[T]> => {\n const allLabels = useNovaConnectLabels();\n\n const categoryKeys: Record<keyof LabelCategory, (keyof NovaConnectLabels)[]> = {\n actions: ['connectWallet', 'disconnect', 'connecting', 'connected', 'tryAgain', 'back', 'connect', 'close'],\n states: ['success', 'error', 'replaced', 'loading', 'idle'],\n accessibility: ['chainSelector', 'closeModal', 'selectChain', 'walletControls', 'openWalletModal'],\n transactions: ['transactionLoading', 'transactionSuccess', 'transactionError', 'transactionReplaced', 'recent'],\n };\n\n const keys = categoryKeys[category] as LabelCategory[T][];\n const categoryLabels = {} as Pick<NovaConnectLabels, LabelCategory[T]>;\n\n for (const key of keys) {\n // eslint-disable-next-line\n (categoryLabels as any)[key] = allLabels[key as keyof NovaConnectLabels];\n }\n\n return categoryLabels;\n};\n\n/**\n * Utility function to check if labels are default ones (for external use)\n * This is a regular function, not a hook, so it can be used anywhere\n *\n * @param labels The labels to check\n * @returns Whether the labels are the default English labels\n *\n * @example\n * ```typescript\n * function SomeUtilityFunction(labels: NovaConnectLabels) {\n * if (isDefaultLabels(labels)) {\n * console.log('Using default English labels');\n * }\n * }\n * ```\n */\nexport const isDefaultLabels = (labels: NovaConnectLabels): boolean => {\n return labels === defaultLabels;\n};\n\n/**\n * Utility function to get a formatted label with fallback\n *\n * @param labels The labels object\n * @param key The label key\n * @param fallback Optional fallback text\n * @returns The label value or fallback\n *\n * @example\n * ```typescript\n * const buttonText = getLabelWithFallback(labels, 'connectWallet', 'Connect');\n * ```\n */\nexport const getLabelWithFallback = (\n labels: NovaConnectLabels,\n key: keyof NovaConnectLabels,\n fallback?: string,\n): string => {\n const value = labels[key];\n if (value && value.trim()) {\n return value;\n }\n return fallback || defaultLabels[key] || key.toString();\n};\n\n/**\n * Utility function to create a labels subset (for use outside of React components)\n *\n * @param labels The source labels object\n * @param keys Array of keys to extract\n * @returns Object with only the requested labels\n *\n * @example\n * ```typescript\n * const actionLabels = createLabelsSubset(labels, ['connect', 'disconnect', 'tryAgain']);\n * ```\n */\nexport const createLabelsSubset = <K extends keyof NovaConnectLabels>(\n labels: NovaConnectLabels,\n keys: K[],\n): Pick<NovaConnectLabels, K> => {\n const subset = {} as Pick<NovaConnectLabels, K>;\n for (const key of keys) {\n subset[key] = labels[key];\n }\n return subset;\n};\n","import { Web3Icon } from '@bgd-labs/react-web3-icons';\nimport { getChainName } from '@bgd-labs/react-web3-icons/dist/utils';\nimport * as Select from '@radix-ui/react-select';\nimport { cn } from '@tuwaio/nova-core';\nimport React, { type ComponentPropsWithoutRef, type ElementRef, forwardRef } from 'react';\n\nimport { useNovaConnectLabels } from '../../hooks/useNovaConnectLabels';\n\ninterface ChainData {\n formattedChainId: string | number;\n chain: string | number;\n}\n\ninterface ChainListRendererProps {\n chainsList: (string | number)[];\n selectValue: string;\n handleValueChange: (newChainId: string) => void;\n getChainData: (chain: string | number) => ChainData;\n onClose: () => void;\n isMobile?: boolean;\n}\n\nconst SelectItemBase = forwardRef<ElementRef<typeof Select.Item>, ComponentPropsWithoutRef<typeof Select.Item>>(\n ({ children, className, ...props }, forwardedRef) => {\n const labels = useNovaConnectLabels();\n const isActive = props.value === props['aria-label'];\n\n return (\n <Select.Item\n ref={forwardedRef}\n className={cn(\n 'novacon:flex novacon:items-center novacon:w-full novacon:text-left novacon:px-2 novacon:py-2 novacon:rounded-md novacon:transition-colors novacon:space-x-3 novacon:cursor-pointer novacon:outline-none',\n 'novacon:text-[var(--tuwa-text-primary)] novacon:hover:bg-[var(--tuwa-bg-muted)] novacon:focus:bg-[var(--tuwa-bg-muted)] novacon:focus:outline-none novacon:focus:ring-2 novacon:focus:ring-[var(--tuwa-border-primary)] novacon:focus:ring-offset-2',\n { 'novacon:bg-[var(--tuwa-bg-muted)]': isActive },\n className,\n )}\n role=\"option\"\n aria-selected={isActive}\n tabIndex={0}\n {...props}\n >\n {children}\n {isActive && (\n <>\n <span\n className=\"novacon:ml-auto novacon:text-xs novacon:font-semibold novacon:w-2 novacon:h-2 novacon:rounded-full novacon:bg-[var(--tuwa-success-text)]\"\n aria-label={labels.connected}\n role=\"status\"\n />\n <span className=\"novacon:sr-only\">{labels.connected}</span>\n </>\n )}\n </Select.Item>\n );\n },\n);\nSelectItemBase.displayName = 'SelectItemBase';\n\nexport const ChainListRenderer: React.FC<ChainListRendererProps> = ({\n chainsList,\n selectValue,\n handleValueChange,\n getChainData,\n onClose,\n isMobile = false,\n}) => {\n const labels = useNovaConnectLabels();\n\n return (\n <div role=\"listbox\" aria-label={labels.selectChain}>\n {chainsList.map((chain) => {\n const { formattedChainId } = getChainData(chain);\n const isActive = String(formattedChainId) === selectValue;\n const chainName = getChainName(formattedChainId);\n\n const itemClasses = cn(\n 'novacon:flex novacon:items-center novacon:w-full novacon:text-left novacon:px-2 novacon:py-2 novacon:rounded-md novacon:transition-colors novacon:space-x-3 novacon:cursor-pointer novacon:outline-none',\n 'novacon:text-[var(--tuwa-text-primary)] novacon:hover:bg-[var(--tuwa-bg-muted)] novacon:focus:bg-[var(--tuwa-bg-muted)] novacon:focus:outline-none novacon:focus:ring-2 novacon:focus:ring-[var(--tuwa-border-primary)] novacon:focus:ring-offset-2',\n { 'novacon:bg-[var(--tuwa-bg-muted)]': isActive },\n );\n\n const content = (\n <div className=\"novacon:flex novacon:items-center novacon:space-x-3 novacon:[&_img]:w-6 novacon:[&_img]:h-6\">\n <div aria-hidden=\"true\">\n <Web3Icon chainId={formattedChainId} />\n </div>\n <span className=\"novacon:text-sm novacon:font-medium\">{chainName}</span>\n </div>\n );\n\n const handleClick = () => {\n handleValueChange(String(formattedChainId));\n onClose();\n };\n\n const handleKeyDown = (event: React.KeyboardEvent) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n handleClick();\n }\n };\n\n if (isMobile) {\n return (\n <div\n key={chain}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n className={cn(itemClasses, 'novacon:justify-between')}\n role=\"option\"\n aria-selected={isActive}\n aria-label={`${labels.chainOption}: ${chainName}`}\n tabIndex={0}\n >\n {content}\n {isActive && (\n <div className=\"novacon:flex novacon:items-center novacon:space-x-2 novacon:text-xs novacon:font-semibold novacon:text-[var(--tuwa-text-tertiary)]\">\n <span aria-label={labels.connected}>{labels.connected}</span>\n <span\n className=\"novacon:ml-auto novacon:text-xs novacon:font-semibold novacon:w-2 novacon:h-2 novacon:rounded-full novacon:bg-[var(--tuwa-success-text)]\"\n aria-hidden=\"true\"\n role=\"status\"\n />\n </div>\n )}\n </div>\n );\n }\n\n return (\n <SelectItemBase\n value={String(formattedChainId)}\n aria-label={`${labels.chainOption}: ${chainName}`}\n key={chain}\n onSelect={handleClick}\n >\n {content}\n </SelectItemBase>\n );\n })}\n </div>\n );\n};\n","import { OrbitAdapter } from '@tuwaio/orbit-core';\nimport { ISatelliteConnectStore } from '@tuwaio/satellite-core';\nimport { BaseWallet } from '@tuwaio/satellite-core';\nimport { createContext, useContext } from 'react';\nimport { StoreApi } from 'zustand/index';\n\nimport { NovaConnectLabels } from '../i18n/types';\nimport { Connector, Wallet } from '../types';\n\nexport type ButtonTxStatus = 'idle' | 'loading' | 'succeed' | 'failed' | 'replaced';\nexport type ConnectContentType = 'network' | 'connectors' | 'about' | 'getWallet' | 'connecting' | 'impersonate';\nexport type ConnectedContentType = 'main' | 'transactions' | 'chains';\n\n// Provider props interface\nexport interface NovaConnectProviderProps {\n store: StoreApi<ISatelliteConnectStore<Connector, Wallet>>;\n children: React.ReactNode;\n labels?: Partial<NovaConnectLabels>;\n}\n\n// Balance type for better type safety\nexport interface WalletBalance {\n value: string;\n symbol: string;\n}\n\n// Provider context type with better organization\nexport interface NovaConnectProviderType {\n activeWallet: BaseWallet | undefined;\n walletConnectionError: string | undefined;\n // Modal states\n isConnectModalOpen: boolean;\n setIsConnectModalOpen: (value: boolean) => void;\n isConnectedModalOpen: boolean;\n setIsConnectedModalOpen: (value: boolean) => void;\n\n // Chain selection states\n isChainsListOpen: boolean;\n setIsChainsListOpen: (value: boolean) => void;\n isChainsListOpenMobile: boolean;\n setIsChainsListOpenMobile: (value: boolean) => void;\n\n // Connection states\n connectedButtonStatus: ButtonTxStatus;\n setConnectedButtonStatus: (value: ButtonTxStatus) => void;\n isConnected: boolean;\n setIsConnected: (value: boolean) => void;\n\n // Modal content types\n connectedModalContentType: ConnectedContentType;\n setConnectedModalContentType: (value: ConnectedContentType) => void;\n connectModalContentType: ConnectContentType;\n setConnectModalContentType: (value: ConnectContentType) => void;\n\n // Adapter and connector states\n selectedAdapter: OrbitAdapter | undefined;\n setSelectedAdapter: (value: OrbitAdapter | undefined) => void;\n activeConnector: string | undefined;\n setActiveConnector: (value: string | undefined) => void;\n\n // Impersonation\n impersonatedAddress: string;\n setImpersonatedAddress: (value: string) => void;\n}\n\n// Custom error for hook usage outside provider\nexport class NovaConnectProviderError extends Error {\n constructor(message = 'useNovaConnect must be used within NovaConnectProvider') {\n super(message);\n this.name = 'NovaConnectProviderError';\n }\n}\n\n// Create context with undefined default to enforce provider usage\nexport const NovaConnectProviderContext = createContext<NovaConnectProviderType | undefined>(undefined);\n\n/**\n * Hook to access NovaConnect context\n *\n * @throws {NovaConnectProviderError} When used outside of NovaConnectProvider\n * @returns {NovaConnectProviderType} The NovaConnect context value\n *\n * @example\n * ```typescript\n * function MyComponent() {\n * const { isConnected, handleConnectButtonClick } = useNovaConnect();\n *\n * return (\n * <button onClick={handleConnectButtonClick}>\n * {isConnected ? 'Connected' : 'Connect Wallet'}\n * </button>\n * );\n * }\n * ```\n */\nexport const useNovaConnect = (): NovaConnectProviderType => {\n const context = useContext(NovaConnectProviderContext);\n\n if (!context) {\n throw new NovaConnectProviderError();\n }\n\n return context;\n};\n\n/**\n * Hook to check if NovaConnect context is available\n *\n * @returns {boolean} True if context is available, false otherwise\n *\n * @example\n * ```typescript\n * function ConditionalComponent() {\n * const hasContext = useHasNovaConnectContext();\n *\n * if (!hasContext) {\n * return <div>NovaConnect provider not found</div>;\n * }\n *\n * return <ConnectedComponent />;\n * }\n * ```\n */\nexport const useHasNovaConnectContext = (): boolean => {\n const context = useContext(NovaConnectProviderContext);\n return context !== undefined;\n};\n\n/**\n * Optional hook that returns null if provider is not available\n *\n * @returns {NovaConnectProviderType | null} Context value or null if not available\n *\n * @example\n * ```typescript\n * function OptionalComponent() {\n * const context = useNovaConnectOptional();\n *\n * if (!context) {\n * return <div>No wallet provider available</div>;\n * }\n *\n * return <div>Connected: {context.isConnected}</div>;\n * }\n * ```\n */\nexport const useNovaConnectOptional = (): NovaConnectProviderType | null => {\n const context = useContext(NovaConnectProviderContext);\n return context ?? null;\n};\n","import { OrbitAdapter } from '@tuwaio/orbit-core';\n\nimport { InitialChains } from '../types';\n\n// Default fallback chain IDs\nconst DEFAULT_CHAIN_IDS = {\n [OrbitAdapter.EVM]: 1, // Ethereum Mainnet\n [OrbitAdapter.SOLANA]: 'mainnet',\n [OrbitAdapter.Starknet]: '0x534e5f4d41494e',\n} as const;\n\n/**\n * Basic interface for chain objects to handle the any type safely\n */\ninterface BasicChain {\n id: number | string;\n [key: string]: any;\n}\n\n/**\n * Gets the appropriate chain ID for connecting based on the selected adapter.\n * Returns the first available chain for the adapter, or a sensible default.\n *\n * @param params - Configuration object\n * @param params.selectedAdapter - The blockchain adapter to use\n * @param params.appChains - Available EVM chains\n * @param params.solanaRPCUrls - Available Solana networks\n * @returns Chain ID (number for EVM/Starknet, string for Solana)\n */\nexport function getConnectChainId({\n selectedAdapter,\n appChains,\n solanaRPCUrls,\n}: { selectedAdapter: OrbitAdapter } & InitialChains): number | string {\n switch (selectedAdapter) {\n case OrbitAdapter.EVM: {\n // Return first available EVM chain or default to Ethereum\n const firstChain = appChains?.[0];\n if (firstChain?.id && typeof firstChain.id === 'number') {\n return firstChain.id;\n }\n\n if (process.env.NODE_ENV === 'development' && !appChains?.length) {\n console.warn('getConnectChainId: No EVM chains configured, using Ethereum Mainnet');\n }\n\n return DEFAULT_CHAIN_IDS[OrbitAdapter.EVM];\n }\n\n case OrbitAdapter.SOLANA: {\n // Return first available Solana network or default to mainnet\n if (solanaRPCUrls && typeof solanaRPCUrls === 'object') {\n const networks = Object.keys(solanaRPCUrls);\n if (networks.length > 0) {\n return networks[0];\n }\n }\n\n if (process.env.NODE_ENV === 'development' && !solanaRPCUrls) {\n console.warn('getConnectChainId: No Solana RPC URLs configured, using mainnet');\n }\n\n return DEFAULT_CHAIN_IDS[OrbitAdapter.SOLANA];\n }\n\n case OrbitAdapter.Starknet: {\n if (process.env.NODE_ENV === 'development') {\n console.info('getConnectChainId: Using default Starknet chain ID');\n }\n\n return DEFAULT_CHAIN_IDS[OrbitAdapter.Starknet];\n }\n\n default: {\n // Handle unknown adapter types gracefully\n if (process.env.NODE_ENV === 'development') {\n console.error('getConnectChainId: Unknown adapter:', selectedAdapter);\n }\n\n return DEFAULT_CHAIN_IDS[OrbitAdapter.EVM];\n }\n }\n}\n\n/**\n * Helper to get all available chain IDs for an adapter\n */\nexport function getAvailableChainIds({\n selectedAdapter,\n appChains,\n solanaRPCUrls,\n}: { selectedAdapter: OrbitAdapter } & InitialChains): Array<number | string> {\n switch (selectedAdapter) {\n case OrbitAdapter.EVM:\n return appChains?.map((chain: BasicChain) => chain.id).filter(Boolean) ?? [DEFAULT_CHAIN_IDS[OrbitAdapter.EVM]];\n\n case OrbitAdapter.SOLANA:\n return solanaRPCUrls ? Object.keys(solanaRPCUrls) : [DEFAULT_CHAIN_IDS[OrbitAdapter.SOLANA]];\n\n case OrbitAdapter.Starknet:\n return [DEFAULT_CHAIN_IDS[OrbitAdapter.Starknet]];\n\n default:\n return [DEFAULT_CHAIN_IDS[OrbitAdapter.EVM]];\n }\n}\n","// TODO: migrate to @tuwaio/nova-core\n\n/**\n * @fileoverview Utility function to determine if the current environment supports touch input.\n * This is safe to use in Next.js applications as it checks for the `window` object existence.\n */\n\n/**\n * Determines if the current browsing device supports touch input,\n * while also excluding large screens (typically desktop-sized touch monitors).\n *\n * It checks for:\n * 1. The presence of 'ontouchstart' or navigator.maxTouchPoints > 0 or '(pointer: coarse)'.\n * 2. ONLY returns true if the screen width is less than or equal to the specified threshold (e.g., 1200px).\n *\n * This function is safe for server-side rendering (SSR) environments like Next.js.\n *\n * @param {number} [maxWidth=1200] The maximum screen width (in pixels) for a device to be considered 'touch' (default is 1200).\n * @returns {boolean} Returns true if the environment is determined to support touch input AND is within the width limit, otherwise false.\n */\nexport function isTouchDevice(maxWidth: number = 1200): boolean {\n // 1. Check if we are running in a browser environment (Client Side).\n if (typeof window === 'undefined') {\n // If not in a browser (SSR), we assume no touch support for safety.\n return false;\n }\n\n // --- Core Touch Support Checks (Client Side Only) ---\n\n // A. Check for 'ontouchstart' event property (classic check).\n const hasTouchStart = 'ontouchstart' in window;\n\n // B. Check for maxTouchPoints (reliable modern check).\n const hasMaxTouchPoints = navigator.maxTouchPoints > 0;\n\n // C. Check for 'pointer: coarse' media query (detects \"rough\" pointer like a finger).\n let hasCoarsePointer = false;\n if (window.matchMedia) {\n hasCoarsePointer = window.matchMedia('(pointer: coarse)').matches;\n }\n\n // Determine if the device inherently supports touch input.\n const supportsTouch = hasTouchStart || hasMaxTouchPoints || hasCoarsePointer;\n\n // 2. Check the screen size condition.\n // The device must support touch AND its current width must be less than or equal to the defined maxWidth.\n const isSmallScreen = window.innerWidth <= maxWidth;\n\n // Return true only if both conditions are met.\n return supportsTouch && isSmallScreen;\n}\n","import { OrbitAdapter } from '@tuwaio/orbit-core';\n\nexport const networksLinks: Partial<\n Record<OrbitAdapter, { aboutNetwork: string; choseWallet: string; about: string }>\n> = {\n [OrbitAdapter.EVM]: {\n aboutNetwork: 'https://ethereum.org/developers/docs/intro-to-ethereum/',\n choseWallet: 'https://ethereum.org/wallets/find-wallet/',\n about: 'https://ethereum.org/wallets/',\n },\n [OrbitAdapter.SOLANA]: {\n aboutNetwork: 'https://solana.com/en/learn/what-is-solana',\n choseWallet: 'https://solana.com/en/solana-wallets',\n about: 'https://solana.com/en/learn/what-is-a-wallet',\n },\n};\n","import { ChevronDownIcon } from '@heroicons/react/24/solid';\nimport { cn } from '@tuwaio/nova-core';\nimport { forwardRef } from 'react';\n\nimport { useNovaConnectLabels } from '../hooks/useNovaConnectLabels';\n\ninterface ToBottomButtonProps {\n /** Custom CSS classes for the button */\n className?: string;\n /** Custom aria-label for the button */\n 'aria-label'?: string;\n /** Callback fired when button is clicked */\n onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n /** Whether the button is disabled */\n disabled?: boolean;\n}\n\nexport const ToBottomButton = forwardRef<HTMLButtonElement, ToBottomButtonProps>(\n ({ className, 'aria-label': ariaLabel, onClick, disabled = false, ...props }, ref) => {\n const labels = useNovaConnectLabels();\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n // Prevent default scroll behavior if custom handler provided\n if (onClick) {\n event.preventDefault();\n onClick(event);\n }\n };\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLButtonElement>) => {\n // Handle keyboard activation\n if ((event.key === 'Enter' || event.key === ' ') && onClick) {\n event.preventDefault();\n // eslint-disable-next-line\n onClick(event as any);\n }\n };\n\n return (\n <button\n ref={ref}\n type=\"button\"\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n disabled={disabled}\n className={cn(\n 'novacon:flex novacon:w-full novacon:h-6 novacon:items-center novacon:justify-center',\n 'novacon:bg-[var(--tuwa-bg-secondary)] novacon:text-[var(--tuwa-text-primary)]',\n 'novacon:transition-colors novacon:duration-200',\n 'novacon:hover:bg-[var(--tuwa-bg-tertiary)] novacon:hover:text-[var(--tuwa-text-secondary)]',\n 'novacon:focus:outline-none novacon:focus:ring-2 novacon:focus:ring-[var(--tuwa-text-accent)] novacon:focus:ring-inset',\n 'novacon:active:bg-[var(--tuwa-bg-quaternary)]',\n 'novacon:disabled:opacity-50 novacon:disabled:cursor-not-allowed novacon:disabled:hover:bg-[var(--tuwa-bg-secondary)]',\n onClick ? 'novacon:cursor-pointer' : 'novacon:cursor-default',\n className,\n )}\n aria-label={ariaLabel || labels.scrollToBottom}\n title={ariaLabel || labels.scrollToBottom}\n {...props}\n >\n <ChevronDownIcon\n className={cn(\n 'novacon:w-4 novacon:h-4 novacon:transition-transform novacon:duration-200',\n disabled && 'novacon:opacity-50',\n )}\n aria-hidden=\"true\"\n />\n </button>\n );\n },\n);\n\nToBottomButton.displayName = 'ToBottomButton';\n","import { ChevronUpIcon } from '@heroicons/react/24/solid';\nimport { cn } from '@tuwaio/nova-core';\nimport { forwardRef } from 'react';\n\nimport { useNovaConnectLabels } from '../hooks/useNovaConnectLabels';\n\ninterface ToTopButtonProps {\n /** Custom CSS classes for the button */\n className?: string;\n /** Custom aria-label for the button */\n 'aria-label'?: string;\n /** Callback fired when button is clicked */\n onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n /** Whether the button is disabled */\n disabled?: boolean;\n}\n\nexport const ToTopButton = forwardRef<HTMLButtonElement, ToTopButtonProps>(\n ({ className, 'aria-label': ariaLabel, onClick, disabled = false, ...props }, ref) => {\n const labels = useNovaConnectLabels();\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n // Prevent default scroll behavior if custom handler provided\n if (onClick) {\n event.preventDefault();\n onClick(event);\n }\n };\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLButtonElement>) => {\n // Handle keyboard activation\n if ((event.key === 'Enter' || event.key === ' ') && onClick) {\n event.preventDefault();\n // eslint-disable-next-line\n onClick(event as any);\n }\n };\n\n return (\n <button\n ref={ref}\n type=\"button\"\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n disabled={disabled}\n className={cn(\n 'novacon:flex novacon:w-full novacon:h-6 novacon:items-center novacon:justify-center',\n 'novacon:bg-[var(--tuwa-bg-secondary)] novacon:text-[var(--tuwa-text-primary)]',\n 'novacon:transition-colors novacon:duration-200',\n 'novacon:hover:bg-[var(--tuwa-bg-tertiary)] novacon:hover:text-[var(--tuwa-text-secondary)]',\n 'novacon:focus:outline-none novacon:focus:ring-2 novacon:focus:ring-[var(--tuwa-text-accent)] novacon:focus:ring-inset',\n 'novacon:active:bg-[var(--tuwa-bg-quaternary)]',\n 'novacon:disabled:opacity-50 novacon:disabled:cursor-not-allowed novacon:disabled:hover:bg-[var(--tuwa-bg-secondary)]',\n onClick ? 'novacon:cursor-pointer' : 'novacon:cursor-default',\n className,\n )}\n aria-label={ariaLabel || labels.scrollToTop}\n title={ariaLabel || labels.scrollToTop}\n {...props}\n >\n <ChevronUpIcon\n className={cn(\n 'novacon:w-4 novacon:h-4 novacon:transition-transform novacon:duration-200',\n disabled && 'novacon:opacity-50',\n )}\n aria-hidden=\"true\"\n />\n </button>\n );\n },\n);\n\nToTopButton.displayName = 'ToTopButton';\n","import * as Select from '@radix-ui/react-select';\nimport { cn } from '@tuwaio/nova-core';\nimport { AnimatePresence, type Easing, motion } from 'framer-motion';\nimport { type ComponentPropsWithoutRef, type ElementRef, forwardRef, useMemo } from 'react';\n\nimport { useNovaConnectLabels } from '../hooks/useNovaConnectLabels';\nimport { ToBottomButton } from './ToBottomButton';\nimport { ToTopButton } from './ToTopButton';\n\ninterface SelectContentAnimatedProps extends ComponentPropsWithoutRef<typeof Select.Content> {\n /** Custom CSS classes to apply to the content container */\n className?: string;\n /** ARIA label for the select content */\n 'aria-label'?: string;\n /** Whether the select content should have reduced motion for accessibility */\n reduceMotion?: boolean;\n}\n\nexport const SelectContentAnimated = forwardRef<ElementRef<typeof Select.Content>, SelectContentAnimatedProps>(\n (\n { className, children, position = 'popper', 'aria-label': ariaLabel, reduceMotion = false, ...props },\n forwardedRef,\n ) => {\n const labels = useNovaConnectLabels();\n\n // Memoize animation configuration based on reduce motion preference\n const animationConfig = useMemo(() => {\n if (reduceMotion) {\n return {\n initial: { opacity: 0 },\n animate: { opacity: 1 },\n exit: { opacity: 0 },\n transition: { duration: 0.15 },\n };\n }\n\n return {\n initial: { opacity: 0, scaleY: 0.8, y: -5 },\n animate: { opacity: 1, scaleY: 1, y: 0 },\n exit: { opacity: 0, scaleY: 0.8, y: -5 },\n transition: {\n duration: 0.2,\n ease: 'easeOut',\n },\n };\n }, [reduceMotion]);\n\n // Memoize layout transition configuration\n const layoutTransition = useMemo(() => {\n if (reduceMotion) {\n return {};\n }\n return {\n duration: 0.15,\n ease: 'easeOut' as Easing,\n };\n }, [reduceMotion]);\n\n // Memoize content container classes\n const contentClasses = useMemo(\n () =>\n cn(\n 'novacon:p-1 novacon:bg-[var(--tuwa-bg-secondary)] novacon:rounded-lg novacon:shadow-xl',\n 'novacon:ring-1 novacon:ring-[var(--tuwa-border-primary)] novacon:overflow-hidden',\n className,\n ),\n [className],\n );\n\n // Memoize select content classes\n const selectContentClasses = useMemo(\n () =>\n cn(\n 'novacon:max-h-[300px] novacon:w-[--radix-select-trigger-width] novacon:overflow-hidden',\n 'novacon:data-[state=open]:animate-in novacon:data-[state=closed]:animate-out',\n 'novacon:data-[state=closed]:fade-out-0 novacon:data-[state=open]:novacon:fade-in-0',\n 'novacon:data-[state=closed]:zoom-out-95 novacon:data-[state=open]:novacon:zoom-in-95',\n 'novacon:data-[side=bottom]:slide-in-from-top-2 novacon:data-[side=left]:slide-in-from-right-2',\n 'novacon:data-[side=right]:slide-in-from-left-2 novacon:data-[side=top]:slide-in-from-bottom-2',\n ),\n [],\n );\n\n return (\n <Select.Portal>\n <Select.Content\n className={selectContentClasses}\n ref={forwardedRef}\n position={position}\n role=\"listbox\"\n aria-label={ariaLabel || labels.chainListContainer}\n {...props}\n >\n {/* Scroll to top button */}\n <Select.ScrollUpButton asChild>\n <ToTopButton />\n </Select.ScrollUpButton>\n\n {/* Main content viewport */}\n <Select.Viewport role=\"presentation\">\n <AnimatePresence mode=\"wait\" initial={false}>\n <motion.div\n {...animationConfig}\n className={contentClasses}\n layout={!reduceMotion}\n transition={{\n layout: layoutTransition,\n }}\n role=\"group\"\n aria-live=\"polite\"\n >\n {children}\n </motion.div>\n </AnimatePresence>\n </Select.Viewport>\n\n {/* Scroll to bottom button */}\n <Select.ScrollDownButton asChild>\n <ToBottomButton />\n </Select.ScrollDownButton>\n </Select.Content>\n </Select.Portal>\n );\n },\n);\n\nSelectContentAnimated.displayName = 'SelectContentAnimated';\n","/**\n * @file This file contains the `WalletAvatar` component for displaying a user's avatar.\n */\n\nimport { cn } from '@tuwaio/nova-core';\nimport makeBlockie from 'ethereum-blockies-base64';\nimport { forwardRef, useCallback, useMemo, useRef, useState } from 'react';\n\nimport { useNovaConnectLabels } from '../hooks/useNovaConnectLabels';\n\nexport type WalletAvatarProps = {\n /** The user's wallet address, used for the blockie fallback and background color. */\n address: string;\n /** An optional URL for the user's ENS avatar image. */\n ensAvatar?: string | null;\n /** Optional additional CSS classes for the container. */\n className?: string;\n /** Custom alt text for the avatar image */\n altText?: string;\n /** Size variant for the avatar */\n size?: 'sm' | 'md' | 'lg' | 'xl';\n /** Whether to show loading animation */\n showLoading?: boolean;\n /** Callback fired when image loads successfully */\n onImageLoad?: () => void;\n /** Callback fired when image fails to load */\n onImageError?: (error: Event) => void;\n /** Whether to disable the pulse animation */\n disableAnimation?: boolean;\n};\n\nfunction isHex(value: unknown, { strict = true }: { strict?: boolean | undefined } = {}): value is `0x${string}` {\n if (!value) return false;\n if (typeof value !== 'string') return false;\n return strict ? /^0x[0-9a-fA-F]*$/.test(value) : value.startsWith('0x');\n}\n\nconst zeroAddress = '0x0000000000000000000000000000000000000000';\n\n// Size mapping for different avatar sizes\nconst sizeClasses = {\n sm: 'novacon:h-4 novacon:w-4',\n md: 'novacon:h-6 novacon:w-6',\n lg: 'novacon:h-8 novacon:w-8',\n xl: 'novacon:h-12 novacon:w-12',\n} as const;\n\n/**\n * A component that displays a user's avatar.\n *\n * It prioritizes showing the provided `ensAvatar`. If unavailable or if the image fails to load,\n * it falls back to a procedurally generated \"blockie\" based on the user's address.\n * It also generates a unique background color from the address as a placeholder.\n */\nexport const WalletAvatar = forwardRef<HTMLDivElement, WalletAvatarProps>(\n (\n {\n address,\n ensAvatar,\n className,\n altText,\n size = 'md',\n showLoading = true,\n onImageLoad,\n onImageError,\n disableAnimation = false,\n ...props\n },\n ref,\n ) => {\n const labels = useNovaConnectLabels();\n\n // State management - fix useState initialization\n const [imageSrc, setImageSrc] = useState<string | null>(ensAvatar ?? null);\n const [isLoading, setIsLoading] = useState(Boolean(ensAvatar));\n const [hasError, setHasError] = useState(false);\n const imgRef = useRef<HTMLImageElement>(null);\n\n // Memoize the generated blockie to avoid re-creating it on every render\n const blockie = useMemo(() => {\n try {\n return makeBlockie(isHex(address) ? address : zeroAddress);\n } catch (error) {\n console.warn('Failed to generate blockie for address:', address, error);\n return null;\n }\n }, [address]);\n\n // Memoize the background color with validation\n const bgColor = useMemo(() => {\n try {\n if (!isHex(address)) return '#6B7280'; // Fallback gray color\n const colorHex = address.slice(2, 8);\n return colorHex.length === 6 ? `#${colorHex}` : '#6B7280';\n } catch {\n return '#6B7280';\n }\n }, [address]);\n\n // Format address for screen readers\n const formattedAddress = useMemo(() => {\n if (!address) return labels.unknownWallet;\n return `${address.slice(0, 6)}...${address.slice(-4)}`;\n }, [address, labels.unknownWallet]);\n\n // Generate alt text\n const imageAltText = useMemo(() => {\n if (altText) return altText;\n if (hasError || !ensAvatar) {\n return `${labels.walletAvatar} ${formattedAddress}`;\n }\n return `${labels.ensAvatar} ${formattedAddress}`;\n }, [altText, hasError, ensAvatar, formattedAddress, labels.walletAvatar, labels.ensAvatar]);\n\n // Reset image source when ensAvatar changes - fix state update issues\n const currentEnsAvatar = useMemo(() => ensAvatar ?? null, [ensAvatar]);\n\n useMemo(() => {\n setImageSrc(currentEnsAvatar);\n setIsLoading(Boolean(currentEnsAvatar));\n setHasError(false);\n }, [currentEnsAvatar]);\n\n // Handle image load success\n const handleImageLoad = useCallback(() => {\n setIsLoading(false);\n setHasError(false);\n onImageLoad?.();\n }, [onImageLoad]);\n\n // Handle image load error\n const handleImageError = useCallback(\n (event: React.SyntheticEvent<HTMLImageElement, Event>) => {\n setIsLoading(false);\n setHasError(true);\n setImageSrc(blockie);\n onImageError?.(event.nativeEvent);\n },\n [blockie, onImageError],\n );\n\n // Memoize container classes\n const containerClasses = useMemo(\n () =>\n cn(\n sizeClasses[size],\n 'novacon:flex-shrink-0 novacon:rounded-full novacon:relative novacon:overflow-hidden',\n 'novacon:ring-1 novacon:ring-[var(--tuwa-border-primary)]',\n 'novacon:focus-within:ring-2 novacon:focus-within:ring-[var(--tuwa-text-accent)]',\n className,\n ),\n [size, className],\n );\n\n // Memoize loading overlay classes\n const loadingClasses = useMemo(\n () =>\n cn(\n 'novacon:absolute novacon:inset-0 novacon:rounded-full novacon:bg-[var(--tuwa-bg-muted)]',\n !disableAnimation && showLoading && isLoading && 'novacon:animate-pulse',\n (!isLoading || !showLoading) && 'novacon:opacity-0',\n 'novacon:transition-opacity novacon:duration-300',\n ),\n [disableAnimation, showLoading, isLoading],\n );\n\n // Get current image source with fallback\n const currentImageSrc = imageSrc || blockie || '';\n\n return (\n <div\n ref={ref}\n className={containerClasses}\n style={{ backgroundColor: bgColor }}\n role=\"img\"\n aria-label={imageAltText}\n title={imageAltText}\n {...props}\n >\n {/* Loading overlay */}\n <div className={loadingClasses} aria-hidden=\"true\" />\n\n {/* Avatar image */}\n {currentImageSrc && (\n <img\n ref={imgRef}\n key={`${ensAvatar || 'blockie'}-${address}`} // Force re-mount when source changes\n className={cn(\n 'novacon:h-full novacon:w-full novacon:rounded-full novacon:object-cover novacon:relative novacon:z-10',\n 'novacon:transition-opacity novacon:duration-300',\n isLoading ? 'novacon:opacity-0' : 'novacon:opacity-100',\n )}\n src={currentImageSrc}\n alt=\"\" // Empty alt since parent div has role=\"img\" and aria-label\n onLoad={handleImageLoad}\n onError={handleImageError}\n loading=\"lazy\"\n decoding=\"async\"\n draggable={false}\n />\n )}\n\n {/* Fallback content for extreme error cases */}\n {!currentImageSrc && (\n <div\n className=\"novacon:absolute novacon:inset-0 novacon:flex novacon:items-center novacon:justify-center novacon:text-white novacon:text-xs novacon:font-mono\"\n aria-hidden=\"true\"\n >\n {formattedAddress.slice(0, 2)}\n </div>\n )}\n </div>\n );\n },\n);\n\nWalletAvatar.displayName = 'WalletAvatar';\n","import { Web3Icon } from '@bgd-labs/react-web3-icons';\nimport { cn } from '@tuwaio/nova-core';\nimport { formatWalletName } from '@tuwaio/orbit-core';\nimport { forwardRef, useCallback, useMemo, useState } from 'react';\n\nimport { useNovaConnectLabels } from '../hooks/useNovaConnectLabels';\n\ninterface WalletIconProps {\n /** Custom icon URL for the wallet */\n icon?: string;\n /** Name of the wallet */\n name: string;\n /** Size of the icon in pixels */\n size?: number;\n /** Additional CSS classes */\n className?: string;\n /** Custom alt text for the icon */\n altText?: string;\n /** Whether to show loading state */\n showLoading?: boolean;\n /** Callback fired when image loads successfully */\n onImageLoad?: () => void;\n /** Callback fired when image fails to load */\n onImageError?: () => void;\n /** Enable lazy loading for non-critical images */\n lazy?: boolean;\n}\n\nexport const WalletIcon = forwardRef<HTMLDivElement, WalletIconProps>(\n (\n {\n icon,\n name,\n size = 32,\n className,\n altText,\n showLoading = false,\n onImageLoad,\n onImageError,\n lazy = false,\n ...props\n },\n ref,\n ) => {\n const labels = useNovaConnectLabels();\n const [hasError, setHasError] = useState(false);\n const [isLoading, setIsLoading] = useState(Boolean(icon));\n\n // Format wallet name for consistency\n const walletName = useMemo(() => formatWalletName(name), [name]);\n\n // Generate alt text for accessibility\n const imageAltText = useMemo(() => {\n if (altText) return altText;\n return `${walletName} ${labels.walletIcon}`;\n }, [altText, walletName, labels.walletIcon]);\n\n // Clean and validate icon URL\n const cleanIconUrl = useMemo(() => {\n if (!icon) return null;\n\n try {\n const trimmedIcon = icon.trim();\n if (!trimmedIcon) return null;\n\n // Basic URL validation\n if (\n trimmedIcon.startsWith('http://') ||\n trimmedIcon.startsWith('https://') ||\n trimmedIcon.startsWith('/') ||\n trimmedIcon.startsWith('data:')\n ) {\n return trimmedIcon;\n }\n\n return null;\n } catch {\n return null;\n }\n }, [icon]);\n\n // Handle image load success\n const handleImageLoad = useCallback(() => {\n setIsLoading(false);\n setHasError(false);\n onImageLoad?.();\n }, [onImageLoad]);\n\n // Handle image load error\n const handleImageError = useCallback(() => {\n setIsLoading(false);\n setHasError(true);\n onImageError?.();\n }, [onImageError]);\n\n // Container classes\n const containerClasses = useMemo(\n () =>\n cn(\n 'novacon:relative novacon:inline-flex novacon:items-center novacon:justify-center novacon:flex-shrink-0',\n 'novacon:overflow-hidden',\n showLoading && isLoading && 'novacon:animate-pulse novacon:bg-[var(--tuwa-bg-muted)]',\n className,\n ),\n [showLoading, isLoading, className],\n );\n\n // Image classes for consistency\n const imageClasses = useMemo(\n () =>\n cn(\n 'novacon:object-cover novacon:transition-opacity novacon:duration-200',\n 'novacon:max-w-full novacon:max-h-full',\n isLoading && showLoading ? 'novacon:opacity-0' : 'novacon:opacity-100',\n ),\n [isLoading, showLoading],\n );\n\n // Image style object\n const imageStyle = useMemo(\n () => ({\n width: size,\n height: size,\n }),\n [size],\n );\n\n return (\n <div\n ref={ref}\n className={containerClasses}\n role=\"img\"\n aria-label={imageAltText}\n title={imageAltText}\n style={{ lineHeight: 0 }}\n {...props}\n >\n {/* Loading overlay */}\n {showLoading && isLoading && (\n <div\n className=\"novacon:absolute novacon:inset-0 novacon:bg-[var(--tuwa-bg-muted)] novacon:animate-pulse novacon:rounded-full\"\n aria-hidden=\"true\"\n />\n )}\n\n {/* Custom icon with error fallback */}\n {cleanIconUrl && !hasError ? (\n <img\n src={cleanIconUrl}\n alt=\"\" // Empty alt since parent div has role=\"img\" and aria-label\n className={imageClasses}\n style={imageStyle}\n onLoad={handleImageLoad}\n onError={handleImageError}\n loading={lazy ? 'lazy' : 'eager'}\n decoding=\"async\"\n // Additional attributes for better performance\n crossOrigin=\"anonymous\"\n referrerPolicy=\"no-referrer\"\n />\n ) : (\n /* Fallback to Web3Icon */\n <Web3Icon walletKey={walletName} className={cn(imageClasses, 'novacon:flex-shrink-0')} style={imageStyle} />\n )}\n\n {/* Error state indicator (optional) */}\n {hasError && process.env.NODE_ENV === 'development' && (\n <div\n className=\"novacon:absolute novacon:top-0 novacon:right-0 novacon:w-2 novacon:h-2 novacon:bg-red-500 novacon:rounded-full\"\n title={`Failed to load icon for ${walletName}`}\n aria-hidden=\"true\"\n />\n )}\n </div>\n );\n },\n);\n\nWalletIcon.displayName = 'WalletIcon';\n","import { Web3Icon } from '@bgd-labs/react-web3-icons';\nimport { ChevronArrowWithAnim, cn } from '@tuwaio/nova-core';\nimport { OrbitAdapter } from '@tuwaio/orbit-core';\nimport { forwardRef, useMemo } from 'react';\n\nimport { useNovaConnectLabels } from '../../hooks/useNovaConnectLabels';\nimport { WalletIcon } from '../WalletIcon';\n\n/**\n * Props for the IconButton component\n */\ninterface IconButtonProps {\n /** Custom icon URL for the wallet */\n walletIcon?: string;\n /** Name of the wallet */\n walletName?: string;\n /** Chain ID for the network icon */\n walletChainId?: string | number;\n /** Number of available items/options (shows chevron if > 1) */\n items?: number;\n /** Click handler for the button */\n onClick?: () => void;\n /** Additional CSS classes for styling */\n className?: string;\n /** Whether the button is currently disabled */\n disabled?: boolean;\n /** Whether to show loading state */\n loading?: boolean;\n /** Custom aria-label for accessibility */\n 'aria-label'?: string;\n /** Custom tooltip text */\n title?: string;\n}\n\n/**\n * Multi-purpose icon button component for wallets and chains\n *\n * This component provides a unified interface for displaying wallet and chain information:\n * - Displays wallet icon with fallback to Web3Icon\n * - Shows chain/network icon when chain ID is provided\n * - Conditional chevron arrow for dropdown indicators\n * - Full WCAG accessibility support with proper ARIA labels\n * - Loading and disabled states\n * - Hover and active animations\n * - Responsive design with consistent sizing\n *\n * The button automatically becomes interactive when onClick is provided and items > 1.\n * It supports both EVM chain IDs (numbers) and Solana network identifiers (strings).\n *\n * @param props - Component props for icon button configuration\n * @returns Forwardable button element with icons and accessibility support\n *\n * @example\n * ```tsx\n * // Simple wallet button\n * <IconButton\n * walletName=\"MetaMask\"\n * walletIcon=\"https://example.com/metamask-icon.png\"\n * />\n * ```\n *\n * @example\n * ```tsx\n * // Interactive chain selector\n * <IconButton\n * walletName=\"Phantom\"\n * walletChainId=\"mainnet-beta\"\n * items={3}\n * onClick={handleChainSelect}\n * aria-label=\"Select blockchain network\"\n * />\n * ```\n *\n * @example\n * ```tsx\n * // Loading state with disabled interaction\n * <IconButton\n * walletName=\"WalletConnect\"\n * loading={true}\n * disabled={true}\n * title=\"Connecting to wallet...\"\n * />\n * ```\n *\n * @public\n */\nexport const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(\n (\n {\n walletIcon,\n walletName,\n walletChainId,\n items = 0,\n onClick,\n className,\n disabled = false,\n loading = false,\n 'aria-label': ariaLabel,\n title,\n },\n ref,\n ) => {\n const labels = useNovaConnectLabels();\n\n /**\n * Determine if the button should be interactive\n * Button is clickable when onClick is provided, not disabled, not loading, and has multiple items\n */\n const isClickable = useMemo(\n () => Boolean(onClick && !disabled && !loading && items > 1),\n [onClick, disabled, loading, items],\n );\n\n /**\n * Generate chain ID for Web3Icon\n * Handles both EVM (numeric) and Solana (string) chain identifiers\n */\n const formattedChainId = useMemo(() => {\n if (!walletChainId) return undefined;\n\n // If it's a string, assume it's a Solana network identifier\n if (typeof walletChainId === 'string') {\n return `${OrbitAdapter.SOLANA}:${walletChainId}`;\n }\n\n // If it's a number, use it directly as EVM chain ID\n return walletChainId;\n }, [walletChainId]);\n\n /**\n * Generate accessible label for the button\n */\n const accessibleLabel = useMemo(() => {\n if (ariaLabel) return ariaLabel;\n\n const parts: string[] = [];\n\n if (walletName) parts.push(`${walletName} wallet`);\n if (walletChainId) parts.push('network selector');\n if (isClickable) parts.push('button');\n if (loading) parts.push('loading');\n if (disabled) parts.push('disabled');\n\n return parts.join(', ') || 'Wallet controls';\n }, [ariaLabel, walletName, walletChainId, isClickable, loading, disabled]);\n\n /**\n * Generate tooltip text\n */\n const tooltipText = useMemo(() => {\n if (title) return title;\n if (loading) return 'Loading...';\n if (disabled) return 'Button is disabled';\n if (isClickable) return `Click to select ${walletName ? walletName + ' ' : ''}options`;\n return walletName ? `${walletName} wallet` : 'Wallet information';\n }, [title, loading, disabled, isClickable, walletName]);\n\n /**\n * Memoized button classes for performance\n */\n const buttonClasses = useMemo(\n () =>\n cn(\n // Base styles\n 'novacon:flex novacon:items-center novacon:justify-center novacon:gap-1 novacon:rounded-full',\n 'novacon:bg-[var(--tuwa-bg-primary)] novacon:border novacon:border-[var(--tuwa-border-primary)]',\n 'novacon:p-1.5 novacon:transition-all novacon:duration-200',\n\n // Icon sizing\n 'novacon:[&_img]:w-6! novacon:[&_img]:h-6! novacon:[&_img]:transition-transform novacon:[&_img]:duration-200',\n\n // Interactive states\n {\n 'novacon:cursor-pointer novacon:hover:[&_img]:scale-95 novacon:active:[&_img]:scale-85 novacon:hover:shadow-sm':\n isClickable,\n 'novacon:cursor-not-allowed novacon:opacity-50': disabled && !loading,\n 'novacon:cursor-wait novacon:opacity-75': loading,\n 'novacon:cursor-default': !isClickable && !disabled && !loading,\n },\n\n // Focus states for accessibility\n 'novacon:focus-visible:outline-none novacon:focus-visible:ring-2 novacon:focus-visible:ring-[var(--tuwa-border-accent)] novacon:focus-visible:ring-offset-2',\n\n className,\n ),\n [isClickable, disabled, loading, className],\n );\n\n /**\n * Handle button click with safety checks\n */\n const handleClick = () => {\n if (isClickable && onClick) {\n onClick();\n }\n };\n\n return (\n <button\n ref={ref}\n type=\"button\"\n className={buttonClasses}\n onClick={handleClick}\n disabled={disabled || loading}\n aria-label={accessibleLabel}\n title={tooltipText}\n role=\"button\"\n tabIndex={disabled || loading ? -1 : 0}\n >\n {/* Wallet icon */}\n {walletName && (\n <WalletIcon\n name={walletName}\n icon={walletIcon}\n altText={`${walletName} ${labels.walletIcon}`}\n showLoading={loading}\n className=\"novacon:flex-shrink-0\"\n />\n )}\n\n {/* Chain/Network icon */}\n {formattedChainId && (\n <Web3Icon chainId={formattedChainId} className=\"novacon:flex-shrink-0\" title={`Network: ${walletChainId}`} />\n )}\n\n {/* Chevron arrow for dropdown indication */}\n {isClickable && <ChevronArrowWithAnim className=\"novacon:flex-shrink-0\" aria-hidden=\"true\" />}\n\n {/* Loading indicator overlay */}\n {loading && (\n <div\n className=\"novacon:absolute novacon:inset-0 novacon:bg-[var(--tuwa-bg-primary)]/50 novacon:rounded-full novacon:flex novacon:items-center novacon:justify-center\"\n aria-hidden=\"true\"\n >\n <div className=\"novacon:w-3 novacon:h-3 novacon:border-2 novacon:border-[var(--tuwa-text-accent)] novacon:border-t-transparent novacon:rounded-full novacon:animate-spin\" />\n </div>\n )}\n </button>\n );\n },\n);\n\nIconButton.displayName = 'IconButton';\n","import { ExclamationTriangleIcon, PuzzlePieceIcon } from '@heroicons/react/24/solid';\nimport { motion } from 'framer-motion';\nimport { Component, lazy, Suspense, useMemo } from 'react';\n\nimport { useNovaConnect } from '../../hooks/useNovaConnect';\nimport { useNovaConnectLabels } from '../../hooks/useNovaConnectLabels';\nimport { ConnectButtonProps } from '../ConnectButton';\n\n/**\n * Props for the ConnectedModalTxHistory component\n */\ninterface ConnectedModalTxHistoryProps extends Pick<ConnectButtonProps, 'transactionPool' | 'pulsarAdapter'> {\n /** Additional CSS classes for the container */\n className?: string;\n}\n\n/**\n * Lazy import of TransactionsHistory component with error handling\n * This allows the component to work even if the @tuwaio/nova-transactions package is not available\n */\nconst TransactionsHistory = lazy(() => {\n try {\n return import('@tuwaio/nova-transactions').then((module) => ({\n default: module.TransactionsHistory,\n }));\n } catch (error) {\n console.warn('Failed to load @tuwaio/nova-transactions package:', error);\n // Return a promise that never resolves to trigger error boundary\n return new Promise(() => {});\n }\n});\n\n/**\n * Loading component for transaction history\n */\nfunction TransactionHistoryLoading() {\n const labels = useNovaConnectLabels();\n\n return (\n <div\n className=\"novacon:flex novacon:flex-col novacon:items-center novacon:justify-center novacon:p-8 novacon:gap-4\"\n role=\"status\"\n >\n <div className=\"novacon:animate-spin novacon:rounded-full novacon:h-8 novacon:w-8 novacon:border-2 novacon:border-[var(--tuwa-text-accent)] novacon:border-t-transparent\" />\n <p className=\"novacon:text-sm novacon:text-[var(--tuwa-text-secondary)]\">\n {labels.loading} {labels.transactionsInApp.toLowerCase()}...\n </p>\n </div>\n );\n}\n\n/**\n * Error fallback component when TransactionsHistory fails to load\n */\nfunction TransactionHistoryError() {\n return (\n <motion.div\n initial={{ opacity: 0, y: 20 }}\n animate={{ opacity: 1, y: 0 }}\n transition={{ duration: 0.3, ease: 'easeOut' }}\n className=\"novacon:flex novacon:flex-col novacon:items-center novacon:justify-center novacon:text-center novacon:gap-4 novacon:p-6\"\n role=\"alert\"\n >\n <div className=\"novacon:w-12 novacon:h-12 novacon:p-2 novacon:rounded-full novacon:bg-[var(--tuwa-warning-bg)] novacon:text-[var(--tuwa-warning-text)]\">\n <ExclamationTriangleIcon className=\"novacon:w-full novacon:h-full\" />\n </div>\n\n <div className=\"novacon:space-y-2\">\n <h2 className=\"novacon:text-lg novacon:font-semibold novacon:text-[var(--tuwa-text-primary)]\">\n Transaction History Not Available\n </h2>\n <p className=\"novacon:text-sm novacon:text-[var(--tuwa-text-secondary)] novacon:max-w-md\">\n Transaction history is not supported by this application at the moment. The required package is not installed\n or configured.\n </p>\n </div>\n </motion.div>\n );\n}\n\n/**\n * Pulsar adapter required fallback component\n */\nfunction PulsarAdapterRequired() {\n const labels = useNovaConnectLabels();\n\n return (\n <motion.div\n initial={{ opacity: 0, scale: 0.95 }}\n animate={{ opacity: 1, scale: 1 }}\n transition={{ duration: 0.2, ease: 'easeOut' }}\n className=\"novacon:flex novacon:flex-col novacon:items-center novacon:justify-center novacon:text-center novacon:gap-4 novacon:p-6\"\n role=\"alert\"\n >\n <div className=\"novacon:w-12 novacon:h-12 novacon:p-2 novacon:rounded-full novacon:bg-gradient-to-r novacon:from-[var(--tuwa-button-gradient-from)] novacon:to-[var(--tuwa-button-gradient-to)] novacon:text-[var(--tuwa-text-on-accent)]\">\n <PuzzlePieceIcon className=\"novacon:w-full novacon:h-full\" />\n </div>\n\n <div className=\"novacon:space-y-2\">\n <h2 className=\"novacon:text-lg novacon:font-semibold novacon:text-[var(--tuwa-text-primary)]\">\n {labels.pulsarAdapterRequired}\n </h2>\n <p className=\"novacon:text-sm novacon:text-[var(--tuwa-text-secondary)] novacon:max-w-md novacon:leading-relaxed\">\n {labels.pulsarAdapterDescription}\n </p>\n </div>\n </motion.div>\n );\n}\n\n/**\n * Component for displaying transaction history with conditional loading\n *\n * This component provides comprehensive transaction history functionality:\n * - Conditional loading of the @tuwaio/nova-transactions package\n * - Graceful fallback when the package is not available\n * - Loading states with proper accessibility support\n * - Error handling for missing configuration\n * - Full WCAG compliance with ARIA labels\n *\n * The component automatically detects if the required dependencies are available\n * and provides appropriate fallbacks for different scenarios.\n *\n * @param props - Component props including transaction pool and adapter configuration\n * @returns JSX element displaying transaction history or appropriate fallback\n *\n * @example\n * ```tsx\n * <ConnectedModalTxHistory\n * transactionPool={txPool}\n * pulsarAdapter={adapter}\n * className=\"custom-styling\"\n * />\n * ```\n *\n * @public\n */\nexport function ConnectedModalTxHistory({ transactionPool, pulsarAdapter, className }: ConnectedModalTxHistoryProps) {\n const labels = useNovaConnectLabels();\n const { activeWallet } = useNovaConnect();\n\n /**\n * Memoized container classes for better performance\n */\n const containerClasses = useMemo(\n () =>\n `novacon:flex novacon:flex-col novacon:items-center novacon:justify-center novacon:p-4 ${className || ''}`.trim(),\n [className],\n );\n\n /**\n * Memoized check for adapter availability\n */\n const hasValidAdapter = useMemo(() => Boolean(transactionPool && pulsarAdapter), [transactionPool, pulsarAdapter]);\n\n // Early return if no active wallet\n if (!activeWallet) {\n return (\n <div className={containerClasses}>\n <p className=\"novacon:text-sm novacon:text-[var(--tuwa-text-secondary)]\">No wallet connected</p>\n </div>\n );\n }\n\n return (\n <div className={containerClasses}>\n {hasValidAdapter ? (\n <Suspense fallback={<TransactionHistoryLoading />}>\n <ErrorBoundary fallback={<TransactionHistoryError />}>\n <TransactionsHistory\n transactionsPool={transactionPool!}\n adapter={pulsarAdapter!}\n connectedWalletAddress={activeWallet.address}\n className=\"novacon:w-full\"\n aria-label={`${labels.transactionsInApp} for ${activeWallet.address}`}\n />\n </ErrorBoundary>\n </Suspense>\n ) : (\n <PulsarAdapterRequired />\n )}\n </div>\n );\n}\n\n/**\n * Simple Error Boundary component for handling TransactionsHistory loading errors\n */\ninterface ErrorBoundaryState {\n hasError: boolean;\n}\n\ninterface ErrorBoundaryProps {\n children: React.ReactNode;\n fallback: React.ReactNode;\n}\n\nclass ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {\n constructor(props: ErrorBoundaryProps) {\n super(props);\n this.state = { hasError: false };\n }\n\n static getDerivedStateFromError(): ErrorBoundaryState {\n return { hasError: true };\n }\n\n componentDidCatch(error: Error, errorInfo: React.ErrorInfo) {\n console.warn('TransactionsHistory component failed to load:', error, errorInfo);\n }\n\n render() {\n if (this.state.hasError) {\n return this.props.fallback;\n }\n\n return this.props.children;\n }\n}\n","import { cn } from '@tuwaio/nova-core';\nimport { motion } from 'framer-motion';\nimport React, { memo, useMemo } from 'react';\n\nimport { isTouchDevice } from '../../utils';\n\ninterface RecentBadgeProps {\n className?: string;\n children?: React.ReactNode;\n animated?: boolean;\n}\n\n/**\n * Badge component with animated gradient border effect\n */\nexport const RecentBadge = memo<RecentBadgeProps>(({ className, children = 'Recent', animated = true }) => {\n const isTouch = useMemo(() => isTouchDevice(), []);\n\n // Memoize gradient to prevent recreating\n const gradientBackground = useMemo(\n () => `linear-gradient(90deg, \n rgba(255, 255, 255, 0) 0%, \n var(--tuwa-text-secondary) 20%, \n rgba(255, 255, 255, 0) 40%\n )`,\n [],\n );\n\n const sizeClasses = isTouch\n ? 'novacon:px-1.5 novacon:py-0 novacon:text-[10px]'\n : 'novacon:px-2.5 novacon:py-0.5 novacon:text-xs';\n\n return (\n <span\n className={cn(\n 'novacon:inline-flex novacon:items-center novacon:rounded-full novacon:font-medium novacon:relative novacon:overflow-hidden',\n 'novacon:text-[var(--tuwa-text-secondary)] novacon:border novacon:border-[var(--tuwa-border-primary)]',\n sizeClasses,\n className,\n )}\n role=\"status\"\n aria-label={typeof children === 'string' ? children : 'Recent'}\n >\n {/* Animated gradient border */}\n <motion.span\n className=\"novacon:absolute novacon:inset-0 novacon:z-0 novacon:pointer-events-none novacon:rounded-full\"\n style={{ background: gradientBackground, backgroundSize: '200% 100%' }}\n initial={{ backgroundPositionX: '100%' }}\n animate={animated ? { backgroundPositionX: '-100%' } : {}}\n transition={{\n duration: 4,\n ease: 'linear',\n repeat: animated ? Infinity : 0,\n }}\n />\n\n {/* Background overlay */}\n <span className=\"novacon:absolute novacon:z-10 novacon:pointer-events-none novacon:rounded-full novacon:bg-[var(--tuwa-bg-primary)] novacon:inset-[1px]\" />\n\n {/* Content */}\n <span className=\"novacon:relative novacon:z-20 novacon:whitespace-nowrap\">{children}</span>\n </span>\n );\n});\n\nRecentBadge.displayName = 'RecentBadge';\n","import { DocumentDuplicateIcon } from '@heroicons/react/24/solid';\nimport { cn, useCopyToClipboard } from '@tuwaio/nova-core';\nimport * as React from 'react';\n\nimport { useNovaConnectLabels } from '../hooks/useNovaConnectLabels';\n\ninterface ToastErrorProps {\n /** Error title to display */\n title: string;\n /** Raw error message to display and copy */\n rawError: string;\n /** Custom CSS classes for the container */\n className?: string;\n /** Custom ARIA label for the error container */\n 'aria-label'?: string;\n /** Callback fired when copy operation completes */\n onCopyComplete?: (success: boolean) => void;\n}\n\n// Counter for unique IDs (outside component to avoid re-initialization)\nlet idCounter = 0;\n\nexport function ToastError({ title, rawError, className, 'aria-label': ariaLabel, onCopyComplete }: ToastErrorProps) {\n const labels = useNovaConnectLabels();\n const { isCopied, copy } = useCopyToClipboard();\n\n // Generate unique IDs only once per component instance\n const [uniqueId] = React.useState(() => {\n idCounter += 1;\n return `${idCounter}-${Date.now()}`;\n });\n\n const titleId = `error-title-${uniqueId}`;\n const descriptionId = `error-description-${uniqueId}`;\n\n // Memoize error text for copying\n const errorToCopy = React.useMemo(() => rawError, [rawError]);\n\n // Handle copy with error handling and callback\n const handleCopy = React.useCallback(\n async (e: React.MouseEvent) => {\n e.stopPropagation();\n e.preventDefault();\n\n try {\n await copy(errorToCopy);\n onCopyComplete?.(true);\n } catch (error) {\n console.error('Failed to copy error:', error);\n onCopyComplete?.(false);\n }\n },\n [copy, errorToCopy, onCopyComplete],\n );\n\n // Handle keyboard interaction for copy button\n const handleKeyDown = React.useCallback(\n (e: React.KeyboardEvent) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n // eslint-disable-next-line\n handleCopy(e as any);\n }\n },\n [handleCopy],\n );\n\n // Memoize container classes\n const containerClasses = React.useMemo(\n () =>\n cn(\n 'novacon:bg-[var(--tuwa-bg-primary)] novacon:p-4 novacon:rounded-md novacon:w-full',\n 'novacon:border novacon:border-[var(--tuwa-border-primary)]',\n className,\n ),\n [className],\n );\n\n // Memoize button classes\n const buttonClasses = React.useMemo(\n () =>\n cn(\n 'novacon:cursor-pointer novacon:mt-2 novacon:text-xs novacon:font-medium novacon:inline-flex novacon:items-center novacon:space-x-1.5',\n 'novacon:focus:outline-none novacon:focus:ring-2 novacon:focus:ring-[var(--tuwa-error-text)] novacon:focus:ring-opacity-50',\n 'novacon:rounded-md novacon:px-2 novacon:py-1 novacon:transition-all novacon:duration-200',\n 'novacon:hover:bg-[var(--tuwa-error-text)] novacon:hover:bg-opacity-10',\n 'novacon:active:bg-[var(--tuwa-error-text)] novacon:active:bg-opacity-20',\n 'novacon:text-[var(--tuwa-error-text)] novacon:hover:text-[var(--tuwa-error-text)]',\n isCopied &&\n 'novacon:bg-[var(--tuwa-success-text)] novacon:bg-opacity-10 novacon:text-[var(--tuwa-success-text)]',\n ),\n [isCopied],\n );\n\n return (\n <div\n className={containerClasses}\n role=\"alert\"\n aria-live=\"assertive\"\n aria-labelledby={titleId}\n aria-describedby={descriptionId}\n aria-label={ariaLabel}\n >\n {/* Error Title */}\n <p\n id={titleId}\n className=\"novacon:text-sm novacon:font-semibold novacon:truncate novacon:text-[var(--tuwa-error-text)]\"\n role=\"heading\"\n aria-level={3}\n title={title} // Show full title on hover if truncated\n >\n {title}\n </p>\n\n {/* Error Description */}\n <p\n id={descriptionId}\n className=\"novacon:mt-1 novacon:text-xs novacon:break-words novacon:text-[var(--tuwa-error-text)] novacon:opacity-80\"\n role=\"text\"\n >\n {rawError}\n </p>\n\n {/* Copy Button */}\n <button\n onClick={handleCopy}\n onKeyDown={handleKeyDown}\n className={buttonClasses}\n type=\"button\"\n aria-label={isCopied ? `${labels.copied} ${labels.copyRawError}` : labels.copyRawError}\n aria-describedby={`${titleId} ${descriptionId}`}\n disabled={!errorToCopy.trim()}\n >\n <DocumentDuplicateIcon\n className={cn(\n 'novacon:w-4 novacon:h-4 novacon:transition-colors',\n isCopied && 'novacon:text-[var(--tuwa-success-text)]',\n )}\n aria-hidden=\"true\"\n />\n <span className=\"novacon:select-none novacon:transition-colors\" aria-live=\"polite\" role=\"status\">\n {isCopied ? labels.copied : labels.copyRawError}\n </span>\n </button>\n </div>\n );\n}\n","import { ToastCloseButton } from '@tuwaio/nova-core';\nimport { useCallback, useEffect, useMemo, useRef } from 'react';\nimport { Bounce, toast, ToastContainer, type ToastPosition } from 'react-toastify';\n\nimport { ToastError } from '../components';\nimport { NovaConnectProviderProps, useNovaConnect } from '../hooks/useNovaConnect';\nimport { useNovaConnectLabels } from '../hooks/useNovaConnectLabels';\n\ninterface ErrorsProviderProps extends Pick<NovaConnectProviderProps, 'store'> {\n /** Custom container ID for toast notifications */\n containerId?: string;\n /** Custom position for toast notifications */\n position?: ToastPosition;\n /** Auto close delay in milliseconds */\n autoClose?: number | false;\n /** Whether to enable drag to dismiss */\n draggable?: boolean;\n}\n\nexport function ErrorsProvider({\n store,\n containerId = 'nova-connect-errors',\n position = 'top-center',\n autoClose = 7000,\n draggable = false,\n}: ErrorsProviderProps) {\n const labels = useNovaConnectLabels();\n const { activeWallet, walletConnectionError } = useNovaConnect();\n\n const switchNetworkError = store.getState().switchNetworkError;\n\n // Track displayed errors to prevent duplicates\n const displayedErrorsRef = useRef<Set<string>>(new Set());\n const currentToastIdRef = useRef<string | null>(null);\n\n // Memoize error state\n const errorState = useMemo(() => {\n const hasWalletError = Boolean(walletConnectionError);\n const hasSwitchError = Boolean(switchNetworkError);\n const isConnected = Boolean(activeWallet?.isConnected);\n\n return {\n hasWalletError,\n hasSwitchError,\n isConnected,\n hasAnyError: hasWalletError || hasSwitchError,\n primaryError: walletConnectionError || switchNetworkError,\n errorType: hasWalletError ? 'wallet' : hasSwitchError ? 'switch' : null,\n };\n }, [walletConnectionError, switchNetworkError, activeWallet?.isConnected]);\n\n // Memoize error title based on type\n const errorTitle = useMemo(() => {\n switch (errorState.errorType) {\n case 'wallet':\n return labels.walletConnectionError;\n case 'switch':\n return labels.errorWhenChainSwitching;\n default:\n return labels.somethingWentWrong;\n }\n }, [errorState.errorType, labels]);\n\n // Generate error hash for deduplication\n const errorHash = useMemo(() => {\n if (!errorState.primaryError) return null;\n return `${errorState.errorType}-${errorState.primaryError.substring(0, 50)}`;\n }, [errorState.primaryError, errorState.errorType]);\n\n // Dismiss current toast\n const dismissCurrentToast = useCallback(() => {\n if (currentToastIdRef.current) {\n toast.dismiss(currentToastIdRef.current);\n currentToastIdRef.current = null;\n }\n toast.dismiss({ containerId });\n }, [containerId]);\n\n // Show error toast\n const showErrorToast = useCallback(\n (title: string, rawError: string, errorKey: string) => {\n // Dismiss previous toast first\n dismissCurrentToast();\n\n // Check if this error was already displayed\n if (displayedErrorsRef.current.has(errorKey)) {\n return;\n }\n\n try {\n // Use toast.error and capture the result properly\n toast.error(\n <ToastError\n title={title}\n rawError={rawError}\n onCopyComplete={(success) => {\n if (success && process.env.NODE_ENV === 'development') {\n console.log('Error copied to clipboard:', rawError.substring(0, 100));\n }\n }}\n />,\n {\n containerId,\n toastId: errorKey,\n onClose: () => {\n displayedErrorsRef.current.delete(errorKey);\n currentToastIdRef.current = null;\n },\n },\n );\n\n displayedErrorsRef.current.add(errorKey);\n currentToastIdRef.current = errorKey;\n } catch (error) {\n console.error('Failed to show error toast:', error);\n }\n },\n [containerId, dismissCurrentToast],\n );\n\n // Main effect to handle error display logic\n useEffect(() => {\n const { hasAnyError, isConnected, primaryError } = errorState;\n\n // Clear all errors when connected successfully\n if (isConnected && !hasAnyError) {\n dismissCurrentToast();\n displayedErrorsRef.current.clear();\n return;\n }\n\n // Show error if present and not already displayed\n if (hasAnyError && primaryError && errorHash) {\n // For connected state, only show switch network errors\n if (isConnected && errorState.errorType !== 'switch') {\n return;\n }\n\n showErrorToast(errorTitle, primaryError, errorHash);\n }\n }, [errorState, errorTitle, errorHash, showErrorToast, dismissCurrentToast]);\n\n // Clean up on unmount\n useEffect(() => {\n return () => {\n dismissCurrentToast();\n // eslint-disable-next-line\n displayedErrorsRef.current.clear();\n };\n }, [dismissCurrentToast]);\n\n // Memoize container props with proper types\n const containerProps = useMemo(\n () => ({\n containerId,\n position,\n closeOnClick: false,\n icon: false as const,\n closeButton: ToastCloseButton,\n autoClose,\n hideProgressBar: false,\n newestOnTop: false,\n pauseOnFocusLoss: false,\n draggable,\n pauseOnHover: true,\n theme: 'light' as const,\n transition: Bounce,\n className: 'novacon:p-0 novacon:bg-transparent',\n }),\n [containerId, position, autoClose, draggable],\n );\n\n return (\n <ToastContainer {...containerProps} role=\"alert\" aria-live=\"assertive\" aria-label={labels.somethingWentWrong} />\n );\n}\n\n// Add display name for better debugging\nErrorsProvider.displayName = 'ErrorsProvider';\n","/**\n * @file This file sets up the React Context for providing i18n labels throughout the UI components.\n * It allows for deep customization of all text displayed by the library.\n */\n\nimport { ReactNode, useMemo } from 'react';\n\nimport { NovaConnectLabelsContext } from '../hooks/useNovaConnectLabels';\nimport { NovaConnectLabels } from '../i18n/types';\n\ninterface NovaConnectLabelsProviderProps {\n /** An object containing the custom labels */\n labels: NovaConnectLabels;\n /** The child components to render */\n children: ReactNode;\n}\n\n/**\n * A React component that provides a custom set of labels to all child components.\n * Wrap your application or component tree with this provider to apply custom translations.\n *\n * The provider uses React.memo optimization and validates labels in development mode.\n *\n * @example\n * ```typescript\n * import { NovaConnectLabelsProvider } from './NovaConnectLabelsProvider';\n * import { defaultLabels } from './i18n/en';\n *\n * function App() {\n * const customLabels = {\n * ...defaultLabels,\n * connectWallet: 'Подключить кошелек',\n * disconnect: 'Отключиться',\n * };\n *\n * return (\n * <NovaConnectLabelsProvider labels={customLabels}>\n * <YourApp />\n * </NovaConnectLabelsProvider>\n * );\n * }\n * ```\n */\nexport function NovaConnectLabelsProvider({ labels, children }: NovaConnectLabelsProviderProps) {\n // Memoize labels to prevent unnecessary re-renders\n const memoizedLabels = useMemo(() => labels, [labels]);\n\n // Development-only validation\n if (process.env.NODE_ENV === 'development') {\n // Validate that labels object is provided\n if (!labels || typeof labels !== 'object') {\n console.warn('NovaConnectLabelsProvider: labels prop should be an object');\n }\n\n // Check for missing required labels (basic validation)\n const requiredLabels = ['connectWallet', 'disconnect', 'connecting', 'connected', 'error', 'success'] as const;\n\n const missingLabels = requiredLabels.filter((key) => !(key in labels));\n if (missingLabels.length > 0) {\n console.warn(`NovaConnectLabelsProvider: Missing required labels: ${missingLabels.join(', ')}`);\n }\n }\n\n return <NovaConnectLabelsContext.Provider value={memoizedLabels}>{children}</NovaConnectLabelsContext.Provider>;\n}\n\n// Add display name for better debugging\nNovaConnectLabelsProvider.displayName = 'NovaConnectLabelsProvider';\n","import { deepMerge } from '@tuwaio/nova-core';\nimport { OrbitAdapter } from '@tuwaio/orbit-core';\nimport { BaseWallet } from '@tuwaio/satellite-core';\nimport { useEffect, useMemo, useState } from 'react';\n\nimport {\n ButtonTxStatus,\n ConnectContentType,\n ConnectedContentType,\n NovaConnectProviderContext,\n NovaConnectProviderProps,\n NovaConnectProviderType,\n} from '../hooks/useNovaConnect';\nimport { defaultLabels } from '../i18n/en';\nimport { ErrorsProvider } from './ErrorsProvider';\nimport { NovaConnectLabelsProvider } from './NovaConnectLabelsProvider';\n\nexport function NovaConnectProvider({ labels, store, children }: NovaConnectProviderProps) {\n const mergedLabels = useMemo(() => deepMerge(defaultLabels, labels || {}), [labels]);\n\n const [activeWallet, setActiveWallet] = useState<BaseWallet | undefined>(store.getState().activeWallet);\n const [walletConnectionError, setWalletConnectionError] = useState<string | undefined>(\n store.getState().walletConnectionError,\n );\n const [isConnectModalOpen, setIsConnectModalOpen] = useState(false);\n const [isConnectedModalOpen, setIsConnectedModalOpen] = useState(false);\n const [isChainsListOpen, setIsChainsListOpen] = useState(false);\n const [isChainsListOpenMobile, setIsChainsListOpenMobile] = useState(false);\n const [connectedButtonStatus, setConnectedButtonStatus] = useState<ButtonTxStatus>('idle');\n const [connectModalContentType, setConnectModalContentType] = useState<ConnectContentType>('connectors');\n const [selectedAdapter, setSelectedAdapter] = useState<OrbitAdapter | undefined>(undefined);\n const [activeConnector, setActiveConnector] = useState<string | undefined>(undefined);\n const [impersonatedAddress, setImpersonatedAddress] = useState('');\n const [isConnected, setIsConnected] = useState(false);\n const [connectedModalContentType, setConnectedModalContentType] = useState<ConnectedContentType>('main');\n\n useEffect(() => {\n const unsubscribe = store.subscribe((state) => {\n setActiveWallet(state.activeWallet);\n setWalletConnectionError(state.walletConnectionError);\n });\n return unsubscribe;\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const contextValue: NovaConnectProviderType = {\n walletConnectionError,\n activeWallet,\n isConnectModalOpen,\n setIsConnectModalOpen,\n isConnectedModalOpen,\n setIsConnectedModalOpen,\n isChainsListOpen,\n setIsChainsListOpen,\n isChainsListOpenMobile,\n setIsChainsListOpenMobile,\n connectedButtonStatus,\n setConnectedButtonStatus,\n connectedModalContentType,\n setConnectedModalContentType,\n connectModalContentType,\n setConnectModalContentType,\n selectedAdapter,\n setSelectedAdapter,\n activeConnector,\n setActiveConnector,\n impersonatedAddress,\n setImpersonatedAddress,\n isConnected,\n setIsConnected,\n };\n\n return (\n <NovaConnectProviderContext.Provider value={contextValue}>\n <ErrorsProvider store={store} />\n <NovaConnectLabelsProvider labels={mergedLabels}>{children}</NovaConnectLabelsProvider>\n </NovaConnectProviderContext.Provider>\n );\n}\n"]}
1
+ {"version":3,"sources":["../../src/i18n/en.ts","../../src/hooks/useNovaConnectLabels.ts","../../src/components/Chains/ChainListRenderer.tsx","../../src/hooks/useNovaConnect.ts","../../src/utils/getConnectedChainId.ts","../../src/utils/networksLinks.ts","../../src/components/ToBottomButton.tsx","../../src/components/ToTopButton.tsx","../../src/components/SelectContentAnimated.tsx","../../src/components/WalletAvatar.tsx","../../src/components/WalletIcon.tsx","../../src/components/ConnectedModal/IconButton.tsx","../../src/components/ConnectedModal/ConnectedModalTxHistory.tsx","../../src/components/ConnectModal/RecentBadge.tsx","../../src/components/ToastError.tsx","../../src/providers/ErrorsProvider.tsx","../../src/providers/NovaConnectLabelsProvider.tsx","../../src/providers/NovaConnectProvider.tsx"],"names":["defaultLabels","NovaConnectLabelsContext","createContext","useNovaConnectLabels","useContext","SelectItemBase","forwardRef","children","className","props","forwardedRef","labels","isActive","jsxs","Go","cn","Fragment","jsx","NovaConnectProviderError","message","NovaConnectProviderContext","useNovaConnect","context","OrbitAdapter","ToBottomButton","ariaLabel","onClick","disabled","ref","event","ChevronDownIcon","ToTopButton","ChevronUpIcon","SelectContentAnimated","position","reduceMotion","animationConfig","useMemo","layoutTransition","contentClasses","selectContentClasses","AnimatePresence","motion","isHex","value","strict","zeroAddress","sizeClasses","WalletAvatar","address","ensAvatar","altText","size","showLoading","onImageLoad","onImageError","disableAnimation","imageSrc","setImageSrc","useState","isLoading","setIsLoading","hasError","setHasError","imgRef","useRef","blockie","makeBlockie","error","bgColor","colorHex","formattedAddress","imageAltText","currentEnsAvatar","handleImageLoad","useCallback","handleImageError","containerClasses","loadingClasses","currentImageSrc","WalletIcon","icon","name","lazy","walletName","formatWalletName","cleanIconUrl","trimmedIcon","imageClasses","imageStyle","Web3Icon","IconButton","walletIcon","walletChainId","items","loading","title","isClickable","formattedChainId","accessibleLabel","parts","tooltipText","buttonClasses","ChevronArrowWithAnim","module","RecentBadge","memo","animated","isTouch","isTouchDevice","gradientBackground","idCounter","ToastError","rawError","onCopyComplete","isCopied","copy","useCopyToClipboard","uniqueId","titleId","descriptionId","errorToCopy","handleCopy","e","handleKeyDown","DocumentDuplicateIcon","ErrorsProvider","store","containerId","autoClose","draggable","activeWallet","walletConnectionError","switchNetworkError","displayedErrorsRef","currentToastIdRef","errorState","hasWalletError","hasSwitchError","isConnected","errorTitle","errorHash","dismissCurrentToast","toast","showErrorToast","errorKey","success","useEffect","hasAnyError","primaryError","containerProps","ToastCloseButton","Bounce","ToastContainer","NovaConnectLabelsProvider","memoizedLabels","missingLabels","key","NovaConnectProvider","mergedLabels","deepMerge","setActiveWallet","setWalletConnectionError","isConnectModalOpen","setIsConnectModalOpen","isConnectedModalOpen","setIsConnectedModalOpen","isChainsListOpen","setIsChainsListOpen","isChainsListOpenMobile","setIsChainsListOpenMobile","connectedButtonStatus","setConnectedButtonStatus","connectModalContentType","setConnectModalContentType","selectedAdapter","setSelectedAdapter","activeConnector","setActiveConnector","impersonatedAddress","setImpersonatedAddress","setIsConnected","connectedModalContentType","setConnectedModalContentType","state","contextValue"],"mappings":"i0BAMO,IAAMA,EAAmC,CAE9C,aAAA,CAAe,iBACf,UAAA,CAAY,YAAA,CACZ,UAAA,CAAY,eAAA,CACZ,UAAW,WAAA,CACX,QAAA,CAAU,YACV,IAAA,CAAM,MAAA,CACN,QAAS,SAAA,CACT,KAAA,CAAO,OAAA,CACP,GAAA,CAAK,MAGL,eAAA,CAAiB,kBAAA,CACjB,sBAAuB,yBAAA,CACvB,YAAA,CAAc,gBACd,qBAAA,CAAuB,yBAAA,CACvB,wBAAyB,4BAAA,CACzB,mBAAA,CAAqB,2EAGrB,OAAA,CAAS,SAAA,CACT,MAAO,OAAA,CACP,QAAA,CAAU,WACV,MAAA,CAAQ,QAAA,CACR,kBAAA,CAAoB,qBAAA,CACpB,mBAAoB,wBAAA,CACpB,gBAAA,CAAkB,qBAClB,mBAAA,CAAqB,sBAAA,CAGrB,aAAc,eAAA,CACd,SAAA,CAAW,cAAA,CACX,yBAAA,CAA2B,8BAC3B,iBAAA,CAAmB,qBAAA,CACnB,cAAe,gBAAA,CACf,cAAA,CAAgB,kBAChB,kBAAA,CAAoB,eAAA,CAGpB,SAAA,CAAW,WAAA,CACX,QAAS,SAAA,CACT,WAAA,CAAa,cACb,YAAA,CAAc,gBAAA,CAGd,aAAc,mBAAA,CACd,iBAAA,CACE,2NACF,aAAA,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CAAI1H,SAAS,KAAK,CAAA,CAC9C,CAAC2H,CAAAA,CAA2BC,CAA4B,CAAA,CAAI5H,QAAAA,CAA+B,MAAM,CAAA,CAEvGwF,UAAU,IACYpB,CAAAA,CAAM,SAAA,CAAWyD,EAAAA,EAAU,CAC7CvB,CAAAA,CAAgBuB,EAAAA,CAAM,YAAY,CAAA,CAClCtB,CAAAA,CAAyBsB,GAAM,qBAAqB,EACtD,CAAC,CAAA,CAGA,EAAE,CAAA,CAEL,IAAMC,EAAAA,CAAwC,CAC5C,qBAAA,CAAArD,CAAAA,CACA,YAAA,CAAAD,CAAAA,CACA,mBAAAgC,CAAAA,CACA,qBAAA,CAAAC,CAAAA,CACA,oBAAA,CAAAC,EACA,uBAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,oBAAAC,CAAAA,CACA,sBAAA,CAAAC,CAAAA,CACA,yBAAA,CAAAC,EACA,qBAAA,CAAAC,CAAAA,CACA,wBAAA,CAAAC,CAAAA,CACA,0BAAAU,CAAAA,CACA,4BAAA,CAAAC,CAAAA,CACA,uBAAA,CAAAV,EACA,0BAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,mBAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,kBAAA,CAAAC,EACA,mBAAA,CAAAC,CAAAA,CACA,sBAAA,CAAAC,CAAAA,CACA,YAAAzC,CAAAA,CACA,cAAA,CAAA0C,CACF,CAAA,CAEA,OACExK,IAAAA,CAACO,CAAAA,CAA2B,QAAA,CAA3B,CAAoC,MAAOqK,EAAAA,CAC1C,QAAA,CAAA,CAAAxK,GAAAA,CAAC6G,EAAAA,CAAA,CAAe,KAAA,CAAOC,CAAAA,CAAO,CAAA,CAC9B9G,GAAAA,CAACyI,GAAA,CAA0B,MAAA,CAAQK,EAAe,QAAA,CAAAxJ,CAAAA,CAAS,GAC7D,CAEJ","file":"index.js","sourcesContent":["import { NovaConnectLabels } from './types';\n\n/**\n * Default English translations for NovaConnect component\n * All text strings extracted from component files\n */\nexport const defaultLabels: NovaConnectLabels = {\n // Core actions - Primary user interactions\n connectWallet: 'Connect Wallet',\n disconnect: 'Disconnect',\n connecting: 'Connecting...',\n connected: 'Connected',\n tryAgain: 'Try again',\n back: 'Back',\n connect: 'Connect',\n close: 'Close',\n all: 'All',\n\n // Connection states - Status messages for wallet connection flow\n connectionError: 'Connection error',\n connectedSuccessfully: 'Connected successfully!',\n connectingTo: 'Connecting to',\n walletConnectionError: 'Wallet connection error',\n errorWhenChainSwitching: 'Error when chain switching',\n cannotConnectWallet: 'Cannot connect to the wallet. Please try again or use another connector.',\n\n // Transaction states - Status indicators for blockchain transactions\n success: 'Success',\n error: 'Error',\n replaced: 'Replaced',\n recent: 'Recent',\n transactionLoading: 'Transaction loading',\n transactionSuccess: 'Transaction successful',\n transactionError: 'Transaction failed',\n transactionReplaced: 'Transaction replaced',\n\n // Modal titles - Headers for different modal dialogs\n aboutWallets: 'About wallets',\n getWallet: 'Get a wallet',\n connectImpersonatedWallet: 'Connect impersonated wallet',\n transactionsInApp: 'Transactions in app',\n switchNetwork: 'Switch network',\n switchNetworks: 'Switch Networks',\n connectingEllipsis: 'Connecting...',\n\n // Wallet sections - Categories for wallet connector grouping\n installed: 'Installed',\n popular: 'Popular',\n impersonate: 'Impersonate',\n readOnlyMode: 'Read-only mode',\n\n // Information and descriptions - Educational content and explanations\n whatIsWallet: 'What is a wallet?',\n walletDescription:\n 'Wallets are essential for managing your crypto—they let you send, receive, and securely hold digital assets. Connecting your wallet grants you safe access and interaction with decentralized applications (dApps).',\n whatIsNetwork: 'What is a network?',\n networkDescription:\n 'A network (or blockchain) is a decentralized digital ledger that records transactions. Selecting a network lets you choose which blockchain you want to connect to.',\n learnMore: 'Learn more',\n listOfNetworks: 'List of networks',\n viewOnExplorer: 'View on explorer',\n viewTransactions: 'View transactions',\n\n // Impersonation form - Labels for wallet address impersonation feature\n enterWalletAddress: 'Enter wallet address to impersonate',\n walletAddressPlaceholder: '0x...',\n\n // Error messages - User-facing error notifications and descriptions\n noConnectorsFound: 'No Connectors Found',\n noConnectorsDescription: \"We couldn't find any wallets or connection methods for the selected network.\",\n somethingWentWrong: 'Something went wrong',\n networkPickingError: 'Something went wrong with wallet network selection. Please go back and try again.',\n pulsarAdapterRequired: 'Pulsar Adapter Required',\n pulsarAdapterDescription:\n 'Additional configuration is needed for viewing transactions in app. Please contact your admin.',\n selectAvailableNetwork: 'Select one of available network',\n\n // Get Wallet section - Onboarding content for new users without wallets\n startExploringWeb3: 'Start Exploring Web3',\n walletKeyToDigitalWorld:\n 'Your wallet is the key to the digital world and the technology that makes exploring web3 possible.',\n iDontHaveWallet: \"I don't have a wallet\",\n choseWallet: 'Choose a wallet',\n\n // About Wallets slides - Educational carousel content explaining wallet benefits\n keyToNewInternet: 'The Key to a New Internet',\n keyToNewInternetDescription:\n 'Your wallet is more than just storage. Think of it as your digital passport that lets you truly own, display, and exchange every digital asset you hold, from crypto tokens to unique NFTs.',\n logInWithoutHassle: 'Log In Without the Hassle',\n logInWithoutHassleDescription:\n 'Skip the endless sign-up forms! Your wallet is your unique access pass. Just connect it, and the website instantly recognizes you. It saves you time and protects your privacy.',\n\n // Copy functionality and UI feedback - Clipboard operations and user feedback\n copyRawError: 'Copy raw error',\n copied: 'Copied!',\n\n // Accessibility labels - Screen reader and ARIA labels for better accessibility\n chainSelector: 'Chain Selector',\n closeModal: 'Close modal',\n selectChain: 'Select chain',\n chainOption: 'Chain option',\n openChainSelector: 'Open chain selector',\n currentChain: 'Current chain',\n scrollToTop: 'Scroll to top',\n scrollToBottom: 'Scroll to bottom',\n chainListContainer: 'Chain list container',\n walletControls: 'Wallet controls',\n openWalletModal: 'Open wallet modal',\n walletConnected: 'Wallet connected',\n walletNotConnected: 'Wallet not connected',\n walletBalance: 'Wallet balance',\n walletAddress: 'Wallet address',\n transactionStatus: 'Transaction status',\n successIcon: 'Success icon',\n errorIcon: 'Error icon',\n replacedIcon: 'Replaced icon',\n statusIcon: 'Status icon',\n\n // Additional states - Supplementary status indicators\n loading: 'Loading',\n idle: 'Idle',\n\n // Wallet Avatar labels\n unknownWallet: 'Unknown wallet',\n walletAvatar: 'Wallet avatar',\n ensAvatar: 'ENS avatar',\n walletIcon: 'Wallet icon',\n\n // Impersonate errors\n impersonateAddressEmpty: 'Enter a wallet address to impersonate.',\n impersonateAddressNotCorrect: 'Entered wallet address is not correct. Please try again.',\n impersonateAddressConnected: 'First disconnect the wallet to impersonate another address.',\n};\n","import { createContext, useContext } from 'react';\n\nimport { defaultLabels } from '../i18n/en';\nimport { NovaConnectLabels } from '../i18n/types';\n\n/**\n * React Context for storing and providing the UI labels.\n * It is initialized with the default English labels, ensuring that components\n * work even without an explicit provider.\n */\nexport const NovaConnectLabelsContext = createContext<NovaConnectLabels>(defaultLabels);\n\n/**\n * A custom hook to easily access the i18n labels from any component\n * within the `NovaConnectLabelsProvider` tree.\n *\n * This hook provides type-safe access to all UI labels and automatically\n * falls back to default English labels if no provider is found.\n *\n * @returns {NovaConnectLabels} The complete object of UI labels for the current locale.\n *\n * @example\n * ```typescript\n * import { useNovaConnectLabels } from './hooks/useNovaConnectLabels';\n *\n * function MyComponent() {\n * const labels = useNovaConnectLabels();\n *\n * return (\n * <div>\n * <h1>{labels.connectWallet}</h1>\n * <button>{labels.connect}</button>\n * <p aria-label={labels.walletBalance}>{formattedBalance}</p>\n * </div>\n * );\n * }\n * ```\n *\n * @example\n * ```typescript\n * // Destructuring specific labels for better performance\n * function ConnectButton() {\n * const { connectWallet, connecting, connected } = useNovaConnectLabels();\n *\n * return (\n * <button>\n * {isConnecting ? connecting : isConnected ? connected : connectWallet}\n * </button>\n * );\n * }\n * ```\n */\nexport const useNovaConnectLabels = (): NovaConnectLabels => {\n return useContext(NovaConnectLabelsContext);\n};\n\n/**\n * Hook to get a specific label by key path with type safety\n *\n * @param key The label key to retrieve\n * @returns The specific label value\n *\n * @example\n * ```typescript\n * function MyComponent() {\n * const connectLabel = useNovaConnectLabel('connectWallet');\n * const errorLabel = useNovaConnectLabel('connectionError');\n *\n * return <button>{connectLabel}</button>;\n * }\n * ```\n */\nexport const useNovaConnectLabel = <K extends keyof NovaConnectLabels>(key: K): NovaConnectLabels[K] => {\n const labels = useNovaConnectLabels();\n return labels[key];\n};\n\n/**\n * Hook to get multiple specific labels for better performance\n *\n * @param keys Array of label keys to retrieve\n * @returns Object with only the requested labels\n *\n * @example\n * ```typescript\n * function ConnectModal() {\n * const { connectWallet, connecting, disconnect } = useNovaConnectLabelsSubset(['connectWallet', 'connecting', 'disconnect']);\n *\n * return (\n * <div>\n * <h2>{connectWallet}</h2>\n * <span>{connecting}</span>\n * <button>{disconnect}</button>\n * </div>\n * );\n * }\n * ```\n */\nexport const useNovaConnectLabelsSubset = <K extends keyof NovaConnectLabels>(\n keys: K[],\n): Pick<NovaConnectLabels, K> => {\n const allLabels = useNovaConnectLabels();\n\n const subset = {} as Pick<NovaConnectLabels, K>;\n for (const key of keys) {\n subset[key] = allLabels[key];\n }\n\n return subset;\n};\n\n/**\n * Type-safe helper to check if a label exists\n *\n * @param labels The labels object\n * @param key The key to check\n * @returns Whether the key exists and has a non-empty value\n */\nexport const hasLabel = (labels: NovaConnectLabels, key: keyof NovaConnectLabels): boolean => {\n return Boolean(labels[key]?.trim());\n};\n\n/**\n * Utility type for extracting label keys by category\n */\nexport type LabelCategory = {\n actions: Extract<\n keyof NovaConnectLabels,\n 'connectWallet' | 'disconnect' | 'connecting' | 'connected' | 'tryAgain' | 'back' | 'connect' | 'close'\n >;\n states: Extract<keyof NovaConnectLabels, 'success' | 'error' | 'replaced' | 'loading' | 'idle'>;\n accessibility: Extract<\n keyof NovaConnectLabels,\n 'chainSelector' | 'closeModal' | 'selectChain' | 'walletControls' | 'openWalletModal'\n >;\n transactions: Extract<\n keyof NovaConnectLabels,\n 'transactionLoading' | 'transactionSuccess' | 'transactionError' | 'transactionReplaced' | 'recent'\n >;\n};\n\n/**\n * Hook to get labels by category for better organization\n *\n * @param category The category of labels to retrieve\n * @returns Object with labels from the specified category\n */\nexport const useLabelsByCategory = <T extends keyof LabelCategory>(\n category: T,\n): Pick<NovaConnectLabels, LabelCategory[T]> => {\n const allLabels = useNovaConnectLabels();\n\n const categoryKeys: Record<keyof LabelCategory, (keyof NovaConnectLabels)[]> = {\n actions: ['connectWallet', 'disconnect', 'connecting', 'connected', 'tryAgain', 'back', 'connect', 'close'],\n states: ['success', 'error', 'replaced', 'loading', 'idle'],\n accessibility: ['chainSelector', 'closeModal', 'selectChain', 'walletControls', 'openWalletModal'],\n transactions: ['transactionLoading', 'transactionSuccess', 'transactionError', 'transactionReplaced', 'recent'],\n };\n\n const keys = categoryKeys[category] as LabelCategory[T][];\n const categoryLabels = {} as Pick<NovaConnectLabels, LabelCategory[T]>;\n\n for (const key of keys) {\n // eslint-disable-next-line\n (categoryLabels as any)[key] = allLabels[key as keyof NovaConnectLabels];\n }\n\n return categoryLabels;\n};\n\n/**\n * Utility function to check if labels are default ones (for external use)\n * This is a regular function, not a hook, so it can be used anywhere\n *\n * @param labels The labels to check\n * @returns Whether the labels are the default English labels\n *\n * @example\n * ```typescript\n * function SomeUtilityFunction(labels: NovaConnectLabels) {\n * if (isDefaultLabels(labels)) {\n * console.log('Using default English labels');\n * }\n * }\n * ```\n */\nexport const isDefaultLabels = (labels: NovaConnectLabels): boolean => {\n return labels === defaultLabels;\n};\n\n/**\n * Utility function to get a formatted label with fallback\n *\n * @param labels The labels object\n * @param key The label key\n * @param fallback Optional fallback text\n * @returns The label value or fallback\n *\n * @example\n * ```typescript\n * const buttonText = getLabelWithFallback(labels, 'connectWallet', 'Connect');\n * ```\n */\nexport const getLabelWithFallback = (\n labels: NovaConnectLabels,\n key: keyof NovaConnectLabels,\n fallback?: string,\n): string => {\n const value = labels[key];\n if (value && value.trim()) {\n return value;\n }\n return fallback || defaultLabels[key] || key.toString();\n};\n\n/**\n * Utility function to create a labels subset (for use outside of React components)\n *\n * @param labels The source labels object\n * @param keys Array of keys to extract\n * @returns Object with only the requested labels\n *\n * @example\n * ```typescript\n * const actionLabels = createLabelsSubset(labels, ['connect', 'disconnect', 'tryAgain']);\n * ```\n */\nexport const createLabelsSubset = <K extends keyof NovaConnectLabels>(\n labels: NovaConnectLabels,\n keys: K[],\n): Pick<NovaConnectLabels, K> => {\n const subset = {} as Pick<NovaConnectLabels, K>;\n for (const key of keys) {\n subset[key] = labels[key];\n }\n return subset;\n};\n","import { Web3Icon } from '@bgd-labs/react-web3-icons';\nimport { getChainName } from '@bgd-labs/react-web3-icons/dist/utils';\nimport * as Select from '@radix-ui/react-select';\nimport { cn } from '@tuwaio/nova-core';\nimport React, { type ComponentPropsWithoutRef, type ElementRef, forwardRef } from 'react';\n\nimport { useNovaConnectLabels } from '../../hooks/useNovaConnectLabels';\n\ninterface ChainData {\n formattedChainId: string | number;\n chain: string | number;\n}\n\ninterface ChainListRendererProps {\n chainsList: (string | number)[];\n selectValue: string;\n handleValueChange: (newChainId: string) => void;\n getChainData: (chain: string | number) => ChainData;\n onClose: () => void;\n isMobile?: boolean;\n}\n\nconst SelectItemBase = forwardRef<ElementRef<typeof Select.Item>, ComponentPropsWithoutRef<typeof Select.Item>>(\n ({ children, className, ...props }, forwardedRef) => {\n const labels = useNovaConnectLabels();\n const isActive = props.value === props['aria-label'];\n\n return (\n <Select.Item\n ref={forwardedRef}\n className={cn(\n 'novacon:flex novacon:items-center novacon:w-full novacon:text-left novacon:px-2 novacon:py-2 novacon:rounded-md novacon:transition-colors novacon:space-x-3 novacon:cursor-pointer novacon:outline-none',\n 'novacon:text-[var(--tuwa-text-primary)] novacon:hover:bg-[var(--tuwa-bg-muted)] novacon:focus:bg-[var(--tuwa-bg-muted)] novacon:focus:outline-none novacon:focus:ring-2 novacon:focus:ring-[var(--tuwa-border-primary)] novacon:focus:ring-offset-2',\n { 'novacon:bg-[var(--tuwa-bg-muted)]': isActive },\n className,\n )}\n role=\"option\"\n aria-selected={isActive}\n tabIndex={0}\n {...props}\n >\n {children}\n {isActive && (\n <>\n <span\n className=\"novacon:ml-auto novacon:text-xs novacon:font-semibold novacon:w-2 novacon:h-2 novacon:rounded-full novacon:bg-[var(--tuwa-success-text)]\"\n aria-label={labels.connected}\n role=\"status\"\n />\n <span className=\"novacon:sr-only\">{labels.connected}</span>\n </>\n )}\n </Select.Item>\n );\n },\n);\nSelectItemBase.displayName = 'SelectItemBase';\n\nexport const ChainListRenderer: React.FC<ChainListRendererProps> = ({\n chainsList,\n selectValue,\n handleValueChange,\n getChainData,\n onClose,\n isMobile = false,\n}) => {\n const labels = useNovaConnectLabels();\n\n return (\n <div role=\"listbox\" aria-label={labels.selectChain}>\n {chainsList.map((chain) => {\n const { formattedChainId } = getChainData(chain);\n const isActive = String(formattedChainId) === selectValue;\n const chainName = getChainName(formattedChainId);\n\n const itemClasses = cn(\n 'novacon:flex novacon:items-center novacon:w-full novacon:text-left novacon:px-2 novacon:py-2 novacon:rounded-md novacon:transition-colors novacon:space-x-3 novacon:cursor-pointer novacon:outline-none',\n 'novacon:text-[var(--tuwa-text-primary)] novacon:hover:bg-[var(--tuwa-bg-muted)] novacon:focus:bg-[var(--tuwa-bg-muted)] novacon:focus:outline-none novacon:focus:ring-2 novacon:focus:ring-[var(--tuwa-border-primary)] novacon:focus:ring-offset-2',\n { 'novacon:bg-[var(--tuwa-bg-muted)]': isActive },\n );\n\n const content = (\n <div className=\"novacon:flex novacon:items-center novacon:space-x-3 novacon:[&_img]:w-6 novacon:[&_img]:h-6\">\n <div aria-hidden=\"true\">\n <Web3Icon chainId={formattedChainId} />\n </div>\n <span className=\"novacon:text-sm novacon:font-medium\">{chainName}</span>\n </div>\n );\n\n const handleClick = () => {\n handleValueChange(String(formattedChainId));\n onClose();\n };\n\n const handleKeyDown = (event: React.KeyboardEvent) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n handleClick();\n }\n };\n\n if (isMobile) {\n return (\n <div\n key={chain}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n className={cn(itemClasses, 'novacon:justify-between')}\n role=\"option\"\n aria-selected={isActive}\n aria-label={`${labels.chainOption}: ${chainName}`}\n tabIndex={0}\n >\n {content}\n {isActive && (\n <div className=\"novacon:flex novacon:items-center novacon:space-x-2 novacon:text-xs novacon:font-semibold novacon:text-[var(--tuwa-text-tertiary)]\">\n <span aria-label={labels.connected}>{labels.connected}</span>\n <span\n className=\"novacon:ml-auto novacon:text-xs novacon:font-semibold novacon:w-2 novacon:h-2 novacon:rounded-full novacon:bg-[var(--tuwa-success-text)]\"\n aria-hidden=\"true\"\n role=\"status\"\n />\n </div>\n )}\n </div>\n );\n }\n\n return (\n <SelectItemBase\n value={String(formattedChainId)}\n aria-label={`${labels.chainOption}: ${chainName}`}\n key={chain}\n onSelect={handleClick}\n >\n {content}\n </SelectItemBase>\n );\n })}\n </div>\n );\n};\n","import { OrbitAdapter } from '@tuwaio/orbit-core';\nimport { ISatelliteConnectStore } from '@tuwaio/satellite-core';\nimport { BaseWallet } from '@tuwaio/satellite-core';\nimport { createContext, useContext } from 'react';\nimport { StoreApi } from 'zustand/index';\n\nimport { NovaConnectLabels } from '../i18n/types';\nimport { Connector, Wallet } from '../types';\n\nexport type ButtonTxStatus = 'idle' | 'loading' | 'succeed' | 'failed' | 'replaced';\nexport type ConnectContentType = 'network' | 'connectors' | 'about' | 'getWallet' | 'connecting' | 'impersonate';\nexport type ConnectedContentType = 'main' | 'transactions' | 'chains';\n\n// Provider props interface\nexport interface NovaConnectProviderProps {\n store: StoreApi<ISatelliteConnectStore<Connector, Wallet>>;\n children: React.ReactNode;\n labels?: Partial<NovaConnectLabels>;\n}\n\n// Balance type for better type safety\nexport interface WalletBalance {\n value: string;\n symbol: string;\n}\n\n// Provider context type with better organization\nexport interface NovaConnectProviderType {\n activeWallet: BaseWallet | undefined;\n walletConnectionError: string | undefined;\n // Modal states\n isConnectModalOpen: boolean;\n setIsConnectModalOpen: (value: boolean) => void;\n isConnectedModalOpen: boolean;\n setIsConnectedModalOpen: (value: boolean) => void;\n\n // Chain selection states\n isChainsListOpen: boolean;\n setIsChainsListOpen: (value: boolean) => void;\n isChainsListOpenMobile: boolean;\n setIsChainsListOpenMobile: (value: boolean) => void;\n\n // Connection states\n connectedButtonStatus: ButtonTxStatus;\n setConnectedButtonStatus: (value: ButtonTxStatus) => void;\n isConnected: boolean;\n setIsConnected: (value: boolean) => void;\n\n // Modal content types\n connectedModalContentType: ConnectedContentType;\n setConnectedModalContentType: (value: ConnectedContentType) => void;\n connectModalContentType: ConnectContentType;\n setConnectModalContentType: (value: ConnectContentType) => void;\n\n // Adapter and connector states\n selectedAdapter: OrbitAdapter | undefined;\n setSelectedAdapter: (value: OrbitAdapter | undefined) => void;\n activeConnector: string | undefined;\n setActiveConnector: (value: string | undefined) => void;\n\n // Impersonation\n impersonatedAddress: string;\n setImpersonatedAddress: (value: string) => void;\n}\n\n// Custom error for hook usage outside provider\nexport class NovaConnectProviderError extends Error {\n constructor(message = 'useNovaConnect must be used within NovaConnectProvider') {\n super(message);\n this.name = 'NovaConnectProviderError';\n }\n}\n\n// Create context with undefined default to enforce provider usage\nexport const NovaConnectProviderContext = createContext<NovaConnectProviderType | undefined>(undefined);\n\n/**\n * Hook to access NovaConnect context\n *\n * @throws {NovaConnectProviderError} When used outside of NovaConnectProvider\n * @returns {NovaConnectProviderType} The NovaConnect context value\n *\n * @example\n * ```typescript\n * function MyComponent() {\n * const { isConnected, handleConnectButtonClick } = useNovaConnect();\n *\n * return (\n * <button onClick={handleConnectButtonClick}>\n * {isConnected ? 'Connected' : 'Connect Wallet'}\n * </button>\n * );\n * }\n * ```\n */\nexport const useNovaConnect = (): NovaConnectProviderType => {\n const context = useContext(NovaConnectProviderContext);\n\n if (!context) {\n throw new NovaConnectProviderError();\n }\n\n return context;\n};\n\n/**\n * Hook to check if NovaConnect context is available\n *\n * @returns {boolean} True if context is available, false otherwise\n *\n * @example\n * ```typescript\n * function ConditionalComponent() {\n * const hasContext = useHasNovaConnectContext();\n *\n * if (!hasContext) {\n * return <div>NovaConnect provider not found</div>;\n * }\n *\n * return <ConnectedComponent />;\n * }\n * ```\n */\nexport const useHasNovaConnectContext = (): boolean => {\n const context = useContext(NovaConnectProviderContext);\n return context !== undefined;\n};\n\n/**\n * Optional hook that returns null if provider is not available\n *\n * @returns {NovaConnectProviderType | null} Context value or null if not available\n *\n * @example\n * ```typescript\n * function OptionalComponent() {\n * const context = useNovaConnectOptional();\n *\n * if (!context) {\n * return <div>No wallet provider available</div>;\n * }\n *\n * return <div>Connected: {context.isConnected}</div>;\n * }\n * ```\n */\nexport const useNovaConnectOptional = (): NovaConnectProviderType | null => {\n const context = useContext(NovaConnectProviderContext);\n return context ?? null;\n};\n","import { OrbitAdapter } from '@tuwaio/orbit-core';\n\nimport { InitialChains } from '../types';\n\n// Default fallback chain IDs\nconst DEFAULT_CHAIN_IDS = {\n [OrbitAdapter.EVM]: 1, // Ethereum Mainnet\n [OrbitAdapter.SOLANA]: 'mainnet',\n [OrbitAdapter.Starknet]: '0x534e5f4d41494e',\n} as const;\n\n/**\n * Basic interface for chain objects to handle the any type safely\n */\ninterface BasicChain {\n id: number | string;\n [key: string]: any;\n}\n\n/**\n * Gets the appropriate chain ID for connecting based on the selected adapter.\n * Returns the first available chain for the adapter, or a sensible default.\n *\n * @param params - Configuration object\n * @param params.selectedAdapter - The blockchain adapter to use\n * @param params.appChains - Available EVM chains\n * @param params.solanaRPCUrls - Available Solana networks\n * @returns Chain ID (number for EVM/Starknet, string for Solana)\n */\nexport function getConnectChainId({\n selectedAdapter,\n appChains,\n solanaRPCUrls,\n}: { selectedAdapter: OrbitAdapter } & InitialChains): number | string {\n switch (selectedAdapter) {\n case OrbitAdapter.EVM: {\n // Return first available EVM chain or default to Ethereum\n const firstChain = appChains?.[0];\n if (firstChain?.id && typeof firstChain.id === 'number') {\n return firstChain.id;\n }\n\n if (process.env.NODE_ENV === 'development' && !appChains?.length) {\n console.warn('getConnectChainId: No EVM chains configured, using Ethereum Mainnet');\n }\n\n return DEFAULT_CHAIN_IDS[OrbitAdapter.EVM];\n }\n\n case OrbitAdapter.SOLANA: {\n // Return first available Solana network or default to mainnet\n if (solanaRPCUrls && typeof solanaRPCUrls === 'object') {\n const networks = Object.keys(solanaRPCUrls);\n if (networks.length > 0) {\n return networks[0];\n }\n }\n\n if (process.env.NODE_ENV === 'development' && !solanaRPCUrls) {\n console.warn('getConnectChainId: No Solana RPC URLs configured, using mainnet');\n }\n\n return DEFAULT_CHAIN_IDS[OrbitAdapter.SOLANA];\n }\n\n case OrbitAdapter.Starknet: {\n if (process.env.NODE_ENV === 'development') {\n console.info('getConnectChainId: Using default Starknet chain ID');\n }\n\n return DEFAULT_CHAIN_IDS[OrbitAdapter.Starknet];\n }\n\n default: {\n // Handle unknown adapter types gracefully\n if (process.env.NODE_ENV === 'development') {\n console.error('getConnectChainId: Unknown adapter:', selectedAdapter);\n }\n\n return DEFAULT_CHAIN_IDS[OrbitAdapter.EVM];\n }\n }\n}\n\n/**\n * Helper to get all available chain IDs for an adapter\n */\nexport function getAvailableChainIds({\n selectedAdapter,\n appChains,\n solanaRPCUrls,\n}: { selectedAdapter: OrbitAdapter } & InitialChains): Array<number | string> {\n switch (selectedAdapter) {\n case OrbitAdapter.EVM:\n return appChains?.map((chain: BasicChain) => chain.id).filter(Boolean) ?? [DEFAULT_CHAIN_IDS[OrbitAdapter.EVM]];\n\n case OrbitAdapter.SOLANA:\n return solanaRPCUrls ? Object.keys(solanaRPCUrls) : [DEFAULT_CHAIN_IDS[OrbitAdapter.SOLANA]];\n\n case OrbitAdapter.Starknet:\n return [DEFAULT_CHAIN_IDS[OrbitAdapter.Starknet]];\n\n default:\n return [DEFAULT_CHAIN_IDS[OrbitAdapter.EVM]];\n }\n}\n","import { OrbitAdapter } from '@tuwaio/orbit-core';\n\nexport const networksLinks: Partial<\n Record<OrbitAdapter, { aboutNetwork: string; choseWallet: string; about: string }>\n> = {\n [OrbitAdapter.EVM]: {\n aboutNetwork: 'https://ethereum.org/developers/docs/intro-to-ethereum/',\n choseWallet: 'https://ethereum.org/wallets/find-wallet/',\n about: 'https://ethereum.org/wallets/',\n },\n [OrbitAdapter.SOLANA]: {\n aboutNetwork: 'https://solana.com/en/learn/what-is-solana',\n choseWallet: 'https://solana.com/en/solana-wallets',\n about: 'https://solana.com/en/learn/what-is-a-wallet',\n },\n};\n","import { ChevronDownIcon } from '@heroicons/react/24/solid';\nimport { cn } from '@tuwaio/nova-core';\nimport { forwardRef } from 'react';\n\nimport { useNovaConnectLabels } from '../hooks/useNovaConnectLabels';\n\ninterface ToBottomButtonProps {\n /** Custom CSS classes for the button */\n className?: string;\n /** Custom aria-label for the button */\n 'aria-label'?: string;\n /** Callback fired when button is clicked */\n onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n /** Whether the button is disabled */\n disabled?: boolean;\n}\n\nexport const ToBottomButton = forwardRef<HTMLButtonElement, ToBottomButtonProps>(\n ({ className, 'aria-label': ariaLabel, onClick, disabled = false, ...props }, ref) => {\n const labels = useNovaConnectLabels();\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n // Prevent default scroll behavior if custom handler provided\n if (onClick) {\n event.preventDefault();\n onClick(event);\n }\n };\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLButtonElement>) => {\n // Handle keyboard activation\n if ((event.key === 'Enter' || event.key === ' ') && onClick) {\n event.preventDefault();\n // eslint-disable-next-line\n onClick(event as any);\n }\n };\n\n return (\n <button\n ref={ref}\n type=\"button\"\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n disabled={disabled}\n className={cn(\n 'novacon:flex novacon:w-full novacon:h-6 novacon:items-center novacon:justify-center',\n 'novacon:bg-[var(--tuwa-bg-secondary)] novacon:text-[var(--tuwa-text-primary)]',\n 'novacon:transition-colors novacon:duration-200',\n 'novacon:hover:bg-[var(--tuwa-bg-tertiary)] novacon:hover:text-[var(--tuwa-text-secondary)]',\n 'novacon:focus:outline-none novacon:focus:ring-2 novacon:focus:ring-[var(--tuwa-text-accent)] novacon:focus:ring-inset',\n 'novacon:active:bg-[var(--tuwa-bg-quaternary)]',\n 'novacon:disabled:opacity-50 novacon:disabled:cursor-not-allowed novacon:disabled:hover:bg-[var(--tuwa-bg-secondary)]',\n onClick ? 'novacon:cursor-pointer' : 'novacon:cursor-default',\n className,\n )}\n aria-label={ariaLabel || labels.scrollToBottom}\n title={ariaLabel || labels.scrollToBottom}\n {...props}\n >\n <ChevronDownIcon\n className={cn(\n 'novacon:w-4 novacon:h-4 novacon:transition-transform novacon:duration-200',\n disabled && 'novacon:opacity-50',\n )}\n aria-hidden=\"true\"\n />\n </button>\n );\n },\n);\n\nToBottomButton.displayName = 'ToBottomButton';\n","import { ChevronUpIcon } from '@heroicons/react/24/solid';\nimport { cn } from '@tuwaio/nova-core';\nimport { forwardRef } from 'react';\n\nimport { useNovaConnectLabels } from '../hooks/useNovaConnectLabels';\n\ninterface ToTopButtonProps {\n /** Custom CSS classes for the button */\n className?: string;\n /** Custom aria-label for the button */\n 'aria-label'?: string;\n /** Callback fired when button is clicked */\n onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n /** Whether the button is disabled */\n disabled?: boolean;\n}\n\nexport const ToTopButton = forwardRef<HTMLButtonElement, ToTopButtonProps>(\n ({ className, 'aria-label': ariaLabel, onClick, disabled = false, ...props }, ref) => {\n const labels = useNovaConnectLabels();\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n // Prevent default scroll behavior if custom handler provided\n if (onClick) {\n event.preventDefault();\n onClick(event);\n }\n };\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLButtonElement>) => {\n // Handle keyboard activation\n if ((event.key === 'Enter' || event.key === ' ') && onClick) {\n event.preventDefault();\n // eslint-disable-next-line\n onClick(event as any);\n }\n };\n\n return (\n <button\n ref={ref}\n type=\"button\"\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n disabled={disabled}\n className={cn(\n 'novacon:flex novacon:w-full novacon:h-6 novacon:items-center novacon:justify-center',\n 'novacon:bg-[var(--tuwa-bg-secondary)] novacon:text-[var(--tuwa-text-primary)]',\n 'novacon:transition-colors novacon:duration-200',\n 'novacon:hover:bg-[var(--tuwa-bg-tertiary)] novacon:hover:text-[var(--tuwa-text-secondary)]',\n 'novacon:focus:outline-none novacon:focus:ring-2 novacon:focus:ring-[var(--tuwa-text-accent)] novacon:focus:ring-inset',\n 'novacon:active:bg-[var(--tuwa-bg-quaternary)]',\n 'novacon:disabled:opacity-50 novacon:disabled:cursor-not-allowed novacon:disabled:hover:bg-[var(--tuwa-bg-secondary)]',\n onClick ? 'novacon:cursor-pointer' : 'novacon:cursor-default',\n className,\n )}\n aria-label={ariaLabel || labels.scrollToTop}\n title={ariaLabel || labels.scrollToTop}\n {...props}\n >\n <ChevronUpIcon\n className={cn(\n 'novacon:w-4 novacon:h-4 novacon:transition-transform novacon:duration-200',\n disabled && 'novacon:opacity-50',\n )}\n aria-hidden=\"true\"\n />\n </button>\n );\n },\n);\n\nToTopButton.displayName = 'ToTopButton';\n","import * as Select from '@radix-ui/react-select';\nimport { cn } from '@tuwaio/nova-core';\nimport { AnimatePresence, type Easing, motion } from 'framer-motion';\nimport { type ComponentPropsWithoutRef, type ElementRef, forwardRef, useMemo } from 'react';\n\nimport { useNovaConnectLabels } from '../hooks/useNovaConnectLabels';\nimport { ToBottomButton } from './ToBottomButton';\nimport { ToTopButton } from './ToTopButton';\n\ninterface SelectContentAnimatedProps extends ComponentPropsWithoutRef<typeof Select.Content> {\n /** Custom CSS classes to apply to the content container */\n className?: string;\n /** ARIA label for the select content */\n 'aria-label'?: string;\n /** Whether the select content should have reduced motion for accessibility */\n reduceMotion?: boolean;\n}\n\nexport const SelectContentAnimated = forwardRef<ElementRef<typeof Select.Content>, SelectContentAnimatedProps>(\n (\n { className, children, position = 'popper', 'aria-label': ariaLabel, reduceMotion = false, ...props },\n forwardedRef,\n ) => {\n const labels = useNovaConnectLabels();\n\n // Memoize animation configuration based on reduce motion preference\n const animationConfig = useMemo(() => {\n if (reduceMotion) {\n return {\n initial: { opacity: 0 },\n animate: { opacity: 1 },\n exit: { opacity: 0 },\n transition: { duration: 0.15 },\n };\n }\n\n return {\n initial: { opacity: 0, scaleY: 0.8, y: -5 },\n animate: { opacity: 1, scaleY: 1, y: 0 },\n exit: { opacity: 0, scaleY: 0.8, y: -5 },\n transition: {\n duration: 0.2,\n ease: 'easeOut',\n },\n };\n }, [reduceMotion]);\n\n // Memoize layout transition configuration\n const layoutTransition = useMemo(() => {\n if (reduceMotion) {\n return {};\n }\n return {\n duration: 0.15,\n ease: 'easeOut' as Easing,\n };\n }, [reduceMotion]);\n\n // Memoize content container classes\n const contentClasses = useMemo(\n () =>\n cn(\n 'novacon:p-1 novacon:bg-[var(--tuwa-bg-secondary)] novacon:rounded-lg novacon:shadow-xl',\n 'novacon:ring-1 novacon:ring-[var(--tuwa-border-primary)] novacon:overflow-hidden',\n className,\n ),\n [className],\n );\n\n // Memoize select content classes\n const selectContentClasses = useMemo(\n () =>\n cn(\n 'novacon:max-h-[300px] novacon:w-[--radix-select-trigger-width] novacon:overflow-hidden',\n 'novacon:data-[state=open]:animate-in novacon:data-[state=closed]:animate-out',\n 'novacon:data-[state=closed]:fade-out-0 novacon:data-[state=open]:novacon:fade-in-0',\n 'novacon:data-[state=closed]:zoom-out-95 novacon:data-[state=open]:novacon:zoom-in-95',\n 'novacon:data-[side=bottom]:slide-in-from-top-2 novacon:data-[side=left]:slide-in-from-right-2',\n 'novacon:data-[side=right]:slide-in-from-left-2 novacon:data-[side=top]:slide-in-from-bottom-2',\n ),\n [],\n );\n\n return (\n <Select.Portal>\n <Select.Content\n className={selectContentClasses}\n ref={forwardedRef}\n position={position}\n role=\"listbox\"\n aria-label={ariaLabel || labels.chainListContainer}\n {...props}\n >\n {/* Scroll to top button */}\n <Select.ScrollUpButton asChild>\n <ToTopButton />\n </Select.ScrollUpButton>\n\n {/* Main content viewport */}\n <Select.Viewport role=\"presentation\">\n <AnimatePresence mode=\"wait\" initial={false}>\n <motion.div\n {...animationConfig}\n className={contentClasses}\n layout={!reduceMotion}\n transition={{\n layout: layoutTransition,\n }}\n role=\"group\"\n aria-live=\"polite\"\n >\n {children}\n </motion.div>\n </AnimatePresence>\n </Select.Viewport>\n\n {/* Scroll to bottom button */}\n <Select.ScrollDownButton asChild>\n <ToBottomButton />\n </Select.ScrollDownButton>\n </Select.Content>\n </Select.Portal>\n );\n },\n);\n\nSelectContentAnimated.displayName = 'SelectContentAnimated';\n","/**\n * @file This file contains the `WalletAvatar` component for displaying a user's avatar.\n */\n\nimport { cn } from '@tuwaio/nova-core';\nimport makeBlockie from 'ethereum-blockies-base64';\nimport { forwardRef, useCallback, useMemo, useRef, useState } from 'react';\n\nimport { useNovaConnectLabels } from '../hooks/useNovaConnectLabels';\n\nexport type WalletAvatarProps = {\n /** The user's wallet address, used for the blockie fallback and background color. */\n address: string;\n /** An optional URL for the user's ENS avatar image. */\n ensAvatar?: string | null;\n /** Optional additional CSS classes for the container. */\n className?: string;\n /** Custom alt text for the avatar image */\n altText?: string;\n /** Size variant for the avatar */\n size?: 'sm' | 'md' | 'lg' | 'xl';\n /** Whether to show loading animation */\n showLoading?: boolean;\n /** Callback fired when image loads successfully */\n onImageLoad?: () => void;\n /** Callback fired when image fails to load */\n onImageError?: (error: Event) => void;\n /** Whether to disable the pulse animation */\n disableAnimation?: boolean;\n};\n\nfunction isHex(value: unknown, { strict = true }: { strict?: boolean | undefined } = {}): value is `0x${string}` {\n if (!value) return false;\n if (typeof value !== 'string') return false;\n return strict ? /^0x[0-9a-fA-F]*$/.test(value) : value.startsWith('0x');\n}\n\nconst zeroAddress = '0x0000000000000000000000000000000000000000';\n\n// Size mapping for different avatar sizes\nconst sizeClasses = {\n sm: 'novacon:h-4 novacon:w-4',\n md: 'novacon:h-6 novacon:w-6',\n lg: 'novacon:h-8 novacon:w-8',\n xl: 'novacon:h-12 novacon:w-12',\n} as const;\n\n/**\n * A component that displays a user's avatar.\n *\n * It prioritizes showing the provided `ensAvatar`. If unavailable or if the image fails to load,\n * it falls back to a procedurally generated \"blockie\" based on the user's address.\n * It also generates a unique background color from the address as a placeholder.\n */\nexport const WalletAvatar = forwardRef<HTMLDivElement, WalletAvatarProps>(\n (\n {\n address,\n ensAvatar,\n className,\n altText,\n size = 'md',\n showLoading = true,\n onImageLoad,\n onImageError,\n disableAnimation = false,\n ...props\n },\n ref,\n ) => {\n const labels = useNovaConnectLabels();\n\n // State management - fix useState initialization\n const [imageSrc, setImageSrc] = useState<string | null>(ensAvatar ?? null);\n const [isLoading, setIsLoading] = useState(Boolean(ensAvatar));\n const [hasError, setHasError] = useState(false);\n const imgRef = useRef<HTMLImageElement>(null);\n\n // Memoize the generated blockie to avoid re-creating it on every render\n const blockie = useMemo(() => {\n try {\n return makeBlockie(isHex(address) ? address : zeroAddress);\n } catch (error) {\n console.warn('Failed to generate blockie for address:', address, error);\n return null;\n }\n }, [address]);\n\n // Memoize the background color with validation\n const bgColor = useMemo(() => {\n try {\n if (!isHex(address)) return '#6B7280'; // Fallback gray color\n const colorHex = address.slice(2, 8);\n return colorHex.length === 6 ? `#${colorHex}` : '#6B7280';\n } catch {\n return '#6B7280';\n }\n }, [address]);\n\n // Format address for screen readers\n const formattedAddress = useMemo(() => {\n if (!address) return labels.unknownWallet;\n return `${address.slice(0, 6)}...${address.slice(-4)}`;\n }, [address, labels.unknownWallet]);\n\n // Generate alt text\n const imageAltText = useMemo(() => {\n if (altText) return altText;\n if (hasError || !ensAvatar) {\n return `${labels.walletAvatar} ${formattedAddress}`;\n }\n return `${labels.ensAvatar} ${formattedAddress}`;\n }, [altText, hasError, ensAvatar, formattedAddress, labels.walletAvatar, labels.ensAvatar]);\n\n // Reset image source when ensAvatar changes - fix state update issues\n const currentEnsAvatar = useMemo(() => ensAvatar ?? null, [ensAvatar]);\n\n useMemo(() => {\n setImageSrc(currentEnsAvatar);\n setIsLoading(Boolean(currentEnsAvatar));\n setHasError(false);\n }, [currentEnsAvatar]);\n\n // Handle image load success\n const handleImageLoad = useCallback(() => {\n setIsLoading(false);\n setHasError(false);\n onImageLoad?.();\n }, [onImageLoad]);\n\n // Handle image load error\n const handleImageError = useCallback(\n (event: React.SyntheticEvent<HTMLImageElement, Event>) => {\n setIsLoading(false);\n setHasError(true);\n setImageSrc(blockie);\n onImageError?.(event.nativeEvent);\n },\n [blockie, onImageError],\n );\n\n // Memoize container classes\n const containerClasses = useMemo(\n () =>\n cn(\n sizeClasses[size],\n 'novacon:flex-shrink-0 novacon:rounded-full novacon:relative novacon:overflow-hidden',\n 'novacon:ring-1 novacon:ring-[var(--tuwa-border-primary)]',\n 'novacon:focus-within:ring-2 novacon:focus-within:ring-[var(--tuwa-text-accent)]',\n className,\n ),\n [size, className],\n );\n\n // Memoize loading overlay classes\n const loadingClasses = useMemo(\n () =>\n cn(\n 'novacon:absolute novacon:inset-0 novacon:rounded-full novacon:bg-[var(--tuwa-bg-muted)]',\n !disableAnimation && showLoading && isLoading && 'novacon:animate-pulse',\n (!isLoading || !showLoading) && 'novacon:opacity-0',\n 'novacon:transition-opacity novacon:duration-300',\n ),\n [disableAnimation, showLoading, isLoading],\n );\n\n // Get current image source with fallback\n const currentImageSrc = imageSrc || blockie || '';\n\n return (\n <div\n ref={ref}\n className={containerClasses}\n style={{ backgroundColor: bgColor }}\n role=\"img\"\n aria-label={imageAltText}\n title={imageAltText}\n {...props}\n >\n {/* Loading overlay */}\n <div className={loadingClasses} aria-hidden=\"true\" />\n\n {/* Avatar image */}\n {currentImageSrc && (\n <img\n ref={imgRef}\n key={`${ensAvatar || 'blockie'}-${address}`} // Force re-mount when source changes\n className={cn(\n 'novacon:h-full novacon:w-full novacon:rounded-full novacon:object-cover novacon:relative novacon:z-10',\n 'novacon:transition-opacity novacon:duration-300',\n isLoading ? 'novacon:opacity-0' : 'novacon:opacity-100',\n )}\n src={currentImageSrc}\n alt=\"\" // Empty alt since parent div has role=\"img\" and aria-label\n onLoad={handleImageLoad}\n onError={handleImageError}\n loading=\"lazy\"\n decoding=\"async\"\n draggable={false}\n />\n )}\n\n {/* Fallback content for extreme error cases */}\n {!currentImageSrc && (\n <div\n className=\"novacon:absolute novacon:inset-0 novacon:flex novacon:items-center novacon:justify-center novacon:text-white novacon:text-xs novacon:font-mono\"\n aria-hidden=\"true\"\n >\n {formattedAddress.slice(0, 2)}\n </div>\n )}\n </div>\n );\n },\n);\n\nWalletAvatar.displayName = 'WalletAvatar';\n","import { Web3Icon } from '@bgd-labs/react-web3-icons';\nimport { cn } from '@tuwaio/nova-core';\nimport { formatWalletName } from '@tuwaio/orbit-core';\nimport { forwardRef, useCallback, useMemo, useState } from 'react';\n\nimport { useNovaConnectLabels } from '../hooks/useNovaConnectLabels';\n\ninterface WalletIconProps {\n /** Custom icon URL for the wallet */\n icon?: string;\n /** Name of the wallet */\n name: string;\n /** Size of the icon in pixels */\n size?: number;\n /** Additional CSS classes */\n className?: string;\n /** Custom alt text for the icon */\n altText?: string;\n /** Whether to show loading state */\n showLoading?: boolean;\n /** Callback fired when image loads successfully */\n onImageLoad?: () => void;\n /** Callback fired when image fails to load */\n onImageError?: () => void;\n /** Enable lazy loading for non-critical images */\n lazy?: boolean;\n}\n\nexport const WalletIcon = forwardRef<HTMLDivElement, WalletIconProps>(\n (\n {\n icon,\n name,\n size = 32,\n className,\n altText,\n showLoading = false,\n onImageLoad,\n onImageError,\n lazy = false,\n ...props\n },\n ref,\n ) => {\n const labels = useNovaConnectLabels();\n const [hasError, setHasError] = useState(false);\n const [isLoading, setIsLoading] = useState(Boolean(icon));\n\n // Format wallet name for consistency\n const walletName = useMemo(() => formatWalletName(name), [name]);\n\n // Generate alt text for accessibility\n const imageAltText = useMemo(() => {\n if (altText) return altText;\n return `${walletName} ${labels.walletIcon}`;\n }, [altText, walletName, labels.walletIcon]);\n\n // Clean and validate icon URL\n const cleanIconUrl = useMemo(() => {\n if (!icon) return null;\n\n try {\n const trimmedIcon = icon.trim();\n if (!trimmedIcon) return null;\n\n // Basic URL validation\n if (\n trimmedIcon.startsWith('http://') ||\n trimmedIcon.startsWith('https://') ||\n trimmedIcon.startsWith('/') ||\n trimmedIcon.startsWith('data:')\n ) {\n return trimmedIcon;\n }\n\n return null;\n } catch {\n return null;\n }\n }, [icon]);\n\n // Handle image load success\n const handleImageLoad = useCallback(() => {\n setIsLoading(false);\n setHasError(false);\n onImageLoad?.();\n }, [onImageLoad]);\n\n // Handle image load error\n const handleImageError = useCallback(() => {\n setIsLoading(false);\n setHasError(true);\n onImageError?.();\n }, [onImageError]);\n\n // Container classes\n const containerClasses = useMemo(\n () =>\n cn(\n 'novacon:relative novacon:inline-flex novacon:items-center novacon:justify-center novacon:flex-shrink-0',\n 'novacon:overflow-hidden',\n showLoading && isLoading && 'novacon:animate-pulse novacon:bg-[var(--tuwa-bg-muted)]',\n className,\n ),\n [showLoading, isLoading, className],\n );\n\n // Image classes for consistency\n const imageClasses = useMemo(\n () =>\n cn(\n 'novacon:object-cover novacon:transition-opacity novacon:duration-200',\n 'novacon:max-w-full novacon:max-h-full',\n isLoading && showLoading ? 'novacon:opacity-0' : 'novacon:opacity-100',\n ),\n [isLoading, showLoading],\n );\n\n // Image style object\n const imageStyle = useMemo(\n () => ({\n width: size,\n height: size,\n }),\n [size],\n );\n\n return (\n <div\n ref={ref}\n className={containerClasses}\n role=\"img\"\n aria-label={imageAltText}\n title={imageAltText}\n style={{ lineHeight: 0 }}\n {...props}\n >\n {/* Loading overlay */}\n {showLoading && isLoading && (\n <div\n className=\"novacon:absolute novacon:inset-0 novacon:bg-[var(--tuwa-bg-muted)] novacon:animate-pulse novacon:rounded-full\"\n aria-hidden=\"true\"\n />\n )}\n\n {/* Custom icon with error fallback */}\n {cleanIconUrl && !hasError ? (\n <img\n src={cleanIconUrl}\n alt=\"\" // Empty alt since parent div has role=\"img\" and aria-label\n className={imageClasses}\n style={imageStyle}\n onLoad={handleImageLoad}\n onError={handleImageError}\n loading={lazy ? 'lazy' : 'eager'}\n decoding=\"async\"\n // Additional attributes for better performance\n crossOrigin=\"anonymous\"\n referrerPolicy=\"no-referrer\"\n />\n ) : (\n /* Fallback to Web3Icon */\n <Web3Icon walletKey={walletName} className={cn(imageClasses, 'novacon:flex-shrink-0')} style={imageStyle} />\n )}\n\n {/* Error state indicator (optional) */}\n {hasError && process.env.NODE_ENV === 'development' && (\n <div\n className=\"novacon:absolute novacon:top-0 novacon:right-0 novacon:w-2 novacon:h-2 novacon:bg-red-500 novacon:rounded-full\"\n title={`Failed to load icon for ${walletName}`}\n aria-hidden=\"true\"\n />\n )}\n </div>\n );\n },\n);\n\nWalletIcon.displayName = 'WalletIcon';\n","import { Web3Icon } from '@bgd-labs/react-web3-icons';\nimport { ChevronArrowWithAnim, cn } from '@tuwaio/nova-core';\nimport { OrbitAdapter } from '@tuwaio/orbit-core';\nimport { forwardRef, useMemo } from 'react';\n\nimport { useNovaConnectLabels } from '../../hooks/useNovaConnectLabels';\nimport { WalletIcon } from '../WalletIcon';\n\n/**\n * Props for the IconButton component\n */\ninterface IconButtonProps {\n /** Custom icon URL for the wallet */\n walletIcon?: string;\n /** Name of the wallet */\n walletName?: string;\n /** Chain ID for the network icon */\n walletChainId?: string | number;\n /** Number of available items/options (shows chevron if > 1) */\n items?: number;\n /** Click handler for the button */\n onClick?: () => void;\n /** Additional CSS classes for styling */\n className?: string;\n /** Whether the button is currently disabled */\n disabled?: boolean;\n /** Whether to show loading state */\n loading?: boolean;\n /** Custom aria-label for accessibility */\n 'aria-label'?: string;\n /** Custom tooltip text */\n title?: string;\n}\n\n/**\n * Multi-purpose icon button component for wallets and chains\n *\n * This component provides a unified interface for displaying wallet and chain information:\n * - Displays wallet icon with fallback to Web3Icon\n * - Shows chain/network icon when chain ID is provided\n * - Conditional chevron arrow for dropdown indicators\n * - Full WCAG accessibility support with proper ARIA labels\n * - Loading and disabled states\n * - Hover and active animations\n * - Responsive design with consistent sizing\n *\n * The button automatically becomes interactive when onClick is provided and items > 1.\n * It supports both EVM chain IDs (numbers) and Solana network identifiers (strings).\n *\n * @param props - Component props for icon button configuration\n * @returns Forwardable button element with icons and accessibility support\n *\n * @example\n * ```tsx\n * // Simple wallet button\n * <IconButton\n * walletName=\"MetaMask\"\n * walletIcon=\"https://example.com/metamask-icon.png\"\n * />\n * ```\n *\n * @example\n * ```tsx\n * // Interactive chain selector\n * <IconButton\n * walletName=\"Phantom\"\n * walletChainId=\"mainnet-beta\"\n * items={3}\n * onClick={handleChainSelect}\n * aria-label=\"Select blockchain network\"\n * />\n * ```\n *\n * @example\n * ```tsx\n * // Loading state with disabled interaction\n * <IconButton\n * walletName=\"WalletConnect\"\n * loading={true}\n * disabled={true}\n * title=\"Connecting to wallet...\"\n * />\n * ```\n *\n * @public\n */\nexport const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(\n (\n {\n walletIcon,\n walletName,\n walletChainId,\n items = 0,\n onClick,\n className,\n disabled = false,\n loading = false,\n 'aria-label': ariaLabel,\n title,\n },\n ref,\n ) => {\n const labels = useNovaConnectLabels();\n\n /**\n * Determine if the button should be interactive\n * Button is clickable when onClick is provided, not disabled, not loading, and has multiple items\n */\n const isClickable = useMemo(\n () => Boolean(onClick && !disabled && !loading && items > 1),\n [onClick, disabled, loading, items],\n );\n\n /**\n * Generate chain ID for Web3Icon\n * Handles both EVM (numeric) and Solana (string) chain identifiers\n */\n const formattedChainId = useMemo(() => {\n if (!walletChainId) return undefined;\n\n // If it's a string, assume it's a Solana network identifier\n if (typeof walletChainId === 'string') {\n return `${OrbitAdapter.SOLANA}:${walletChainId}`;\n }\n\n // If it's a number, use it directly as EVM chain ID\n return walletChainId;\n }, [walletChainId]);\n\n /**\n * Generate accessible label for the button\n */\n const accessibleLabel = useMemo(() => {\n if (ariaLabel) return ariaLabel;\n\n const parts: string[] = [];\n\n if (walletName) parts.push(`${walletName} wallet`);\n if (walletChainId) parts.push('network selector');\n if (isClickable) parts.push('button');\n if (loading) parts.push('loading');\n if (disabled) parts.push('disabled');\n\n return parts.join(', ') || 'Wallet controls';\n }, [ariaLabel, walletName, walletChainId, isClickable, loading, disabled]);\n\n /**\n * Generate tooltip text\n */\n const tooltipText = useMemo(() => {\n if (title) return title;\n if (loading) return 'Loading...';\n if (disabled) return 'Button is disabled';\n if (isClickable) return `Click to select ${walletName ? walletName + ' ' : ''}options`;\n return walletName ? `${walletName} wallet` : 'Wallet information';\n }, [title, loading, disabled, isClickable, walletName]);\n\n /**\n * Memoized button classes for performance\n */\n const buttonClasses = useMemo(\n () =>\n cn(\n // Base styles\n 'novacon:flex novacon:items-center novacon:justify-center novacon:gap-1 novacon:rounded-full',\n 'novacon:bg-[var(--tuwa-bg-primary)] novacon:border novacon:border-[var(--tuwa-border-primary)]',\n 'novacon:p-1.5 novacon:transition-all novacon:duration-200',\n\n // Icon sizing\n 'novacon:[&_img]:w-6! novacon:[&_img]:h-6! novacon:[&_img]:transition-transform novacon:[&_img]:duration-200',\n\n // Interactive states\n {\n 'novacon:cursor-pointer novacon:hover:[&_img]:scale-95 novacon:active:[&_img]:scale-85 novacon:hover:shadow-sm':\n isClickable,\n 'novacon:cursor-not-allowed novacon:opacity-50': disabled && !loading,\n 'novacon:cursor-wait novacon:opacity-75': loading,\n 'novacon:cursor-default': !isClickable && !disabled && !loading,\n },\n\n // Focus states for accessibility\n 'novacon:focus-visible:outline-none novacon:focus-visible:ring-2 novacon:focus-visible:ring-[var(--tuwa-border-accent)] novacon:focus-visible:ring-offset-2',\n\n className,\n ),\n [isClickable, disabled, loading, className],\n );\n\n /**\n * Handle button click with safety checks\n */\n const handleClick = () => {\n if (isClickable && onClick) {\n onClick();\n }\n };\n\n return (\n <button\n ref={ref}\n type=\"button\"\n className={buttonClasses}\n onClick={handleClick}\n disabled={disabled || loading}\n aria-label={accessibleLabel}\n title={tooltipText}\n role=\"button\"\n tabIndex={disabled || loading ? -1 : 0}\n >\n {/* Wallet icon */}\n {walletName && (\n <WalletIcon\n name={walletName}\n icon={walletIcon}\n altText={`${walletName} ${labels.walletIcon}`}\n showLoading={loading}\n className=\"novacon:flex-shrink-0\"\n />\n )}\n\n {/* Chain/Network icon */}\n {formattedChainId && (\n <Web3Icon chainId={formattedChainId} className=\"novacon:flex-shrink-0\" title={`Network: ${walletChainId}`} />\n )}\n\n {/* Chevron arrow for dropdown indication */}\n {isClickable && <ChevronArrowWithAnim className=\"novacon:flex-shrink-0\" aria-hidden=\"true\" />}\n\n {/* Loading indicator overlay */}\n {loading && (\n <div\n className=\"novacon:absolute novacon:inset-0 novacon:bg-[var(--tuwa-bg-primary)]/50 novacon:rounded-full novacon:flex novacon:items-center novacon:justify-center\"\n aria-hidden=\"true\"\n >\n <div className=\"novacon:w-3 novacon:h-3 novacon:border-2 novacon:border-[var(--tuwa-text-accent)] novacon:border-t-transparent novacon:rounded-full novacon:animate-spin\" />\n </div>\n )}\n </button>\n );\n },\n);\n\nIconButton.displayName = 'IconButton';\n","import { ExclamationTriangleIcon, PuzzlePieceIcon } from '@heroicons/react/24/solid';\nimport { motion } from 'framer-motion';\nimport { Component, lazy, Suspense, useMemo } from 'react';\n\nimport { useNovaConnect } from '../../hooks/useNovaConnect';\nimport { useNovaConnectLabels } from '../../hooks/useNovaConnectLabels';\nimport { ConnectButtonProps } from '../ConnectButton';\n\n/**\n * Props for the ConnectedModalTxHistory component\n */\ninterface ConnectedModalTxHistoryProps extends Pick<ConnectButtonProps, 'transactionPool' | 'pulsarAdapter'> {\n /** Additional CSS classes for the container */\n className?: string;\n}\n\n/**\n * Lazy import of TransactionsHistory component with error handling\n * This allows the component to work even if the @tuwaio/nova-transactions package is not available\n */\nconst TransactionsHistory = lazy(() => {\n try {\n return import('@tuwaio/nova-transactions').then((module) => ({\n default: module.TransactionsHistory,\n }));\n } catch (error) {\n console.warn('Failed to load @tuwaio/nova-transactions package:', error);\n // Return a promise that never resolves to trigger error boundary\n return new Promise(() => {});\n }\n});\n\n/**\n * Loading component for transaction history\n */\nfunction TransactionHistoryLoading() {\n const labels = useNovaConnectLabels();\n\n return (\n <div\n className=\"novacon:flex novacon:flex-col novacon:items-center novacon:justify-center novacon:p-8 novacon:gap-4\"\n role=\"status\"\n >\n <div className=\"novacon:animate-spin novacon:rounded-full novacon:h-8 novacon:w-8 novacon:border-2 novacon:border-[var(--tuwa-text-accent)] novacon:border-t-transparent\" />\n <p className=\"novacon:text-sm novacon:text-[var(--tuwa-text-secondary)]\">\n {labels.loading} {labels.transactionsInApp.toLowerCase()}...\n </p>\n </div>\n );\n}\n\n/**\n * Error fallback component when TransactionsHistory fails to load\n */\nfunction TransactionHistoryError() {\n return (\n <motion.div\n initial={{ opacity: 0, y: 20 }}\n animate={{ opacity: 1, y: 0 }}\n transition={{ duration: 0.3, ease: 'easeOut' }}\n className=\"novacon:flex novacon:flex-col novacon:items-center novacon:justify-center novacon:text-center novacon:gap-4 novacon:p-6\"\n role=\"alert\"\n >\n <div className=\"novacon:w-12 novacon:h-12 novacon:p-2 novacon:rounded-full novacon:bg-[var(--tuwa-warning-bg)] novacon:text-[var(--tuwa-warning-text)]\">\n <ExclamationTriangleIcon className=\"novacon:w-full novacon:h-full\" />\n </div>\n\n <div className=\"novacon:space-y-2\">\n <h2 className=\"novacon:text-lg novacon:font-semibold novacon:text-[var(--tuwa-text-primary)]\">\n Transaction History Not Available\n </h2>\n <p className=\"novacon:text-sm novacon:text-[var(--tuwa-text-secondary)] novacon:max-w-md\">\n Transaction history is not supported by this application at the moment. The required package is not installed\n or configured.\n </p>\n </div>\n </motion.div>\n );\n}\n\n/**\n * Pulsar adapter required fallback component\n */\nfunction PulsarAdapterRequired() {\n const labels = useNovaConnectLabels();\n\n return (\n <motion.div\n initial={{ opacity: 0, scale: 0.95 }}\n animate={{ opacity: 1, scale: 1 }}\n transition={{ duration: 0.2, ease: 'easeOut' }}\n className=\"novacon:flex novacon:flex-col novacon:items-center novacon:justify-center novacon:text-center novacon:gap-4 novacon:p-6\"\n role=\"alert\"\n >\n <div className=\"novacon:w-12 novacon:h-12 novacon:p-2 novacon:rounded-full novacon:bg-gradient-to-r novacon:from-[var(--tuwa-button-gradient-from)] novacon:to-[var(--tuwa-button-gradient-to)] novacon:text-[var(--tuwa-text-on-accent)]\">\n <PuzzlePieceIcon className=\"novacon:w-full novacon:h-full\" />\n </div>\n\n <div className=\"novacon:space-y-2\">\n <h2 className=\"novacon:text-lg novacon:font-semibold novacon:text-[var(--tuwa-text-primary)]\">\n {labels.pulsarAdapterRequired}\n </h2>\n <p className=\"novacon:text-sm novacon:text-[var(--tuwa-text-secondary)] novacon:max-w-md novacon:leading-relaxed\">\n {labels.pulsarAdapterDescription}\n </p>\n </div>\n </motion.div>\n );\n}\n\n/**\n * Component for displaying transaction history with conditional loading\n *\n * This component provides comprehensive transaction history functionality:\n * - Conditional loading of the @tuwaio/nova-transactions package\n * - Graceful fallback when the package is not available\n * - Loading states with proper accessibility support\n * - Error handling for missing configuration\n * - Full WCAG compliance with ARIA labels\n *\n * The component automatically detects if the required dependencies are available\n * and provides appropriate fallbacks for different scenarios.\n *\n * @param props - Component props including transaction pool and adapter configuration\n * @returns JSX element displaying transaction history or appropriate fallback\n *\n * @example\n * ```tsx\n * <ConnectedModalTxHistory\n * transactionPool={txPool}\n * pulsarAdapter={adapter}\n * className=\"custom-styling\"\n * />\n * ```\n *\n * @public\n */\nexport function ConnectedModalTxHistory({ transactionPool, pulsarAdapter, className }: ConnectedModalTxHistoryProps) {\n const labels = useNovaConnectLabels();\n const { activeWallet } = useNovaConnect();\n\n /**\n * Memoized container classes for better performance\n */\n const containerClasses = useMemo(\n () =>\n `novacon:flex novacon:flex-col novacon:items-center novacon:justify-center novacon:p-4 ${className || ''}`.trim(),\n [className],\n );\n\n /**\n * Memoized check for adapter availability\n */\n const hasValidAdapter = useMemo(() => Boolean(transactionPool && pulsarAdapter), [transactionPool, pulsarAdapter]);\n\n // Early return if no active wallet\n if (!activeWallet) {\n return (\n <div className={containerClasses}>\n <p className=\"novacon:text-sm novacon:text-[var(--tuwa-text-secondary)]\">No wallet connected</p>\n </div>\n );\n }\n\n return (\n <div className={containerClasses}>\n {hasValidAdapter ? (\n <Suspense fallback={<TransactionHistoryLoading />}>\n <ErrorBoundary fallback={<TransactionHistoryError />}>\n <TransactionsHistory\n transactionsPool={transactionPool!}\n adapter={pulsarAdapter!}\n connectedWalletAddress={activeWallet.address}\n className=\"novacon:w-full\"\n aria-label={`${labels.transactionsInApp} for ${activeWallet.address}`}\n />\n </ErrorBoundary>\n </Suspense>\n ) : (\n <PulsarAdapterRequired />\n )}\n </div>\n );\n}\n\n/**\n * Simple Error Boundary component for handling TransactionsHistory loading errors\n */\ninterface ErrorBoundaryState {\n hasError: boolean;\n}\n\ninterface ErrorBoundaryProps {\n children: React.ReactNode;\n fallback: React.ReactNode;\n}\n\nclass ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {\n constructor(props: ErrorBoundaryProps) {\n super(props);\n this.state = { hasError: false };\n }\n\n static getDerivedStateFromError(): ErrorBoundaryState {\n return { hasError: true };\n }\n\n componentDidCatch(error: Error, errorInfo: React.ErrorInfo) {\n console.warn('TransactionsHistory component failed to load:', error, errorInfo);\n }\n\n render() {\n if (this.state.hasError) {\n return this.props.fallback;\n }\n\n return this.props.children;\n }\n}\n","import { cn, isTouchDevice } from '@tuwaio/nova-core';\nimport { motion } from 'framer-motion';\nimport React, { memo, useMemo } from 'react';\n\ninterface RecentBadgeProps {\n className?: string;\n children?: React.ReactNode;\n animated?: boolean;\n}\n\n/**\n * Badge component with animated gradient border effect\n */\nexport const RecentBadge = memo<RecentBadgeProps>(({ className, children = 'Recent', animated = true }) => {\n const isTouch = useMemo(() => isTouchDevice(), []);\n\n // Memoize gradient to prevent recreating\n const gradientBackground = useMemo(\n () => `linear-gradient(90deg, \n rgba(255, 255, 255, 0) 0%, \n var(--tuwa-text-secondary) 20%, \n rgba(255, 255, 255, 0) 40%\n )`,\n [],\n );\n\n const sizeClasses = isTouch\n ? 'novacon:px-1.5 novacon:py-0 novacon:text-[10px]'\n : 'novacon:px-2.5 novacon:py-0.5 novacon:text-xs';\n\n return (\n <span\n className={cn(\n 'novacon:inline-flex novacon:items-center novacon:rounded-full novacon:font-medium novacon:relative novacon:overflow-hidden',\n 'novacon:text-[var(--tuwa-text-secondary)] novacon:border novacon:border-[var(--tuwa-border-primary)]',\n sizeClasses,\n className,\n )}\n role=\"status\"\n aria-label={typeof children === 'string' ? children : 'Recent'}\n >\n {/* Animated gradient border */}\n <motion.span\n className=\"novacon:absolute novacon:inset-0 novacon:z-0 novacon:pointer-events-none novacon:rounded-full\"\n style={{ background: gradientBackground, backgroundSize: '200% 100%' }}\n initial={{ backgroundPositionX: '100%' }}\n animate={animated ? { backgroundPositionX: '-100%' } : {}}\n transition={{\n duration: 4,\n ease: 'linear',\n repeat: animated ? Infinity : 0,\n }}\n />\n\n {/* Background overlay */}\n <span className=\"novacon:absolute novacon:z-10 novacon:pointer-events-none novacon:rounded-full novacon:bg-[var(--tuwa-bg-primary)] novacon:inset-[1px]\" />\n\n {/* Content */}\n <span className=\"novacon:relative novacon:z-20 novacon:whitespace-nowrap\">{children}</span>\n </span>\n );\n});\n\nRecentBadge.displayName = 'RecentBadge';\n","import { DocumentDuplicateIcon } from '@heroicons/react/24/solid';\nimport { cn, useCopyToClipboard } from '@tuwaio/nova-core';\nimport * as React from 'react';\n\nimport { useNovaConnectLabels } from '../hooks/useNovaConnectLabels';\n\ninterface ToastErrorProps {\n /** Error title to display */\n title: string;\n /** Raw error message to display and copy */\n rawError: string;\n /** Custom CSS classes for the container */\n className?: string;\n /** Custom ARIA label for the error container */\n 'aria-label'?: string;\n /** Callback fired when copy operation completes */\n onCopyComplete?: (success: boolean) => void;\n}\n\n// Counter for unique IDs (outside component to avoid re-initialization)\nlet idCounter = 0;\n\nexport function ToastError({ title, rawError, className, 'aria-label': ariaLabel, onCopyComplete }: ToastErrorProps) {\n const labels = useNovaConnectLabels();\n const { isCopied, copy } = useCopyToClipboard();\n\n // Generate unique IDs only once per component instance\n const [uniqueId] = React.useState(() => {\n idCounter += 1;\n return `${idCounter}-${Date.now()}`;\n });\n\n const titleId = `error-title-${uniqueId}`;\n const descriptionId = `error-description-${uniqueId}`;\n\n // Memoize error text for copying\n const errorToCopy = React.useMemo(() => rawError, [rawError]);\n\n // Handle copy with error handling and callback\n const handleCopy = React.useCallback(\n async (e: React.MouseEvent) => {\n e.stopPropagation();\n e.preventDefault();\n\n try {\n await copy(errorToCopy);\n onCopyComplete?.(true);\n } catch (error) {\n console.error('Failed to copy error:', error);\n onCopyComplete?.(false);\n }\n },\n [copy, errorToCopy, onCopyComplete],\n );\n\n // Handle keyboard interaction for copy button\n const handleKeyDown = React.useCallback(\n (e: React.KeyboardEvent) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n // eslint-disable-next-line\n handleCopy(e as any);\n }\n },\n [handleCopy],\n );\n\n // Memoize container classes\n const containerClasses = React.useMemo(\n () =>\n cn(\n 'novacon:bg-[var(--tuwa-bg-primary)] novacon:p-4 novacon:rounded-md novacon:w-full',\n 'novacon:border novacon:border-[var(--tuwa-border-primary)]',\n className,\n ),\n [className],\n );\n\n // Memoize button classes\n const buttonClasses = React.useMemo(\n () =>\n cn(\n 'novacon:cursor-pointer novacon:mt-2 novacon:text-xs novacon:font-medium novacon:inline-flex novacon:items-center novacon:space-x-1.5',\n 'novacon:focus:outline-none novacon:focus:ring-2 novacon:focus:ring-[var(--tuwa-error-text)] novacon:focus:ring-opacity-50',\n 'novacon:rounded-md novacon:px-2 novacon:py-1 novacon:transition-all novacon:duration-200',\n 'novacon:hover:bg-[var(--tuwa-error-text)] novacon:hover:bg-opacity-10',\n 'novacon:active:bg-[var(--tuwa-error-text)] novacon:active:bg-opacity-20',\n 'novacon:text-[var(--tuwa-error-text)] novacon:hover:text-[var(--tuwa-error-text)]',\n isCopied &&\n 'novacon:bg-[var(--tuwa-success-text)] novacon:bg-opacity-10 novacon:text-[var(--tuwa-success-text)]',\n ),\n [isCopied],\n );\n\n return (\n <div\n className={containerClasses}\n role=\"alert\"\n aria-live=\"assertive\"\n aria-labelledby={titleId}\n aria-describedby={descriptionId}\n aria-label={ariaLabel}\n >\n {/* Error Title */}\n <p\n id={titleId}\n className=\"novacon:text-sm novacon:font-semibold novacon:truncate novacon:text-[var(--tuwa-error-text)]\"\n role=\"heading\"\n aria-level={3}\n title={title} // Show full title on hover if truncated\n >\n {title}\n </p>\n\n {/* Error Description */}\n <p\n id={descriptionId}\n className=\"novacon:mt-1 novacon:text-xs novacon:break-words novacon:text-[var(--tuwa-error-text)] novacon:opacity-80\"\n role=\"text\"\n >\n {rawError}\n </p>\n\n {/* Copy Button */}\n <button\n onClick={handleCopy}\n onKeyDown={handleKeyDown}\n className={buttonClasses}\n type=\"button\"\n aria-label={isCopied ? `${labels.copied} ${labels.copyRawError}` : labels.copyRawError}\n aria-describedby={`${titleId} ${descriptionId}`}\n disabled={!errorToCopy.trim()}\n >\n <DocumentDuplicateIcon\n className={cn(\n 'novacon:w-4 novacon:h-4 novacon:transition-colors',\n isCopied && 'novacon:text-[var(--tuwa-success-text)]',\n )}\n aria-hidden=\"true\"\n />\n <span className=\"novacon:select-none novacon:transition-colors\" aria-live=\"polite\" role=\"status\">\n {isCopied ? labels.copied : labels.copyRawError}\n </span>\n </button>\n </div>\n );\n}\n","import { ToastCloseButton } from '@tuwaio/nova-core';\nimport { useCallback, useEffect, useMemo, useRef } from 'react';\nimport { Bounce, toast, ToastContainer, type ToastPosition } from 'react-toastify';\n\nimport { ToastError } from '../components';\nimport { NovaConnectProviderProps, useNovaConnect } from '../hooks/useNovaConnect';\nimport { useNovaConnectLabels } from '../hooks/useNovaConnectLabels';\n\ninterface ErrorsProviderProps extends Pick<NovaConnectProviderProps, 'store'> {\n /** Custom container ID for toast notifications */\n containerId?: string;\n /** Custom position for toast notifications */\n position?: ToastPosition;\n /** Auto close delay in milliseconds */\n autoClose?: number | false;\n /** Whether to enable drag to dismiss */\n draggable?: boolean;\n}\n\nexport function ErrorsProvider({\n store,\n containerId = 'nova-connect-errors',\n position = 'top-center',\n autoClose = 7000,\n draggable = false,\n}: ErrorsProviderProps) {\n const labels = useNovaConnectLabels();\n const { activeWallet, walletConnectionError } = useNovaConnect();\n\n const switchNetworkError = store.getState().switchNetworkError;\n\n // Track displayed errors to prevent duplicates\n const displayedErrorsRef = useRef<Set<string>>(new Set());\n const currentToastIdRef = useRef<string | null>(null);\n\n // Memoize error state\n const errorState = useMemo(() => {\n const hasWalletError = Boolean(walletConnectionError);\n const hasSwitchError = Boolean(switchNetworkError);\n const isConnected = Boolean(activeWallet?.isConnected);\n\n return {\n hasWalletError,\n hasSwitchError,\n isConnected,\n hasAnyError: hasWalletError || hasSwitchError,\n primaryError: walletConnectionError || switchNetworkError,\n errorType: hasWalletError ? 'wallet' : hasSwitchError ? 'switch' : null,\n };\n }, [walletConnectionError, switchNetworkError, activeWallet?.isConnected]);\n\n // Memoize error title based on type\n const errorTitle = useMemo(() => {\n switch (errorState.errorType) {\n case 'wallet':\n return labels.walletConnectionError;\n case 'switch':\n return labels.errorWhenChainSwitching;\n default:\n return labels.somethingWentWrong;\n }\n }, [errorState.errorType, labels]);\n\n // Generate error hash for deduplication\n const errorHash = useMemo(() => {\n if (!errorState.primaryError) return null;\n return `${errorState.errorType}-${errorState.primaryError.substring(0, 50)}`;\n }, [errorState.primaryError, errorState.errorType]);\n\n // Dismiss current toast\n const dismissCurrentToast = useCallback(() => {\n if (currentToastIdRef.current) {\n toast.dismiss(currentToastIdRef.current);\n currentToastIdRef.current = null;\n }\n toast.dismiss({ containerId });\n }, [containerId]);\n\n // Show error toast\n const showErrorToast = useCallback(\n (title: string, rawError: string, errorKey: string) => {\n // Dismiss previous toast first\n dismissCurrentToast();\n\n // Check if this error was already displayed\n if (displayedErrorsRef.current.has(errorKey)) {\n return;\n }\n\n try {\n // Use toast.error and capture the result properly\n toast.error(\n <ToastError\n title={title}\n rawError={rawError}\n onCopyComplete={(success) => {\n if (success && process.env.NODE_ENV === 'development') {\n console.log('Error copied to clipboard:', rawError.substring(0, 100));\n }\n }}\n />,\n {\n containerId,\n toastId: errorKey,\n onClose: () => {\n displayedErrorsRef.current.delete(errorKey);\n currentToastIdRef.current = null;\n },\n },\n );\n\n displayedErrorsRef.current.add(errorKey);\n currentToastIdRef.current = errorKey;\n } catch (error) {\n console.error('Failed to show error toast:', error);\n }\n },\n [containerId, dismissCurrentToast],\n );\n\n // Main effect to handle error display logic\n useEffect(() => {\n const { hasAnyError, isConnected, primaryError } = errorState;\n\n // Clear all errors when connected successfully\n if (isConnected && !hasAnyError) {\n dismissCurrentToast();\n displayedErrorsRef.current.clear();\n return;\n }\n\n // Show error if present and not already displayed\n if (hasAnyError && primaryError && errorHash) {\n // For connected state, only show switch network errors\n if (isConnected && errorState.errorType !== 'switch') {\n return;\n }\n\n showErrorToast(errorTitle, primaryError, errorHash);\n }\n }, [errorState, errorTitle, errorHash, showErrorToast, dismissCurrentToast]);\n\n // Clean up on unmount\n useEffect(() => {\n return () => {\n dismissCurrentToast();\n // eslint-disable-next-line\n displayedErrorsRef.current.clear();\n };\n }, [dismissCurrentToast]);\n\n // Memoize container props with proper types\n const containerProps = useMemo(\n () => ({\n containerId,\n position,\n closeOnClick: false,\n icon: false as const,\n closeButton: ToastCloseButton,\n autoClose,\n hideProgressBar: false,\n newestOnTop: false,\n pauseOnFocusLoss: false,\n draggable,\n pauseOnHover: true,\n theme: 'light' as const,\n transition: Bounce,\n className: 'novacon:p-0 novacon:bg-transparent',\n }),\n [containerId, position, autoClose, draggable],\n );\n\n return (\n <ToastContainer {...containerProps} role=\"alert\" aria-live=\"assertive\" aria-label={labels.somethingWentWrong} />\n );\n}\n\n// Add display name for better debugging\nErrorsProvider.displayName = 'ErrorsProvider';\n","/**\n * @file This file sets up the React Context for providing i18n labels throughout the UI components.\n * It allows for deep customization of all text displayed by the library.\n */\n\nimport { ReactNode, useMemo } from 'react';\n\nimport { NovaConnectLabelsContext } from '../hooks/useNovaConnectLabels';\nimport { NovaConnectLabels } from '../i18n/types';\n\ninterface NovaConnectLabelsProviderProps {\n /** An object containing the custom labels */\n labels: NovaConnectLabels;\n /** The child components to render */\n children: ReactNode;\n}\n\n/**\n * A React component that provides a custom set of labels to all child components.\n * Wrap your application or component tree with this provider to apply custom translations.\n *\n * The provider uses React.memo optimization and validates labels in development mode.\n *\n * @example\n * ```typescript\n * import { NovaConnectLabelsProvider } from './NovaConnectLabelsProvider';\n * import { defaultLabels } from './i18n/en';\n *\n * function App() {\n * const customLabels = {\n * ...defaultLabels,\n * connectWallet: 'Подключить кошелек',\n * disconnect: 'Отключиться',\n * };\n *\n * return (\n * <NovaConnectLabelsProvider labels={customLabels}>\n * <YourApp />\n * </NovaConnectLabelsProvider>\n * );\n * }\n * ```\n */\nexport function NovaConnectLabelsProvider({ labels, children }: NovaConnectLabelsProviderProps) {\n // Memoize labels to prevent unnecessary re-renders\n const memoizedLabels = useMemo(() => labels, [labels]);\n\n // Development-only validation\n if (process.env.NODE_ENV === 'development') {\n // Validate that labels object is provided\n if (!labels || typeof labels !== 'object') {\n console.warn('NovaConnectLabelsProvider: labels prop should be an object');\n }\n\n // Check for missing required labels (basic validation)\n const requiredLabels = ['connectWallet', 'disconnect', 'connecting', 'connected', 'error', 'success'] as const;\n\n const missingLabels = requiredLabels.filter((key) => !(key in labels));\n if (missingLabels.length > 0) {\n console.warn(`NovaConnectLabelsProvider: Missing required labels: ${missingLabels.join(', ')}`);\n }\n }\n\n return <NovaConnectLabelsContext.Provider value={memoizedLabels}>{children}</NovaConnectLabelsContext.Provider>;\n}\n\n// Add display name for better debugging\nNovaConnectLabelsProvider.displayName = 'NovaConnectLabelsProvider';\n","import { deepMerge } from '@tuwaio/nova-core';\nimport { OrbitAdapter } from '@tuwaio/orbit-core';\nimport { BaseWallet } from '@tuwaio/satellite-core';\nimport { useEffect, useMemo, useState } from 'react';\n\nimport {\n ButtonTxStatus,\n ConnectContentType,\n ConnectedContentType,\n NovaConnectProviderContext,\n NovaConnectProviderProps,\n NovaConnectProviderType,\n} from '../hooks/useNovaConnect';\nimport { defaultLabels } from '../i18n/en';\nimport { ErrorsProvider } from './ErrorsProvider';\nimport { NovaConnectLabelsProvider } from './NovaConnectLabelsProvider';\n\nexport function NovaConnectProvider({ labels, store, children }: NovaConnectProviderProps) {\n const mergedLabels = useMemo(() => deepMerge(defaultLabels, labels || {}), [labels]);\n\n const [activeWallet, setActiveWallet] = useState<BaseWallet | undefined>(store.getState().activeWallet);\n const [walletConnectionError, setWalletConnectionError] = useState<string | undefined>(\n store.getState().walletConnectionError,\n );\n const [isConnectModalOpen, setIsConnectModalOpen] = useState(false);\n const [isConnectedModalOpen, setIsConnectedModalOpen] = useState(false);\n const [isChainsListOpen, setIsChainsListOpen] = useState(false);\n const [isChainsListOpenMobile, setIsChainsListOpenMobile] = useState(false);\n const [connectedButtonStatus, setConnectedButtonStatus] = useState<ButtonTxStatus>('idle');\n const [connectModalContentType, setConnectModalContentType] = useState<ConnectContentType>('connectors');\n const [selectedAdapter, setSelectedAdapter] = useState<OrbitAdapter | undefined>(undefined);\n const [activeConnector, setActiveConnector] = useState<string | undefined>(undefined);\n const [impersonatedAddress, setImpersonatedAddress] = useState('');\n const [isConnected, setIsConnected] = useState(false);\n const [connectedModalContentType, setConnectedModalContentType] = useState<ConnectedContentType>('main');\n\n useEffect(() => {\n const unsubscribe = store.subscribe((state) => {\n setActiveWallet(state.activeWallet);\n setWalletConnectionError(state.walletConnectionError);\n });\n return unsubscribe;\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const contextValue: NovaConnectProviderType = {\n walletConnectionError,\n activeWallet,\n isConnectModalOpen,\n setIsConnectModalOpen,\n isConnectedModalOpen,\n setIsConnectedModalOpen,\n isChainsListOpen,\n setIsChainsListOpen,\n isChainsListOpenMobile,\n setIsChainsListOpenMobile,\n connectedButtonStatus,\n setConnectedButtonStatus,\n connectedModalContentType,\n setConnectedModalContentType,\n connectModalContentType,\n setConnectModalContentType,\n selectedAdapter,\n setSelectedAdapter,\n activeConnector,\n setActiveConnector,\n impersonatedAddress,\n setImpersonatedAddress,\n isConnected,\n setIsConnected,\n };\n\n return (\n <NovaConnectProviderContext.Provider value={contextValue}>\n <ErrorsProvider store={store} />\n <NovaConnectLabelsProvider labels={mergedLabels}>{children}</NovaConnectLabelsProvider>\n </NovaConnectProviderContext.Provider>\n );\n}\n"]}