@tuwaio/nova-core 0.2.2 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +3 -4
- package/dist/index.css +21 -0
- package/dist/index.d.cts +116 -1
- package/dist/index.d.ts +116 -1
- package/dist/index.js +3 -4
- package/package.json +7 -3
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
'use strict';var framerMotion=require('framer-motion'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),jsxRuntime=require('react/jsx-runtime'),l=require('react'),
|
|
1
|
+
'use strict';var framerMotion=require('framer-motion'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),metadata=require('@web3icons/common/metadata'),jsxRuntime=require('react/jsx-runtime'),l=require('react'),s=require('@radix-ui/react-dialog');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var l__namespace=/*#__PURE__*/_interopNamespace(l);var s__namespace=/*#__PURE__*/_interopNamespace(s);var uo="novacore:cursor-pointer novacore:rounded-md novacore:bg-[var(--tuwa-standart-button-bg)] novacore:px-3 novacore:py-2 novacore:flex novacore:items-center novacore:gap-1 novacore:text-sm novacore:font-semibold novacore:text-[var(--tuwa-text-primary)] novacore:transition-colors novacore:hover:bg-[var(--tuwa-standart-button-hover)] novacore:disabled:cursor-not-allowed novacore:disabled:opacity-50";function r(...o){return tailwindMerge.twMerge(clsx.clsx(o))}var g=o=>o&&typeof o=="object"&&!Array.isArray(o);function z(o,e){let t={...o};return g(o)&&g(e)&&Object.keys(e).forEach(n=>{let a=o[n],i=e[n];g(a)&&g(i)?t[n]=z(a,i):t[n]=i;}),t}function w(o){if(typeof o!="string")return false;let e=o.toLowerCase();return e.includes("solana")&&(e.includes("devnet")||e.includes("testnet"))}var k="Unknown";function No(o){if(typeof o=="number")return metadata.networks.find(a=>a.chainId===o)?.name??k;let[e,t]=o.split(":"),n=metadata.networks.find(a=>a.id===e);if(!n)return k;if(t&&w(o)){let a=t.charAt(0).toUpperCase()+t.slice(1).toLowerCase();return `${n.name} ${a}`}return n.name}function D(o=1200){if(typeof window>"u")return false;let e="ontouchstart"in window,t=navigator.maxTouchPoints>0,n=false;window.matchMedia&&(n=window.matchMedia("(pointer: coarse)").matches);let a=e||t||n,i=window.innerWidth<=o;return a&&i}function Co(o,e,t){if(!o)return "";if(o.length<=e+t)return o;let n=o.slice(0,e),a=o.slice(o.length-t);return `${n}...${a}`}function Vo({className:o,strokeWidth:e,isOpen:t}){return jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:e??2,stroke:"currentColor",className:r("novacore:w-4 novacore:h-4 novacore:text-[var(--tuwa-text-secondary)]",o),children:[jsxRuntime.jsx(framerMotion.AnimatePresence,{children:t&&jsxRuntime.jsx(framerMotion.motion.path,{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5",variants:{hidden:{translateY:3,scaleY:.8,opacity:0},visible:{translateY:0,scaleY:1,opacity:1}},initial:"hidden",animate:"visible",transition:{duration:.4}})}),jsxRuntime.jsx(framerMotion.AnimatePresence,{children:!t&&jsxRuntime.jsx(framerMotion.motion.path,{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5",className:"novacore:relative",variants:{hidden:{translateY:-3,scaleY:.8,opacity:0},visible:{translateY:0,scaleY:1,opacity:1}},initial:"hidden",animate:"visible",transition:{duration:.4}})})]})}var V=l__namespace.forwardRef(({className:o,...e},t)=>jsxRuntime.jsxs("svg",{ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:r("novacore:h-5 novacore:w-5 novacore:text-[var(--tuwa-text-primary)] novacore:transition-colors",o),...e,children:[jsxRuntime.jsx("path",{d:"M18 6 6 18"}),jsxRuntime.jsx("path",{d:"m6 6 12 12"})]}));V.displayName="CloseIcon";var F="flex items-center justify-center novacore:w-full novacore:h-full novacore:rounded-full novacore:text-[var(--tuwa-text-secondary)] novacore:bg-[var(--tuwa-bg-muted)]",d=({animate:o=false,content:e="",className:t})=>jsxRuntime.jsx("div",{className:r(F,t,{"novacore:animate-pulse":o}),children:e});var Uo=s__namespace.Root,Qo=s__namespace.Trigger,H=s__namespace.Portal,Jo=s__namespace.Close,Y={initial:{opacity:0,scale:.9,y:20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.9,transition:{duration:.2}}},$={initial:{opacity:0,y:"100%"},animate:{opacity:1,y:"0%"},exit:{opacity:0,y:"100%",transition:{duration:.2}}},q={initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},S=({className:o,backdropAnimation:e})=>(l__namespace.useEffect(()=>(typeof window<"u"&&window.document.body.classList.add("NovaModalOpen"),()=>{typeof window<"u"&&window.document.body.classList.remove("NovaModalOpen");}),[]),jsxRuntime.jsx(framerMotion.AnimatePresence,{children:jsxRuntime.jsx(framerMotion.motion.div,{variants:e??q,transition:{duration:.2,ease:"easeInOut"},animate:"animate",initial:"initial",exit:"exit",className:"novacore:relative novacore:rounded-t-2xl novacore:sm:rounded-2xl novacore:overflow-hidden",children:jsxRuntime.jsx("div",{className:r("novacore:fixed novacore:inset-0 novacore:z-50 novacore:bg-black/55 novacore:backdrop-blur-sm novacore:backdrop-saturate-150",o)})})}));S.displayName=s__namespace.Overlay.displayName;var G=l__namespace.forwardRef(({className:o,children:e,modalAnimation:t,backdropAnimation:n,...a},i)=>{let[m,p]=l__namespace.useState(false);l__namespace.useEffect(()=>{p(D());},[]);let f=t??(m?$:Y);return jsxRuntime.jsxs(H,{children:[jsxRuntime.jsx(S,{backdropAnimation:n}),jsxRuntime.jsx(s__namespace.Content,{"aria-describedby":"tuwa:modal-content",ref:i,className:r("NovaNoScrolling novacore:fixed novacore:bottom-0 novacore:left-0 novacore:p-0 novacore:sm:bottom-auto novacore:sm:left-[50%] novacore:sm:top-[50%] novacore:sm:translate-x-[-50%] novacore:sm:translate-y-[-50%] novacore:z-50 novacore:sm:p-4 novacore:outline-none",o),...a,children:jsxRuntime.jsx(framerMotion.motion.div,{layout:true,className:"NovaNoScrolling novacore:relative novacore:overflow-hidden",transition:{layout:{duration:.2,ease:[.1,.1,.2,1]}},children:jsxRuntime.jsx(framerMotion.AnimatePresence,{children:jsxRuntime.jsx(framerMotion.motion.div,{variants:f,transition:{duration:.2,ease:"easeInOut"},animate:"animate",initial:"initial",exit:"exit",className:"NovaNoScrolling novacore:relative novacore:rounded-t-2xl novacore:sm:rounded-2xl novacore:overflow-hidden",children:jsxRuntime.jsx("div",{className:r("NovaNoScrolling novacore:relative novacore:flex novacore:max-h-[98dvh] novacore:w-full novacore:flex-col novacore:gap-3 novacore:overflow-y-auto novacore:rounded-t-2xl novacore:sm:rounded-2xl novacore:shadow-2xl","novacore:border novacore:border-[var(--tuwa-border-primary)] novacore:bg-[var(--tuwa-bg-primary)]"),children:e})})})})})]})});G.displayName=s__namespace.Content.displayName;var _=({className:o,...e})=>jsxRuntime.jsx("div",{"aria-describedby":"tuwa:modal-header",className:r("novacore:sticky novacore:flex novacore:top-0 novacore:z-11 novacore:w-full novacore:flex-row novacore:items-center novacore:justify-between","novacore:border-b novacore:border-[var(--tuwa-border-primary)] novacore:bg-[var(--tuwa-bg-primary)] novacore:p-4",o),...e});_.displayName="DialogHeader";var j=({className:o,...e})=>jsxRuntime.jsx("div",{"aria-describedby":"tuwa:modal-footer",className:r("novacore:flex novacore:flex-col-reverse novacore:sm:flex-row novacore:sm:justify-end novacore:sm:space-x-2",o),...e});j.displayName="DialogFooter";var K=l__namespace.forwardRef(({className:o,...e},t)=>jsxRuntime.jsx(s__namespace.Title,{ref:t,"aria-describedby":"tuwa:modal-title",className:r("novacore:text-lg novacore:font-bold novacore:leading-none novacore:tracking-tight novacore:text-[var(--tuwa-text-primary)] novacore:m-0",o),...e}));K.displayName=s__namespace.Title.displayName;var U=l__namespace.forwardRef(({className:o,...e},t)=>jsxRuntime.jsx(s__namespace.Description,{"aria-describedby":"tuwa:modal-description",ref:t,className:r("novacore:text-sm novacore:text-[var(--tuwa-text-secondary)]",o),...e}));U.displayName=s__namespace.Description.displayName;var A=l.lazy(()=>import('@web3icons/react/dynamic').then(o=>({default:o.NetworkIcon})));function ne({chainId:o,variant:e="background",className:t}){let n=typeof o=="string",a=n?o.split(":")[0].toLowerCase():o,i=n&&w(o),m=r("novacore:w-full novacore:h-full novacore:rounded-full",t,{"novacore:[&_path]:first-of-type:fill-[var(--tuwa-testnet-icons)]":i});return jsxRuntime.jsx(l.Suspense,{fallback:jsxRuntime.jsx(d,{animate:true,className:t}),children:typeof a=="string"?jsxRuntime.jsx(A,{id:a,variant:e,className:m,fallback:jsxRuntime.jsx(d,{content:"?",className:t})}):jsxRuntime.jsx(A,{chainId:a,variant:e,className:m,fallback:jsxRuntime.jsx(d,{content:"?",className:t})})})}function ce({starsCount:o}){let[e,t]=l.useState(false);l.useEffect(()=>t(true),[]);let n=l.useMemo(()=>e?Array.from({length:o??200}).map(()=>({x:Math.random()*window.innerWidth,y:Math.random()*window.innerHeight,r:Math.random()*1+.5,isSupernova:Math.random()<.1,delay:Math.random()*10,duration:5+Math.random()*5})):[],[e]);return jsxRuntime.jsx("div",{className:"novacore:absolute novacore:inset-0 novacore:z-1 novacore:h-full novacore:w-full novacore:overflow-hidden",children:jsxRuntime.jsxs("svg",{width:"100%",height:"100%",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("defs",{children:jsxRuntime.jsx("style",{children:`
|
|
2
2
|
/* Pulse animation now includes scale for a more organic feel. */
|
|
3
3
|
@keyframes pulse {
|
|
4
4
|
0%, 100% {
|
|
@@ -44,6 +44,5 @@
|
|
|
44
44
|
transform-origin: center;
|
|
45
45
|
stroke-width: 2;
|
|
46
46
|
}
|
|
47
|
-
`})}),n.map((a,i)=>jsxRuntime.jsx("circle",{cx:a.x,cy:a.y,r:a.r,fill:"rgba(var(--tuwa-bg-primary), 0.7)",className:a.isSupernova?"supernova":"pulsar",style:{animationDelay:`${a.delay}s`,animationDuration:`${a.duration}s`}},i))]})})}function
|
|
48
|
-
exports.ChevronArrowWithAnim=
|
|
49
|
-
//# sourceMappingURL=index.cjs.map
|
|
47
|
+
`})}),n.map((a,i)=>jsxRuntime.jsx("circle",{cx:a.x,cy:a.y,r:a.r,fill:"rgba(var(--tuwa-bg-primary), 0.7)",className:a.isSupernova?"supernova":"pulsar",style:{animationDelay:`${a.delay}s`,animationDuration:`${a.duration}s`}},i))]})})}function ve({closeToast:o}){return jsxRuntime.jsx("button",{type:"button",onClick:o,"aria-label":"Close toast notification",title:"Close toast notification",className:r("novacore:absolute novacore:top-2 novacore:right-2 novacore:cursor-pointer novacore:rounded-full novacore:p-1","novacore:text-[var(--tuwa-text-tertiary)] novacore:transition-colors","novacore:hover:bg-[var(--tuwa-bg-muted)] novacore:hover:text-[var(--tuwa-text-primary)]"),children:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"novacore:h-5 novatx:w-5",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"})})})}var ro=l.lazy(()=>import('@web3icons/react/dynamic').then(o=>({default:o.WalletIcon}))),io={walletconnect:"wallet-connect"},so=({className:o})=>jsxRuntime.jsxs("svg",{className:o,fill:"none",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("path",{fill:"#fff",fillRule:"evenodd",d:"M16 0c8.84 0 16 7.16 16 16s-7.16 16-16 16S0 24.84 0 16 7.16 0 16 0",clipRule:"evenodd"}),jsxRuntime.jsx("path",{fill:"#000",fillRule:"evenodd",d:"M16.54 2.01h1.53c.5.09.99.23 1.48.42.21.25.19.48-.05.69q-.195.045-.39 0c-1.86-.65-3.55-.35-5.07.89 2.39.7 3.84 2.27 4.36 4.7.12.85.08 1.68-.12 2.51.87 0 1.74 0 2.61-.02.39-.4.7-.85.94-1.35-.45-.45-.65-.99-.59-1.63-1.15.08-1.79-.44-1.92-1.58.14-1.12.78-1.67 1.92-1.63a.7.7 0 0 0-.12-.49l-.89-.89c-.02-.45.19-.6.62-.47.24.19.46.39.66.62.71-.79 1.5-.89 2.39-.32.44.42.62.94.54 1.55 1.49.02 2.11.76 1.85 2.22-.08.17-.17.34-.27.49.53.59.87 1.28 1.01 2.07.08 4.6.1 9.19.05 13.79-.19 1.58-1 2.71-2.44 3.37-.29.1-.59.2-.89.27H7.2c-1.31-.33-2.05-1.17-2.24-2.51-.03-5.24-.03-10.47 0-15.71.3-1.62 1.28-2.46 2.93-2.54 1.26-1.77 2.98-2.64 5.17-2.61.96-1.01 2.13-1.62 3.5-1.85zm6.11 1.87c.39-.03.7.12.91.44.06.39.09.79.1 1.18.02.12.07.21.17.27.41 0 .82.04 1.23.1.49.26.63.65.42 1.16-.07.14-.18.25-.32.32-.39.06-.79.09-1.18.1-.12.02-.21.07-.27.17l-.15 1.33c-.32.46-.72.55-1.21.27a.76.76 0 0 1-.27-.37c-.06-.41-.09-.82-.1-1.23a.35.35 0 0 0-.27-.17l-1.08-.05c-.46-.24-.62-.61-.47-1.11.14-.27.36-.43.66-.47l.99-.05s.09-.04.12-.07l.15-1.28q.18-.39.57-.54m-10.49.79c2.41-.09 4.12.94 5.15 3.1.44 1.12.48 2.25.12 3.4-.84.06-1.67.07-2.51.02.56-.68.52-1.32-.1-1.92-.26-.13-.54-.19-.84-.17.02-.95 0-1.91-.07-2.86-.21-.41-.55-.58-1.01-.52-.17.03-.31.09-.44.2-.72.92-1.43 1.85-2.14 2.78-.28.45-.29.91-.05 1.38q.225.3.57.42c.34.02.69.03 1.03.02v.69c-1.3.02-2.59 0-3.89-.05-.58-2.1-.08-3.88 1.53-5.34.79-.62 1.68-1 2.66-1.16zm.83 1.82c.07 0 .13.03.17.1l.05 3.05c.04.09.1.16.17.22l.89.05c.22.08.3.24.22.47q-.27.42-.57.81c-.43.02-.85.03-1.28.02 0-.41 0-.82-.02-1.23a.46.46 0 0 0-.17-.17l-1.28-.05c-.3-.1-.37-.29-.22-.57.7-.89 1.39-1.79 2.04-2.71zm-5.81.84h.2a6.1 6.1 0 0 0-.25 3.77c-.59-.13-1.01-.49-1.26-1.06-.36-1.29.08-2.19 1.31-2.71m17.98.83c.05 0 .1 0 .15.02q.825.855.96 2.04.045 1.305 0 2.61a3.76 3.76 0 0 0-2.54-1.55c-.61-.05-1.21-.08-1.82-.1.26-.31.48-.66.64-1.03 1.31.02 1.94-.62 1.87-1.95.26.02.5 0 .74-.05zM5.7 11.22c.41.4.91.65 1.48.76l16.06.05c1.42.13 2.38.87 2.88 2.19.07.24.12.49.15.74.03 2.86.03 5.71 0 8.57-.21 1.44-1 2.38-2.39 2.83-.24.05-.49.08-.74.1-1.26.02-2.53.03-3.79.02 0-1.33 0-2.66.02-3.99l1.55-1.55c1.42-.04 2.09-.78 1.99-2.19-.24-.88-.81-1.34-1.72-1.38-1.2.12-1.81.8-1.82 2.02l-1.92 1.92c-.08.11-.14.22-.2.34-.07 1.61-.1 3.22-.07 4.83h-.44c0-2.28 0-4.56-.02-6.85a1.8 1.8 0 0 0-.15-.34l-1.13-1.13c0-1.23-.61-1.92-1.82-2.07-1.29.17-1.87.91-1.72 2.22q.465 1.395 1.95 1.35l.71.71c0 .3.04.6.1.89.25.21.48.19.69-.05.03-.39.03-.79 0-1.18-.2-.25-.43-.49-.66-.71.15-.1.29-.22.39-.37.3.27.58.55.86.84.02 2.23.03 4.47.02 6.7h-.59c0-1.38 0-2.76-.02-4.14-.15-.25-.35-.31-.62-.17a1 1 0 0 0-.12.22c-.02 1.36-.03 2.73-.02 4.09h-.44c0-.99 0-1.97-.02-2.96-.02-.09-.06-.17-.1-.25-.67-.72-1.36-1.43-2.07-2.12-.06-1.48-.82-2.13-2.29-1.95-1.02.41-1.42 1.16-1.21 2.24q.51 1.32 1.95 1.26l1.55 1.55c.02.74.03 1.48.02 2.22-1.56.02-3.12 0-4.68-.07-.9-.24-1.42-.83-1.55-1.75-.02-4.48-.03-8.96-.02-13.45zm7.79 5.66c.84.06 1.19.5 1.06 1.33-.32.62-.8.79-1.45.52-.46-.37-.56-.82-.32-1.35.18-.26.42-.42.71-.49zm7.43 1.28c.89-.03 1.29.4 1.21 1.28-.33.67-.83.85-1.5.52-.54-.49-.58-1-.1-1.55.12-.11.25-.19.39-.25M9.94 19.94c.84 0 1.22.4 1.16 1.23-.28.68-.76.89-1.45.62-.63-.54-.65-1.09-.05-1.67l.34-.17zm9.75.24c.16.13.3.27.44.42-.53.52-1.05 1.05-1.55 1.6-.02 1.43-.03 2.86-.02 4.28h-.59c0-1.51 0-3.02.02-4.53a71 71 0 0 1 1.7-1.77M11.56 22c.62.53 1.21 1.11 1.75 1.72.02.92.03 1.84.02 2.76h-.59c0-.85 0-1.71-.02-2.56l-1.48-1.48s-.03-.07 0-.1c.12-.11.22-.22.32-.34",clipRule:"evenodd"})]});function ye({walletName:o,variant:e="background",className:t}){let n=r("novacore:w-full novacore:h-full novacore:rounded-full",t),a=o.toLowerCase();if(a==="impersonatedwallet")return jsxRuntime.jsx(so,{className:n});let i=io[a]??a;return jsxRuntime.jsx(l.Suspense,{fallback:jsxRuntime.jsx(d,{animate:true,className:t}),children:jsxRuntime.jsx(ro,{id:i,variant:e,className:n,fallback:jsxRuntime.jsx(d,{content:"?",className:t})})})}function Ne(o=2e3){let[e,t]=l.useState(false),[n,a]=l.useState(null),i=l.useCallback(async m=>{if(m)try{await navigator.clipboard.writeText(m),t(!0),a(null),setTimeout(()=>t(!1),o);}catch(p){let f=p instanceof Error?p:new Error("Failed to copy text.");console.error(f),a(f),setTimeout(()=>a(null),o);}},[o]);return {isCopied:e,copy:i,error:n}}function Ce(o){let e=a=>typeof window<"u"?window.matchMedia(a).matches:false,[t,n]=l.useState(e(o));return l.useEffect(()=>{let a=window.matchMedia(o),i=()=>n(a.matches);return i(),window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)},[o]),t}
|
|
48
|
+
exports.ChevronArrowWithAnim=Vo;exports.CloseIcon=V;exports.Dialog=Uo;exports.DialogClose=Jo;exports.DialogContent=G;exports.DialogDescription=U;exports.DialogFooter=j;exports.DialogHeader=_;exports.DialogOverlay=S;exports.DialogPortal=H;exports.DialogTitle=K;exports.DialogTrigger=Qo;exports.FallbackIcon=d;exports.NetworkIcon=ne;exports.StarsBackground=ce;exports.ToastCloseButton=ve;exports.WalletIcon=ye;exports.cn=r;exports.deepMerge=z;exports.getChainName=No;exports.isSolanaDev=w;exports.isTouchDevice=D;exports.standardButtonClasses=uo;exports.textCenterEllipsis=Co;exports.useCopyToClipboard=Ne;exports.useMediaQuery=Ce;
|
package/dist/index.css
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
--novacore-tracking-tight: -0.025em;
|
|
15
15
|
--novacore-radius-md: 0.375rem;
|
|
16
16
|
--novacore-radius-2xl: 1rem;
|
|
17
|
+
--novacore-animate-pulse: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
|
|
17
18
|
--novacore-blur-sm: 8px;
|
|
18
19
|
--novacore-default-transition-duration: 150ms;
|
|
19
20
|
--novacore-default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
@@ -86,6 +87,9 @@
|
|
|
86
87
|
.novacore\:w-full {
|
|
87
88
|
width: 100%;
|
|
88
89
|
}
|
|
90
|
+
.novacore\:animate-pulse {
|
|
91
|
+
animation: var(--novacore-animate-pulse);
|
|
92
|
+
}
|
|
89
93
|
.novacore\:cursor-pointer {
|
|
90
94
|
cursor: pointer;
|
|
91
95
|
}
|
|
@@ -137,6 +141,9 @@
|
|
|
137
141
|
.novacore\:border-\[var\(--tuwa-border-primary\)\] {
|
|
138
142
|
border-color: var(--tuwa-border-primary);
|
|
139
143
|
}
|
|
144
|
+
.novacore\:bg-\[var\(--tuwa-bg-muted\)\] {
|
|
145
|
+
background-color: var(--tuwa-bg-muted);
|
|
146
|
+
}
|
|
140
147
|
.novacore\:bg-\[var\(--tuwa-bg-primary\)\] {
|
|
141
148
|
background-color: var(--tuwa-bg-primary);
|
|
142
149
|
}
|
|
@@ -305,6 +312,13 @@
|
|
|
305
312
|
padding: calc(var(--novacore-spacing) * 4);
|
|
306
313
|
}
|
|
307
314
|
}
|
|
315
|
+
.novacore\:\[\&_path\]\:first-of-type\:fill-\[var\(--tuwa-testnet-icons\)\] {
|
|
316
|
+
& path {
|
|
317
|
+
&:first-of-type {
|
|
318
|
+
fill: var(--tuwa-testnet-icons);
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
}
|
|
308
322
|
}
|
|
309
323
|
:root {
|
|
310
324
|
--tuwa-success-bg: oklch(96.2% 0.044 156.743);
|
|
@@ -335,6 +349,7 @@
|
|
|
335
349
|
--tuwa-button-gradient-to-hover: oklch(49.6% 0.265 301.924);
|
|
336
350
|
--tuwa-standart-button-bg: oklch(96.7% 0.003 264.542);
|
|
337
351
|
--tuwa-standart-button-hover: oklch(92.8% 0.006 264.531);
|
|
352
|
+
--tuwa-testnet-icons: #C4BFB8;
|
|
338
353
|
}
|
|
339
354
|
.dark {
|
|
340
355
|
--tuwa-success-bg: oklch(39.3% 0.095 152.535);
|
|
@@ -365,6 +380,7 @@
|
|
|
365
380
|
--tuwa-button-gradient-to-hover: oklch(55.8% 0.288 302.321);
|
|
366
381
|
--tuwa-standart-button-bg: oklch(37.3% 0.034 259.733);
|
|
367
382
|
--tuwa-standart-button-hover: oklch(27.8% 0.033 256.848);
|
|
383
|
+
--tuwa-testnet-icons: #C4BFB8;
|
|
368
384
|
}
|
|
369
385
|
.Toastify {
|
|
370
386
|
pointer-events: auto;
|
|
@@ -552,6 +568,11 @@
|
|
|
552
568
|
inherits: false;
|
|
553
569
|
initial-value: 0;
|
|
554
570
|
}
|
|
571
|
+
@keyframes pulse {
|
|
572
|
+
50% {
|
|
573
|
+
opacity: 0.5;
|
|
574
|
+
}
|
|
575
|
+
}
|
|
555
576
|
@layer properties {
|
|
556
577
|
@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
|
|
557
578
|
*, ::before, ::after, ::backdrop {
|
package/dist/index.d.cts
CHANGED
|
@@ -15,6 +15,34 @@ declare function ChevronArrowWithAnim({ className, strokeWidth, isOpen, }: {
|
|
|
15
15
|
*/
|
|
16
16
|
declare const CloseIcon: React$1.ForwardRefExoticComponent<React$1.SVGAttributes<SVGSVGElement> & React$1.RefAttributes<SVGSVGElement>>;
|
|
17
17
|
|
|
18
|
+
/**
|
|
19
|
+
* Props for the FallbackIcon component.
|
|
20
|
+
*/
|
|
21
|
+
interface FallbackIconProps {
|
|
22
|
+
/**
|
|
23
|
+
* Whether to show a pulse animation to indicate a loading state.
|
|
24
|
+
* @default false
|
|
25
|
+
*/
|
|
26
|
+
animate?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Text content to display inside the fallback circle (e.g., "?", "!", or empty).
|
|
29
|
+
* @default ''
|
|
30
|
+
*/
|
|
31
|
+
content?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Additional CSS class names to apply to the container.
|
|
34
|
+
*/
|
|
35
|
+
className?: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* A reusable placeholder component used for Suspense fallbacks (loading)
|
|
39
|
+
* or Error fallbacks (when an icon is missing or fails to load).
|
|
40
|
+
*
|
|
41
|
+
* @param props - {@link FallbackIconProps}
|
|
42
|
+
* @returns The rendered fallback element.
|
|
43
|
+
*/
|
|
44
|
+
declare const FallbackIcon: ({ animate, content, className }: FallbackIconProps) => react_jsx_runtime.JSX.Element;
|
|
45
|
+
|
|
18
46
|
declare const Dialog: React$1.FC<DialogPrimitive.DialogProps>;
|
|
19
47
|
declare const DialogTrigger: React$1.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
20
48
|
declare const DialogPortal: React$1.FC<DialogPrimitive.DialogPortalProps>;
|
|
@@ -41,6 +69,37 @@ declare const DialogFooter: {
|
|
|
41
69
|
declare const DialogTitle: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React$1.RefAttributes<HTMLHeadingElement>, "ref"> & React$1.RefAttributes<HTMLHeadingElement>>;
|
|
42
70
|
declare const DialogDescription: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React$1.RefAttributes<HTMLParagraphElement>, "ref"> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
43
71
|
|
|
72
|
+
/**
|
|
73
|
+
* Props for the NetworkIcon component.
|
|
74
|
+
*/
|
|
75
|
+
interface NetworkIconProps {
|
|
76
|
+
/**
|
|
77
|
+
* Chain identifier.
|
|
78
|
+
* - `number`: For EVM networks (e.g., 1, 137).
|
|
79
|
+
* - `string`: For non-EVM networks (e.g., "solana:mainnet", "solana:devnet").
|
|
80
|
+
*/
|
|
81
|
+
chainId: number | string;
|
|
82
|
+
/**
|
|
83
|
+
* Visual style variant for the icon.
|
|
84
|
+
* @default 'background'
|
|
85
|
+
*/
|
|
86
|
+
variant?: 'background' | 'branded' | 'mono';
|
|
87
|
+
/** Additional CSS class names. */
|
|
88
|
+
className?: string;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Renders a network icon based on the chain ID.
|
|
92
|
+
*
|
|
93
|
+
* It handles logic for:
|
|
94
|
+
* 1. Lazy loading the heavy icon library.
|
|
95
|
+
* 2. Normalizing string IDs (e.g., converts "solana:devnet" -> "solana").
|
|
96
|
+
* 3. Applying specific styling for Testnets/Devnets (e.g., muted colors for Solana Devnet).
|
|
97
|
+
*
|
|
98
|
+
* @param props - {@link NetworkIconProps}
|
|
99
|
+
* @returns The network icon or a fallback UI.
|
|
100
|
+
*/
|
|
101
|
+
declare function NetworkIcon({ chainId, variant, className }: NetworkIconProps): react_jsx_runtime.JSX.Element;
|
|
102
|
+
|
|
44
103
|
declare function StarsBackground({ starsCount }: {
|
|
45
104
|
starsCount?: number;
|
|
46
105
|
}): react_jsx_runtime.JSX.Element;
|
|
@@ -64,6 +123,36 @@ type ToastCloseButtonProps = {
|
|
|
64
123
|
*/
|
|
65
124
|
declare function ToastCloseButton({ closeToast }: ToastCloseButtonProps): react_jsx_runtime.JSX.Element;
|
|
66
125
|
|
|
126
|
+
/**
|
|
127
|
+
* Props for the WalletIcon component.
|
|
128
|
+
*/
|
|
129
|
+
interface WalletIconProps {
|
|
130
|
+
/**
|
|
131
|
+
* The unique identifier of the wallet.
|
|
132
|
+
* Examples: 'metamask', 'phantom', 'coinbase', 'walletconnect'.
|
|
133
|
+
*/
|
|
134
|
+
walletName: string;
|
|
135
|
+
/**
|
|
136
|
+
* Visual style variant for the icon.
|
|
137
|
+
* @default 'background'
|
|
138
|
+
*/
|
|
139
|
+
variant?: 'background' | 'branded' | 'mono';
|
|
140
|
+
/** Additional CSS class names. */
|
|
141
|
+
className?: string;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Renders a wallet icon based on the wallet name.
|
|
145
|
+
*
|
|
146
|
+
* It handles logic for:
|
|
147
|
+
* 1. Rendering a custom SVG for 'impersonatedwallet' (Watch mode).
|
|
148
|
+
* 2. Normalizing IDs for common wallets (e.g. 'walletconnect' -> 'wallet-connect').
|
|
149
|
+
* 3. Lazy loading other icons from @web3icons/react.
|
|
150
|
+
*
|
|
151
|
+
* @param props - {@link WalletIconProps}
|
|
152
|
+
* @returns The wallet icon or a fallback UI.
|
|
153
|
+
*/
|
|
154
|
+
declare function WalletIcon({ walletName, variant, className }: WalletIconProps): react_jsx_runtime.JSX.Element;
|
|
155
|
+
|
|
67
156
|
/**
|
|
68
157
|
* @file This file contains a custom React hook for copying text to the clipboard.
|
|
69
158
|
*/
|
|
@@ -149,6 +238,32 @@ declare function cn(...inputs: ClassValue[]): string;
|
|
|
149
238
|
*/
|
|
150
239
|
declare function deepMerge<T extends object>(target: T, source: Partial<T>): T;
|
|
151
240
|
|
|
241
|
+
/**
|
|
242
|
+
* Retrieves the human-readable name of a blockchain network based on its Chain ID.
|
|
243
|
+
*
|
|
244
|
+
* Supports both:
|
|
245
|
+
* - Numeric IDs (EVM): e.g., `1` -> "Ethereum"
|
|
246
|
+
* - String IDs (Non-EVM): e.g., `"solana:devnet"` -> "Solana Devnet"
|
|
247
|
+
*
|
|
248
|
+
* For formatted string IDs (like "solana:devnet"), it capitalizes the suffix
|
|
249
|
+
* if the network is identified as a development environment.
|
|
250
|
+
*
|
|
251
|
+
* @param chainId - The unique identifier of the chain (number for EVM, string for others).
|
|
252
|
+
* @returns The formatted network name or 'Unknown'.
|
|
253
|
+
*/
|
|
254
|
+
declare function getChainName(chainId: number | string): string;
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* Determines if the current chain is a Solana development or test network.
|
|
258
|
+
*
|
|
259
|
+
* It strictly checks if the ID is a string containing 'solana' AND
|
|
260
|
+
* indicates a non-production environment ('devnet' or 'testnet').
|
|
261
|
+
*
|
|
262
|
+
* @param chainId - The chain identifier (e.g., "solana:devnet", 1, "ethereum").
|
|
263
|
+
* @returns {boolean} True only if it is a Solana dev/test chain.
|
|
264
|
+
*/
|
|
265
|
+
declare function isSolanaDev(chainId: number | string): boolean;
|
|
266
|
+
|
|
152
267
|
/**
|
|
153
268
|
* @fileoverview Utility function to determine if the current environment supports touch input.
|
|
154
269
|
* This is safe to use in Next.js applications as it checks for the `window` object existence.
|
|
@@ -188,4 +303,4 @@ declare function isTouchDevice(maxWidth?: number): boolean;
|
|
|
188
303
|
*/
|
|
189
304
|
declare function textCenterEllipsis(str: string | undefined | null, from: number, to: number): string;
|
|
190
305
|
|
|
191
|
-
export { ChevronArrowWithAnim, CloseIcon, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, StarsBackground, ToastCloseButton, type ToastCloseButtonProps, cn, deepMerge, isTouchDevice, standardButtonClasses, textCenterEllipsis, useCopyToClipboard, useMediaQuery };
|
|
306
|
+
export { ChevronArrowWithAnim, CloseIcon, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, FallbackIcon, type FallbackIconProps, NetworkIcon, StarsBackground, ToastCloseButton, type ToastCloseButtonProps, WalletIcon, cn, deepMerge, getChainName, isSolanaDev, isTouchDevice, standardButtonClasses, textCenterEllipsis, useCopyToClipboard, useMediaQuery };
|
package/dist/index.d.ts
CHANGED
|
@@ -15,6 +15,34 @@ declare function ChevronArrowWithAnim({ className, strokeWidth, isOpen, }: {
|
|
|
15
15
|
*/
|
|
16
16
|
declare const CloseIcon: React$1.ForwardRefExoticComponent<React$1.SVGAttributes<SVGSVGElement> & React$1.RefAttributes<SVGSVGElement>>;
|
|
17
17
|
|
|
18
|
+
/**
|
|
19
|
+
* Props for the FallbackIcon component.
|
|
20
|
+
*/
|
|
21
|
+
interface FallbackIconProps {
|
|
22
|
+
/**
|
|
23
|
+
* Whether to show a pulse animation to indicate a loading state.
|
|
24
|
+
* @default false
|
|
25
|
+
*/
|
|
26
|
+
animate?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Text content to display inside the fallback circle (e.g., "?", "!", or empty).
|
|
29
|
+
* @default ''
|
|
30
|
+
*/
|
|
31
|
+
content?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Additional CSS class names to apply to the container.
|
|
34
|
+
*/
|
|
35
|
+
className?: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* A reusable placeholder component used for Suspense fallbacks (loading)
|
|
39
|
+
* or Error fallbacks (when an icon is missing or fails to load).
|
|
40
|
+
*
|
|
41
|
+
* @param props - {@link FallbackIconProps}
|
|
42
|
+
* @returns The rendered fallback element.
|
|
43
|
+
*/
|
|
44
|
+
declare const FallbackIcon: ({ animate, content, className }: FallbackIconProps) => react_jsx_runtime.JSX.Element;
|
|
45
|
+
|
|
18
46
|
declare const Dialog: React$1.FC<DialogPrimitive.DialogProps>;
|
|
19
47
|
declare const DialogTrigger: React$1.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
20
48
|
declare const DialogPortal: React$1.FC<DialogPrimitive.DialogPortalProps>;
|
|
@@ -41,6 +69,37 @@ declare const DialogFooter: {
|
|
|
41
69
|
declare const DialogTitle: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React$1.RefAttributes<HTMLHeadingElement>, "ref"> & React$1.RefAttributes<HTMLHeadingElement>>;
|
|
42
70
|
declare const DialogDescription: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React$1.RefAttributes<HTMLParagraphElement>, "ref"> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
43
71
|
|
|
72
|
+
/**
|
|
73
|
+
* Props for the NetworkIcon component.
|
|
74
|
+
*/
|
|
75
|
+
interface NetworkIconProps {
|
|
76
|
+
/**
|
|
77
|
+
* Chain identifier.
|
|
78
|
+
* - `number`: For EVM networks (e.g., 1, 137).
|
|
79
|
+
* - `string`: For non-EVM networks (e.g., "solana:mainnet", "solana:devnet").
|
|
80
|
+
*/
|
|
81
|
+
chainId: number | string;
|
|
82
|
+
/**
|
|
83
|
+
* Visual style variant for the icon.
|
|
84
|
+
* @default 'background'
|
|
85
|
+
*/
|
|
86
|
+
variant?: 'background' | 'branded' | 'mono';
|
|
87
|
+
/** Additional CSS class names. */
|
|
88
|
+
className?: string;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Renders a network icon based on the chain ID.
|
|
92
|
+
*
|
|
93
|
+
* It handles logic for:
|
|
94
|
+
* 1. Lazy loading the heavy icon library.
|
|
95
|
+
* 2. Normalizing string IDs (e.g., converts "solana:devnet" -> "solana").
|
|
96
|
+
* 3. Applying specific styling for Testnets/Devnets (e.g., muted colors for Solana Devnet).
|
|
97
|
+
*
|
|
98
|
+
* @param props - {@link NetworkIconProps}
|
|
99
|
+
* @returns The network icon or a fallback UI.
|
|
100
|
+
*/
|
|
101
|
+
declare function NetworkIcon({ chainId, variant, className }: NetworkIconProps): react_jsx_runtime.JSX.Element;
|
|
102
|
+
|
|
44
103
|
declare function StarsBackground({ starsCount }: {
|
|
45
104
|
starsCount?: number;
|
|
46
105
|
}): react_jsx_runtime.JSX.Element;
|
|
@@ -64,6 +123,36 @@ type ToastCloseButtonProps = {
|
|
|
64
123
|
*/
|
|
65
124
|
declare function ToastCloseButton({ closeToast }: ToastCloseButtonProps): react_jsx_runtime.JSX.Element;
|
|
66
125
|
|
|
126
|
+
/**
|
|
127
|
+
* Props for the WalletIcon component.
|
|
128
|
+
*/
|
|
129
|
+
interface WalletIconProps {
|
|
130
|
+
/**
|
|
131
|
+
* The unique identifier of the wallet.
|
|
132
|
+
* Examples: 'metamask', 'phantom', 'coinbase', 'walletconnect'.
|
|
133
|
+
*/
|
|
134
|
+
walletName: string;
|
|
135
|
+
/**
|
|
136
|
+
* Visual style variant for the icon.
|
|
137
|
+
* @default 'background'
|
|
138
|
+
*/
|
|
139
|
+
variant?: 'background' | 'branded' | 'mono';
|
|
140
|
+
/** Additional CSS class names. */
|
|
141
|
+
className?: string;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Renders a wallet icon based on the wallet name.
|
|
145
|
+
*
|
|
146
|
+
* It handles logic for:
|
|
147
|
+
* 1. Rendering a custom SVG for 'impersonatedwallet' (Watch mode).
|
|
148
|
+
* 2. Normalizing IDs for common wallets (e.g. 'walletconnect' -> 'wallet-connect').
|
|
149
|
+
* 3. Lazy loading other icons from @web3icons/react.
|
|
150
|
+
*
|
|
151
|
+
* @param props - {@link WalletIconProps}
|
|
152
|
+
* @returns The wallet icon or a fallback UI.
|
|
153
|
+
*/
|
|
154
|
+
declare function WalletIcon({ walletName, variant, className }: WalletIconProps): react_jsx_runtime.JSX.Element;
|
|
155
|
+
|
|
67
156
|
/**
|
|
68
157
|
* @file This file contains a custom React hook for copying text to the clipboard.
|
|
69
158
|
*/
|
|
@@ -149,6 +238,32 @@ declare function cn(...inputs: ClassValue[]): string;
|
|
|
149
238
|
*/
|
|
150
239
|
declare function deepMerge<T extends object>(target: T, source: Partial<T>): T;
|
|
151
240
|
|
|
241
|
+
/**
|
|
242
|
+
* Retrieves the human-readable name of a blockchain network based on its Chain ID.
|
|
243
|
+
*
|
|
244
|
+
* Supports both:
|
|
245
|
+
* - Numeric IDs (EVM): e.g., `1` -> "Ethereum"
|
|
246
|
+
* - String IDs (Non-EVM): e.g., `"solana:devnet"` -> "Solana Devnet"
|
|
247
|
+
*
|
|
248
|
+
* For formatted string IDs (like "solana:devnet"), it capitalizes the suffix
|
|
249
|
+
* if the network is identified as a development environment.
|
|
250
|
+
*
|
|
251
|
+
* @param chainId - The unique identifier of the chain (number for EVM, string for others).
|
|
252
|
+
* @returns The formatted network name or 'Unknown'.
|
|
253
|
+
*/
|
|
254
|
+
declare function getChainName(chainId: number | string): string;
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* Determines if the current chain is a Solana development or test network.
|
|
258
|
+
*
|
|
259
|
+
* It strictly checks if the ID is a string containing 'solana' AND
|
|
260
|
+
* indicates a non-production environment ('devnet' or 'testnet').
|
|
261
|
+
*
|
|
262
|
+
* @param chainId - The chain identifier (e.g., "solana:devnet", 1, "ethereum").
|
|
263
|
+
* @returns {boolean} True only if it is a Solana dev/test chain.
|
|
264
|
+
*/
|
|
265
|
+
declare function isSolanaDev(chainId: number | string): boolean;
|
|
266
|
+
|
|
152
267
|
/**
|
|
153
268
|
* @fileoverview Utility function to determine if the current environment supports touch input.
|
|
154
269
|
* This is safe to use in Next.js applications as it checks for the `window` object existence.
|
|
@@ -188,4 +303,4 @@ declare function isTouchDevice(maxWidth?: number): boolean;
|
|
|
188
303
|
*/
|
|
189
304
|
declare function textCenterEllipsis(str: string | undefined | null, from: number, to: number): string;
|
|
190
305
|
|
|
191
|
-
export { ChevronArrowWithAnim, CloseIcon, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, StarsBackground, ToastCloseButton, type ToastCloseButtonProps, cn, deepMerge, isTouchDevice, standardButtonClasses, textCenterEllipsis, useCopyToClipboard, useMediaQuery };
|
|
306
|
+
export { ChevronArrowWithAnim, CloseIcon, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, FallbackIcon, type FallbackIconProps, NetworkIcon, StarsBackground, ToastCloseButton, type ToastCloseButtonProps, WalletIcon, cn, deepMerge, getChainName, isSolanaDev, isTouchDevice, standardButtonClasses, textCenterEllipsis, useCopyToClipboard, useMediaQuery };
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {motion,AnimatePresence}from'framer-motion';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {jsxs,jsx}from'react/jsx-runtime';import*as l from'react';import {useState,useEffect,useMemo,useCallback}from'react';import*as
|
|
1
|
+
import {motion,AnimatePresence}from'framer-motion';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {networks}from'@web3icons/common/metadata';import {jsxs,jsx}from'react/jsx-runtime';import*as l from'react';import {lazy,Suspense,useState,useEffect,useMemo,useCallback}from'react';import*as s from'@radix-ui/react-dialog';var uo="novacore:cursor-pointer novacore:rounded-md novacore:bg-[var(--tuwa-standart-button-bg)] novacore:px-3 novacore:py-2 novacore:flex novacore:items-center novacore:gap-1 novacore:text-sm novacore:font-semibold novacore:text-[var(--tuwa-text-primary)] novacore:transition-colors novacore:hover:bg-[var(--tuwa-standart-button-hover)] novacore:disabled:cursor-not-allowed novacore:disabled:opacity-50";function r(...o){return twMerge(clsx(o))}var g=o=>o&&typeof o=="object"&&!Array.isArray(o);function z(o,e){let t={...o};return g(o)&&g(e)&&Object.keys(e).forEach(n=>{let a=o[n],i=e[n];g(a)&&g(i)?t[n]=z(a,i):t[n]=i;}),t}function w(o){if(typeof o!="string")return false;let e=o.toLowerCase();return e.includes("solana")&&(e.includes("devnet")||e.includes("testnet"))}var k="Unknown";function No(o){if(typeof o=="number")return networks.find(a=>a.chainId===o)?.name??k;let[e,t]=o.split(":"),n=networks.find(a=>a.id===e);if(!n)return k;if(t&&w(o)){let a=t.charAt(0).toUpperCase()+t.slice(1).toLowerCase();return `${n.name} ${a}`}return n.name}function D(o=1200){if(typeof window>"u")return false;let e="ontouchstart"in window,t=navigator.maxTouchPoints>0,n=false;window.matchMedia&&(n=window.matchMedia("(pointer: coarse)").matches);let a=e||t||n,i=window.innerWidth<=o;return a&&i}function Co(o,e,t){if(!o)return "";if(o.length<=e+t)return o;let n=o.slice(0,e),a=o.slice(o.length-t);return `${n}...${a}`}function Vo({className:o,strokeWidth:e,isOpen:t}){return jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:e??2,stroke:"currentColor",className:r("novacore:w-4 novacore:h-4 novacore:text-[var(--tuwa-text-secondary)]",o),children:[jsx(AnimatePresence,{children:t&&jsx(motion.path,{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5",variants:{hidden:{translateY:3,scaleY:.8,opacity:0},visible:{translateY:0,scaleY:1,opacity:1}},initial:"hidden",animate:"visible",transition:{duration:.4}})}),jsx(AnimatePresence,{children:!t&&jsx(motion.path,{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5",className:"novacore:relative",variants:{hidden:{translateY:-3,scaleY:.8,opacity:0},visible:{translateY:0,scaleY:1,opacity:1}},initial:"hidden",animate:"visible",transition:{duration:.4}})})]})}var V=l.forwardRef(({className:o,...e},t)=>jsxs("svg",{ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:r("novacore:h-5 novacore:w-5 novacore:text-[var(--tuwa-text-primary)] novacore:transition-colors",o),...e,children:[jsx("path",{d:"M18 6 6 18"}),jsx("path",{d:"m6 6 12 12"})]}));V.displayName="CloseIcon";var F="flex items-center justify-center novacore:w-full novacore:h-full novacore:rounded-full novacore:text-[var(--tuwa-text-secondary)] novacore:bg-[var(--tuwa-bg-muted)]",d=({animate:o=false,content:e="",className:t})=>jsx("div",{className:r(F,t,{"novacore:animate-pulse":o}),children:e});var Uo=s.Root,Qo=s.Trigger,H=s.Portal,Jo=s.Close,Y={initial:{opacity:0,scale:.9,y:20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.9,transition:{duration:.2}}},$={initial:{opacity:0,y:"100%"},animate:{opacity:1,y:"0%"},exit:{opacity:0,y:"100%",transition:{duration:.2}}},q={initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},S=({className:o,backdropAnimation:e})=>(l.useEffect(()=>(typeof window<"u"&&window.document.body.classList.add("NovaModalOpen"),()=>{typeof window<"u"&&window.document.body.classList.remove("NovaModalOpen");}),[]),jsx(AnimatePresence,{children:jsx(motion.div,{variants:e??q,transition:{duration:.2,ease:"easeInOut"},animate:"animate",initial:"initial",exit:"exit",className:"novacore:relative novacore:rounded-t-2xl novacore:sm:rounded-2xl novacore:overflow-hidden",children:jsx("div",{className:r("novacore:fixed novacore:inset-0 novacore:z-50 novacore:bg-black/55 novacore:backdrop-blur-sm novacore:backdrop-saturate-150",o)})})}));S.displayName=s.Overlay.displayName;var G=l.forwardRef(({className:o,children:e,modalAnimation:t,backdropAnimation:n,...a},i)=>{let[m,p]=l.useState(false);l.useEffect(()=>{p(D());},[]);let f=t??(m?$:Y);return jsxs(H,{children:[jsx(S,{backdropAnimation:n}),jsx(s.Content,{"aria-describedby":"tuwa:modal-content",ref:i,className:r("NovaNoScrolling novacore:fixed novacore:bottom-0 novacore:left-0 novacore:p-0 novacore:sm:bottom-auto novacore:sm:left-[50%] novacore:sm:top-[50%] novacore:sm:translate-x-[-50%] novacore:sm:translate-y-[-50%] novacore:z-50 novacore:sm:p-4 novacore:outline-none",o),...a,children:jsx(motion.div,{layout:true,className:"NovaNoScrolling novacore:relative novacore:overflow-hidden",transition:{layout:{duration:.2,ease:[.1,.1,.2,1]}},children:jsx(AnimatePresence,{children:jsx(motion.div,{variants:f,transition:{duration:.2,ease:"easeInOut"},animate:"animate",initial:"initial",exit:"exit",className:"NovaNoScrolling novacore:relative novacore:rounded-t-2xl novacore:sm:rounded-2xl novacore:overflow-hidden",children:jsx("div",{className:r("NovaNoScrolling novacore:relative novacore:flex novacore:max-h-[98dvh] novacore:w-full novacore:flex-col novacore:gap-3 novacore:overflow-y-auto novacore:rounded-t-2xl novacore:sm:rounded-2xl novacore:shadow-2xl","novacore:border novacore:border-[var(--tuwa-border-primary)] novacore:bg-[var(--tuwa-bg-primary)]"),children:e})})})})})]})});G.displayName=s.Content.displayName;var _=({className:o,...e})=>jsx("div",{"aria-describedby":"tuwa:modal-header",className:r("novacore:sticky novacore:flex novacore:top-0 novacore:z-11 novacore:w-full novacore:flex-row novacore:items-center novacore:justify-between","novacore:border-b novacore:border-[var(--tuwa-border-primary)] novacore:bg-[var(--tuwa-bg-primary)] novacore:p-4",o),...e});_.displayName="DialogHeader";var j=({className:o,...e})=>jsx("div",{"aria-describedby":"tuwa:modal-footer",className:r("novacore:flex novacore:flex-col-reverse novacore:sm:flex-row novacore:sm:justify-end novacore:sm:space-x-2",o),...e});j.displayName="DialogFooter";var K=l.forwardRef(({className:o,...e},t)=>jsx(s.Title,{ref:t,"aria-describedby":"tuwa:modal-title",className:r("novacore:text-lg novacore:font-bold novacore:leading-none novacore:tracking-tight novacore:text-[var(--tuwa-text-primary)] novacore:m-0",o),...e}));K.displayName=s.Title.displayName;var U=l.forwardRef(({className:o,...e},t)=>jsx(s.Description,{"aria-describedby":"tuwa:modal-description",ref:t,className:r("novacore:text-sm novacore:text-[var(--tuwa-text-secondary)]",o),...e}));U.displayName=s.Description.displayName;var A=lazy(()=>import('@web3icons/react/dynamic').then(o=>({default:o.NetworkIcon})));function ne({chainId:o,variant:e="background",className:t}){let n=typeof o=="string",a=n?o.split(":")[0].toLowerCase():o,i=n&&w(o),m=r("novacore:w-full novacore:h-full novacore:rounded-full",t,{"novacore:[&_path]:first-of-type:fill-[var(--tuwa-testnet-icons)]":i});return jsx(Suspense,{fallback:jsx(d,{animate:true,className:t}),children:typeof a=="string"?jsx(A,{id:a,variant:e,className:m,fallback:jsx(d,{content:"?",className:t})}):jsx(A,{chainId:a,variant:e,className:m,fallback:jsx(d,{content:"?",className:t})})})}function ce({starsCount:o}){let[e,t]=useState(false);useEffect(()=>t(true),[]);let n=useMemo(()=>e?Array.from({length:o??200}).map(()=>({x:Math.random()*window.innerWidth,y:Math.random()*window.innerHeight,r:Math.random()*1+.5,isSupernova:Math.random()<.1,delay:Math.random()*10,duration:5+Math.random()*5})):[],[e]);return jsx("div",{className:"novacore:absolute novacore:inset-0 novacore:z-1 novacore:h-full novacore:w-full novacore:overflow-hidden",children:jsxs("svg",{width:"100%",height:"100%",xmlns:"http://www.w3.org/2000/svg",children:[jsx("defs",{children:jsx("style",{children:`
|
|
2
2
|
/* Pulse animation now includes scale for a more organic feel. */
|
|
3
3
|
@keyframes pulse {
|
|
4
4
|
0%, 100% {
|
|
@@ -44,6 +44,5 @@ import {motion,AnimatePresence}from'framer-motion';import {clsx}from'clsx';impor
|
|
|
44
44
|
transform-origin: center;
|
|
45
45
|
stroke-width: 2;
|
|
46
46
|
}
|
|
47
|
-
`})}),n.map((a,i)=>jsx("circle",{cx:a.x,cy:a.y,r:a.r,fill:"rgba(var(--tuwa-bg-primary), 0.7)",className:a.isSupernova?"supernova":"pulsar",style:{animationDelay:`${a.delay}s`,animationDuration:`${a.duration}s`}},i))]})})}function
|
|
48
|
-
export{
|
|
49
|
-
//# sourceMappingURL=index.js.map
|
|
47
|
+
`})}),n.map((a,i)=>jsx("circle",{cx:a.x,cy:a.y,r:a.r,fill:"rgba(var(--tuwa-bg-primary), 0.7)",className:a.isSupernova?"supernova":"pulsar",style:{animationDelay:`${a.delay}s`,animationDuration:`${a.duration}s`}},i))]})})}function ve({closeToast:o}){return jsx("button",{type:"button",onClick:o,"aria-label":"Close toast notification",title:"Close toast notification",className:r("novacore:absolute novacore:top-2 novacore:right-2 novacore:cursor-pointer novacore:rounded-full novacore:p-1","novacore:text-[var(--tuwa-text-tertiary)] novacore:transition-colors","novacore:hover:bg-[var(--tuwa-bg-muted)] novacore:hover:text-[var(--tuwa-text-primary)]"),children:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"novacore:h-5 novatx:w-5",children:jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"})})})}var ro=lazy(()=>import('@web3icons/react/dynamic').then(o=>({default:o.WalletIcon}))),io={walletconnect:"wallet-connect"},so=({className:o})=>jsxs("svg",{className:o,fill:"none",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",children:[jsx("path",{fill:"#fff",fillRule:"evenodd",d:"M16 0c8.84 0 16 7.16 16 16s-7.16 16-16 16S0 24.84 0 16 7.16 0 16 0",clipRule:"evenodd"}),jsx("path",{fill:"#000",fillRule:"evenodd",d:"M16.54 2.01h1.53c.5.09.99.23 1.48.42.21.25.19.48-.05.69q-.195.045-.39 0c-1.86-.65-3.55-.35-5.07.89 2.39.7 3.84 2.27 4.36 4.7.12.85.08 1.68-.12 2.51.87 0 1.74 0 2.61-.02.39-.4.7-.85.94-1.35-.45-.45-.65-.99-.59-1.63-1.15.08-1.79-.44-1.92-1.58.14-1.12.78-1.67 1.92-1.63a.7.7 0 0 0-.12-.49l-.89-.89c-.02-.45.19-.6.62-.47.24.19.46.39.66.62.71-.79 1.5-.89 2.39-.32.44.42.62.94.54 1.55 1.49.02 2.11.76 1.85 2.22-.08.17-.17.34-.27.49.53.59.87 1.28 1.01 2.07.08 4.6.1 9.19.05 13.79-.19 1.58-1 2.71-2.44 3.37-.29.1-.59.2-.89.27H7.2c-1.31-.33-2.05-1.17-2.24-2.51-.03-5.24-.03-10.47 0-15.71.3-1.62 1.28-2.46 2.93-2.54 1.26-1.77 2.98-2.64 5.17-2.61.96-1.01 2.13-1.62 3.5-1.85zm6.11 1.87c.39-.03.7.12.91.44.06.39.09.79.1 1.18.02.12.07.21.17.27.41 0 .82.04 1.23.1.49.26.63.65.42 1.16-.07.14-.18.25-.32.32-.39.06-.79.09-1.18.1-.12.02-.21.07-.27.17l-.15 1.33c-.32.46-.72.55-1.21.27a.76.76 0 0 1-.27-.37c-.06-.41-.09-.82-.1-1.23a.35.35 0 0 0-.27-.17l-1.08-.05c-.46-.24-.62-.61-.47-1.11.14-.27.36-.43.66-.47l.99-.05s.09-.04.12-.07l.15-1.28q.18-.39.57-.54m-10.49.79c2.41-.09 4.12.94 5.15 3.1.44 1.12.48 2.25.12 3.4-.84.06-1.67.07-2.51.02.56-.68.52-1.32-.1-1.92-.26-.13-.54-.19-.84-.17.02-.95 0-1.91-.07-2.86-.21-.41-.55-.58-1.01-.52-.17.03-.31.09-.44.2-.72.92-1.43 1.85-2.14 2.78-.28.45-.29.91-.05 1.38q.225.3.57.42c.34.02.69.03 1.03.02v.69c-1.3.02-2.59 0-3.89-.05-.58-2.1-.08-3.88 1.53-5.34.79-.62 1.68-1 2.66-1.16zm.83 1.82c.07 0 .13.03.17.1l.05 3.05c.04.09.1.16.17.22l.89.05c.22.08.3.24.22.47q-.27.42-.57.81c-.43.02-.85.03-1.28.02 0-.41 0-.82-.02-1.23a.46.46 0 0 0-.17-.17l-1.28-.05c-.3-.1-.37-.29-.22-.57.7-.89 1.39-1.79 2.04-2.71zm-5.81.84h.2a6.1 6.1 0 0 0-.25 3.77c-.59-.13-1.01-.49-1.26-1.06-.36-1.29.08-2.19 1.31-2.71m17.98.83c.05 0 .1 0 .15.02q.825.855.96 2.04.045 1.305 0 2.61a3.76 3.76 0 0 0-2.54-1.55c-.61-.05-1.21-.08-1.82-.1.26-.31.48-.66.64-1.03 1.31.02 1.94-.62 1.87-1.95.26.02.5 0 .74-.05zM5.7 11.22c.41.4.91.65 1.48.76l16.06.05c1.42.13 2.38.87 2.88 2.19.07.24.12.49.15.74.03 2.86.03 5.71 0 8.57-.21 1.44-1 2.38-2.39 2.83-.24.05-.49.08-.74.1-1.26.02-2.53.03-3.79.02 0-1.33 0-2.66.02-3.99l1.55-1.55c1.42-.04 2.09-.78 1.99-2.19-.24-.88-.81-1.34-1.72-1.38-1.2.12-1.81.8-1.82 2.02l-1.92 1.92c-.08.11-.14.22-.2.34-.07 1.61-.1 3.22-.07 4.83h-.44c0-2.28 0-4.56-.02-6.85a1.8 1.8 0 0 0-.15-.34l-1.13-1.13c0-1.23-.61-1.92-1.82-2.07-1.29.17-1.87.91-1.72 2.22q.465 1.395 1.95 1.35l.71.71c0 .3.04.6.1.89.25.21.48.19.69-.05.03-.39.03-.79 0-1.18-.2-.25-.43-.49-.66-.71.15-.1.29-.22.39-.37.3.27.58.55.86.84.02 2.23.03 4.47.02 6.7h-.59c0-1.38 0-2.76-.02-4.14-.15-.25-.35-.31-.62-.17a1 1 0 0 0-.12.22c-.02 1.36-.03 2.73-.02 4.09h-.44c0-.99 0-1.97-.02-2.96-.02-.09-.06-.17-.1-.25-.67-.72-1.36-1.43-2.07-2.12-.06-1.48-.82-2.13-2.29-1.95-1.02.41-1.42 1.16-1.21 2.24q.51 1.32 1.95 1.26l1.55 1.55c.02.74.03 1.48.02 2.22-1.56.02-3.12 0-4.68-.07-.9-.24-1.42-.83-1.55-1.75-.02-4.48-.03-8.96-.02-13.45zm7.79 5.66c.84.06 1.19.5 1.06 1.33-.32.62-.8.79-1.45.52-.46-.37-.56-.82-.32-1.35.18-.26.42-.42.71-.49zm7.43 1.28c.89-.03 1.29.4 1.21 1.28-.33.67-.83.85-1.5.52-.54-.49-.58-1-.1-1.55.12-.11.25-.19.39-.25M9.94 19.94c.84 0 1.22.4 1.16 1.23-.28.68-.76.89-1.45.62-.63-.54-.65-1.09-.05-1.67l.34-.17zm9.75.24c.16.13.3.27.44.42-.53.52-1.05 1.05-1.55 1.6-.02 1.43-.03 2.86-.02 4.28h-.59c0-1.51 0-3.02.02-4.53a71 71 0 0 1 1.7-1.77M11.56 22c.62.53 1.21 1.11 1.75 1.72.02.92.03 1.84.02 2.76h-.59c0-.85 0-1.71-.02-2.56l-1.48-1.48s-.03-.07 0-.1c.12-.11.22-.22.32-.34",clipRule:"evenodd"})]});function ye({walletName:o,variant:e="background",className:t}){let n=r("novacore:w-full novacore:h-full novacore:rounded-full",t),a=o.toLowerCase();if(a==="impersonatedwallet")return jsx(so,{className:n});let i=io[a]??a;return jsx(Suspense,{fallback:jsx(d,{animate:true,className:t}),children:jsx(ro,{id:i,variant:e,className:n,fallback:jsx(d,{content:"?",className:t})})})}function Ne(o=2e3){let[e,t]=useState(false),[n,a]=useState(null),i=useCallback(async m=>{if(m)try{await navigator.clipboard.writeText(m),t(!0),a(null),setTimeout(()=>t(!1),o);}catch(p){let f=p instanceof Error?p:new Error("Failed to copy text.");console.error(f),a(f),setTimeout(()=>a(null),o);}},[o]);return {isCopied:e,copy:i,error:n}}function Ce(o){let e=a=>typeof window<"u"?window.matchMedia(a).matches:false,[t,n]=useState(e(o));return useEffect(()=>{let a=window.matchMedia(o),i=()=>n(a.matches);return i(),window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)},[o]),t}
|
|
48
|
+
export{Vo as ChevronArrowWithAnim,V as CloseIcon,Uo as Dialog,Jo as DialogClose,G as DialogContent,U as DialogDescription,j as DialogFooter,_ as DialogHeader,S as DialogOverlay,H as DialogPortal,K as DialogTitle,Qo as DialogTrigger,d as FallbackIcon,ne as NetworkIcon,ce as StarsBackground,ve as ToastCloseButton,ye as WalletIcon,r as cn,z as deepMerge,No as getChainName,w as isSolanaDev,D as isTouchDevice,uo as standardButtonClasses,Co as textCenterEllipsis,Ne as useCopyToClipboard,Ce as useMediaQuery};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tuwaio/nova-core",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "Oleksandr Tkach",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -49,6 +49,8 @@
|
|
|
49
49
|
],
|
|
50
50
|
"peerDependencies": {
|
|
51
51
|
"@radix-ui/react-dialog": "1.x.x",
|
|
52
|
+
"@web3icons/react": ">=4",
|
|
53
|
+
"@web3icons/common": ">=0.11",
|
|
52
54
|
"clsx": "2.x.x",
|
|
53
55
|
"framer-motion": "12.x.x",
|
|
54
56
|
"react": ">=19.2.3",
|
|
@@ -57,11 +59,13 @@
|
|
|
57
59
|
"devDependencies": {
|
|
58
60
|
"@tailwindcss/postcss": "^4.1.18",
|
|
59
61
|
"@tailwindcss/vite": "^4.1.18",
|
|
60
|
-
"@types/react": "^19.2.
|
|
62
|
+
"@types/react": "^19.2.8",
|
|
61
63
|
"@radix-ui/react-dialog": "^1.1.15",
|
|
64
|
+
"@web3icons/react": "^4.1.12",
|
|
65
|
+
"@web3icons/common": "^0.11.41",
|
|
62
66
|
"autoprefixer": "^10.4.23",
|
|
63
67
|
"clsx": "^2.1.1",
|
|
64
|
-
"framer-motion": "^12.
|
|
68
|
+
"framer-motion": "^12.26.2",
|
|
65
69
|
"postcss": "^8.5.6",
|
|
66
70
|
"postcss-cli": "^11.0.1",
|
|
67
71
|
"react": "^19.2.3",
|
package/dist/index.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/utils/classes.ts","../src/utils/cn.ts","../src/utils/deepMerge.ts","../src/utils/isTouchDevice.ts","../src/utils/textCenterEllipsis.ts","../src/components/ChevronArrowWithAnim.tsx","../src/components/CloseIcon.tsx","../src/components/Modal.tsx","../src/components/StarsBackground.tsx","../src/components/ToastCloseButton.tsx","../src/hooks/useCopyToClipboard.ts","../src/hooks/useMediaQuery.ts"],"names":["standardButtonClasses","cn","inputs","twMerge","clsx","isObject","item","deepMerge","target","source","output","key","targetValue","sourceValue","isTouchDevice","maxWidth","hasTouchStart","hasMaxTouchPoints","hasCoarsePointer","supportsTouch","isSmallScreen","textCenterEllipsis","str","from","to","start","end","ChevronArrowWithAnim","className","strokeWidth","isOpen","jsxs","jsx","AnimatePresence","motion","CloseIcon","D","props","ref","Dialog","r","DialogTrigger","DialogPortal","DialogClose","defaultModalAnimation","mobileModalAnimation","defaultModalBackdropAnimation","DialogOverlay","backdropAnimation","l","DialogContent","children","modalAnimation","isMobile","setIsMobile","selectedAnimation","DialogHeader","DialogFooter","DialogTitle","DialogDescription","StarsBackground","starsCount","isMounted","setIsMounted","useState","useEffect","stars","useMemo","star","ToastCloseButton","closeToast","useCopyToClipboard","timeout","isCopied","setIsCopied","error","setError","copy","useCallback","text","e","copyError","useMediaQuery","query","getMatches","q","matches","setMatches","media","listener"],"mappings":"gnBAAaA,CAAAA,CACX,8YCuBK,SAASC,CAAAA,CAAAA,GAAMC,CAAAA,CAA8B,CAClD,OAAOC,qBAAAA,CAAQC,SAAAA,CAAKF,CAAM,CAAC,CAC7B,CChBA,IAAMG,CAAAA,CAAYC,CAAAA,EACTA,CAAAA,EAAQ,OAAOA,CAAAA,EAAS,UAAY,CAAC,KAAA,CAAM,OAAA,CAAQA,CAAI,CAAA,CAkBzD,SAASC,EAA4BC,CAAAA,CAAWC,CAAAA,CAAuB,CAE5E,IAAMC,CAAAA,CAAS,CAAE,GAAGF,CAAO,CAAA,CAE3B,OAAIH,CAAAA,CAASG,CAAM,CAAA,EAAKH,CAAAA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EAC1C,CACF,CAAA,CACA,CAACA,CAAO,CACV,CAAA,CAEA,OAAO,CAAE,QAAA,CAAAC,CAAAA,CAAU,IAAA,CAAAI,CAAAA,CAAM,KAAA,CAAAF,CAAM,CACjC,CCpDO,SAASO,EAAAA,CAAcC,CAAAA,CAAwB,CACpD,IAAMC,CAAAA,CAAcC,CAAAA,EACd,OAAO,MAAA,CAAW,GAAA,CACb,MAAA,CAAO,UAAA,CAAWA,CAAC,CAAA,CAAE,OAAA,CAEvB,KAAA,CAGH,CAACC,CAAAA,CAASC,CAAU,CAAA,CAAIvB,UAAAA,CAAkBoB,CAAAA,CAAWD,CAAK,CAAC,CAAA,CAEjE,OAAAlB,WAAAA,CAAU,IAAM,CACd,IAAMuB,CAAAA,CAAQ,MAAA,CAAO,UAAA,CAAWL,CAAK,CAAA,CAC/BM,CAAAA,CAAW,IAAMF,CAAAA,CAAWC,CAAAA,CAAM,OAAO,CAAA,CAG/C,OAAAC,GAAS,CACT,MAAA,CAAO,gBAAA,CAAiB,QAAA,CAAUA,CAAQ,CAAA,CAEnC,IAAM,MAAA,CAAO,mBAAA,CAAoB,QAAA,CAAUA,CAAQ,CAC5D,CAAA,CAAG,CAACN,CAAK,CAAC,EAEHG,CACT","file":"index.cjs","sourcesContent":["export const standardButtonClasses =\n 'novacore:cursor-pointer novacore:rounded-md novacore:bg-[var(--tuwa-standart-button-bg)] novacore:px-3 novacore:py-2 novacore:flex novacore:items-center novacore:gap-1 novacore:text-sm novacore:font-semibold novacore:text-[var(--tuwa-text-primary)] novacore:transition-colors novacore:hover:bg-[var(--tuwa-standart-button-hover)] novacore:disabled:cursor-not-allowed novacore:disabled:opacity-50';\n","/**\n * @file This file contains a utility function for conditionally merging Tailwind CSS classes.\n */\n\nimport { type ClassValue, clsx } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\n/**\n * A utility function to conditionally join class names together and resolve\n * conflicting Tailwind CSS classes.\n *\n * It combines the functionality of `clsx` and `tailwind-merge`.\n *\n * @param {...ClassValue[]} inputs - A list of class values to be combined.\n * This can include strings, numbers, objects, arrays, and booleans.\n * @returns {string} The final, merged class name string.\n *\n * @example\n * cn('p-4', 'bg-red-500', { 'font-bold': true }); // => 'p-4 bg-red-500 font-bold'\n * cn('p-2', 'p-4'); // => 'p-4' (tailwind-merge resolves the conflict)\n *\n * @see https://github.com/dcastil/tailwind-merge\n * @see https://github.com/lukeed/clsx\n */\nexport function cn(...inputs: ClassValue[]): string {\n return twMerge(clsx(inputs));\n}\n","/**\n * @file This file contains a utility for performing a deep (recursive) merge of two objects.\n */\n\n/**\n * Checks if the provided item is a plain object (i.e., not null and not an array).\n *\n * @param {any} item - The item to check.\n * @returns {item is Record<string, any>} True if the item is a plain object, otherwise false.\n */\nconst isObject = (item: any): item is Record<string, any> => {\n return item && typeof item === 'object' && !Array.isArray(item);\n};\n\n/**\n * Recursively merges the properties of a source object into a target object.\n * This function creates a new object and does not mutate the original target.\n *\n * @template T - The type of the objects being merged.\n * @param {T} target - The base object.\n * @param {Partial<T>} source - The object with properties to merge into the target.\n * @returns {T} A new object representing the merged result.\n *\n * @example\n * const defaults = { a: 1, b: { c: 2, d: 3 } };\n * const custom = { b: { c: 99 } };\n * const result = deepMerge(defaults, custom);\n * // result will be { a: 1, b: { c: 99, d: 3 } }\n */\nexport function deepMerge<T extends object>(target: T, source: Partial<T>): T {\n // Start with a shallow copy of the target to avoid mutation.\n const output = { ...target };\n\n if (isObject(target) && isObject(source)) {\n // Iterate over the keys in the source object.\n Object.keys(source).forEach((key) => {\n const targetValue = target[key as keyof T];\n const sourceValue = source[key as keyof T];\n\n // If the value is an object in both target and source, merge them recursively.\n if (isObject(targetValue) && isObject(sourceValue)) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-expect-error\n (output as Record<string, any>)[key] = deepMerge(targetValue, sourceValue);\n } else {\n // Otherwise, the source value overwrites the target value.\n (output as Record<string, any>)[key] = sourceValue;\n }\n });\n }\n\n return output;\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","/**\n * @file This file contains a utility function for truncating a string with a center ellipsis.\n */\n\n/**\n * Truncates a string by showing a specified number of characters from the start and end,\n * with an ellipsis in the middle. If the string is too short to be truncated, it's returned as is.\n *\n * @param {string} str - The string to truncate.\n * @param {number} from - The number of characters to show from the beginning of the string.\n * @param {number} to - The number of characters to show from the end of the string.\n * @returns {string} The truncated string, or the original string if it's too short.\n *\n * @example\n * const hash = '0x1234567890abcdef1234567890abcdef';\n * textCenterEllipsis(hash, 6, 4); // => \"0x1234...cdef\"\n *\n * textCenterEllipsis('short', 6, 4); // => \"short\"\n */\nexport function textCenterEllipsis(str: string | undefined | null, from: number, to: number): string {\n if (!str) {\n return '';\n }\n\n // If the string is short enough, don't truncate it.\n if (str.length <= from + to) {\n return str;\n }\n\n const start = str.slice(0, from);\n const end = str.slice(str.length - to);\n\n return `${start}...${end}`;\n}\n","import { AnimatePresence, motion } from 'framer-motion';\n\nimport { cn } from '../utils';\n\nexport function ChevronArrowWithAnim({\n className,\n strokeWidth,\n isOpen,\n}: {\n className?: string;\n strokeWidth?: number;\n isOpen?: boolean;\n}) {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth={strokeWidth ?? 2}\n stroke=\"currentColor\"\n className={cn('novacore:w-4 novacore:h-4 novacore:text-[var(--tuwa-text-secondary)]', className)}\n >\n <AnimatePresence>\n {isOpen && (\n <motion.path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"m4.5 15.75 7.5-7.5 7.5 7.5\"\n variants={{\n hidden: { translateY: 3, scaleY: 0.8, opacity: 0 },\n visible: { translateY: 0, scaleY: 1, opacity: 1 },\n }}\n initial=\"hidden\"\n animate=\"visible\"\n transition={{ duration: 0.4 }}\n />\n )}\n </AnimatePresence>\n\n <AnimatePresence>\n {!isOpen && (\n <motion.path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"m19.5 8.25-7.5 7.5-7.5-7.5\"\n className=\"novacore:relative\"\n variants={{\n hidden: { translateY: -3, scaleY: 0.8, opacity: 0 },\n visible: { translateY: 0, scaleY: 1, opacity: 1 },\n }}\n initial=\"hidden\"\n animate=\"visible\"\n transition={{ duration: 0.4 }}\n />\n )}\n </AnimatePresence>\n </svg>\n );\n}\n","import * as React from 'react';\n\nimport { cn } from '../utils';\n\n/**\n * A reusable close button icon (X mark) styled with TUWA color scheme.\n */\nexport const CloseIcon = React.forwardRef<SVGSVGElement, React.SVGAttributes<SVGSVGElement>>(\n ({ className, ...props }, ref) => (\n <svg\n ref={ref}\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className={cn(\n 'novacore:h-5 novacore:w-5 novacore:text-[var(--tuwa-text-primary)] novacore:transition-colors',\n className,\n )}\n {...props}\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n ),\n);\nCloseIcon.displayName = 'CloseIcon';\n","import * as DialogPrimitive from '@radix-ui/react-dialog';\nimport { AnimatePresence, motion, Variants } from 'framer-motion';\nimport * as React from 'react';\n\nimport { cn, isTouchDevice } from '../utils';\n\nconst Dialog = DialogPrimitive.Root;\nconst DialogTrigger = DialogPrimitive.Trigger;\nconst DialogPortal = DialogPrimitive.Portal;\nconst DialogClose = DialogPrimitive.Close;\n\nconst defaultModalAnimation: Variants = {\n initial: { opacity: 0, scale: 0.9, y: 20 },\n animate: { opacity: 1, scale: 1, y: 0 },\n exit: {\n opacity: 0,\n scale: 0.9,\n transition: {\n duration: 0.2,\n },\n },\n};\n\nconst mobileModalAnimation: Variants = {\n initial: { opacity: 0, y: '100%' },\n animate: { opacity: 1, y: '0%' },\n exit: {\n opacity: 0,\n y: '100%',\n transition: {\n duration: 0.2,\n },\n },\n};\n\nconst defaultModalBackdropAnimation: Variants = {\n initial: { opacity: 0 },\n animate: { opacity: 1 },\n exit: { opacity: 0 },\n};\n\nconst DialogOverlay = ({ className, backdropAnimation }: { backdropAnimation?: Variants; className?: string }) => {\n React.useEffect(() => {\n if (typeof window !== 'undefined') {\n window.document.body.classList.add('NovaModalOpen');\n }\n return () => {\n if (typeof window !== 'undefined') {\n window.document.body.classList.remove('NovaModalOpen');\n }\n };\n }, []);\n return (\n <AnimatePresence>\n <motion.div\n variants={backdropAnimation ?? defaultModalBackdropAnimation}\n transition={{ duration: 0.2, ease: 'easeInOut' }}\n animate=\"animate\"\n initial=\"initial\"\n exit=\"exit\"\n className=\"novacore:relative novacore:rounded-t-2xl novacore:sm:rounded-2xl novacore:overflow-hidden\"\n >\n <div\n className={cn(\n 'novacore:fixed novacore:inset-0 novacore:z-50 novacore:bg-black/55 novacore:backdrop-blur-sm novacore:backdrop-saturate-150',\n className,\n )}\n />\n </motion.div>\n </AnimatePresence>\n );\n};\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName;\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & {\n modalAnimation?: Variants;\n backdropAnimation?: Variants;\n }\n>(({ className, children, modalAnimation, backdropAnimation, ...props }, ref) => {\n const [isMobile, setIsMobile] = React.useState(false);\n\n React.useEffect(() => {\n setIsMobile(isTouchDevice());\n }, []);\n\n const selectedAnimation = modalAnimation ?? (isMobile ? mobileModalAnimation : defaultModalAnimation);\n\n return (\n <DialogPortal>\n <DialogOverlay backdropAnimation={backdropAnimation} />\n\n <DialogPrimitive.Content\n aria-describedby=\"tuwa:modal-content\"\n ref={ref}\n className={cn(\n 'NovaNoScrolling novacore:fixed novacore:bottom-0 novacore:left-0 novacore:p-0 novacore:sm:bottom-auto novacore:sm:left-[50%] novacore:sm:top-[50%] novacore:sm:translate-x-[-50%] novacore:sm:translate-y-[-50%] novacore:z-50 novacore:sm:p-4 novacore:outline-none',\n className,\n )}\n {...props}\n >\n <motion.div\n layout\n className=\"NovaNoScrolling novacore:relative novacore:overflow-hidden\"\n transition={{\n layout: {\n duration: 0.2,\n ease: [0.1, 0.1, 0.2, 1],\n },\n }}\n >\n <AnimatePresence>\n <motion.div\n variants={selectedAnimation}\n transition={{ duration: 0.2, ease: 'easeInOut' }}\n animate=\"animate\"\n initial=\"initial\"\n exit=\"exit\"\n className=\"NovaNoScrolling novacore:relative novacore:rounded-t-2xl novacore:sm:rounded-2xl novacore:overflow-hidden\"\n >\n <div\n className={cn(\n 'NovaNoScrolling novacore:relative novacore:flex novacore:max-h-[98dvh] novacore:w-full novacore:flex-col novacore:gap-3 novacore:overflow-y-auto novacore:rounded-t-2xl novacore:sm:rounded-2xl novacore:shadow-2xl',\n 'novacore:border novacore:border-[var(--tuwa-border-primary)] novacore:bg-[var(--tuwa-bg-primary)]',\n )}\n >\n {children}\n </div>\n </motion.div>\n </AnimatePresence>\n </motion.div>\n </DialogPrimitive.Content>\n </DialogPortal>\n );\n});\nDialogContent.displayName = DialogPrimitive.Content.displayName;\n\nconst DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n aria-describedby=\"tuwa:modal-header\"\n className={cn(\n 'novacore:sticky novacore:flex novacore:top-0 novacore:z-11 novacore:w-full novacore:flex-row novacore:items-center novacore:justify-between',\n 'novacore:border-b novacore:border-[var(--tuwa-border-primary)] novacore:bg-[var(--tuwa-bg-primary)] novacore:p-4',\n className,\n )}\n {...props}\n />\n);\nDialogHeader.displayName = 'DialogHeader';\n\nconst DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n aria-describedby=\"tuwa:modal-footer\"\n className={cn(\n 'novacore:flex novacore:flex-col-reverse novacore:sm:flex-row novacore:sm:justify-end novacore:sm:space-x-2',\n className,\n )}\n {...props}\n />\n);\nDialogFooter.displayName = 'DialogFooter';\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n aria-describedby=\"tuwa:modal-title\"\n className={cn(\n 'novacore:text-lg novacore:font-bold novacore:leading-none novacore:tracking-tight novacore:text-[var(--tuwa-text-primary)] novacore:m-0',\n className,\n )}\n {...props}\n />\n));\nDialogTitle.displayName = DialogPrimitive.Title.displayName;\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n aria-describedby=\"tuwa:modal-description\"\n ref={ref}\n className={cn('novacore:text-sm novacore:text-[var(--tuwa-text-secondary)]', className)}\n {...props}\n />\n));\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n};\n","import { useEffect, useMemo, useState } from 'react';\n\nexport function StarsBackground({ starsCount }: { starsCount?: number }) {\n const [isMounted, setIsMounted] = useState(false);\n useEffect(() => setIsMounted(true), []);\n\n const stars = useMemo(() => {\n if (!isMounted) {\n return [];\n }\n\n const numStars = starsCount ?? 200;\n return Array.from({ length: numStars }).map(() => ({\n x: Math.random() * window.innerWidth,\n y: Math.random() * window.innerHeight,\n r: Math.random() * 1 + 0.5,\n isSupernova: Math.random() < 0.1,\n delay: Math.random() * 10,\n duration: 5 + Math.random() * 5,\n }));\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isMounted]);\n\n return (\n <div className=\"novacore:absolute novacore:inset-0 novacore:z-1 novacore:h-full novacore:w-full novacore:overflow-hidden\">\n <svg width=\"100%\" height=\"100%\" xmlns=\"http://www.w3.org/2000/svg\">\n <defs>\n <style>\n {`\n /* Pulse animation now includes scale for a more organic feel. */\n @keyframes pulse {\n 0%, 100% { \n opacity: 0.2;\n transform: scale(0.9);\n }\n 50% {\n opacity: 0.8;\n transform: scale(1.2);\n }\n }\n \n /* Supernova animation remains impactful. */\n @keyframes supernova {\n 0% { \n transform: scale(1);\n stroke: rgba(var(--tuwa-bg-primary), 0.5);\n opacity: 0.8;\n }\n 20% { \n transform: scale(3);\n stroke: var(--tuwa-button-gradient-from);\n opacity: 1;\n }\n 100% { \n transform: scale(0.8);\n stroke: var(--tuwa-button-gradient-to);\n opacity: 0;\n }\n }\n\n .pulsar {\n animation-name: pulse;\n animation-timing-function: ease-in-out;\n animation-iteration-count: infinite;\n transform-origin: center;\n }\n\n .supernova {\n animation-name: supernova;\n animation-timing-function: ease-out;\n animation-iteration-count: infinite;\n transform-origin: center;\n stroke-width: 2;\n }\n `}\n </style>\n </defs>\n\n {stars.map((star, i) => (\n <circle\n key={i}\n cx={star.x}\n cy={star.y}\n r={star.r}\n fill={`rgba(var(--tuwa-bg-primary), 0.7)`}\n className={star.isSupernova ? 'supernova' : 'pulsar'}\n style={{\n animationDelay: `${star.delay}s`,\n animationDuration: `${star.duration}s`,\n }}\n />\n ))}\n </svg>\n </div>\n );\n}\n","/**\n * @file This file contains a reusable close button component, designed primarily for toast notifications.\n */\n\nimport { cn } from '../utils';\n\n/**\n * Defines the props for the ToastCloseButton component.\n */\nexport type ToastCloseButtonProps = {\n /**\n * The function to call when the button is clicked. This is typically provided by the\n * toast library (e.g., react-toastify) to dismiss the notification.\n */\n closeToast?: (e: React.MouseEvent<HTMLElement>) => void;\n};\n\n/**\n * A simple, styled close button component ('X' icon) intended for use within toast notifications.\n * It uses theme-aware CSS variables for styling and i18n labels for accessibility.\n */\nexport function ToastCloseButton({ closeToast }: ToastCloseButtonProps) {\n return (\n <button\n type=\"button\"\n onClick={closeToast}\n aria-label=\"Close toast notification\"\n title=\"Close toast notification\"\n className={cn(\n 'novacore:absolute novacore:top-2 novacore:right-2 novacore:cursor-pointer novacore:rounded-full novacore:p-1',\n 'novacore:text-[var(--tuwa-text-tertiary)] novacore:transition-colors',\n 'novacore:hover:bg-[var(--tuwa-bg-muted)] novacore:hover:text-[var(--tuwa-text-primary)]',\n )}\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth={1.5}\n stroke=\"currentColor\"\n className=\"novacore:h-5 novatx:w-5\"\n >\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M6 18 18 6M6 6l12 12\" />\n </svg>\n </button>\n );\n}\n","/**\n * @file This file contains a custom React hook for copying text to the clipboard.\n */\n\nimport { useCallback, useState } from 'react';\n\n/**\n * A custom React hook that provides functionality to copy text to the clipboard.\n * It also manages a \"copied\" state with a timeout for user feedback.\n *\n * @param {number} [timeout=2000] - The duration in milliseconds to keep the `isCopied` state as true.\n * @returns {{\n * isCopied: boolean;\n * copy: (text: string) => Promise<void>;\n * error: Error | null;\n * }} An object containing the `isCopied` state, the `copy` function, and any potential error.\n *\n * @example\n * const MyComponent = () => {\n * const { isCopied, copy } = useCopyToClipboard();\n * const textToCopy = '0x123...';\n *\n * return (\n * <button onClick={() => copy(textToCopy)}>\n * {isCopied ? 'Copied!' : 'Copy Address'}\n * </button>\n * );\n * }\n */\nexport function useCopyToClipboard(timeout = 2000): {\n isCopied: boolean;\n copy: (text: string) => Promise<void>;\n error: Error | null;\n} {\n const [isCopied, setIsCopied] = useState(false);\n const [error, setError] = useState<Error | null>(null);\n\n const copy = useCallback(\n async (text: string) => {\n if (!text) return;\n\n try {\n await navigator.clipboard.writeText(text);\n setIsCopied(true);\n setError(null);\n\n setTimeout(() => setIsCopied(false), timeout);\n } catch (e) {\n const copyError = e instanceof Error ? e : new Error('Failed to copy text.');\n console.error(copyError);\n setError(copyError);\n\n // Reset error state after timeout as well\n setTimeout(() => setError(null), timeout);\n }\n },\n [timeout],\n );\n\n return { isCopied, copy, error };\n}\n","import { useEffect, useState } from 'react';\n\n/**\n * A custom hook to detect if a media query matches the current screen dimensions.\n * Handles SSR gracefully.\n * @param {string} query - The media query string (e.g., '(max-width: 767px)').\n * @returns {boolean} Whether the query matches or not.\n */\nexport function useMediaQuery(query: string): boolean {\n const getMatches = (q: string): boolean => {\n if (typeof window !== 'undefined') {\n return window.matchMedia(q).matches;\n }\n return false;\n };\n\n const [matches, setMatches] = useState<boolean>(getMatches(query));\n\n useEffect(() => {\n const media = window.matchMedia(query);\n const listener = () => setMatches(media.matches);\n\n // Re-check on mount and subscribe to changes\n listener();\n window.addEventListener('resize', listener);\n\n return () => window.removeEventListener('resize', listener);\n }, [query]);\n\n return matches;\n}\n"]}
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/utils/classes.ts","../src/utils/cn.ts","../src/utils/deepMerge.ts","../src/utils/isTouchDevice.ts","../src/utils/textCenterEllipsis.ts","../src/components/ChevronArrowWithAnim.tsx","../src/components/CloseIcon.tsx","../src/components/Modal.tsx","../src/components/StarsBackground.tsx","../src/components/ToastCloseButton.tsx","../src/hooks/useCopyToClipboard.ts","../src/hooks/useMediaQuery.ts"],"names":["standardButtonClasses","cn","inputs","twMerge","clsx","isObject","item","deepMerge","target","source","output","key","targetValue","sourceValue","isTouchDevice","maxWidth","hasTouchStart","hasMaxTouchPoints","hasCoarsePointer","supportsTouch","isSmallScreen","textCenterEllipsis","str","from","to","start","end","ChevronArrowWithAnim","className","strokeWidth","isOpen","jsxs","jsx","AnimatePresence","motion","CloseIcon","D","props","ref","Dialog","DialogTrigger","DialogPortal","DialogClose","defaultModalAnimation","mobileModalAnimation","defaultModalBackdropAnimation","DialogOverlay","backdropAnimation","DialogContent","children","modalAnimation","isMobile","setIsMobile","selectedAnimation","DialogHeader","DialogFooter","DialogTitle","DialogDescription","StarsBackground","starsCount","isMounted","setIsMounted","useState","useEffect","stars","useMemo","star","ToastCloseButton","closeToast","useCopyToClipboard","timeout","isCopied","setIsCopied","error","setError","copy","useCallback","text","e","copyError","useMediaQuery","query","getMatches","q","matches","setMatches","media","listener"],"mappings":"yRAAaA,CAAAA,CACX,8YCuBK,SAASC,CAAAA,CAAAA,GAAMC,CAAAA,CAA8B,CAClD,OAAOC,OAAAA,CAAQC,IAAAA,CAAKF,CAAM,CAAC,CAC7B,CChBA,IAAMG,CAAAA,CAAYC,CAAAA,EACTA,CAAAA,EAAQ,OAAOA,C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I,KAAA,CAAM,sBAAsB,CAAA,CAC3E,OAAA,CAAQ,KAAA,CAAMC,CAAS,CAAA,CACvBL,CAAAA,CAASK,CAAS,CAAA,CAGlB,UAAA,CAAW,IAAML,CAAAA,CAAS,IAAI,CAAA,CAAGJ,CAAO,EAC1C,CACF,CAAA,CACA,CAACA,CAAO,CACV,CAAA,CAEA,OAAO,CAAE,QAAA,CAAAC,CAAAA,CAAU,IAAA,CAAAI,CAAAA,CAAM,KAAA,CAAAF,CAAM,CACjC,CCpDO,SAASO,EAAAA,CAAcC,CAAAA,CAAwB,CACpD,IAAMC,CAAAA,CAAcC,CAAAA,EACd,OAAO,MAAA,CAAW,GAAA,CACb,MAAA,CAAO,UAAA,CAAWA,CAAC,CAAA,CAAE,OAAA,CAEvB,KAAA,CAGH,CAACC,CAAAA,CAASC,CAAU,CAAA,CAAIvB,QAAAA,CAAkBoB,CAAAA,CAAWD,CAAK,CAAC,CAAA,CAEjE,OAAAlB,SAAAA,CAAU,IAAM,CACd,IAAMuB,CAAAA,CAAQ,MAAA,CAAO,UAAA,CAAWL,CAAK,CAAA,CAC/BM,CAAAA,CAAW,IAAMF,CAAAA,CAAWC,CAAAA,CAAM,OAAO,CAAA,CAG/C,OAAAC,GAAS,CACT,MAAA,CAAO,gBAAA,CAAiB,QAAA,CAAUA,CAAQ,CAAA,CAEnC,IAAM,MAAA,CAAO,mBAAA,CAAoB,QAAA,CAAUA,CAAQ,CAC5D,CAAA,CAAG,CAACN,CAAK,CAAC,EAEHG,CACT","file":"index.js","sourcesContent":["export const standardButtonClasses =\n 'novacore:cursor-pointer novacore:rounded-md novacore:bg-[var(--tuwa-standart-button-bg)] novacore:px-3 novacore:py-2 novacore:flex novacore:items-center novacore:gap-1 novacore:text-sm novacore:font-semibold novacore:text-[var(--tuwa-text-primary)] novacore:transition-colors novacore:hover:bg-[var(--tuwa-standart-button-hover)] novacore:disabled:cursor-not-allowed novacore:disabled:opacity-50';\n","/**\n * @file This file contains a utility function for conditionally merging Tailwind CSS classes.\n */\n\nimport { type ClassValue, clsx } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\n/**\n * A utility function to conditionally join class names together and resolve\n * conflicting Tailwind CSS classes.\n *\n * It combines the functionality of `clsx` and `tailwind-merge`.\n *\n * @param {...ClassValue[]} inputs - A list of class values to be combined.\n * This can include strings, numbers, objects, arrays, and booleans.\n * @returns {string} The final, merged class name string.\n *\n * @example\n * cn('p-4', 'bg-red-500', { 'font-bold': true }); // => 'p-4 bg-red-500 font-bold'\n * cn('p-2', 'p-4'); // => 'p-4' (tailwind-merge resolves the conflict)\n *\n * @see https://github.com/dcastil/tailwind-merge\n * @see https://github.com/lukeed/clsx\n */\nexport function cn(...inputs: ClassValue[]): string {\n return twMerge(clsx(inputs));\n}\n","/**\n * @file This file contains a utility for performing a deep (recursive) merge of two objects.\n */\n\n/**\n * Checks if the provided item is a plain object (i.e., not null and not an array).\n *\n * @param {any} item - The item to check.\n * @returns {item is Record<string, any>} True if the item is a plain object, otherwise false.\n */\nconst isObject = (item: any): item is Record<string, any> => {\n return item && typeof item === 'object' && !Array.isArray(item);\n};\n\n/**\n * Recursively merges the properties of a source object into a target object.\n * This function creates a new object and does not mutate the original target.\n *\n * @template T - The type of the objects being merged.\n * @param {T} target - The base object.\n * @param {Partial<T>} source - The object with properties to merge into the target.\n * @returns {T} A new object representing the merged result.\n *\n * @example\n * const defaults = { a: 1, b: { c: 2, d: 3 } };\n * const custom = { b: { c: 99 } };\n * const result = deepMerge(defaults, custom);\n * // result will be { a: 1, b: { c: 99, d: 3 } }\n */\nexport function deepMerge<T extends object>(target: T, source: Partial<T>): T {\n // Start with a shallow copy of the target to avoid mutation.\n const output = { ...target };\n\n if (isObject(target) && isObject(source)) {\n // Iterate over the keys in the source object.\n Object.keys(source).forEach((key) => {\n const targetValue = target[key as keyof T];\n const sourceValue = source[key as keyof T];\n\n // If the value is an object in both target and source, merge them recursively.\n if (isObject(targetValue) && isObject(sourceValue)) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-expect-error\n (output as Record<string, any>)[key] = deepMerge(targetValue, sourceValue);\n } else {\n // Otherwise, the source value overwrites the target value.\n (output as Record<string, any>)[key] = sourceValue;\n }\n });\n }\n\n return output;\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","/**\n * @file This file contains a utility function for truncating a string with a center ellipsis.\n */\n\n/**\n * Truncates a string by showing a specified number of characters from the start and end,\n * with an ellipsis in the middle. If the string is too short to be truncated, it's returned as is.\n *\n * @param {string} str - The string to truncate.\n * @param {number} from - The number of characters to show from the beginning of the string.\n * @param {number} to - The number of characters to show from the end of the string.\n * @returns {string} The truncated string, or the original string if it's too short.\n *\n * @example\n * const hash = '0x1234567890abcdef1234567890abcdef';\n * textCenterEllipsis(hash, 6, 4); // => \"0x1234...cdef\"\n *\n * textCenterEllipsis('short', 6, 4); // => \"short\"\n */\nexport function textCenterEllipsis(str: string | undefined | null, from: number, to: number): string {\n if (!str) {\n return '';\n }\n\n // If the string is short enough, don't truncate it.\n if (str.length <= from + to) {\n return str;\n }\n\n const start = str.slice(0, from);\n const end = str.slice(str.length - to);\n\n return `${start}...${end}`;\n}\n","import { AnimatePresence, motion } from 'framer-motion';\n\nimport { cn } from '../utils';\n\nexport function ChevronArrowWithAnim({\n className,\n strokeWidth,\n isOpen,\n}: {\n className?: string;\n strokeWidth?: number;\n isOpen?: boolean;\n}) {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth={strokeWidth ?? 2}\n stroke=\"currentColor\"\n className={cn('novacore:w-4 novacore:h-4 novacore:text-[var(--tuwa-text-secondary)]', className)}\n >\n <AnimatePresence>\n {isOpen && (\n <motion.path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"m4.5 15.75 7.5-7.5 7.5 7.5\"\n variants={{\n hidden: { translateY: 3, scaleY: 0.8, opacity: 0 },\n visible: { translateY: 0, scaleY: 1, opacity: 1 },\n }}\n initial=\"hidden\"\n animate=\"visible\"\n transition={{ duration: 0.4 }}\n />\n )}\n </AnimatePresence>\n\n <AnimatePresence>\n {!isOpen && (\n <motion.path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"m19.5 8.25-7.5 7.5-7.5-7.5\"\n className=\"novacore:relative\"\n variants={{\n hidden: { translateY: -3, scaleY: 0.8, opacity: 0 },\n visible: { translateY: 0, scaleY: 1, opacity: 1 },\n }}\n initial=\"hidden\"\n animate=\"visible\"\n transition={{ duration: 0.4 }}\n />\n )}\n </AnimatePresence>\n </svg>\n );\n}\n","import * as React from 'react';\n\nimport { cn } from '../utils';\n\n/**\n * A reusable close button icon (X mark) styled with TUWA color scheme.\n */\nexport const CloseIcon = React.forwardRef<SVGSVGElement, React.SVGAttributes<SVGSVGElement>>(\n ({ className, ...props }, ref) => (\n <svg\n ref={ref}\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className={cn(\n 'novacore:h-5 novacore:w-5 novacore:text-[var(--tuwa-text-primary)] novacore:transition-colors',\n className,\n )}\n {...props}\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n ),\n);\nCloseIcon.displayName = 'CloseIcon';\n","import * as DialogPrimitive from '@radix-ui/react-dialog';\nimport { AnimatePresence, motion, Variants } from 'framer-motion';\nimport * as React from 'react';\n\nimport { cn, isTouchDevice } from '../utils';\n\nconst Dialog = DialogPrimitive.Root;\nconst DialogTrigger = DialogPrimitive.Trigger;\nconst DialogPortal = DialogPrimitive.Portal;\nconst DialogClose = DialogPrimitive.Close;\n\nconst defaultModalAnimation: Variants = {\n initial: { opacity: 0, scale: 0.9, y: 20 },\n animate: { opacity: 1, scale: 1, y: 0 },\n exit: {\n opacity: 0,\n scale: 0.9,\n transition: {\n duration: 0.2,\n },\n },\n};\n\nconst mobileModalAnimation: Variants = {\n initial: { opacity: 0, y: '100%' },\n animate: { opacity: 1, y: '0%' },\n exit: {\n opacity: 0,\n y: '100%',\n transition: {\n duration: 0.2,\n },\n },\n};\n\nconst defaultModalBackdropAnimation: Variants = {\n initial: { opacity: 0 },\n animate: { opacity: 1 },\n exit: { opacity: 0 },\n};\n\nconst DialogOverlay = ({ className, backdropAnimation }: { backdropAnimation?: Variants; className?: string }) => {\n React.useEffect(() => {\n if (typeof window !== 'undefined') {\n window.document.body.classList.add('NovaModalOpen');\n }\n return () => {\n if (typeof window !== 'undefined') {\n window.document.body.classList.remove('NovaModalOpen');\n }\n };\n }, []);\n return (\n <AnimatePresence>\n <motion.div\n variants={backdropAnimation ?? defaultModalBackdropAnimation}\n transition={{ duration: 0.2, ease: 'easeInOut' }}\n animate=\"animate\"\n initial=\"initial\"\n exit=\"exit\"\n className=\"novacore:relative novacore:rounded-t-2xl novacore:sm:rounded-2xl novacore:overflow-hidden\"\n >\n <div\n className={cn(\n 'novacore:fixed novacore:inset-0 novacore:z-50 novacore:bg-black/55 novacore:backdrop-blur-sm novacore:backdrop-saturate-150',\n className,\n )}\n />\n </motion.div>\n </AnimatePresence>\n );\n};\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName;\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & {\n modalAnimation?: Variants;\n backdropAnimation?: Variants;\n }\n>(({ className, children, modalAnimation, backdropAnimation, ...props }, ref) => {\n const [isMobile, setIsMobile] = React.useState(false);\n\n React.useEffect(() => {\n setIsMobile(isTouchDevice());\n }, []);\n\n const selectedAnimation = modalAnimation ?? (isMobile ? mobileModalAnimation : defaultModalAnimation);\n\n return (\n <DialogPortal>\n <DialogOverlay backdropAnimation={backdropAnimation} />\n\n <DialogPrimitive.Content\n aria-describedby=\"tuwa:modal-content\"\n ref={ref}\n className={cn(\n 'NovaNoScrolling novacore:fixed novacore:bottom-0 novacore:left-0 novacore:p-0 novacore:sm:bottom-auto novacore:sm:left-[50%] novacore:sm:top-[50%] novacore:sm:translate-x-[-50%] novacore:sm:translate-y-[-50%] novacore:z-50 novacore:sm:p-4 novacore:outline-none',\n className,\n )}\n {...props}\n >\n <motion.div\n layout\n className=\"NovaNoScrolling novacore:relative novacore:overflow-hidden\"\n transition={{\n layout: {\n duration: 0.2,\n ease: [0.1, 0.1, 0.2, 1],\n },\n }}\n >\n <AnimatePresence>\n <motion.div\n variants={selectedAnimation}\n transition={{ duration: 0.2, ease: 'easeInOut' }}\n animate=\"animate\"\n initial=\"initial\"\n exit=\"exit\"\n className=\"NovaNoScrolling novacore:relative novacore:rounded-t-2xl novacore:sm:rounded-2xl novacore:overflow-hidden\"\n >\n <div\n className={cn(\n 'NovaNoScrolling novacore:relative novacore:flex novacore:max-h-[98dvh] novacore:w-full novacore:flex-col novacore:gap-3 novacore:overflow-y-auto novacore:rounded-t-2xl novacore:sm:rounded-2xl novacore:shadow-2xl',\n 'novacore:border novacore:border-[var(--tuwa-border-primary)] novacore:bg-[var(--tuwa-bg-primary)]',\n )}\n >\n {children}\n </div>\n </motion.div>\n </AnimatePresence>\n </motion.div>\n </DialogPrimitive.Content>\n </DialogPortal>\n );\n});\nDialogContent.displayName = DialogPrimitive.Content.displayName;\n\nconst DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n aria-describedby=\"tuwa:modal-header\"\n className={cn(\n 'novacore:sticky novacore:flex novacore:top-0 novacore:z-11 novacore:w-full novacore:flex-row novacore:items-center novacore:justify-between',\n 'novacore:border-b novacore:border-[var(--tuwa-border-primary)] novacore:bg-[var(--tuwa-bg-primary)] novacore:p-4',\n className,\n )}\n {...props}\n />\n);\nDialogHeader.displayName = 'DialogHeader';\n\nconst DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n aria-describedby=\"tuwa:modal-footer\"\n className={cn(\n 'novacore:flex novacore:flex-col-reverse novacore:sm:flex-row novacore:sm:justify-end novacore:sm:space-x-2',\n className,\n )}\n {...props}\n />\n);\nDialogFooter.displayName = 'DialogFooter';\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n aria-describedby=\"tuwa:modal-title\"\n className={cn(\n 'novacore:text-lg novacore:font-bold novacore:leading-none novacore:tracking-tight novacore:text-[var(--tuwa-text-primary)] novacore:m-0',\n className,\n )}\n {...props}\n />\n));\nDialogTitle.displayName = DialogPrimitive.Title.displayName;\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n aria-describedby=\"tuwa:modal-description\"\n ref={ref}\n className={cn('novacore:text-sm novacore:text-[var(--tuwa-text-secondary)]', className)}\n {...props}\n />\n));\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n};\n","import { useEffect, useMemo, useState } from 'react';\n\nexport function StarsBackground({ starsCount }: { starsCount?: number }) {\n const [isMounted, setIsMounted] = useState(false);\n useEffect(() => setIsMounted(true), []);\n\n const stars = useMemo(() => {\n if (!isMounted) {\n return [];\n }\n\n const numStars = starsCount ?? 200;\n return Array.from({ length: numStars }).map(() => ({\n x: Math.random() * window.innerWidth,\n y: Math.random() * window.innerHeight,\n r: Math.random() * 1 + 0.5,\n isSupernova: Math.random() < 0.1,\n delay: Math.random() * 10,\n duration: 5 + Math.random() * 5,\n }));\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isMounted]);\n\n return (\n <div className=\"novacore:absolute novacore:inset-0 novacore:z-1 novacore:h-full novacore:w-full novacore:overflow-hidden\">\n <svg width=\"100%\" height=\"100%\" xmlns=\"http://www.w3.org/2000/svg\">\n <defs>\n <style>\n {`\n /* Pulse animation now includes scale for a more organic feel. */\n @keyframes pulse {\n 0%, 100% { \n opacity: 0.2;\n transform: scale(0.9);\n }\n 50% {\n opacity: 0.8;\n transform: scale(1.2);\n }\n }\n \n /* Supernova animation remains impactful. */\n @keyframes supernova {\n 0% { \n transform: scale(1);\n stroke: rgba(var(--tuwa-bg-primary), 0.5);\n opacity: 0.8;\n }\n 20% { \n transform: scale(3);\n stroke: var(--tuwa-button-gradient-from);\n opacity: 1;\n }\n 100% { \n transform: scale(0.8);\n stroke: var(--tuwa-button-gradient-to);\n opacity: 0;\n }\n }\n\n .pulsar {\n animation-name: pulse;\n animation-timing-function: ease-in-out;\n animation-iteration-count: infinite;\n transform-origin: center;\n }\n\n .supernova {\n animation-name: supernova;\n animation-timing-function: ease-out;\n animation-iteration-count: infinite;\n transform-origin: center;\n stroke-width: 2;\n }\n `}\n </style>\n </defs>\n\n {stars.map((star, i) => (\n <circle\n key={i}\n cx={star.x}\n cy={star.y}\n r={star.r}\n fill={`rgba(var(--tuwa-bg-primary), 0.7)`}\n className={star.isSupernova ? 'supernova' : 'pulsar'}\n style={{\n animationDelay: `${star.delay}s`,\n animationDuration: `${star.duration}s`,\n }}\n />\n ))}\n </svg>\n </div>\n );\n}\n","/**\n * @file This file contains a reusable close button component, designed primarily for toast notifications.\n */\n\nimport { cn } from '../utils';\n\n/**\n * Defines the props for the ToastCloseButton component.\n */\nexport type ToastCloseButtonProps = {\n /**\n * The function to call when the button is clicked. This is typically provided by the\n * toast library (e.g., react-toastify) to dismiss the notification.\n */\n closeToast?: (e: React.MouseEvent<HTMLElement>) => void;\n};\n\n/**\n * A simple, styled close button component ('X' icon) intended for use within toast notifications.\n * It uses theme-aware CSS variables for styling and i18n labels for accessibility.\n */\nexport function ToastCloseButton({ closeToast }: ToastCloseButtonProps) {\n return (\n <button\n type=\"button\"\n onClick={closeToast}\n aria-label=\"Close toast notification\"\n title=\"Close toast notification\"\n className={cn(\n 'novacore:absolute novacore:top-2 novacore:right-2 novacore:cursor-pointer novacore:rounded-full novacore:p-1',\n 'novacore:text-[var(--tuwa-text-tertiary)] novacore:transition-colors',\n 'novacore:hover:bg-[var(--tuwa-bg-muted)] novacore:hover:text-[var(--tuwa-text-primary)]',\n )}\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth={1.5}\n stroke=\"currentColor\"\n className=\"novacore:h-5 novatx:w-5\"\n >\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M6 18 18 6M6 6l12 12\" />\n </svg>\n </button>\n );\n}\n","/**\n * @file This file contains a custom React hook for copying text to the clipboard.\n */\n\nimport { useCallback, useState } from 'react';\n\n/**\n * A custom React hook that provides functionality to copy text to the clipboard.\n * It also manages a \"copied\" state with a timeout for user feedback.\n *\n * @param {number} [timeout=2000] - The duration in milliseconds to keep the `isCopied` state as true.\n * @returns {{\n * isCopied: boolean;\n * copy: (text: string) => Promise<void>;\n * error: Error | null;\n * }} An object containing the `isCopied` state, the `copy` function, and any potential error.\n *\n * @example\n * const MyComponent = () => {\n * const { isCopied, copy } = useCopyToClipboard();\n * const textToCopy = '0x123...';\n *\n * return (\n * <button onClick={() => copy(textToCopy)}>\n * {isCopied ? 'Copied!' : 'Copy Address'}\n * </button>\n * );\n * }\n */\nexport function useCopyToClipboard(timeout = 2000): {\n isCopied: boolean;\n copy: (text: string) => Promise<void>;\n error: Error | null;\n} {\n const [isCopied, setIsCopied] = useState(false);\n const [error, setError] = useState<Error | null>(null);\n\n const copy = useCallback(\n async (text: string) => {\n if (!text) return;\n\n try {\n await navigator.clipboard.writeText(text);\n setIsCopied(true);\n setError(null);\n\n setTimeout(() => setIsCopied(false), timeout);\n } catch (e) {\n const copyError = e instanceof Error ? e : new Error('Failed to copy text.');\n console.error(copyError);\n setError(copyError);\n\n // Reset error state after timeout as well\n setTimeout(() => setError(null), timeout);\n }\n },\n [timeout],\n );\n\n return { isCopied, copy, error };\n}\n","import { useEffect, useState } from 'react';\n\n/**\n * A custom hook to detect if a media query matches the current screen dimensions.\n * Handles SSR gracefully.\n * @param {string} query - The media query string (e.g., '(max-width: 767px)').\n * @returns {boolean} Whether the query matches or not.\n */\nexport function useMediaQuery(query: string): boolean {\n const getMatches = (q: string): boolean => {\n if (typeof window !== 'undefined') {\n return window.matchMedia(q).matches;\n }\n return false;\n };\n\n const [matches, setMatches] = useState<boolean>(getMatches(query));\n\n useEffect(() => {\n const media = window.matchMedia(query);\n const listener = () => setMatches(media.matches);\n\n // Re-check on mount and subscribe to changes\n listener();\n window.addEventListener('resize', listener);\n\n return () => window.removeEventListener('resize', listener);\n }, [query]);\n\n return matches;\n}\n"]}
|