@tuwaio/nova-connect 0.5.11 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -14
- package/dist/chunk-5MOVHUHI.js +2 -0
- package/dist/chunk-7K4ENNWO.cjs +2 -0
- package/dist/chunk-7TYZT7ZD.cjs +1 -0
- package/dist/chunk-ARBYH7CW.js +1 -0
- package/dist/components/index.cjs +1 -1
- package/dist/components/index.d.cts +2 -2
- package/dist/components/index.d.ts +2 -2
- package/dist/components/index.js +1 -1
- package/dist/hooks/index.cjs +1 -1
- package/dist/hooks/index.d.cts +2 -2
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/solana/index.d.cts +2 -2
- package/dist/solana/index.d.ts +2 -2
- package/dist/{useWalletNativeBalance-DPbn6y5A.d.cts → useWalletNativeBalance-BuiJip3d.d.cts} +2 -2
- package/dist/{useWalletNativeBalance-B99NXY6D.d.ts → useWalletNativeBalance-DrgdoQa-.d.ts} +2 -2
- package/package.json +40 -40
- package/dist/chunk-7HBYKNSL.cjs +0 -2
- package/dist/chunk-BVVQR6Y7.cjs +0 -1
- package/dist/chunk-SOJLLC7T.js +0 -1
- package/dist/chunk-UOYHTY7H.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunk7K4ENNWO_cjs=require('../chunk-7K4ENNWO.cjs');require('../chunk-7TYZT7ZD.cjs'),require('../chunk-K44IHM6B.cjs'),require('../chunk-MGBN4EIT.cjs'),require('../chunk-V6XDFRWV.cjs');Object.defineProperty(exports,"AboutWallets",{enumerable:true,get:function(){return chunk7K4ENNWO_cjs.u}});Object.defineProperty(exports,"BalanceDisplay",{enumerable:true,get:function(){return chunk7K4ENNWO_cjs.a}});Object.defineProperty(exports,"ChainListRenderer",{enumerable:true,get:function(){return chunk7K4ENNWO_cjs.b}});Object.defineProperty(exports,"ChainSelector",{enumerable:true,get:function(){return chunk7K4ENNWO_cjs.g}});Object.defineProperty(exports,"ConnectButton",{enumerable:true,get:function(){return chunk7K4ENNWO_cjs.l}});Object.defineProperty(exports,"ConnectCard",{enumerable:true,get:function(){return chunk7K4ENNWO_cjs.w}});Object.defineProperty(exports,"ConnectModal",{enumerable:true,get:function(){return chunk7K4ENNWO_cjs.G}});Object.defineProperty(exports,"ConnectedContent",{enumerable:true,get:function(){return chunk7K4ENNWO_cjs.j}});Object.defineProperty(exports,"ConnectedModal",{enumerable:true,get:function(){return chunk7K4ENNWO_cjs.t}});Object.defineProperty(exports,"ConnectedModalFooter",{enumerable:true,get:function(){return chunk7K4ENNWO_cjs.m}});Object.defineProperty(exports,"ConnectedModalMainContent",{enumerable:true,get:function(){return chunk7K4ENNWO_cjs.q}});Object.defineProperty(exports,"ConnectedModalNameAndBalance",{enumerable:true,get:function(){return chunk7K4ENNWO_cjs.n}});Object.defineProperty(exports,"ConnectedModalTxHistory",{enumerable:true,get:function(){return chunk7K4ENNWO_cjs.r}});Object.defineProperty(exports,"Connecting",{enumerable:true,get:function(){return chunk7K4ENNWO_cjs.x}});Object.defineProperty(exports,"ConnectionsContent",{enumerable:true,get:function(){return chunk7K4ENNWO_cjs.s}});Object.defineProperty(exports,"ConnectorsBlock",{enumerable:true,get:function(){return chunk7K4ENNWO_cjs.y}});Object.defineProperty(exports,"ConnectorsSelections",{enumerable:true,get:function(){return chunk7K4ENNWO_cjs.A}});Object.defineProperty(exports,"Disclaimer",{enumerable:true,get:function(){return chunk7K4ENNWO_cjs.z}});Object.defineProperty(exports,"GetWallet",{enumerable:true,get:function(){return chunk7K4ENNWO_cjs.B}});Object.defineProperty(exports,"IconButton",{enumerable:true,get:function(){return chunk7K4ENNWO_cjs.p}});Object.defineProperty(exports,"ImpersonateForm",{enumerable:true,get:function(){return chunk7K4ENNWO_cjs.C}});Object.defineProperty(exports,"LegalDisclaimer",{enumerable:true,get:function(){return chunk7K4ENNWO_cjs.D}});Object.defineProperty(exports,"NetworkSelections",{enumerable:true,get:function(){return chunk7K4ENNWO_cjs.E}});Object.defineProperty(exports,"NetworkTabs",{enumerable:true,get:function(){return chunk7K4ENNWO_cjs.F}});Object.defineProperty(exports,"RecentBadge",{enumerable:true,get:function(){return chunk7K4ENNWO_cjs.v}});Object.defineProperty(exports,"ScrollableChainList",{enumerable:true,get:function(){return chunk7K4ENNWO_cjs.f}});Object.defineProperty(exports,"SelectContentAnimated",{enumerable:true,get:function(){return chunk7K4ENNWO_cjs.e}});Object.defineProperty(exports,"StatusIcon",{enumerable:true,get:function(){return chunk7K4ENNWO_cjs.i}});Object.defineProperty(exports,"ToBottomButton",{enumerable:true,get:function(){return chunk7K4ENNWO_cjs.c}});Object.defineProperty(exports,"ToTopButton",{enumerable:true,get:function(){return chunk7K4ENNWO_cjs.d}});Object.defineProperty(exports,"ToastError",{enumerable:true,get:function(){return chunk7K4ENNWO_cjs.H}});Object.defineProperty(exports,"WaitForConnectionContent",{enumerable:true,get:function(){return chunk7K4ENNWO_cjs.k}});Object.defineProperty(exports,"WalletAvatar",{enumerable:true,get:function(){return chunk7K4ENNWO_cjs.h}});Object.defineProperty(exports,"WalletIcon",{enumerable:true,get:function(){return chunk7K4ENNWO_cjs.o}});
|
|
@@ -2,8 +2,8 @@ import { Variants, TargetAndTransition, VariantLabels, LegacyAnimationControls,
|
|
|
2
2
|
import * as React$1 from 'react';
|
|
3
3
|
import React__default, { ComponentPropsWithoutRef, ComponentType, ReactNode } from 'react';
|
|
4
4
|
import * as Select from '@radix-ui/react-select';
|
|
5
|
-
import { I as InitialChains, B as ButtonTxStatus, N as NovaConnectProviderProps, q as useNovaConnectLabels, d as NativeBalanceResult, a as ConnectedContentType, v as ConnectedModalTxHistoryProps, w as ConnectedModalTxHistoryCustomization, C as ConnectContentType } from '../useWalletNativeBalance-
|
|
6
|
-
export { x as ConnectedModalTxHistory, y as LocalTransactionsHistoryCustomization, z as LocalTxPagination } from '../useWalletNativeBalance-
|
|
5
|
+
import { I as InitialChains, B as ButtonTxStatus, N as NovaConnectProviderProps, q as useNovaConnectLabels, d as NativeBalanceResult, a as ConnectedContentType, v as ConnectedModalTxHistoryProps, w as ConnectedModalTxHistoryCustomization, C as ConnectContentType } from '../useWalletNativeBalance-BuiJip3d.cjs';
|
|
6
|
+
export { x as ConnectedModalTxHistory, y as LocalTransactionsHistoryCustomization, z as LocalTxPagination } from '../useWalletNativeBalance-BuiJip3d.cjs';
|
|
7
7
|
import { BaseConnector } from '@tuwaio/satellite-core';
|
|
8
8
|
import { Dialog, DialogContent, StarsBackground } from '@tuwaio/nova-core';
|
|
9
9
|
import { Transaction } from '@tuwaio/pulsar-core';
|
|
@@ -2,8 +2,8 @@ import { Variants, TargetAndTransition, VariantLabels, LegacyAnimationControls,
|
|
|
2
2
|
import * as React$1 from 'react';
|
|
3
3
|
import React__default, { ComponentPropsWithoutRef, ComponentType, ReactNode } from 'react';
|
|
4
4
|
import * as Select from '@radix-ui/react-select';
|
|
5
|
-
import { I as InitialChains, B as ButtonTxStatus, N as NovaConnectProviderProps, q as useNovaConnectLabels, d as NativeBalanceResult, a as ConnectedContentType, v as ConnectedModalTxHistoryProps, w as ConnectedModalTxHistoryCustomization, C as ConnectContentType } from '../useWalletNativeBalance-
|
|
6
|
-
export { x as ConnectedModalTxHistory, y as LocalTransactionsHistoryCustomization, z as LocalTxPagination } from '../useWalletNativeBalance-
|
|
5
|
+
import { I as InitialChains, B as ButtonTxStatus, N as NovaConnectProviderProps, q as useNovaConnectLabels, d as NativeBalanceResult, a as ConnectedContentType, v as ConnectedModalTxHistoryProps, w as ConnectedModalTxHistoryCustomization, C as ConnectContentType } from '../useWalletNativeBalance-DrgdoQa-.js';
|
|
6
|
+
export { x as ConnectedModalTxHistory, y as LocalTransactionsHistoryCustomization, z as LocalTxPagination } from '../useWalletNativeBalance-DrgdoQa-.js';
|
|
7
7
|
import { BaseConnector } from '@tuwaio/satellite-core';
|
|
8
8
|
import { Dialog, DialogContent, StarsBackground } from '@tuwaio/nova-core';
|
|
9
9
|
import { Transaction } from '@tuwaio/pulsar-core';
|
package/dist/components/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{u as AboutWallets,a as BalanceDisplay,b as ChainListRenderer,g as ChainSelector,l as ConnectButton,w as ConnectCard,G as ConnectModal,j as ConnectedContent,t as ConnectedModal,m as ConnectedModalFooter,q as ConnectedModalMainContent,n as ConnectedModalNameAndBalance,r as ConnectedModalTxHistory,x as Connecting,s as ConnectionsContent,y as ConnectorsBlock,A as ConnectorsSelections,z as Disclaimer,B as GetWallet,p as IconButton,C as ImpersonateForm,D as LegalDisclaimer,E as NetworkSelections,F as NetworkTabs,v as RecentBadge,f as ScrollableChainList,e as SelectContentAnimated,i as StatusIcon,c as ToBottomButton,d as ToTopButton,H as ToastError,k as WaitForConnectionContent,h as WalletAvatar,o as WalletIcon}from'../chunk-
|
|
1
|
+
export{u as AboutWallets,a as BalanceDisplay,b as ChainListRenderer,g as ChainSelector,l as ConnectButton,w as ConnectCard,G as ConnectModal,j as ConnectedContent,t as ConnectedModal,m as ConnectedModalFooter,q as ConnectedModalMainContent,n as ConnectedModalNameAndBalance,r as ConnectedModalTxHistory,x as Connecting,s as ConnectionsContent,y as ConnectorsBlock,A as ConnectorsSelections,z as Disclaimer,B as GetWallet,p as IconButton,C as ImpersonateForm,D as LegalDisclaimer,E as NetworkSelections,F as NetworkTabs,v as RecentBadge,f as ScrollableChainList,e as SelectContentAnimated,i as StatusIcon,c as ToBottomButton,d as ToTopButton,H as ToastError,k as WaitForConnectionContent,h as WalletAvatar,o as WalletIcon}from'../chunk-5MOVHUHI.js';import'../chunk-ARBYH7CW.js';import'../chunk-S3IRVZMG.js';import'../chunk-NQ5AECZQ.js';import'../chunk-EYP534IS.js';
|
package/dist/hooks/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunk7TYZT7ZD_cjs=require('../chunk-7TYZT7ZD.cjs');require('../chunk-K44IHM6B.cjs'),require('../chunk-MGBN4EIT.cjs'),require('../chunk-V6XDFRWV.cjs');Object.defineProperty(exports,"NovaConnectLabelsContext",{enumerable:true,get:function(){return chunk7TYZT7ZD_cjs.g}});Object.defineProperty(exports,"NovaConnectProviderContext",{enumerable:true,get:function(){return chunk7TYZT7ZD_cjs.c}});Object.defineProperty(exports,"NovaConnectProviderError",{enumerable:true,get:function(){return chunk7TYZT7ZD_cjs.b}});Object.defineProperty(exports,"createLabelsSubset",{enumerable:true,get:function(){return chunk7TYZT7ZD_cjs.o}});Object.defineProperty(exports,"getLabelWithFallback",{enumerable:true,get:function(){return chunk7TYZT7ZD_cjs.n}});Object.defineProperty(exports,"hasLabel",{enumerable:true,get:function(){return chunk7TYZT7ZD_cjs.k}});Object.defineProperty(exports,"isDefaultLabels",{enumerable:true,get:function(){return chunk7TYZT7ZD_cjs.m}});Object.defineProperty(exports,"useGetWalletNameAndAvatar",{enumerable:true,get:function(){return chunk7TYZT7ZD_cjs.a}});Object.defineProperty(exports,"useHasNovaConnectContext",{enumerable:true,get:function(){return chunk7TYZT7ZD_cjs.e}});Object.defineProperty(exports,"useLabelsByCategory",{enumerable:true,get:function(){return chunk7TYZT7ZD_cjs.l}});Object.defineProperty(exports,"useNovaConnect",{enumerable:true,get:function(){return chunk7TYZT7ZD_cjs.d}});Object.defineProperty(exports,"useNovaConnectLabel",{enumerable:true,get:function(){return chunk7TYZT7ZD_cjs.i}});Object.defineProperty(exports,"useNovaConnectLabels",{enumerable:true,get:function(){return chunk7TYZT7ZD_cjs.h}});Object.defineProperty(exports,"useNovaConnectLabelsSubset",{enumerable:true,get:function(){return chunk7TYZT7ZD_cjs.j}});Object.defineProperty(exports,"useNovaConnectOptional",{enumerable:true,get:function(){return chunk7TYZT7ZD_cjs.f}});Object.defineProperty(exports,"useNovaSiwx",{enumerable:true,get:function(){return chunk7TYZT7ZD_cjs.p}});Object.defineProperty(exports,"useWalletChainsList",{enumerable:true,get:function(){return chunk7TYZT7ZD_cjs.y}});Object.defineProperty(exports,"useWalletNativeBalance",{enumerable:true,get:function(){return chunk7TYZT7ZD_cjs.z}});
|
package/dist/hooks/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { I as InitialChains } from '../useWalletNativeBalance-
|
|
2
|
-
export { B as ButtonTxStatus, C as ConnectContentType, a as ConnectedContentType, L as LabelCategory, c as LegalConfig, d as NativeBalanceResult, e as NovaConnectLabelsContext, f as NovaConnectProviderContext, g as NovaConnectProviderError, N as NovaConnectProviderProps, b as NovaConnectProviderType, W as WalletBalance, j as createLabelsSubset, k as getLabelWithFallback, l as hasLabel, m as isDefaultLabels, u as useHasNovaConnectContext, n as useLabelsByCategory, o as useNovaConnect, p as useNovaConnectLabel, q as useNovaConnectLabels, r as useNovaConnectLabelsSubset, s as useNovaConnectOptional, t as useWalletNativeBalance } from '../useWalletNativeBalance-
|
|
1
|
+
import { I as InitialChains } from '../useWalletNativeBalance-BuiJip3d.cjs';
|
|
2
|
+
export { B as ButtonTxStatus, C as ConnectContentType, a as ConnectedContentType, L as LabelCategory, c as LegalConfig, d as NativeBalanceResult, e as NovaConnectLabelsContext, f as NovaConnectProviderContext, g as NovaConnectProviderError, N as NovaConnectProviderProps, b as NovaConnectProviderType, W as WalletBalance, j as createLabelsSubset, k as getLabelWithFallback, l as hasLabel, m as isDefaultLabels, u as useHasNovaConnectContext, n as useLabelsByCategory, o as useNovaConnect, p as useNovaConnectLabel, q as useNovaConnectLabels, r as useNovaConnectLabelsSubset, s as useNovaConnectOptional, t as useWalletNativeBalance } from '../useWalletNativeBalance-BuiJip3d.cjs';
|
|
3
3
|
import * as _tuwaio_satellite_core from '@tuwaio/satellite-core';
|
|
4
4
|
import * as _tuwaio_satellite_react from '@tuwaio/satellite-react';
|
|
5
5
|
import { SatelliteSiwxFieldOptions, UseSiwxSignInOptions } from '@tuwaio/siwx-react';
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { I as InitialChains } from '../useWalletNativeBalance-
|
|
2
|
-
export { B as ButtonTxStatus, C as ConnectContentType, a as ConnectedContentType, L as LabelCategory, c as LegalConfig, d as NativeBalanceResult, e as NovaConnectLabelsContext, f as NovaConnectProviderContext, g as NovaConnectProviderError, N as NovaConnectProviderProps, b as NovaConnectProviderType, W as WalletBalance, j as createLabelsSubset, k as getLabelWithFallback, l as hasLabel, m as isDefaultLabels, u as useHasNovaConnectContext, n as useLabelsByCategory, o as useNovaConnect, p as useNovaConnectLabel, q as useNovaConnectLabels, r as useNovaConnectLabelsSubset, s as useNovaConnectOptional, t as useWalletNativeBalance } from '../useWalletNativeBalance-
|
|
1
|
+
import { I as InitialChains } from '../useWalletNativeBalance-DrgdoQa-.js';
|
|
2
|
+
export { B as ButtonTxStatus, C as ConnectContentType, a as ConnectedContentType, L as LabelCategory, c as LegalConfig, d as NativeBalanceResult, e as NovaConnectLabelsContext, f as NovaConnectProviderContext, g as NovaConnectProviderError, N as NovaConnectProviderProps, b as NovaConnectProviderType, W as WalletBalance, j as createLabelsSubset, k as getLabelWithFallback, l as hasLabel, m as isDefaultLabels, u as useHasNovaConnectContext, n as useLabelsByCategory, o as useNovaConnect, p as useNovaConnectLabel, q as useNovaConnectLabels, r as useNovaConnectLabelsSubset, s as useNovaConnectOptional, t as useWalletNativeBalance } from '../useWalletNativeBalance-DrgdoQa-.js';
|
|
3
3
|
import * as _tuwaio_satellite_core from '@tuwaio/satellite-core';
|
|
4
4
|
import * as _tuwaio_satellite_react from '@tuwaio/satellite-react';
|
|
5
5
|
import { SatelliteSiwxFieldOptions, UseSiwxSignInOptions } from '@tuwaio/siwx-react';
|
package/dist/hooks/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{g as NovaConnectLabelsContext,c as NovaConnectProviderContext,b as NovaConnectProviderError,o as createLabelsSubset,n as getLabelWithFallback,k as hasLabel,m as isDefaultLabels,a as useGetWalletNameAndAvatar,e as useHasNovaConnectContext,l as useLabelsByCategory,d as useNovaConnect,i as useNovaConnectLabel,h as useNovaConnectLabels,j as useNovaConnectLabelsSubset,f as useNovaConnectOptional,p as useNovaSiwx,y as useWalletChainsList,z as useWalletNativeBalance}from'../chunk-
|
|
1
|
+
export{g as NovaConnectLabelsContext,c as NovaConnectProviderContext,b as NovaConnectProviderError,o as createLabelsSubset,n as getLabelWithFallback,k as hasLabel,m as isDefaultLabels,a as useGetWalletNameAndAvatar,e as useHasNovaConnectContext,l as useLabelsByCategory,d as useNovaConnect,i as useNovaConnectLabel,h as useNovaConnectLabels,j as useNovaConnectLabelsSubset,f as useNovaConnectOptional,p as useNovaSiwx,y as useWalletChainsList,z as useWalletNativeBalance}from'../chunk-ARBYH7CW.js';import'../chunk-S3IRVZMG.js';import'../chunk-NQ5AECZQ.js';import'../chunk-EYP534IS.js';
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var chunk7HBYKNSL_cjs=require('./chunk-7HBYKNSL.cjs'),chunkBVVQR6Y7_cjs=require('./chunk-BVVQR6Y7.cjs'),chunkK44IHM6B_cjs=require('./chunk-K44IHM6B.cjs'),chunkMGBN4EIT_cjs=require('./chunk-MGBN4EIT.cjs'),chunkV6XDFRWV_cjs=require('./chunk-V6XDFRWV.cjs'),orbitCore=require('@tuwaio/orbit-core'),novaCore=require('@tuwaio/nova-core'),react=require('react'),reactToastify=require('react-toastify'),jsxRuntime=require('react/jsx-runtime'),siwxReact=require('@tuwaio/siwx-react');var Ie=({title:e,rawError:o,onCopyComplete:r,errorType:l,isConnected:n,...u})=>jsxRuntime.jsx(chunk7HBYKNSL_cjs.H,{title:e,rawError:o,onCopyComplete:r,customization:u.customization}),We=e=>{let o=chunkBVVQR6Y7_cjs.h();return jsxRuntime.jsx(reactToastify.ToastContainer,{...e,role:"alert","aria-live":"assertive","aria-label":o.somethingWentWrong})},ze=(e,o)=>{e(o.title,o.rawError,o.errorKey);},He=e=>{e();},Ue=(e,o)=>{if(e&&process.env.NODE_ENV==="development"){let r=typeof o=="string"?o:o.message;console.log("Error copied to clipboard:",r.substring(0,100));}},Ve=e=>e,Fe=e=>e;function ie({containerId:e="nova-connect-errors",position:o="top-center",autoClose:r=7e3,draggable:l=false,customization:n}){let u=chunkBVVQR6Y7_cjs.h(),M=chunkV6XDFRWV_cjs.d(i=>i.switchNetworkError),B=chunkV6XDFRWV_cjs.d(i=>i.activeConnection),L=chunkV6XDFRWV_cjs.d(i=>i.connectionError),{ToastError:O=Ie,Container:A=We}=n?.components??{},{showError:R=ze,dismissError:S=He,onCopyComplete:d=Ue}=n?.handlers??{},{errorTitle:k=Ve,errorHash:t=Fe}=n??{},m=react.useRef(new Set),E=react.useRef(null),P=!!L,c=!!M,p=!!B?.isConnected,g=P||c,b=L||M||null,s=P?"wallet":c?"switch":null,a={hasWalletError:P,hasSwitchError:c,isConnected:p,hasAnyError:g,primaryError:b,errorType:s},N=u.somethingWentWrong;switch(a.errorType){case "wallet":N=u.connectionError;break;case "switch":N=u.errorWhenChainSwitching;break}let T=k(N,{errorType:a.errorType}),I=a.primaryError?`${a.errorType}-${a.primaryError.message.substring(0,50)}`:null,h=t(I,{primaryError:a.primaryError,errorType:a.errorType}),x=react.useCallback(()=>{S(()=>{E.current&&(reactToastify.toast.dismiss(E.current),E.current=null),reactToastify.toast.dismiss({containerId:e});});},[e,S]),W=react.useCallback((i,C)=>{d(i,C,s);},[d,s]),K=react.useCallback((i,C,w)=>{if(x(),!m.current.has(w))try{let V={containerId:e,toastId:w,onClose:()=>{m.current.delete(w),E.current=null;}},J=n?.toastOptions?.error?.({title:i,rawError:C,errorType:a.errorType,isConnected:a.isConnected}),F={...V,...J};reactToastify.toast.error(jsxRuntime.jsx(O,{title:i,rawError:C,errorType:a.errorType,isConnected:a.isConnected,onCopyComplete:Q=>W(Q,C),customization:n?.toastErrorCustomization}),F),m.current.add(w),E.current=w;}catch(V){console.error("Failed to show error toast:",V);}},[x,e,n?.toastOptions?.error,n?.toastErrorCustomization,O,a.errorType,a.isConnected,W]),z=react.useCallback((i,C,w)=>{R(K,{title:i,rawError:C,errorKey:w,errorType:s});},[K,R,s]);react.useEffect(()=>{if(p&&!g){x(),m.current.clear();return}if(g&&b&&h){if(p&&s!=="switch")return;z(T,b,h);}},[g,p,b,s,T,h,z,x]),react.useEffect(()=>()=>{x(),m.current.clear();},[x]);let _=n?.classNames?.container?n.classNames.container({hasErrors:a.hasAnyError,errorType:a.errorType}):"novacon:p-0 novacon:bg-transparent",U=react.useMemo(()=>{let i=n?.toastCloseButton;return i?({closeToast:C})=>jsxRuntime.jsx(novaCore.ToastCloseButton,{closeToast:C,...i}):novaCore.ToastCloseButton},[n?.toastCloseButton]),j={...{containerId:e,position:o,closeOnClick:false,icon:false,closeButton:U,autoClose:r,hideProgressBar:false,newestOnTop:false,pauseOnFocusLoss:false,draggable:l,pauseOnHover:true,theme:"light",transition:reactToastify.Bounce},...n?.containerProps,className:_};return jsxRuntime.jsx(A,{...j})}ie.displayName="ErrorsProvider";function le({labels:e,children:o}){let r=react.useMemo(()=>e,[e]);if(process.env.NODE_ENV==="development"){(!e||typeof e!="object")&&console.warn("NovaConnectLabelsProvider: labels prop should be an object");let n=["connectWallet","disconnect","connecting","connected","error","success"].filter(u=>!(u in e));n.length>0&&console.warn(`NovaConnectLabelsProvider: Missing required labels: ${n.join(", ")}`);}return jsxRuntime.jsx(chunkBVVQR6Y7_cjs.g.Provider,{value:r,children:o})}le.displayName="NovaConnectLabelsProvider";function de(e){let{enabled:o=true,getNonce:r,verifier:l,destroyer:n,domain:u,uri:M,statement:B,expirationTime:L,expirationSeconds:O,notBefore:A,requestId:R,resources:S,onSuccess:d,onError:k}=e,t=chunkV6XDFRWV_cjs.d(s=>s.activeConnection),m=chunkV6XDFRWV_cjs.d(s=>s.disconnect),{signIn:E}=siwxReact.useSiwx(),P=siwxReact.useSiwxSessionStore(s=>s.session),c=siwxReact.useSiwxSessionStore(s=>s.status),p=siwxReact.useSiwxSessionStore(s=>s.reset),g=react.useRef(null),b=react.useRef(false);return react.useEffect(()=>{(!t?.isConnected||!t?.address)&&(g.current=null,(c==="authenticated"||P)&&(p(),n&&n().catch(s=>{console.warn("[NovaSiwxWatcher] Failed to execute session destroyer:",s);})));},[t?.isConnected,t?.address,c,P,p,n]),react.useEffect(()=>{if(!(!o||!t?.isConnected||!t?.address||!t?.chainId)&&t.signMessage&&!b.current&&!(c==="building"||c==="signing"||c==="verifying"))try{let s={address:String(t.address),chainId:t.chainId,signMessage:t.signMessage,isConnected:t.isConnected},a=siwxReact.getSatelliteSiwxFields(s,{domain:u,uri:M,statement:B,expirationTime:L,expirationSeconds:O,notBefore:A,requestId:R,resources:S});if(c==="authenticated"&&P?.address===a.address||g.current===a.address)return;if(g.current=a.address,!l){console.warn("[NovaSiwxWatcher] Verifier not provided, skipping SIWX auto-authentication.");return}let N=T=>{let I=T instanceof Error?T.message:String(T);console.warn("[NovaSiwxWatcher] SIWX authentication rejected or failed:",I);let h=t.address;t.connectorType&&h===t.address&&m(t.connectorType),p(),k?.(I);};b.current=!0,E({signer:t.signMessage,verifier:l,getNonce:r,fields:a,onSuccess:d,onError:N}).catch(N).finally(()=>{b.current=!1;});}catch(s){console.warn("[NovaSiwxWatcher] Failed to build SIWX fields:",s);}},[t?.isConnected,t?.address,t?.chainId,t?.signMessage,t?.connectorType,m,o,c,P?.address,r,l,u,M,B,L,O,A,R,S,E,p,d,k]),null}var $e=({labels:e,children:o})=>jsxRuntime.jsx(le,{labels:e,children:o}),_e=({customization:e})=>jsxRuntime.jsx(ie,{customization:e}),je=(e,o)=>novaCore.deepMerge(e,o||{}),Je=e=>e,Qe=e=>e,Ye=(e,o,r)=>e;function Ze({labels:e,children:o,appChains:r,solanaRPCUrls:l,transactionPool:n,pulsarAdapter:u,withImpersonated:M,withBalance:B,withChain:L,popularConnectors:O,customConnectorGroups:A,legal:R,siwx:S,customization:d,pagination:k}){let t=chunkV6XDFRWV_cjs.d(te=>te.activeConnection),m=chunkV6XDFRWV_cjs.d(te=>te.connectionError),{LabelsProvider:E=$e,ErrorsProvider:P=_e}=d?.components??{},{merge:c=je,transform:p=Je}=d?.labels??{},{transform:g=Qe}=d?.contextValue??{},{providerTree:b=Ye}=d?.rendering??{},s=react.useMemo(()=>c(chunkMGBN4EIT_cjs.a,e||{}),[e,c]),[a,N]=react.useState(false),[T,I]=react.useState(false),[h,x]=react.useState(false),[W,K]=react.useState(false),[z,_]=react.useState("idle"),[U,me]=react.useState("connectors"),[j,i]=react.useState(void 0),[C,w]=react.useState(void 0),[V,J]=react.useState(""),[F,Q]=react.useState(false),[Y,Ne]=react.useState("main"),xe={appChains:r,solanaRPCUrls:l,withImpersonated:M,popularConnectors:O,customConnectorGroups:A,withBalance:B,withChain:L,isConnectModalOpen:a,setIsConnectModalOpen:N,isConnectedModalOpen:T,setIsConnectedModalOpen:I,isChainsListOpen:h,setIsChainsListOpen:x,isChainsListOpenMobile:W,setIsChainsListOpenMobile:K,connectedButtonStatus:z,setConnectedButtonStatus:_,connectedModalContentType:Y,setConnectedModalContentType:Ne,connectModalContentType:U,setConnectModalContentType:me,selectedAdapter:j,setSelectedAdapter:i,activeConnector:C,setActiveConnector:w,impersonatedAddress:V,setImpersonatedAddress:J,isConnected:F,setIsConnected:Q,legal:R},q=react.useMemo(()=>({isConnected:F,activeConnection:t,connectionError:m,modalStates:{isConnectModalOpen:a,isConnectedModalOpen:T,isChainsListOpen:h,isChainsListOpenMobile:W},contentTypes:{connectModal:U,connectedModal:Y},statuses:{connectedButton:z}}),[F,t,m,a,T,h,W,U,Y,z]),Me=react.useMemo(()=>p(s,q),[s,p,q]),Ce=g(xe,q),Z=jsxRuntime.jsx(P,{customization:d?.errors}),ee=jsxRuntime.jsx(E,{labels:Me,children:o}),oe=r||l?jsxRuntime.jsx(chunk7HBYKNSL_cjs.G,{solanaRPCUrls:l,appChains:r,customization:d?.modals?.connectModal}):null,re=r||l?jsxRuntime.jsx(chunk7HBYKNSL_cjs.t,{solanaRPCUrls:l,appChains:r,transactionPool:n,pulsarAdapter:u,customization:d?.modals?.connectedModal,pagination:k}):null,Le=jsxRuntime.jsxs(chunkBVVQR6Y7_cjs.c.Provider,{value:Ce,children:[jsxRuntime.jsx(de,{...S}),Z,ee,oe,re]}),Oe=jsxRuntime.jsxs(chunkBVVQR6Y7_cjs.c.Provider,{value:Ce,children:[jsxRuntime.jsx(de,{...S}),Z,ee,oe,re]}),Re=b(Oe,{ErrorsProvider:Z,LabelsProvider:ee,MainContent:Le,ConnectModal:oe||jsxRuntime.jsx(jsxRuntime.Fragment,{}),ConnectedModal:re||jsxRuntime.jsx(jsxRuntime.Fragment,{})},q);return jsxRuntime.jsx(jsxRuntime.Fragment,{children:Re})}Ze.displayName="NovaConnectProvider";async function kr(){let{getAllAdaptersStatus:e}=await import('./getChainsListByConnectorType-QCNOPM6I.cjs');return {hasEvmUtils:await X(),hasSolanaUtils:await $(),adaptersStatus:e()}}async function X(){try{return await import('viem'),await import('@tuwaio/orbit-evm'),!0}catch{return false}}async function $(){try{return await import('gill'),await import('@tuwaio/orbit-solana'),!0}catch{return false}}async function Ir(){try{if(!await X())return {available:!1,error:"EVM packages (viem, @tuwaio/orbit-evm) not available"};let o=await import('./evm/index.cjs'),r=await o.getEvmExports();return r.available?{...o,...r}:{available:!1,error:r.error||"Failed to load EVM exports"}}catch(e){return {available:false,error:e instanceof Error?e.message:"EVM utilities not available"}}}async function Wr(){try{if(!await $())return {available:!1,error:"Solana packages (gill, @tuwaio/orbit-solana) not available"};let o=await import('./solana/index.cjs'),r=await o.getSolanaExports();return r.available?{...o,...r}:{available:!1,error:r.error||"Failed to load Solana exports"}}catch(e){return {available:false,error:e instanceof Error?e.message:"Solana utilities not available"}}}async function zr(){let e={evm:false,solana:false,errors:[]};try{let o=await X(),r=await $();if(o||r){let{preloadChainAdapters:l}=await import('./getChainsListByConnectorType-QCNOPM6I.cjs'),n=[];o&&n.push(orbitCore.OrbitAdapter.EVM),r&&n.push(orbitCore.OrbitAdapter.SOLANA),await l(n),e.evm=o,e.solana=r;}else e.errors.push("No blockchain packages available for initialization");}catch(o){let r=o instanceof Error?o.message:"Unknown initialization error";e.errors.push(r);}return e}async function Hr(e){return e===orbitCore.OrbitAdapter.Starknet||e!==orbitCore.OrbitAdapter.EVM&&e!==orbitCore.OrbitAdapter.SOLANA?false:e===orbitCore.OrbitAdapter.EVM?X():$()}Object.defineProperty(exports,"NovaConnectLabelsContext",{enumerable:true,get:function(){return chunkBVVQR6Y7_cjs.g}});Object.defineProperty(exports,"NovaConnectProviderContext",{enumerable:true,get:function(){return chunkBVVQR6Y7_cjs.c}});Object.defineProperty(exports,"NovaConnectProviderError",{enumerable:true,get:function(){return chunkBVVQR6Y7_cjs.b}});Object.defineProperty(exports,"createLabelsSubset",{enumerable:true,get:function(){return chunkBVVQR6Y7_cjs.o}});Object.defineProperty(exports,"getAvailableChainIds",{enumerable:true,get:function(){return chunkBVVQR6Y7_cjs.r}});Object.defineProperty(exports,"getAvailableSolanaClusters",{enumerable:true,get:function(){return chunkBVVQR6Y7_cjs.w}});Object.defineProperty(exports,"getConnectChainId",{enumerable:true,get:function(){return chunkBVVQR6Y7_cjs.q}});Object.defineProperty(exports,"getFilteredConnectors",{enumerable:true,get:function(){return chunkBVVQR6Y7_cjs.u}});Object.defineProperty(exports,"getGroupedConnectors",{enumerable:true,get:function(){return chunkBVVQR6Y7_cjs.s}});Object.defineProperty(exports,"getLabelWithFallback",{enumerable:true,get:function(){return chunkBVVQR6Y7_cjs.n}});Object.defineProperty(exports,"hasAvailableConnectors",{enumerable:true,get:function(){return chunkBVVQR6Y7_cjs.t}});Object.defineProperty(exports,"hasConnectorsForAdapter",{enumerable:true,get:function(){return chunkBVVQR6Y7_cjs.v}});Object.defineProperty(exports,"hasLabel",{enumerable:true,get:function(){return chunkBVVQR6Y7_cjs.k}});Object.defineProperty(exports,"isDefaultLabels",{enumerable:true,get:function(){return chunkBVVQR6Y7_cjs.m}});Object.defineProperty(exports,"isValidSolanaCluster",{enumerable:true,get:function(){return chunkBVVQR6Y7_cjs.x}});Object.defineProperty(exports,"useGetWalletNameAndAvatar",{enumerable:true,get:function(){return chunkBVVQR6Y7_cjs.a}});Object.defineProperty(exports,"useHasNovaConnectContext",{enumerable:true,get:function(){return chunkBVVQR6Y7_cjs.e}});Object.defineProperty(exports,"useLabelsByCategory",{enumerable:true,get:function(){return chunkBVVQR6Y7_cjs.l}});Object.defineProperty(exports,"useNovaConnect",{enumerable:true,get:function(){return chunkBVVQR6Y7_cjs.d}});Object.defineProperty(exports,"useNovaConnectLabel",{enumerable:true,get:function(){return chunkBVVQR6Y7_cjs.i}});Object.defineProperty(exports,"useNovaConnectLabels",{enumerable:true,get:function(){return chunkBVVQR6Y7_cjs.h}});Object.defineProperty(exports,"useNovaConnectLabelsSubset",{enumerable:true,get:function(){return chunkBVVQR6Y7_cjs.j}});Object.defineProperty(exports,"useNovaConnectOptional",{enumerable:true,get:function(){return chunkBVVQR6Y7_cjs.f}});Object.defineProperty(exports,"useNovaSiwx",{enumerable:true,get:function(){return chunkBVVQR6Y7_cjs.p}});Object.defineProperty(exports,"useWalletChainsList",{enumerable:true,get:function(){return chunkBVVQR6Y7_cjs.y}});Object.defineProperty(exports,"useWalletNativeBalance",{enumerable:true,get:function(){return chunkBVVQR6Y7_cjs.z}});Object.defineProperty(exports,"getAdapterStatus",{enumerable:true,get:function(){return chunkK44IHM6B_cjs.k}});Object.defineProperty(exports,"getAllAdaptersStatus",{enumerable:true,get:function(){return chunkK44IHM6B_cjs.l}});Object.defineProperty(exports,"getAvailableSolanaClustersAsync",{enumerable:true,get:function(){return chunkK44IHM6B_cjs.g}});Object.defineProperty(exports,"getChainsListByConnectorType",{enumerable:true,get:function(){return chunkK44IHM6B_cjs.b}});Object.defineProperty(exports,"getChainsListByConnectorTypeAsync",{enumerable:true,get:function(){return chunkK44IHM6B_cjs.a}});Object.defineProperty(exports,"getChainsListByConnectorTypeSync",{enumerable:true,get:function(){return chunkK44IHM6B_cjs.b}});Object.defineProperty(exports,"getWalletChains",{enumerable:true,get:function(){return chunkK44IHM6B_cjs.i}});Object.defineProperty(exports,"isEvmChainList",{enumerable:true,get:function(){return chunkK44IHM6B_cjs.e}});Object.defineProperty(exports,"isEvmChainListAsync",{enumerable:true,get:function(){return chunkK44IHM6B_cjs.c}});Object.defineProperty(exports,"isEvmChainListSync",{enumerable:true,get:function(){return chunkK44IHM6B_cjs.e}});Object.defineProperty(exports,"isSolanaChainList",{enumerable:true,get:function(){return chunkK44IHM6B_cjs.f}});Object.defineProperty(exports,"isSolanaChainListAsync",{enumerable:true,get:function(){return chunkK44IHM6B_cjs.d}});Object.defineProperty(exports,"isSolanaChainListSync",{enumerable:true,get:function(){return chunkK44IHM6B_cjs.f}});Object.defineProperty(exports,"isValidSolanaClusterAsync",{enumerable:true,get:function(){return chunkK44IHM6B_cjs.h}});Object.defineProperty(exports,"preloadChainAdapters",{enumerable:true,get:function(){return chunkK44IHM6B_cjs.j}});exports.ErrorsProvider=ie;exports.NovaConnectLabelsProvider=le;exports.NovaConnectProvider=Ze;exports.NovaSiwxWatcher=de;exports.getBlockchainUtilities=kr;exports.getEvmUtils=Ir;exports.getSolanaUtils=Wr;exports.initializeBlockchainSupport=zr;exports.isAdapterSupported=Hr;
|
|
1
|
+
'use strict';var chunk7K4ENNWO_cjs=require('./chunk-7K4ENNWO.cjs'),chunk7TYZT7ZD_cjs=require('./chunk-7TYZT7ZD.cjs'),chunkK44IHM6B_cjs=require('./chunk-K44IHM6B.cjs'),chunkMGBN4EIT_cjs=require('./chunk-MGBN4EIT.cjs'),chunkV6XDFRWV_cjs=require('./chunk-V6XDFRWV.cjs'),orbitCore=require('@tuwaio/orbit-core'),novaCore=require('@tuwaio/nova-core'),react=require('react'),reactToastify=require('react-toastify'),jsxRuntime=require('react/jsx-runtime'),siwxReact=require('@tuwaio/siwx-react');var Ie=({title:e,rawError:o,onCopyComplete:r,errorType:c,isConnected:n,...u})=>jsxRuntime.jsx(chunk7K4ENNWO_cjs.H,{title:e,rawError:o,onCopyComplete:r,customization:u.customization}),We=e=>{let o=chunk7TYZT7ZD_cjs.h();return jsxRuntime.jsx(reactToastify.ToastContainer,{...e,role:"alert","aria-live":"assertive","aria-label":o.somethingWentWrong})},ze=(e,o)=>{e(o.title,o.rawError,o.errorKey);},He=e=>{e();},Ue=(e,o)=>{if(e&&process.env.NODE_ENV==="development"){let r=typeof o=="string"?o:o.message;console.log("Error copied to clipboard:",r.substring(0,100));}},Ve=e=>e,Fe=e=>e;function ie({containerId:e="nova-connect-errors",position:o="top-center",autoClose:r=7e3,draggable:c=false,customization:n}){let u=chunk7TYZT7ZD_cjs.h(),M=chunkV6XDFRWV_cjs.d(i=>i.switchNetworkError),B=chunkV6XDFRWV_cjs.d(i=>i.activeConnection),L=chunkV6XDFRWV_cjs.d(i=>i.connectionError),{ToastError:O=Ie,Container:A=We}=n?.components??{},{showError:R=ze,dismissError:S=He,onCopyComplete:d=Ue}=n?.handlers??{},{errorTitle:k=Ve,errorHash:t=Fe}=n??{},m=react.useRef(new Set),E=react.useRef(null),P=!!L,l=!!M,p=!!B?.isConnected,g=P||l,b=L||M||null,s=P?"wallet":l?"switch":null,a={hasWalletError:P,hasSwitchError:l,isConnected:p,hasAnyError:g,primaryError:b,errorType:s},N=u.somethingWentWrong;switch(a.errorType){case "wallet":N=u.connectionError;break;case "switch":N=u.errorWhenChainSwitching;break}let T=k(N,{errorType:a.errorType}),I=a.primaryError?`${a.errorType}-${a.primaryError.message.substring(0,50)}`:null,h=t(I,{primaryError:a.primaryError,errorType:a.errorType}),x=react.useCallback(()=>{S(()=>{E.current&&(reactToastify.toast.dismiss(E.current),E.current=null),reactToastify.toast.dismiss({containerId:e});});},[e,S]),W=react.useCallback((i,C)=>{d(i,C,s);},[d,s]),K=react.useCallback((i,C,w)=>{if(x(),!m.current.has(w))try{let V={containerId:e,toastId:w,onClose:()=>{m.current.delete(w),E.current=null;}},J=n?.toastOptions?.error?.({title:i,rawError:C,errorType:a.errorType,isConnected:a.isConnected}),F={...V,...J};reactToastify.toast.error(jsxRuntime.jsx(O,{title:i,rawError:C,errorType:a.errorType,isConnected:a.isConnected,onCopyComplete:Q=>W(Q,C),customization:n?.toastErrorCustomization}),F),m.current.add(w),E.current=w;}catch(V){console.error("Failed to show error toast:",V);}},[x,e,n?.toastOptions?.error,n?.toastErrorCustomization,O,a.errorType,a.isConnected,W]),z=react.useCallback((i,C,w)=>{R(K,{title:i,rawError:C,errorKey:w,errorType:s});},[K,R,s]);react.useEffect(()=>{if(p&&!g){x(),m.current.clear();return}if(g&&b&&h){if(p&&s!=="switch")return;z(T,b,h);}},[g,p,b,s,T,h,z,x]),react.useEffect(()=>()=>{x(),m.current.clear();},[x]);let _=n?.classNames?.container?n.classNames.container({hasErrors:a.hasAnyError,errorType:a.errorType}):"novacon:p-0 novacon:bg-transparent",U=react.useMemo(()=>{let i=n?.toastCloseButton;return i?({closeToast:C})=>jsxRuntime.jsx(novaCore.ToastCloseButton,{closeToast:C,...i}):novaCore.ToastCloseButton},[n?.toastCloseButton]),j={...{containerId:e,position:o,closeOnClick:false,icon:false,closeButton:U,autoClose:r,hideProgressBar:false,newestOnTop:false,pauseOnFocusLoss:false,draggable:c,pauseOnHover:true,theme:"light",transition:reactToastify.Bounce},...n?.containerProps,className:_};return jsxRuntime.jsx(A,{...j})}ie.displayName="ErrorsProvider";function ce({labels:e,children:o}){let r=react.useMemo(()=>e,[e]);if(process.env.NODE_ENV==="development"){(!e||typeof e!="object")&&console.warn("NovaConnectLabelsProvider: labels prop should be an object");let n=["connectWallet","disconnect","connecting","connected","error","success"].filter(u=>!(u in e));n.length>0&&console.warn(`NovaConnectLabelsProvider: Missing required labels: ${n.join(", ")}`);}return jsxRuntime.jsx(chunk7TYZT7ZD_cjs.g.Provider,{value:r,children:o})}ce.displayName="NovaConnectLabelsProvider";function de(e){let{enabled:o=true,getNonce:r,verifier:c,destroyer:n,domain:u,uri:M,statement:B,expirationTime:L,expirationSeconds:O,notBefore:A,requestId:R,resources:S,onSuccess:d,onError:k}=e,t=chunkV6XDFRWV_cjs.d(s=>s.activeConnection),m=chunkV6XDFRWV_cjs.d(s=>s.disconnect),{signIn:E}=siwxReact.useSiwx(),P=siwxReact.useSiwxSessionStore(s=>s.session),l=siwxReact.useSiwxSessionStore(s=>s.status),p=siwxReact.useSiwxSessionStore(s=>s.reset),g=react.useRef(null),b=react.useRef(false);return react.useEffect(()=>{(!t?.isConnected||!t?.address)&&(g.current=null,(l==="authenticated"||P)&&(p(),n&&n().catch(s=>{console.warn("[NovaSiwxWatcher] Failed to execute session destroyer:",s);})));},[t?.isConnected,t?.address,l,P,p,n]),react.useEffect(()=>{if(!(!o||!t?.isConnected||!t?.address||!t?.chainId)&&t.signMessage&&!b.current&&!(l==="building"||l==="signing"||l==="verifying"))try{let s={address:String(t.address),chainId:t.chainId,signMessage:t.signMessage,isConnected:t.isConnected},a=siwxReact.getSatelliteSiwxFields(s,{domain:u,uri:M,statement:B,expirationTime:L,expirationSeconds:O,notBefore:A,requestId:R,resources:S});if(l==="authenticated"&&P?.address===a.address||g.current===a.address)return;if(g.current=a.address,!c){console.warn("[NovaSiwxWatcher] Verifier not provided, skipping SIWX auto-authentication.");return}let N=T=>{let I=T instanceof Error?T.message:String(T);console.warn("[NovaSiwxWatcher] SIWX authentication rejected or failed:",I);let h=t.address;t.connectorType&&h===t.address&&m(t.connectorType),p(),k?.(I);};b.current=!0,E({signer:t.signMessage,verifier:c,getNonce:r,fields:a,onSuccess:d,onError:N}).catch(N).finally(()=>{b.current=!1;});}catch(s){console.warn("[NovaSiwxWatcher] Failed to build SIWX fields:",s);}},[t?.isConnected,t?.address,t?.chainId,t?.signMessage,t?.connectorType,m,o,l,P?.address,r,c,u,M,B,L,O,A,R,S,E,p,d,k]),null}var $e=({labels:e,children:o})=>jsxRuntime.jsx(ce,{labels:e,children:o}),_e=({customization:e})=>jsxRuntime.jsx(ie,{customization:e}),je=(e,o)=>novaCore.deepMerge(e,o||{}),Je=e=>e,Qe=e=>e,Ye=(e,o,r)=>e;function Ze({labels:e,children:o,appChains:r,solanaRPCUrls:c,transactionPool:n,pulsarAdapter:u,withImpersonated:M,withBalance:B,withChain:L,popularConnectors:O,customConnectorGroups:A,legal:R,siwx:S,customization:d,pagination:k}){let t=chunkV6XDFRWV_cjs.d(te=>te.activeConnection),m=chunkV6XDFRWV_cjs.d(te=>te.connectionError),{LabelsProvider:E=$e,ErrorsProvider:P=_e}=d?.components??{},{merge:l=je,transform:p=Je}=d?.labels??{},{transform:g=Qe}=d?.contextValue??{},{providerTree:b=Ye}=d?.rendering??{},s=react.useMemo(()=>l(chunkMGBN4EIT_cjs.a,e||{}),[e,l]),[a,N]=react.useState(false),[T,I]=react.useState(false),[h,x]=react.useState(false),[W,K]=react.useState(false),[z,_]=react.useState("idle"),[U,me]=react.useState("connectors"),[j,i]=react.useState(void 0),[C,w]=react.useState(void 0),[V,J]=react.useState(""),[F,Q]=react.useState(false),[Y,Ne]=react.useState("main"),xe={appChains:r,solanaRPCUrls:c,withImpersonated:M,popularConnectors:O,customConnectorGroups:A,withBalance:B,withChain:L,isConnectModalOpen:a,setIsConnectModalOpen:N,isConnectedModalOpen:T,setIsConnectedModalOpen:I,isChainsListOpen:h,setIsChainsListOpen:x,isChainsListOpenMobile:W,setIsChainsListOpenMobile:K,connectedButtonStatus:z,setConnectedButtonStatus:_,connectedModalContentType:Y,setConnectedModalContentType:Ne,connectModalContentType:U,setConnectModalContentType:me,selectedAdapter:j,setSelectedAdapter:i,activeConnector:C,setActiveConnector:w,impersonatedAddress:V,setImpersonatedAddress:J,isConnected:F,setIsConnected:Q,legal:R},q=react.useMemo(()=>({isConnected:F,activeConnection:t,connectionError:m,modalStates:{isConnectModalOpen:a,isConnectedModalOpen:T,isChainsListOpen:h,isChainsListOpenMobile:W},contentTypes:{connectModal:U,connectedModal:Y},statuses:{connectedButton:z}}),[F,t,m,a,T,h,W,U,Y,z]),Me=react.useMemo(()=>p(s,q),[s,p,q]),Ce=g(xe,q),Z=jsxRuntime.jsx(P,{customization:d?.errors}),ee=jsxRuntime.jsx(E,{labels:Me,children:o}),oe=r||c?jsxRuntime.jsx(chunk7K4ENNWO_cjs.G,{solanaRPCUrls:c,appChains:r,customization:d?.modals?.connectModal}):null,re=r||c?jsxRuntime.jsx(chunk7K4ENNWO_cjs.t,{solanaRPCUrls:c,appChains:r,transactionPool:n,pulsarAdapter:u,customization:d?.modals?.connectedModal,pagination:k}):null,Le=jsxRuntime.jsxs(chunk7TYZT7ZD_cjs.c.Provider,{value:Ce,children:[jsxRuntime.jsx(de,{...S}),Z,ee,oe,re]}),Oe=jsxRuntime.jsxs(chunk7TYZT7ZD_cjs.c.Provider,{value:Ce,children:[jsxRuntime.jsx(de,{...S}),Z,ee,oe,re]}),Re=b(Oe,{ErrorsProvider:Z,LabelsProvider:ee,MainContent:Le,ConnectModal:oe||jsxRuntime.jsx(jsxRuntime.Fragment,{}),ConnectedModal:re||jsxRuntime.jsx(jsxRuntime.Fragment,{})},q);return jsxRuntime.jsx(jsxRuntime.Fragment,{children:Re})}Ze.displayName="NovaConnectProvider";async function kr(){let{getAllAdaptersStatus:e}=await import('./getChainsListByConnectorType-QCNOPM6I.cjs');return {hasEvmUtils:await X(),hasSolanaUtils:await $(),adaptersStatus:e()}}async function X(){try{return await import('viem'),await import('@tuwaio/orbit-evm'),!0}catch{return false}}async function $(){try{return await import('@solana/kit'),await import('@tuwaio/orbit-solana'),!0}catch{return false}}async function Ir(){try{if(!await X())return {available:!1,error:"EVM packages (viem, @tuwaio/orbit-evm) not available"};let o=await import('./evm/index.cjs'),r=await o.getEvmExports();return r.available?{...o,...r}:{available:!1,error:r.error||"Failed to load EVM exports"}}catch(e){return {available:false,error:e instanceof Error?e.message:"EVM utilities not available"}}}async function Wr(){try{if(!await $())return {available:!1,error:"Solana packages (@solana/kit, @tuwaio/orbit-solana) not available"};let o=await import('./solana/index.cjs'),r=await o.getSolanaExports();return r.available?{...o,...r}:{available:!1,error:r.error||"Failed to load Solana exports"}}catch(e){return {available:false,error:e instanceof Error?e.message:"Solana utilities not available"}}}async function zr(){let e={evm:false,solana:false,errors:[]};try{let o=await X(),r=await $();if(o||r){let{preloadChainAdapters:c}=await import('./getChainsListByConnectorType-QCNOPM6I.cjs'),n=[];o&&n.push(orbitCore.OrbitAdapter.EVM),r&&n.push(orbitCore.OrbitAdapter.SOLANA),await c(n),e.evm=o,e.solana=r;}else e.errors.push("No blockchain packages available for initialization");}catch(o){let r=o instanceof Error?o.message:"Unknown initialization error";e.errors.push(r);}return e}async function Hr(e){return e===orbitCore.OrbitAdapter.Starknet||e!==orbitCore.OrbitAdapter.EVM&&e!==orbitCore.OrbitAdapter.SOLANA?false:e===orbitCore.OrbitAdapter.EVM?X():$()}Object.defineProperty(exports,"NovaConnectLabelsContext",{enumerable:true,get:function(){return chunk7TYZT7ZD_cjs.g}});Object.defineProperty(exports,"NovaConnectProviderContext",{enumerable:true,get:function(){return chunk7TYZT7ZD_cjs.c}});Object.defineProperty(exports,"NovaConnectProviderError",{enumerable:true,get:function(){return chunk7TYZT7ZD_cjs.b}});Object.defineProperty(exports,"createLabelsSubset",{enumerable:true,get:function(){return chunk7TYZT7ZD_cjs.o}});Object.defineProperty(exports,"getAvailableChainIds",{enumerable:true,get:function(){return chunk7TYZT7ZD_cjs.r}});Object.defineProperty(exports,"getAvailableSolanaClusters",{enumerable:true,get:function(){return chunk7TYZT7ZD_cjs.w}});Object.defineProperty(exports,"getConnectChainId",{enumerable:true,get:function(){return chunk7TYZT7ZD_cjs.q}});Object.defineProperty(exports,"getFilteredConnectors",{enumerable:true,get:function(){return chunk7TYZT7ZD_cjs.u}});Object.defineProperty(exports,"getGroupedConnectors",{enumerable:true,get:function(){return chunk7TYZT7ZD_cjs.s}});Object.defineProperty(exports,"getLabelWithFallback",{enumerable:true,get:function(){return chunk7TYZT7ZD_cjs.n}});Object.defineProperty(exports,"hasAvailableConnectors",{enumerable:true,get:function(){return chunk7TYZT7ZD_cjs.t}});Object.defineProperty(exports,"hasConnectorsForAdapter",{enumerable:true,get:function(){return chunk7TYZT7ZD_cjs.v}});Object.defineProperty(exports,"hasLabel",{enumerable:true,get:function(){return chunk7TYZT7ZD_cjs.k}});Object.defineProperty(exports,"isDefaultLabels",{enumerable:true,get:function(){return chunk7TYZT7ZD_cjs.m}});Object.defineProperty(exports,"isValidSolanaCluster",{enumerable:true,get:function(){return chunk7TYZT7ZD_cjs.x}});Object.defineProperty(exports,"useGetWalletNameAndAvatar",{enumerable:true,get:function(){return chunk7TYZT7ZD_cjs.a}});Object.defineProperty(exports,"useHasNovaConnectContext",{enumerable:true,get:function(){return chunk7TYZT7ZD_cjs.e}});Object.defineProperty(exports,"useLabelsByCategory",{enumerable:true,get:function(){return chunk7TYZT7ZD_cjs.l}});Object.defineProperty(exports,"useNovaConnect",{enumerable:true,get:function(){return chunk7TYZT7ZD_cjs.d}});Object.defineProperty(exports,"useNovaConnectLabel",{enumerable:true,get:function(){return chunk7TYZT7ZD_cjs.i}});Object.defineProperty(exports,"useNovaConnectLabels",{enumerable:true,get:function(){return chunk7TYZT7ZD_cjs.h}});Object.defineProperty(exports,"useNovaConnectLabelsSubset",{enumerable:true,get:function(){return chunk7TYZT7ZD_cjs.j}});Object.defineProperty(exports,"useNovaConnectOptional",{enumerable:true,get:function(){return chunk7TYZT7ZD_cjs.f}});Object.defineProperty(exports,"useNovaSiwx",{enumerable:true,get:function(){return chunk7TYZT7ZD_cjs.p}});Object.defineProperty(exports,"useWalletChainsList",{enumerable:true,get:function(){return chunk7TYZT7ZD_cjs.y}});Object.defineProperty(exports,"useWalletNativeBalance",{enumerable:true,get:function(){return chunk7TYZT7ZD_cjs.z}});Object.defineProperty(exports,"getAdapterStatus",{enumerable:true,get:function(){return chunkK44IHM6B_cjs.k}});Object.defineProperty(exports,"getAllAdaptersStatus",{enumerable:true,get:function(){return chunkK44IHM6B_cjs.l}});Object.defineProperty(exports,"getAvailableSolanaClustersAsync",{enumerable:true,get:function(){return chunkK44IHM6B_cjs.g}});Object.defineProperty(exports,"getChainsListByConnectorType",{enumerable:true,get:function(){return chunkK44IHM6B_cjs.b}});Object.defineProperty(exports,"getChainsListByConnectorTypeAsync",{enumerable:true,get:function(){return chunkK44IHM6B_cjs.a}});Object.defineProperty(exports,"getChainsListByConnectorTypeSync",{enumerable:true,get:function(){return chunkK44IHM6B_cjs.b}});Object.defineProperty(exports,"getWalletChains",{enumerable:true,get:function(){return chunkK44IHM6B_cjs.i}});Object.defineProperty(exports,"isEvmChainList",{enumerable:true,get:function(){return chunkK44IHM6B_cjs.e}});Object.defineProperty(exports,"isEvmChainListAsync",{enumerable:true,get:function(){return chunkK44IHM6B_cjs.c}});Object.defineProperty(exports,"isEvmChainListSync",{enumerable:true,get:function(){return chunkK44IHM6B_cjs.e}});Object.defineProperty(exports,"isSolanaChainList",{enumerable:true,get:function(){return chunkK44IHM6B_cjs.f}});Object.defineProperty(exports,"isSolanaChainListAsync",{enumerable:true,get:function(){return chunkK44IHM6B_cjs.d}});Object.defineProperty(exports,"isSolanaChainListSync",{enumerable:true,get:function(){return chunkK44IHM6B_cjs.f}});Object.defineProperty(exports,"isValidSolanaClusterAsync",{enumerable:true,get:function(){return chunkK44IHM6B_cjs.h}});Object.defineProperty(exports,"preloadChainAdapters",{enumerable:true,get:function(){return chunkK44IHM6B_cjs.j}});exports.ErrorsProvider=ie;exports.NovaConnectLabelsProvider=ce;exports.NovaConnectProvider=Ze;exports.NovaSiwxWatcher=de;exports.getBlockchainUtilities=kr;exports.getEvmUtils=Ir;exports.getSolanaUtils=Wr;exports.initializeBlockchainSupport=zr;exports.isAdapterSupported=Hr;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TuwaErrorState, OrbitAdapter, ConnectorType, ChainIdentifierArray } from '@tuwaio/orbit-core';
|
|
2
2
|
export { UseNovaSiwxOptions, WalletNameAndAvatarData, useGetWalletNameAndAvatar, useNovaSiwx, useWalletChainsList } from './hooks/index.cjs';
|
|
3
|
-
import { N as NovaConnectProviderProps, C as ConnectContentType, a as ConnectedContentType, B as ButtonTxStatus, b as NovaConnectProviderType, I as InitialChains } from './useWalletNativeBalance-
|
|
4
|
-
export { A as AllChainConfigs, L as LabelCategory, c as LegalConfig, d as NativeBalanceResult, e as NovaConnectLabelsContext, f as NovaConnectProviderContext, g as NovaConnectProviderError, h as NovaSiwxWatcher, i as NovaSiwxWatcherProps, W as WalletBalance, j as createLabelsSubset, k as getLabelWithFallback, l as hasLabel, m as isDefaultLabels, u as useHasNovaConnectContext, n as useLabelsByCategory, o as useNovaConnect, p as useNovaConnectLabel, q as useNovaConnectLabels, r as useNovaConnectLabelsSubset, s as useNovaConnectOptional, t as useWalletNativeBalance } from './useWalletNativeBalance-
|
|
3
|
+
import { N as NovaConnectProviderProps, C as ConnectContentType, a as ConnectedContentType, B as ButtonTxStatus, b as NovaConnectProviderType, I as InitialChains } from './useWalletNativeBalance-BuiJip3d.cjs';
|
|
4
|
+
export { A as AllChainConfigs, L as LabelCategory, c as LegalConfig, d as NativeBalanceResult, e as NovaConnectLabelsContext, f as NovaConnectProviderContext, g as NovaConnectProviderError, h as NovaSiwxWatcher, i as NovaSiwxWatcherProps, W as WalletBalance, j as createLabelsSubset, k as getLabelWithFallback, l as hasLabel, m as isDefaultLabels, u as useHasNovaConnectContext, n as useLabelsByCategory, o as useNovaConnect, p as useNovaConnectLabel, q as useNovaConnectLabels, r as useNovaConnectLabelsSubset, s as useNovaConnectOptional, t as useWalletNativeBalance } from './useWalletNativeBalance-BuiJip3d.cjs';
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import { ComponentPropsWithoutRef, ComponentType, ReactNode } from 'react';
|
|
7
7
|
import { ToastCloseButtonProps } from '@tuwaio/nova-core';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TuwaErrorState, OrbitAdapter, ConnectorType, ChainIdentifierArray } from '@tuwaio/orbit-core';
|
|
2
2
|
export { UseNovaSiwxOptions, WalletNameAndAvatarData, useGetWalletNameAndAvatar, useNovaSiwx, useWalletChainsList } from './hooks/index.js';
|
|
3
|
-
import { N as NovaConnectProviderProps, C as ConnectContentType, a as ConnectedContentType, B as ButtonTxStatus, b as NovaConnectProviderType, I as InitialChains } from './useWalletNativeBalance-
|
|
4
|
-
export { A as AllChainConfigs, L as LabelCategory, c as LegalConfig, d as NativeBalanceResult, e as NovaConnectLabelsContext, f as NovaConnectProviderContext, g as NovaConnectProviderError, h as NovaSiwxWatcher, i as NovaSiwxWatcherProps, W as WalletBalance, j as createLabelsSubset, k as getLabelWithFallback, l as hasLabel, m as isDefaultLabels, u as useHasNovaConnectContext, n as useLabelsByCategory, o as useNovaConnect, p as useNovaConnectLabel, q as useNovaConnectLabels, r as useNovaConnectLabelsSubset, s as useNovaConnectOptional, t as useWalletNativeBalance } from './useWalletNativeBalance-
|
|
3
|
+
import { N as NovaConnectProviderProps, C as ConnectContentType, a as ConnectedContentType, B as ButtonTxStatus, b as NovaConnectProviderType, I as InitialChains } from './useWalletNativeBalance-DrgdoQa-.js';
|
|
4
|
+
export { A as AllChainConfigs, L as LabelCategory, c as LegalConfig, d as NativeBalanceResult, e as NovaConnectLabelsContext, f as NovaConnectProviderContext, g as NovaConnectProviderError, h as NovaSiwxWatcher, i as NovaSiwxWatcherProps, W as WalletBalance, j as createLabelsSubset, k as getLabelWithFallback, l as hasLabel, m as isDefaultLabels, u as useHasNovaConnectContext, n as useLabelsByCategory, o as useNovaConnect, p as useNovaConnectLabel, q as useNovaConnectLabels, r as useNovaConnectLabelsSubset, s as useNovaConnectOptional, t as useWalletNativeBalance } from './useWalletNativeBalance-DrgdoQa-.js';
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import { ComponentPropsWithoutRef, ComponentType, ReactNode } from 'react';
|
|
7
7
|
import { ToastCloseButtonProps } from '@tuwaio/nova-core';
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import {G,t,H}from'./chunk-UOYHTY7H.js';import {h,g,c}from'./chunk-SOJLLC7T.js';export{g as NovaConnectLabelsContext,c as NovaConnectProviderContext,b as NovaConnectProviderError,o as createLabelsSubset,r as getAvailableChainIds,w as getAvailableSolanaClusters,q as getConnectChainId,u as getFilteredConnectors,s as getGroupedConnectors,n as getLabelWithFallback,t as hasAvailableConnectors,v as hasConnectorsForAdapter,k as hasLabel,m as isDefaultLabels,x as isValidSolanaCluster,a as useGetWalletNameAndAvatar,e as useHasNovaConnectContext,l as useLabelsByCategory,d as useNovaConnect,i as useNovaConnectLabel,h as useNovaConnectLabels,j as useNovaConnectLabelsSubset,f as useNovaConnectOptional,p as useNovaSiwx,y as useWalletChainsList,z as useWalletNativeBalance}from'./chunk-SOJLLC7T.js';export{k as getAdapterStatus,l as getAllAdaptersStatus,g as getAvailableSolanaClustersAsync,b as getChainsListByConnectorType,a as getChainsListByConnectorTypeAsync,b as getChainsListByConnectorTypeSync,i as getWalletChains,e as isEvmChainList,c as isEvmChainListAsync,e as isEvmChainListSync,f as isSolanaChainList,d as isSolanaChainListAsync,f as isSolanaChainListSync,h as isValidSolanaClusterAsync,j as preloadChainAdapters}from'./chunk-S3IRVZMG.js';import {a}from'./chunk-NQ5AECZQ.js';import {d}from'./chunk-EYP534IS.js';import {OrbitAdapter}from'@tuwaio/orbit-core';import {ToastCloseButton,deepMerge}from'@tuwaio/nova-core';import {useRef,useCallback,useEffect,useMemo,useState}from'react';import {toast,Bounce,ToastContainer}from'react-toastify';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {useSiwx,useSiwxSessionStore,getSatelliteSiwxFields}from'@tuwaio/siwx-react';var Ie=({title:e,rawError:o,onCopyComplete:r,errorType:l,isConnected:n,...u})=>jsx(H,{title:e,rawError:o,onCopyComplete:r,customization:u.customization}),We=e=>{let o=h();return jsx(ToastContainer,{...e,role:"alert","aria-live":"assertive","aria-label":o.somethingWentWrong})},ze=(e,o)=>{e(o.title,o.rawError,o.errorKey);},He=e=>{e();},Ue=(e,o)=>{if(e&&process.env.NODE_ENV==="development"){let r=typeof o=="string"?o:o.message;console.log("Error copied to clipboard:",r.substring(0,100));}},Ve=e=>e,Fe=e=>e;function ie({containerId:e="nova-connect-errors",position:o="top-center",autoClose:r=7e3,draggable:l=false,customization:n}){let u=h(),M=d(i=>i.switchNetworkError),B=d(i=>i.activeConnection),L=d(i=>i.connectionError),{ToastError:O=Ie,Container:A=We}=n?.components??{},{showError:R=ze,dismissError:S=He,onCopyComplete:d$1=Ue}=n?.handlers??{},{errorTitle:k=Ve,errorHash:t=Fe}=n??{},m=useRef(new Set),E=useRef(null),P=!!L,c=!!M,p=!!B?.isConnected,g=P||c,b=L||M||null,s=P?"wallet":c?"switch":null,a={hasWalletError:P,hasSwitchError:c,isConnected:p,hasAnyError:g,primaryError:b,errorType:s},N=u.somethingWentWrong;switch(a.errorType){case "wallet":N=u.connectionError;break;case "switch":N=u.errorWhenChainSwitching;break}let T=k(N,{errorType:a.errorType}),I=a.primaryError?`${a.errorType}-${a.primaryError.message.substring(0,50)}`:null,h$1=t(I,{primaryError:a.primaryError,errorType:a.errorType}),x=useCallback(()=>{S(()=>{E.current&&(toast.dismiss(E.current),E.current=null),toast.dismiss({containerId:e});});},[e,S]),W=useCallback((i,C)=>{d$1(i,C,s);},[d$1,s]),K=useCallback((i,C,w)=>{if(x(),!m.current.has(w))try{let V={containerId:e,toastId:w,onClose:()=>{m.current.delete(w),E.current=null;}},J=n?.toastOptions?.error?.({title:i,rawError:C,errorType:a.errorType,isConnected:a.isConnected}),F={...V,...J};toast.error(jsx(O,{title:i,rawError:C,errorType:a.errorType,isConnected:a.isConnected,onCopyComplete:Q=>W(Q,C),customization:n?.toastErrorCustomization}),F),m.current.add(w),E.current=w;}catch(V){console.error("Failed to show error toast:",V);}},[x,e,n?.toastOptions?.error,n?.toastErrorCustomization,O,a.errorType,a.isConnected,W]),z=useCallback((i,C,w)=>{R(K,{title:i,rawError:C,errorKey:w,errorType:s});},[K,R,s]);useEffect(()=>{if(p&&!g){x(),m.current.clear();return}if(g&&b&&h$1){if(p&&s!=="switch")return;z(T,b,h$1);}},[g,p,b,s,T,h$1,z,x]),useEffect(()=>()=>{x(),m.current.clear();},[x]);let _=n?.classNames?.container?n.classNames.container({hasErrors:a.hasAnyError,errorType:a.errorType}):"novacon:p-0 novacon:bg-transparent",U=useMemo(()=>{let i=n?.toastCloseButton;return i?({closeToast:C})=>jsx(ToastCloseButton,{closeToast:C,...i}):ToastCloseButton},[n?.toastCloseButton]),j={...{containerId:e,position:o,closeOnClick:false,icon:false,closeButton:U,autoClose:r,hideProgressBar:false,newestOnTop:false,pauseOnFocusLoss:false,draggable:l,pauseOnHover:true,theme:"light",transition:Bounce},...n?.containerProps,className:_};return jsx(A,{...j})}ie.displayName="ErrorsProvider";function le({labels:e,children:o}){let r=useMemo(()=>e,[e]);if(process.env.NODE_ENV==="development"){(!e||typeof e!="object")&&console.warn("NovaConnectLabelsProvider: labels prop should be an object");let n=["connectWallet","disconnect","connecting","connected","error","success"].filter(u=>!(u in e));n.length>0&&console.warn(`NovaConnectLabelsProvider: Missing required labels: ${n.join(", ")}`);}return jsx(g.Provider,{value:r,children:o})}le.displayName="NovaConnectLabelsProvider";function de(e){let{enabled:o=true,getNonce:r,verifier:l,destroyer:n,domain:u,uri:M,statement:B,expirationTime:L,expirationSeconds:O,notBefore:A,requestId:R,resources:S,onSuccess:d$1,onError:k}=e,t=d(s=>s.activeConnection),m=d(s=>s.disconnect),{signIn:E}=useSiwx(),P=useSiwxSessionStore(s=>s.session),c=useSiwxSessionStore(s=>s.status),p=useSiwxSessionStore(s=>s.reset),g=useRef(null),b=useRef(false);return useEffect(()=>{(!t?.isConnected||!t?.address)&&(g.current=null,(c==="authenticated"||P)&&(p(),n&&n().catch(s=>{console.warn("[NovaSiwxWatcher] Failed to execute session destroyer:",s);})));},[t?.isConnected,t?.address,c,P,p,n]),useEffect(()=>{if(!(!o||!t?.isConnected||!t?.address||!t?.chainId)&&t.signMessage&&!b.current&&!(c==="building"||c==="signing"||c==="verifying"))try{let s={address:String(t.address),chainId:t.chainId,signMessage:t.signMessage,isConnected:t.isConnected},a=getSatelliteSiwxFields(s,{domain:u,uri:M,statement:B,expirationTime:L,expirationSeconds:O,notBefore:A,requestId:R,resources:S});if(c==="authenticated"&&P?.address===a.address||g.current===a.address)return;if(g.current=a.address,!l){console.warn("[NovaSiwxWatcher] Verifier not provided, skipping SIWX auto-authentication.");return}let N=T=>{let I=T instanceof Error?T.message:String(T);console.warn("[NovaSiwxWatcher] SIWX authentication rejected or failed:",I);let h=t.address;t.connectorType&&h===t.address&&m(t.connectorType),p(),k?.(I);};b.current=!0,E({signer:t.signMessage,verifier:l,getNonce:r,fields:a,onSuccess:d$1,onError:N}).catch(N).finally(()=>{b.current=!1;});}catch(s){console.warn("[NovaSiwxWatcher] Failed to build SIWX fields:",s);}},[t?.isConnected,t?.address,t?.chainId,t?.signMessage,t?.connectorType,m,o,c,P?.address,r,l,u,M,B,L,O,A,R,S,E,p,d$1,k]),null}var $e=({labels:e,children:o})=>jsx(le,{labels:e,children:o}),_e=({customization:e})=>jsx(ie,{customization:e}),je=(e,o)=>deepMerge(e,o||{}),Je=e=>e,Qe=e=>e,Ye=(e,o,r)=>e;function Ze({labels:e,children:o,appChains:r,solanaRPCUrls:l,transactionPool:n,pulsarAdapter:u,withImpersonated:M,withBalance:B,withChain:L,popularConnectors:O,customConnectorGroups:A,legal:R,siwx:S,customization:d$1,pagination:k}){let t$1=d(te=>te.activeConnection),m=d(te=>te.connectionError),{LabelsProvider:E=$e,ErrorsProvider:P=_e}=d$1?.components??{},{merge:c$1=je,transform:p=Je}=d$1?.labels??{},{transform:g=Qe}=d$1?.contextValue??{},{providerTree:b=Ye}=d$1?.rendering??{},s=useMemo(()=>c$1(a,e||{}),[e,c$1]),[a$1,N]=useState(false),[T,I]=useState(false),[h,x]=useState(false),[W,K]=useState(false),[z,_]=useState("idle"),[U,me]=useState("connectors"),[j,i]=useState(void 0),[C,w]=useState(void 0),[V,J]=useState(""),[F,Q]=useState(false),[Y,Ne]=useState("main"),xe={appChains:r,solanaRPCUrls:l,withImpersonated:M,popularConnectors:O,customConnectorGroups:A,withBalance:B,withChain:L,isConnectModalOpen:a$1,setIsConnectModalOpen:N,isConnectedModalOpen:T,setIsConnectedModalOpen:I,isChainsListOpen:h,setIsChainsListOpen:x,isChainsListOpenMobile:W,setIsChainsListOpenMobile:K,connectedButtonStatus:z,setConnectedButtonStatus:_,connectedModalContentType:Y,setConnectedModalContentType:Ne,connectModalContentType:U,setConnectModalContentType:me,selectedAdapter:j,setSelectedAdapter:i,activeConnector:C,setActiveConnector:w,impersonatedAddress:V,setImpersonatedAddress:J,isConnected:F,setIsConnected:Q,legal:R},q=useMemo(()=>({isConnected:F,activeConnection:t$1,connectionError:m,modalStates:{isConnectModalOpen:a$1,isConnectedModalOpen:T,isChainsListOpen:h,isChainsListOpenMobile:W},contentTypes:{connectModal:U,connectedModal:Y},statuses:{connectedButton:z}}),[F,t$1,m,a$1,T,h,W,U,Y,z]),Me=useMemo(()=>p(s,q),[s,p,q]),Ce=g(xe,q),Z=jsx(P,{customization:d$1?.errors}),ee=jsx(E,{labels:Me,children:o}),oe=r||l?jsx(G,{solanaRPCUrls:l,appChains:r,customization:d$1?.modals?.connectModal}):null,re=r||l?jsx(t,{solanaRPCUrls:l,appChains:r,transactionPool:n,pulsarAdapter:u,customization:d$1?.modals?.connectedModal,pagination:k}):null,Le=jsxs(c.Provider,{value:Ce,children:[jsx(de,{...S}),Z,ee,oe,re]}),Oe=jsxs(c.Provider,{value:Ce,children:[jsx(de,{...S}),Z,ee,oe,re]}),Re=b(Oe,{ErrorsProvider:Z,LabelsProvider:ee,MainContent:Le,ConnectModal:oe||jsx(Fragment,{}),ConnectedModal:re||jsx(Fragment,{})},q);return jsx(Fragment,{children:Re})}Ze.displayName="NovaConnectProvider";async function kr(){let{getAllAdaptersStatus:e}=await import('./getChainsListByConnectorType-YZZUYC6D.js');return {hasEvmUtils:await X(),hasSolanaUtils:await $(),adaptersStatus:e()}}async function X(){try{return await import('viem'),await import('@tuwaio/orbit-evm'),!0}catch{return false}}async function $(){try{return await import('gill'),await import('@tuwaio/orbit-solana'),!0}catch{return false}}async function Ir(){try{if(!await X())return {available:!1,error:"EVM packages (viem, @tuwaio/orbit-evm) not available"};let o=await import('./evm/index.js'),r=await o.getEvmExports();return r.available?{...o,...r}:{available:!1,error:r.error||"Failed to load EVM exports"}}catch(e){return {available:false,error:e instanceof Error?e.message:"EVM utilities not available"}}}async function Wr(){try{if(!await $())return {available:!1,error:"Solana packages (gill, @tuwaio/orbit-solana) not available"};let o=await import('./solana/index.js'),r=await o.getSolanaExports();return r.available?{...o,...r}:{available:!1,error:r.error||"Failed to load Solana exports"}}catch(e){return {available:false,error:e instanceof Error?e.message:"Solana utilities not available"}}}async function zr(){let e={evm:false,solana:false,errors:[]};try{let o=await X(),r=await $();if(o||r){let{preloadChainAdapters:l}=await import('./getChainsListByConnectorType-YZZUYC6D.js'),n=[];o&&n.push(OrbitAdapter.EVM),r&&n.push(OrbitAdapter.SOLANA),await l(n),e.evm=o,e.solana=r;}else e.errors.push("No blockchain packages available for initialization");}catch(o){let r=o instanceof Error?o.message:"Unknown initialization error";e.errors.push(r);}return e}async function Hr(e){return e===OrbitAdapter.Starknet||e!==OrbitAdapter.EVM&&e!==OrbitAdapter.SOLANA?false:e===OrbitAdapter.EVM?X():$()}export{ie as ErrorsProvider,le as NovaConnectLabelsProvider,Ze as NovaConnectProvider,de as NovaSiwxWatcher,kr as getBlockchainUtilities,Ir as getEvmUtils,Wr as getSolanaUtils,zr as initializeBlockchainSupport,Hr as isAdapterSupported};
|
|
1
|
+
import {G,t,H}from'./chunk-5MOVHUHI.js';import {h,g,c}from'./chunk-ARBYH7CW.js';export{g as NovaConnectLabelsContext,c as NovaConnectProviderContext,b as NovaConnectProviderError,o as createLabelsSubset,r as getAvailableChainIds,w as getAvailableSolanaClusters,q as getConnectChainId,u as getFilteredConnectors,s as getGroupedConnectors,n as getLabelWithFallback,t as hasAvailableConnectors,v as hasConnectorsForAdapter,k as hasLabel,m as isDefaultLabels,x as isValidSolanaCluster,a as useGetWalletNameAndAvatar,e as useHasNovaConnectContext,l as useLabelsByCategory,d as useNovaConnect,i as useNovaConnectLabel,h as useNovaConnectLabels,j as useNovaConnectLabelsSubset,f as useNovaConnectOptional,p as useNovaSiwx,y as useWalletChainsList,z as useWalletNativeBalance}from'./chunk-ARBYH7CW.js';export{k as getAdapterStatus,l as getAllAdaptersStatus,g as getAvailableSolanaClustersAsync,b as getChainsListByConnectorType,a as getChainsListByConnectorTypeAsync,b as getChainsListByConnectorTypeSync,i as getWalletChains,e as isEvmChainList,c as isEvmChainListAsync,e as isEvmChainListSync,f as isSolanaChainList,d as isSolanaChainListAsync,f as isSolanaChainListSync,h as isValidSolanaClusterAsync,j as preloadChainAdapters}from'./chunk-S3IRVZMG.js';import {a}from'./chunk-NQ5AECZQ.js';import {d}from'./chunk-EYP534IS.js';import {OrbitAdapter}from'@tuwaio/orbit-core';import {ToastCloseButton,deepMerge}from'@tuwaio/nova-core';import {useRef,useCallback,useEffect,useMemo,useState}from'react';import {toast,Bounce,ToastContainer}from'react-toastify';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {useSiwx,useSiwxSessionStore,getSatelliteSiwxFields}from'@tuwaio/siwx-react';var Ie=({title:e,rawError:o,onCopyComplete:r,errorType:c,isConnected:n,...u})=>jsx(H,{title:e,rawError:o,onCopyComplete:r,customization:u.customization}),We=e=>{let o=h();return jsx(ToastContainer,{...e,role:"alert","aria-live":"assertive","aria-label":o.somethingWentWrong})},ze=(e,o)=>{e(o.title,o.rawError,o.errorKey);},He=e=>{e();},Ue=(e,o)=>{if(e&&process.env.NODE_ENV==="development"){let r=typeof o=="string"?o:o.message;console.log("Error copied to clipboard:",r.substring(0,100));}},Ve=e=>e,Fe=e=>e;function ie({containerId:e="nova-connect-errors",position:o="top-center",autoClose:r=7e3,draggable:c=false,customization:n}){let u=h(),M=d(i=>i.switchNetworkError),B=d(i=>i.activeConnection),L=d(i=>i.connectionError),{ToastError:O=Ie,Container:A=We}=n?.components??{},{showError:R=ze,dismissError:S=He,onCopyComplete:d$1=Ue}=n?.handlers??{},{errorTitle:k=Ve,errorHash:t=Fe}=n??{},m=useRef(new Set),E=useRef(null),P=!!L,l=!!M,p=!!B?.isConnected,g=P||l,b=L||M||null,s=P?"wallet":l?"switch":null,a={hasWalletError:P,hasSwitchError:l,isConnected:p,hasAnyError:g,primaryError:b,errorType:s},N=u.somethingWentWrong;switch(a.errorType){case "wallet":N=u.connectionError;break;case "switch":N=u.errorWhenChainSwitching;break}let T=k(N,{errorType:a.errorType}),I=a.primaryError?`${a.errorType}-${a.primaryError.message.substring(0,50)}`:null,h$1=t(I,{primaryError:a.primaryError,errorType:a.errorType}),x=useCallback(()=>{S(()=>{E.current&&(toast.dismiss(E.current),E.current=null),toast.dismiss({containerId:e});});},[e,S]),W=useCallback((i,C)=>{d$1(i,C,s);},[d$1,s]),K=useCallback((i,C,w)=>{if(x(),!m.current.has(w))try{let V={containerId:e,toastId:w,onClose:()=>{m.current.delete(w),E.current=null;}},J=n?.toastOptions?.error?.({title:i,rawError:C,errorType:a.errorType,isConnected:a.isConnected}),F={...V,...J};toast.error(jsx(O,{title:i,rawError:C,errorType:a.errorType,isConnected:a.isConnected,onCopyComplete:Q=>W(Q,C),customization:n?.toastErrorCustomization}),F),m.current.add(w),E.current=w;}catch(V){console.error("Failed to show error toast:",V);}},[x,e,n?.toastOptions?.error,n?.toastErrorCustomization,O,a.errorType,a.isConnected,W]),z=useCallback((i,C,w)=>{R(K,{title:i,rawError:C,errorKey:w,errorType:s});},[K,R,s]);useEffect(()=>{if(p&&!g){x(),m.current.clear();return}if(g&&b&&h$1){if(p&&s!=="switch")return;z(T,b,h$1);}},[g,p,b,s,T,h$1,z,x]),useEffect(()=>()=>{x(),m.current.clear();},[x]);let _=n?.classNames?.container?n.classNames.container({hasErrors:a.hasAnyError,errorType:a.errorType}):"novacon:p-0 novacon:bg-transparent",U=useMemo(()=>{let i=n?.toastCloseButton;return i?({closeToast:C})=>jsx(ToastCloseButton,{closeToast:C,...i}):ToastCloseButton},[n?.toastCloseButton]),j={...{containerId:e,position:o,closeOnClick:false,icon:false,closeButton:U,autoClose:r,hideProgressBar:false,newestOnTop:false,pauseOnFocusLoss:false,draggable:c,pauseOnHover:true,theme:"light",transition:Bounce},...n?.containerProps,className:_};return jsx(A,{...j})}ie.displayName="ErrorsProvider";function ce({labels:e,children:o}){let r=useMemo(()=>e,[e]);if(process.env.NODE_ENV==="development"){(!e||typeof e!="object")&&console.warn("NovaConnectLabelsProvider: labels prop should be an object");let n=["connectWallet","disconnect","connecting","connected","error","success"].filter(u=>!(u in e));n.length>0&&console.warn(`NovaConnectLabelsProvider: Missing required labels: ${n.join(", ")}`);}return jsx(g.Provider,{value:r,children:o})}ce.displayName="NovaConnectLabelsProvider";function de(e){let{enabled:o=true,getNonce:r,verifier:c,destroyer:n,domain:u,uri:M,statement:B,expirationTime:L,expirationSeconds:O,notBefore:A,requestId:R,resources:S,onSuccess:d$1,onError:k}=e,t=d(s=>s.activeConnection),m=d(s=>s.disconnect),{signIn:E}=useSiwx(),P=useSiwxSessionStore(s=>s.session),l=useSiwxSessionStore(s=>s.status),p=useSiwxSessionStore(s=>s.reset),g=useRef(null),b=useRef(false);return useEffect(()=>{(!t?.isConnected||!t?.address)&&(g.current=null,(l==="authenticated"||P)&&(p(),n&&n().catch(s=>{console.warn("[NovaSiwxWatcher] Failed to execute session destroyer:",s);})));},[t?.isConnected,t?.address,l,P,p,n]),useEffect(()=>{if(!(!o||!t?.isConnected||!t?.address||!t?.chainId)&&t.signMessage&&!b.current&&!(l==="building"||l==="signing"||l==="verifying"))try{let s={address:String(t.address),chainId:t.chainId,signMessage:t.signMessage,isConnected:t.isConnected},a=getSatelliteSiwxFields(s,{domain:u,uri:M,statement:B,expirationTime:L,expirationSeconds:O,notBefore:A,requestId:R,resources:S});if(l==="authenticated"&&P?.address===a.address||g.current===a.address)return;if(g.current=a.address,!c){console.warn("[NovaSiwxWatcher] Verifier not provided, skipping SIWX auto-authentication.");return}let N=T=>{let I=T instanceof Error?T.message:String(T);console.warn("[NovaSiwxWatcher] SIWX authentication rejected or failed:",I);let h=t.address;t.connectorType&&h===t.address&&m(t.connectorType),p(),k?.(I);};b.current=!0,E({signer:t.signMessage,verifier:c,getNonce:r,fields:a,onSuccess:d$1,onError:N}).catch(N).finally(()=>{b.current=!1;});}catch(s){console.warn("[NovaSiwxWatcher] Failed to build SIWX fields:",s);}},[t?.isConnected,t?.address,t?.chainId,t?.signMessage,t?.connectorType,m,o,l,P?.address,r,c,u,M,B,L,O,A,R,S,E,p,d$1,k]),null}var $e=({labels:e,children:o})=>jsx(ce,{labels:e,children:o}),_e=({customization:e})=>jsx(ie,{customization:e}),je=(e,o)=>deepMerge(e,o||{}),Je=e=>e,Qe=e=>e,Ye=(e,o,r)=>e;function Ze({labels:e,children:o,appChains:r,solanaRPCUrls:c$1,transactionPool:n,pulsarAdapter:u,withImpersonated:M,withBalance:B,withChain:L,popularConnectors:O,customConnectorGroups:A,legal:R,siwx:S,customization:d$1,pagination:k}){let t$1=d(te=>te.activeConnection),m=d(te=>te.connectionError),{LabelsProvider:E=$e,ErrorsProvider:P=_e}=d$1?.components??{},{merge:l=je,transform:p=Je}=d$1?.labels??{},{transform:g=Qe}=d$1?.contextValue??{},{providerTree:b=Ye}=d$1?.rendering??{},s=useMemo(()=>l(a,e||{}),[e,l]),[a$1,N]=useState(false),[T,I]=useState(false),[h,x]=useState(false),[W,K]=useState(false),[z,_]=useState("idle"),[U,me]=useState("connectors"),[j,i]=useState(void 0),[C,w]=useState(void 0),[V,J]=useState(""),[F,Q]=useState(false),[Y,Ne]=useState("main"),xe={appChains:r,solanaRPCUrls:c$1,withImpersonated:M,popularConnectors:O,customConnectorGroups:A,withBalance:B,withChain:L,isConnectModalOpen:a$1,setIsConnectModalOpen:N,isConnectedModalOpen:T,setIsConnectedModalOpen:I,isChainsListOpen:h,setIsChainsListOpen:x,isChainsListOpenMobile:W,setIsChainsListOpenMobile:K,connectedButtonStatus:z,setConnectedButtonStatus:_,connectedModalContentType:Y,setConnectedModalContentType:Ne,connectModalContentType:U,setConnectModalContentType:me,selectedAdapter:j,setSelectedAdapter:i,activeConnector:C,setActiveConnector:w,impersonatedAddress:V,setImpersonatedAddress:J,isConnected:F,setIsConnected:Q,legal:R},q=useMemo(()=>({isConnected:F,activeConnection:t$1,connectionError:m,modalStates:{isConnectModalOpen:a$1,isConnectedModalOpen:T,isChainsListOpen:h,isChainsListOpenMobile:W},contentTypes:{connectModal:U,connectedModal:Y},statuses:{connectedButton:z}}),[F,t$1,m,a$1,T,h,W,U,Y,z]),Me=useMemo(()=>p(s,q),[s,p,q]),Ce=g(xe,q),Z=jsx(P,{customization:d$1?.errors}),ee=jsx(E,{labels:Me,children:o}),oe=r||c$1?jsx(G,{solanaRPCUrls:c$1,appChains:r,customization:d$1?.modals?.connectModal}):null,re=r||c$1?jsx(t,{solanaRPCUrls:c$1,appChains:r,transactionPool:n,pulsarAdapter:u,customization:d$1?.modals?.connectedModal,pagination:k}):null,Le=jsxs(c.Provider,{value:Ce,children:[jsx(de,{...S}),Z,ee,oe,re]}),Oe=jsxs(c.Provider,{value:Ce,children:[jsx(de,{...S}),Z,ee,oe,re]}),Re=b(Oe,{ErrorsProvider:Z,LabelsProvider:ee,MainContent:Le,ConnectModal:oe||jsx(Fragment,{}),ConnectedModal:re||jsx(Fragment,{})},q);return jsx(Fragment,{children:Re})}Ze.displayName="NovaConnectProvider";async function kr(){let{getAllAdaptersStatus:e}=await import('./getChainsListByConnectorType-YZZUYC6D.js');return {hasEvmUtils:await X(),hasSolanaUtils:await $(),adaptersStatus:e()}}async function X(){try{return await import('viem'),await import('@tuwaio/orbit-evm'),!0}catch{return false}}async function $(){try{return await import('@solana/kit'),await import('@tuwaio/orbit-solana'),!0}catch{return false}}async function Ir(){try{if(!await X())return {available:!1,error:"EVM packages (viem, @tuwaio/orbit-evm) not available"};let o=await import('./evm/index.js'),r=await o.getEvmExports();return r.available?{...o,...r}:{available:!1,error:r.error||"Failed to load EVM exports"}}catch(e){return {available:false,error:e instanceof Error?e.message:"EVM utilities not available"}}}async function Wr(){try{if(!await $())return {available:!1,error:"Solana packages (@solana/kit, @tuwaio/orbit-solana) not available"};let o=await import('./solana/index.js'),r=await o.getSolanaExports();return r.available?{...o,...r}:{available:!1,error:r.error||"Failed to load Solana exports"}}catch(e){return {available:false,error:e instanceof Error?e.message:"Solana utilities not available"}}}async function zr(){let e={evm:false,solana:false,errors:[]};try{let o=await X(),r=await $();if(o||r){let{preloadChainAdapters:c}=await import('./getChainsListByConnectorType-YZZUYC6D.js'),n=[];o&&n.push(OrbitAdapter.EVM),r&&n.push(OrbitAdapter.SOLANA),await c(n),e.evm=o,e.solana=r;}else e.errors.push("No blockchain packages available for initialization");}catch(o){let r=o instanceof Error?o.message:"Unknown initialization error";e.errors.push(r);}return e}async function Hr(e){return e===OrbitAdapter.Starknet||e!==OrbitAdapter.EVM&&e!==OrbitAdapter.SOLANA?false:e===OrbitAdapter.EVM?X():$()}export{ie as ErrorsProvider,ce as NovaConnectLabelsProvider,Ze as NovaConnectProvider,de as NovaSiwxWatcher,kr as getBlockchainUtilities,Ir as getEvmUtils,Wr as getSolanaUtils,zr as initializeBlockchainSupport,Hr as isAdapterSupported};
|
package/dist/solana/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { SolanaClusterMoniker } from '
|
|
1
|
+
export { SolanaClusterMoniker } from '@tuwaio/orbit-solana';
|
|
2
2
|
import { OrbitAdapter } from '@tuwaio/orbit-core';
|
|
3
3
|
export { SolanaConnectorsWatcher } from '@tuwaio/satellite-react/solana';
|
|
4
4
|
import { SolanaConnection, ConnectorSolana } from '@tuwaio/satellite-solana';
|
|
@@ -9,7 +9,7 @@ declare module '@tuwaio/nova-connect' {
|
|
|
9
9
|
interface AllChainConfigs {
|
|
10
10
|
/**
|
|
11
11
|
* Solana RPC URLs configuration - enhanced from default any type
|
|
12
|
-
* @override Replaces default `any` with specific SolanaClusterMoniker typing when
|
|
12
|
+
* @override Replaces default `any` with specific SolanaClusterMoniker typing when @tuwaio/orbit-solana is available
|
|
13
13
|
*/
|
|
14
14
|
solanaRPCUrls?: Partial<Record<SolanaClusterMoniker, string>>;
|
|
15
15
|
}
|
package/dist/solana/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { SolanaClusterMoniker } from '
|
|
1
|
+
export { SolanaClusterMoniker } from '@tuwaio/orbit-solana';
|
|
2
2
|
import { OrbitAdapter } from '@tuwaio/orbit-core';
|
|
3
3
|
export { SolanaConnectorsWatcher } from '@tuwaio/satellite-react/solana';
|
|
4
4
|
import { SolanaConnection, ConnectorSolana } from '@tuwaio/satellite-solana';
|
|
@@ -9,7 +9,7 @@ declare module '@tuwaio/nova-connect' {
|
|
|
9
9
|
interface AllChainConfigs {
|
|
10
10
|
/**
|
|
11
11
|
* Solana RPC URLs configuration - enhanced from default any type
|
|
12
|
-
* @override Replaces default `any` with specific SolanaClusterMoniker typing when
|
|
12
|
+
* @override Replaces default `any` with specific SolanaClusterMoniker typing when @tuwaio/orbit-solana is available
|
|
13
13
|
*/
|
|
14
14
|
solanaRPCUrls?: Partial<Record<SolanaClusterMoniker, string>>;
|
|
15
15
|
}
|
package/dist/{useWalletNativeBalance-DPbn6y5A.d.cts → useWalletNativeBalance-BuiJip3d.d.cts}
RENAMED
|
@@ -23,7 +23,7 @@ interface AllChainConfigs {
|
|
|
23
23
|
appChains?: any;
|
|
24
24
|
/**
|
|
25
25
|
* Solana RPC URLs configuration - defaults to any, gets enhanced by Solana packages
|
|
26
|
-
* @default any - Will be typed as `Partial<Record<SolanaClusterMoniker, string>>` when
|
|
26
|
+
* @default any - Will be typed as `Partial<Record<SolanaClusterMoniker, string>>` when @tuwaio/orbit-solana is available
|
|
27
27
|
*/
|
|
28
28
|
solanaRPCUrls?: any;
|
|
29
29
|
}
|
|
@@ -40,7 +40,7 @@ interface AllChainConfigs {
|
|
|
40
40
|
* }
|
|
41
41
|
*
|
|
42
42
|
* // With viem package installed - gets proper Chain[] typing
|
|
43
|
-
* // With
|
|
43
|
+
* // With @tuwaio/orbit-solana package installed - gets proper SolanaClusterMoniker typing
|
|
44
44
|
* ```
|
|
45
45
|
*/
|
|
46
46
|
type InitialChains = AllChainConfigs;
|
|
@@ -23,7 +23,7 @@ interface AllChainConfigs {
|
|
|
23
23
|
appChains?: any;
|
|
24
24
|
/**
|
|
25
25
|
* Solana RPC URLs configuration - defaults to any, gets enhanced by Solana packages
|
|
26
|
-
* @default any - Will be typed as `Partial<Record<SolanaClusterMoniker, string>>` when
|
|
26
|
+
* @default any - Will be typed as `Partial<Record<SolanaClusterMoniker, string>>` when @tuwaio/orbit-solana is available
|
|
27
27
|
*/
|
|
28
28
|
solanaRPCUrls?: any;
|
|
29
29
|
}
|
|
@@ -40,7 +40,7 @@ interface AllChainConfigs {
|
|
|
40
40
|
* }
|
|
41
41
|
*
|
|
42
42
|
* // With viem package installed - gets proper Chain[] typing
|
|
43
|
-
* // With
|
|
43
|
+
* // With @tuwaio/orbit-solana package installed - gets proper SolanaClusterMoniker typing
|
|
44
44
|
* ```
|
|
45
45
|
*/
|
|
46
46
|
type InitialChains = AllChainConfigs;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tuwaio/nova-connect",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "Oleksandr Tkach",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -89,20 +89,22 @@
|
|
|
89
89
|
"@heroicons/react": "2.x.x",
|
|
90
90
|
"@radix-ui/react-dialog": "1.x.x",
|
|
91
91
|
"@radix-ui/react-select": "2.x.x",
|
|
92
|
-
"@tuwaio/orbit-core": "
|
|
93
|
-
"@tuwaio/orbit-evm": "
|
|
94
|
-
"@tuwaio/orbit-solana": "
|
|
95
|
-
"@tuwaio/satellite-core": "
|
|
96
|
-
"@tuwaio/satellite-evm": "
|
|
97
|
-
"@tuwaio/satellite-solana": "
|
|
98
|
-
"@tuwaio/satellite-react": "
|
|
99
|
-
"@tuwaio/siwx-react": "
|
|
100
|
-
"@tuwaio/pulsar-core": "
|
|
92
|
+
"@tuwaio/orbit-core": ">=0.3",
|
|
93
|
+
"@tuwaio/orbit-evm": ">=0.3",
|
|
94
|
+
"@tuwaio/orbit-solana": ">=0.3",
|
|
95
|
+
"@tuwaio/satellite-core": ">=0.5",
|
|
96
|
+
"@tuwaio/satellite-evm": ">=0.5",
|
|
97
|
+
"@tuwaio/satellite-solana": ">=0.5",
|
|
98
|
+
"@tuwaio/satellite-react": ">=0.5",
|
|
99
|
+
"@tuwaio/siwx-react": ">=0.3",
|
|
100
|
+
"@tuwaio/pulsar-core": ">=0.7",
|
|
101
|
+
"@tuwaio/nova-core": "^0.6.0",
|
|
102
|
+
"@tuwaio/nova-transactions": "^0.6.0",
|
|
101
103
|
"@wallet-standard/react": "1.x.x",
|
|
102
104
|
"@wagmi/core": "3.x.x",
|
|
103
105
|
"@web3icons/react": ">=4",
|
|
104
106
|
"@web3icons/common": ">=0.11",
|
|
105
|
-
"
|
|
107
|
+
"@solana/kit": ">=8.2",
|
|
106
108
|
"dayjs": "1.x.x",
|
|
107
109
|
"immer": "11.x.x",
|
|
108
110
|
"ethereum-blockies-base64": "1.x.x",
|
|
@@ -111,9 +113,7 @@
|
|
|
111
113
|
"react": ">=19.2.3",
|
|
112
114
|
"react-toastify": "11.x.x",
|
|
113
115
|
"viem": "2.x.x",
|
|
114
|
-
"zustand": "5.x.x"
|
|
115
|
-
"@tuwaio/nova-transactions": "^0.5.3",
|
|
116
|
-
"@tuwaio/nova-core": "^0.5.1"
|
|
116
|
+
"zustand": "5.x.x"
|
|
117
117
|
},
|
|
118
118
|
"peerDependenciesMeta": {
|
|
119
119
|
"@web3icons/react": {
|
|
@@ -197,7 +197,7 @@
|
|
|
197
197
|
"@wallet-standard/react": {
|
|
198
198
|
"optional": true
|
|
199
199
|
},
|
|
200
|
-
"
|
|
200
|
+
"@solana/kit": {
|
|
201
201
|
"optional": true
|
|
202
202
|
}
|
|
203
203
|
},
|
|
@@ -205,48 +205,48 @@
|
|
|
205
205
|
"@heroicons/react": "^2.2.0",
|
|
206
206
|
"@radix-ui/react-dialog": "^1.1.23",
|
|
207
207
|
"@radix-ui/react-select": "^2.3.7",
|
|
208
|
-
"@tuwaio/orbit-core": "
|
|
209
|
-
"@tuwaio/orbit-evm": "
|
|
210
|
-
"@tuwaio/orbit-solana": "
|
|
211
|
-
"@tuwaio/satellite-react": "
|
|
212
|
-
"@tuwaio/satellite-core": "
|
|
213
|
-
"@tuwaio/satellite-evm": "
|
|
214
|
-
"@tuwaio/satellite-solana": "
|
|
215
|
-
"@tuwaio/siwx-react": "
|
|
216
|
-
"@tuwaio/pulsar-core": "
|
|
208
|
+
"@tuwaio/orbit-core": "1.0.0-feat-update-alpha.4.d411095",
|
|
209
|
+
"@tuwaio/orbit-evm": "1.0.0-feat-update-alpha.4.d411095",
|
|
210
|
+
"@tuwaio/orbit-solana": "1.0.0-feat-update-alpha.4.d411095",
|
|
211
|
+
"@tuwaio/satellite-react": "1.0.0-feat-update-alpha.4.a24a5bc",
|
|
212
|
+
"@tuwaio/satellite-core": "1.0.0-feat-update-alpha.4.a24a5bc",
|
|
213
|
+
"@tuwaio/satellite-evm": "1.0.0-feat-update-alpha.4.a24a5bc",
|
|
214
|
+
"@tuwaio/satellite-solana": "1.0.0-feat-update-alpha.4.a24a5bc",
|
|
215
|
+
"@tuwaio/siwx-react": "1.0.0-feat-update-alpha.3.f77d0e0",
|
|
216
|
+
"@tuwaio/pulsar-core": "1.0.0-feat-update-alpha.3.51498c2",
|
|
217
|
+
"@tuwaio/nova-core": "^0.6.0",
|
|
218
|
+
"@tuwaio/nova-transactions": "^0.6.0",
|
|
217
219
|
"@wallet-standard/react": "^1.0.3",
|
|
218
|
-
"@wagmi/core": "^3.6.
|
|
219
|
-
"@web3icons/react": "^4.1.
|
|
220
|
-
"@web3icons/common": "^0.11.
|
|
221
|
-
"
|
|
220
|
+
"@wagmi/core": "^3.6.5",
|
|
221
|
+
"@web3icons/react": "^4.1.21",
|
|
222
|
+
"@web3icons/common": "^0.11.50",
|
|
223
|
+
"@solana/kit": "^8.2.0",
|
|
222
224
|
"clsx": "^2.1.1",
|
|
223
|
-
"dayjs": "^1.11.
|
|
224
|
-
"immer": "^11.1.
|
|
225
|
+
"dayjs": "^1.11.23",
|
|
226
|
+
"immer": "^11.1.18",
|
|
225
227
|
"ethereum-blockies-base64": "^1.0.2",
|
|
226
|
-
"framer-motion": "^13.
|
|
228
|
+
"framer-motion": "^13.2.0",
|
|
227
229
|
"react": "^19.2.8",
|
|
228
230
|
"react-toastify": "^11.1.0",
|
|
229
231
|
"tailwind-merge": "^3.6.0",
|
|
230
|
-
"viem": "^2.
|
|
232
|
+
"viem": "^2.56.3",
|
|
231
233
|
"zustand": "^5.0.15",
|
|
232
234
|
"@tailwindcss/postcss": "^4.3.3",
|
|
233
235
|
"@tailwindcss/vite": "^4.3.3",
|
|
234
|
-
"@types/node": "^26.
|
|
236
|
+
"@types/node": "^26.4.1",
|
|
235
237
|
"@types/react": "^19.2.18",
|
|
236
|
-
"autoprefixer": "^10.5.
|
|
237
|
-
"postcss": "^8.5.
|
|
238
|
-
"postcss-cli": "^
|
|
238
|
+
"autoprefixer": "^10.5.5",
|
|
239
|
+
"postcss": "^8.5.28",
|
|
240
|
+
"postcss-cli": "^12.0.0",
|
|
239
241
|
"tailwindcss": "^4.3.3",
|
|
240
242
|
"@emotion/is-prop-valid": "^1.4.0",
|
|
241
243
|
"tw-animate-css": "^1.4.0",
|
|
242
244
|
"typescript": "6.0.3",
|
|
243
|
-
"tsup": "^8.5.1"
|
|
244
|
-
"@tuwaio/nova-core": "^0.5.1",
|
|
245
|
-
"@tuwaio/nova-transactions": "^0.5.3"
|
|
245
|
+
"tsup": "^8.5.1"
|
|
246
246
|
},
|
|
247
247
|
"scripts": {
|
|
248
248
|
"start": "tsup src/index.ts --watch",
|
|
249
249
|
"build": "tsup && pnpm exec postcss ./src/styles/app.css -o ./dist/index.css",
|
|
250
|
-
"test": "vitest run
|
|
250
|
+
"test": "vitest run"
|
|
251
251
|
}
|
|
252
252
|
}
|