@tuwaio/nova-core 0.4.7 → 0.4.9

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 CHANGED
@@ -1,4 +1,4 @@
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'),u=require('react'),c=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 u__namespace=/*#__PURE__*/_interopNamespace(u);var c__namespace=/*#__PURE__*/_interopNamespace(c);var _o="novacore:cursor-pointer novacore:rounded-[var(--tuwa-rounded-corners)] 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-mono 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 novacore:min-h-[36px]";function s(...o){return tailwindMerge.twMerge(clsx.clsx(o))}var y=o=>o&&typeof o=="object"&&!Array.isArray(o);function J(o,e){let t={...o};return y(o)&&y(e)&&Object.keys(e).forEach(n=>{let r=o[n],a=e[n];y(r)&&y(a)?t[n]=J(r,a):t[n]=a;}),t}function x(o){if(typeof o!="string")return false;let e=o.toLowerCase();return e.includes("solana")&&(e.includes("devnet")||e.includes("testnet"))}var M="Unknown";function oo(o){return o.charAt(0).toUpperCase()+o.slice(1).toLowerCase()}function W(o){let e={name:M,id:M.toLowerCase(),filePath:M.toLowerCase(),chainId:o};if(typeof o=="number"){let i=metadata.networks.find(l=>l.chainId===o);return i?{name:i.name,id:i.id,filePath:i.filePath?.split(":")[1],chainId:o}:e}let[t,n]=o?o.split(":"):[o],r=metadata.networks.find(i=>i.id===t);return r?{name:n&&x(o)?`${r.name} ${oo(n)}`:r.name,id:r.id,filePath:r.filePath?.split(":")[1],chainId:o}:e}function G(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 r=e||t||n,a=window.innerWidth<=o;return r&&a}function eo(o){if(!o.startsWith("var("))return o;let e=o.match(/var\(\s*(--[\w-]+)/);if(!e)return o;let t=e[1];return getComputedStyle(document.documentElement).getPropertyValue(t).trim()||o}function to(o,e){let t=eo(e),r=new DOMParser().parseFromString(o,"image/svg+xml");if(r.querySelector("parsererror"))return console.warn("SVG parse error, returning original"),o;let i=r.querySelector("path");return i&&i.setAttribute("fill",t),new XMLSerializer().serializeToString(r.documentElement)}function N(o,e){let t=o;return e&&(t=to(t,e)),`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(t)))}`}var S=o=>`${o.replace(/\s+/g,"-").toLowerCase()}.svg`;function te(o,e,t){if(!o)return "";if(o.length<=e+t)return o;let n=o.slice(0,e),r=o.slice(o.length-t);return `${n}...${r}`}function ve({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:s("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 no=u__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:s("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"})]}));no.displayName="CloseIcon";var io="novacore:flex novacore:items-center novacore:justify-center novacore:w-full novacore:h-full novacore:rounded-full novacore:text-[var(--tuwa-text-secondary)] novacore:bg-[var(--tuwa-bg-muted)]",p=({animate:o=false,content:e="",className:t})=>jsxRuntime.jsx("div",{className:s(io,"Nova_Web3_Icon",t,{"novacore:animate-pulse":o}),children:e});function C({src:o,alt:e,...t}){return jsxRuntime.jsx("img",{...t,src:o,alt:e??"",draggable:false,onDragStart:n=>n.preventDefault(),style:{outline:"none",pointerEvents:"none"}})}var mo="https://raw.githubusercontent.com/0xa3k5/web3icons/refs/heads/main/raw-svgs",L=new Map;function P({githubSrc:o,className:e,alt:t,firstPathFill:n,...r}){let a=`${o}|${n??""}`,i=L.get(a),[l,d]=u.useState(null),[w,b]=u.useState("idle"),T=i||l,g=i?"success":w;return u.useEffect(()=>{let D=true;return L.has(a)?void 0:((async()=>{b("loading");try{let R=await fetch(`${mo}/${o}`);if(!R.ok)throw new Error(`Failed to load icon: ${R.status}`);let X=await R.text();if(D){let V=N(X,n);L.set(a,V),d(V),b("success");}}catch{D&&b("error");}})(),()=>{D=false;})},[o,n,a]),g==="loading"||g==="idle"?jsxRuntime.jsx(p,{animate:true,className:e}):g==="success"&&T?jsxRuntime.jsx(C,{...r,src:T,alt:t,className:e}):jsxRuntime.jsx(p,{content:"?",className:e})}var Ve=c__namespace.Root,ze=c__namespace.Trigger,uo=c__namespace.Portal,We=c__namespace.Close,fo={initial:{opacity:0,scale:.9,y:20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.9,transition:{duration:.2}}},po={initial:{opacity:0,y:"100%"},animate:{opacity:1,y:"0%"},exit:{opacity:0,y:"100%",transition:{duration:.2}}},vo={initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},Y=({className:o,backdropAnimation:e})=>(u__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??vo,transition:{duration:.2,ease:"easeInOut"},animate:"animate",initial:"initial",exit:"exit",className:"novacore:relative novacore:overflow-hidden",children:jsxRuntime.jsx("div",{className:s("novacore:fixed novacore:inset-0 novacore:z-50 novacore:bg-black/55 novacore:backdrop-blur-sm novacore:backdrop-saturate-150",o)})})}));Y.displayName=c__namespace.Overlay.displayName;var go=u__namespace.forwardRef(({className:o,children:e,modalAnimation:t,backdropAnimation:n,...r},a)=>{let[i,l]=u__namespace.useState(false);u__namespace.useEffect(()=>{l(G());},[]);let d=t??(i?po:fo);return jsxRuntime.jsxs(uo,{children:[jsxRuntime.jsx(Y,{backdropAnimation:n}),jsxRuntime.jsx(c__namespace.Content,{"aria-describedby":"tuwa:modal-content",ref:a,className:s("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),...r,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:d,transition:{duration:.2,ease:"easeInOut"},animate:"animate",initial:"initial",exit:"exit",className:"NovaNoScrolling novacore:relative novacore:overflow-hidden",children:jsxRuntime.jsx("div",{className:s("NovaNoScrolling NovaDialogContent__elements novacore:relative novacore:flex novacore:max-h-[98dvh] novacore:w-full novacore:flex-col novacore:overflow-y-auto novacore:rounded-t-[var(--tuwa-rounded-corners)] novacore:sm:rounded-[var(--tuwa-rounded-corners)]","novacore:border novacore:border-[var(--tuwa-border-primary)] novacore:bg-[var(--tuwa-bg-primary)] novacore:[transform:translateZ(0)] novacore:[backface-visibility:hidden]"),children:e})})})})})]})});go.displayName=c__namespace.Content.displayName;var wo=({className:o,...e})=>jsxRuntime.jsx("div",{"aria-describedby":"tuwa:modal-header",className:s("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});wo.displayName="DialogHeader";var bo=({className:o,...e})=>jsxRuntime.jsx("div",{"aria-describedby":"tuwa:modal-footer",className:s("novacore:flex novacore:flex-col-reverse novacore:sm:flex-row novacore:sm:justify-end novacore:sm:space-x-2",o),...e});bo.displayName="DialogFooter";var ho=u__namespace.forwardRef(({className:o,...e},t)=>jsxRuntime.jsx(c__namespace.Title,{ref:t,"aria-describedby":"tuwa:modal-title",className:s("novacore:text-lg novacore:font-bold novacore:leading-none novacore:tracking-tight novacore:text-[var(--tuwa-text-primary)] novacore:m-0 novacore:font-mono",o),...e}));ho.displayName=c__namespace.Title.displayName;var yo=u__namespace.forwardRef(({className:o,...e},t)=>jsxRuntime.jsx(c__namespace.Description,{"aria-describedby":"tuwa:modal-description",ref:t,className:s("novacore:text-sm novacore:text-[var(--tuwa-text-secondary)]",o),...e}));yo.displayName=c__namespace.Description.displayName;function h({children:o,iconId:e,alt:t,firstPathFill:n,...r}){let[a,i]=u.useState(null),l=u.useCallback(d=>{if(d){let w=N(d.outerHTML,n);i({id:e,src:w});}},[e,n]);return a&&a.id===e?jsxRuntime.jsx(C,{...r,src:a.src,alt:t}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:o(l)})}var K=u.lazy(()=>import('@web3icons/react/dynamic').then(o=>({default:o.NetworkIcon}))),Io="var(--tuwa-testnet-icons)";function Je({chainId:o,variant:e="background",className:t}){let n=W(o),r=typeof o=="string",a=r?o.split(":")[0].toLowerCase():o,l=r&&x(o)||n.name.toLowerCase().includes("testnet")?Io:void 0,d=s("novacore:w-full novacore:h-full novacore:rounded-full",t),w=typeof a=="string"?a:n.filePath,b=`networks/${e}/${S(w)}`;return n.name==="Unknown"?typeof o=="number"?jsxRuntime.jsx(p,{content:"?",className:t}):jsxRuntime.jsx(P,{githubSrc:b,className:d,firstPathFill:l}):jsxRuntime.jsx(u.Suspense,{fallback:jsxRuntime.jsx(p,{animate:true,className:t}),children:jsxRuntime.jsx(h,{iconId:`${o}-${e}`,className:d,firstPathFill:l,children:g=>typeof a=="string"?jsxRuntime.jsx(K,{ref:g,id:a,variant:e}):jsxRuntime.jsx(K,{ref:g,chainId:a,variant:e})})})}function rt({starsCount:o}){let[e,t]=u.useState(false);u.useEffect(()=>t(true),[]);let n=u.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:`
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'),u=require('react'),c=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 u__namespace=/*#__PURE__*/_interopNamespace(u);var c__namespace=/*#__PURE__*/_interopNamespace(c);var _o="novacore:cursor-pointer novacore:rounded-[var(--tuwa-rounded-corners)] 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-mono 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 novacore:min-h-[36px]";function s(...o){return tailwindMerge.twMerge(clsx.clsx(o))}var y=o=>o&&typeof o=="object"&&!Array.isArray(o);function J(o,e){let t={...o};return y(o)&&y(e)&&Object.keys(e).forEach(n=>{let r=o[n],a=e[n];y(r)&&y(a)?t[n]=J(r,a):t[n]=a;}),t}function x(o){if(typeof o!="string")return false;let e=o.toLowerCase();return e.includes("solana")&&(e.includes("devnet")||e.includes("testnet"))}var M="Unknown";function oo(o){return o.charAt(0).toUpperCase()+o.slice(1).toLowerCase()}function W(o){let e={name:M,id:M.toLowerCase(),filePath:M.toLowerCase(),chainId:o};if(typeof o=="number"){let i=metadata.networks.find(l=>l.chainId===o);return i?{name:i.name,id:i.id,filePath:i.filePath?.split(":")[1],chainId:o}:e}let[t,n]=o?o.split(":"):[o],r=metadata.networks.find(i=>i.id===t);return r?{name:n&&x(o)?`${r.name} ${oo(n)}`:r.name,id:r.id,filePath:r.filePath?.split(":")[1],chainId:o}:e}function G(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 r=e||t||n,a=window.innerWidth<=o;return r&&a}function eo(o){if(!o.startsWith("var("))return o;let e=o.match(/var\(\s*(--[\w-]+)/);if(!e)return o;let t=e[1];return getComputedStyle(document.documentElement).getPropertyValue(t).trim()||o}function to(o,e){let t=eo(e),r=new DOMParser().parseFromString(o,"image/svg+xml");if(r.querySelector("parsererror"))return console.warn("SVG parse error, returning original"),o;let i=r.querySelector("path");return i&&i.setAttribute("fill",t),new XMLSerializer().serializeToString(r.documentElement)}function N(o,e){let t=o;return e&&(t=to(t,e)),`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(t)))}`}var S=o=>`${o.replace(/\s+/g,"-").toLowerCase()}.svg`;function te(o,e,t){if(!o)return "";if(o.length<=e+t)return o;let n=o.slice(0,e),r=o.slice(o.length-t);return `${n}...${r}`}function ve({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:s("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 no=u__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:s("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"})]}));no.displayName="CloseIcon";var io="novacore:flex novacore:items-center novacore:justify-center novacore:w-full novacore:h-full novacore:rounded-full novacore:text-[var(--tuwa-text-secondary)] novacore:bg-[var(--tuwa-bg-muted)]",p=({animate:o=false,content:e="",className:t})=>jsxRuntime.jsx("div",{className:s(io,"Nova_Web3_Icon",t,{"novacore:animate-pulse":o}),children:e});function C({src:o,alt:e,...t}){return jsxRuntime.jsx("img",{...t,src:o,alt:e??"",draggable:false,onDragStart:n=>n.preventDefault(),style:{outline:"none",pointerEvents:"none"}})}var mo="https://raw.githubusercontent.com/0xa3k5/web3icons/refs/heads/main/raw-svgs",L=new Map;function P({githubSrc:o,className:e,alt:t,firstPathFill:n,...r}){let a=`${o}|${n??""}`,i=L.get(a),[l,d]=u.useState(null),[w,b]=u.useState("idle"),T=i||l,g=i?"success":w;return u.useEffect(()=>{let D=true;return L.has(a)?void 0:((async()=>{b("loading");try{let R=await fetch(`${mo}/${o}`);if(!R.ok)throw new Error(`Failed to load icon: ${R.status}`);let X=await R.text();if(D){let V=N(X,n);L.set(a,V),d(V),b("success");}}catch{D&&b("error");}})(),()=>{D=false;})},[o,n,a]),g==="loading"||g==="idle"?jsxRuntime.jsx(p,{animate:true,className:e}):g==="success"&&T?jsxRuntime.jsx(C,{...r,src:T,alt:t,className:e}):jsxRuntime.jsx(p,{content:"?",className:e})}var Ve=c__namespace.Root,ze=c__namespace.Trigger,uo=c__namespace.Portal,We=c__namespace.Close,fo={initial:{opacity:0,scale:.9,y:20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.9,transition:{duration:.2}}},po={initial:{opacity:0,y:"100%"},animate:{opacity:1,y:"0%"},exit:{opacity:0,y:"100%",transition:{duration:.2}}},vo={initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},Y=({className:o,backdropAnimation:e})=>(u__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??vo,transition:{duration:.2,ease:"easeInOut"},animate:"animate",initial:"initial",exit:"exit",className:"novacore:relative novacore:overflow-hidden",children:jsxRuntime.jsx("div",{className:s("novacore:fixed novacore:inset-0 novacore:z-50 novacore:bg-black/55 novacore:backdrop-blur-sm novacore:backdrop-saturate-150",o)})})}));Y.displayName=c__namespace.Overlay.displayName;var go=u__namespace.forwardRef(({className:o,children:e,modalAnimation:t,backdropAnimation:n,...r},a)=>{let[i,l]=u__namespace.useState(false);u__namespace.useEffect(()=>{l(G());},[]);let d=t??(i?po:fo);return jsxRuntime.jsxs(uo,{children:[jsxRuntime.jsx(Y,{backdropAnimation:n}),jsxRuntime.jsx(c__namespace.Content,{"aria-describedby":"tuwa:modal-content",ref:a,className:s("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),...r,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:d,transition:{duration:.2,ease:"easeInOut"},animate:"animate",initial:"initial",exit:"exit",className:"NovaNoScrolling novacore:relative novacore:overflow-hidden novacore:bg-[var(--tuwa-bg-primary)] novacore:border novacore:border-[var(--tuwa-border-primary)] novacore:rounded-t-[var(--tuwa-rounded-corners)] novacore:sm:rounded-[var(--tuwa-rounded-corners)]",children:jsxRuntime.jsx("div",{className:s("NovaNoScrolling NovaDialogContent__elements novacore:relative novacore:flex novacore:max-h-[98dvh] novacore:w-full novacore:flex-col novacore:overflow-y-auto","novacore:[transform:translateZ(0)] novacore:[backface-visibility:hidden]"),children:e})})})})})]})});go.displayName=c__namespace.Content.displayName;var wo=({className:o,...e})=>jsxRuntime.jsx("div",{"aria-describedby":"tuwa:modal-header",className:s("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});wo.displayName="DialogHeader";var bo=({className:o,...e})=>jsxRuntime.jsx("div",{"aria-describedby":"tuwa:modal-footer",className:s("novacore:flex novacore:flex-col-reverse novacore:sm:flex-row novacore:sm:justify-end novacore:sm:space-x-2",o),...e});bo.displayName="DialogFooter";var ho=u__namespace.forwardRef(({className:o,...e},t)=>jsxRuntime.jsx(c__namespace.Title,{ref:t,"aria-describedby":"tuwa:modal-title",className:s("novacore:text-lg novacore:font-bold novacore:leading-none novacore:tracking-tight novacore:text-[var(--tuwa-text-primary)] novacore:m-0 novacore:font-mono",o),...e}));ho.displayName=c__namespace.Title.displayName;var yo=u__namespace.forwardRef(({className:o,...e},t)=>jsxRuntime.jsx(c__namespace.Description,{"aria-describedby":"tuwa:modal-description",ref:t,className:s("novacore:text-sm novacore:text-[var(--tuwa-text-secondary)]",o),...e}));yo.displayName=c__namespace.Description.displayName;function h({children:o,iconId:e,alt:t,firstPathFill:n,...r}){let[a,i]=u.useState(null),l=u.useCallback(d=>{if(d){let w=N(d.outerHTML,n);i({id:e,src:w});}},[e,n]);return a&&a.id===e?jsxRuntime.jsx(C,{...r,src:a.src,alt:t}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:o(l)})}var K=u.lazy(()=>import('@web3icons/react/dynamic').then(o=>({default:o.NetworkIcon}))),Io="var(--tuwa-testnet-icons)";function Je({chainId:o,variant:e="background",className:t}){let n=W(o),r=typeof o=="string",a=r?o.split(":")[0].toLowerCase():o,l=r&&x(o)||n.name.toLowerCase().includes("testnet")?Io:void 0,d=s("novacore:w-full novacore:h-full novacore:rounded-full",t),w=typeof a=="string"?a:n.filePath,b=`networks/${e}/${S(w)}`;return n.name==="Unknown"?typeof o=="number"?jsxRuntime.jsx(p,{content:"?",className:t}):jsxRuntime.jsx(P,{githubSrc:b,className:d,firstPathFill:l}):jsxRuntime.jsx(u.Suspense,{fallback:jsxRuntime.jsx(p,{animate:true,className:t}),children:jsxRuntime.jsx(h,{iconId:`${o}-${e}`,className:d,firstPathFill:l,children:g=>typeof a=="string"?jsxRuntime.jsx(K,{ref:g,id:a,variant:e}):jsxRuntime.jsx(K,{ref:g,chainId:a,variant:e})})})}function rt({starsCount:o}){let[e,t]=u.useState(false);u.useEffect(()=>t(true),[]);let n=u.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% {
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 {networks,wallets}from'@web3icons/common/metadata';import {jsxs,jsx,Fragment}from'react/jsx-runtime';import*as u from'react';import {lazy,useState,useEffect,useCallback,Suspense,useMemo}from'react';import*as c from'@radix-ui/react-dialog';var _o="novacore:cursor-pointer novacore:rounded-[var(--tuwa-rounded-corners)] 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-mono 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 novacore:min-h-[36px]";function s(...o){return twMerge(clsx(o))}var y=o=>o&&typeof o=="object"&&!Array.isArray(o);function J(o,e){let t={...o};return y(o)&&y(e)&&Object.keys(e).forEach(n=>{let r=o[n],a=e[n];y(r)&&y(a)?t[n]=J(r,a):t[n]=a;}),t}function x(o){if(typeof o!="string")return false;let e=o.toLowerCase();return e.includes("solana")&&(e.includes("devnet")||e.includes("testnet"))}var M="Unknown";function oo(o){return o.charAt(0).toUpperCase()+o.slice(1).toLowerCase()}function W(o){let e={name:M,id:M.toLowerCase(),filePath:M.toLowerCase(),chainId:o};if(typeof o=="number"){let i=networks.find(l=>l.chainId===o);return i?{name:i.name,id:i.id,filePath:i.filePath?.split(":")[1],chainId:o}:e}let[t,n]=o?o.split(":"):[o],r=networks.find(i=>i.id===t);return r?{name:n&&x(o)?`${r.name} ${oo(n)}`:r.name,id:r.id,filePath:r.filePath?.split(":")[1],chainId:o}:e}function G(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 r=e||t||n,a=window.innerWidth<=o;return r&&a}function eo(o){if(!o.startsWith("var("))return o;let e=o.match(/var\(\s*(--[\w-]+)/);if(!e)return o;let t=e[1];return getComputedStyle(document.documentElement).getPropertyValue(t).trim()||o}function to(o,e){let t=eo(e),r=new DOMParser().parseFromString(o,"image/svg+xml");if(r.querySelector("parsererror"))return console.warn("SVG parse error, returning original"),o;let i=r.querySelector("path");return i&&i.setAttribute("fill",t),new XMLSerializer().serializeToString(r.documentElement)}function N(o,e){let t=o;return e&&(t=to(t,e)),`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(t)))}`}var S=o=>`${o.replace(/\s+/g,"-").toLowerCase()}.svg`;function te(o,e,t){if(!o)return "";if(o.length<=e+t)return o;let n=o.slice(0,e),r=o.slice(o.length-t);return `${n}...${r}`}function ve({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:s("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 no=u.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:s("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"})]}));no.displayName="CloseIcon";var io="novacore:flex novacore:items-center novacore:justify-center novacore:w-full novacore:h-full novacore:rounded-full novacore:text-[var(--tuwa-text-secondary)] novacore:bg-[var(--tuwa-bg-muted)]",p=({animate:o=false,content:e="",className:t})=>jsx("div",{className:s(io,"Nova_Web3_Icon",t,{"novacore:animate-pulse":o}),children:e});function C({src:o,alt:e,...t}){return jsx("img",{...t,src:o,alt:e??"",draggable:false,onDragStart:n=>n.preventDefault(),style:{outline:"none",pointerEvents:"none"}})}var mo="https://raw.githubusercontent.com/0xa3k5/web3icons/refs/heads/main/raw-svgs",L=new Map;function P({githubSrc:o,className:e,alt:t,firstPathFill:n,...r}){let a=`${o}|${n??""}`,i=L.get(a),[l,d]=useState(null),[w,b]=useState("idle"),T=i||l,g=i?"success":w;return useEffect(()=>{let D=true;return L.has(a)?void 0:((async()=>{b("loading");try{let R=await fetch(`${mo}/${o}`);if(!R.ok)throw new Error(`Failed to load icon: ${R.status}`);let X=await R.text();if(D){let V=N(X,n);L.set(a,V),d(V),b("success");}}catch{D&&b("error");}})(),()=>{D=false;})},[o,n,a]),g==="loading"||g==="idle"?jsx(p,{animate:true,className:e}):g==="success"&&T?jsx(C,{...r,src:T,alt:t,className:e}):jsx(p,{content:"?",className:e})}var Ve=c.Root,ze=c.Trigger,uo=c.Portal,We=c.Close,fo={initial:{opacity:0,scale:.9,y:20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.9,transition:{duration:.2}}},po={initial:{opacity:0,y:"100%"},animate:{opacity:1,y:"0%"},exit:{opacity:0,y:"100%",transition:{duration:.2}}},vo={initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},Y=({className:o,backdropAnimation:e})=>(u.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??vo,transition:{duration:.2,ease:"easeInOut"},animate:"animate",initial:"initial",exit:"exit",className:"novacore:relative novacore:overflow-hidden",children:jsx("div",{className:s("novacore:fixed novacore:inset-0 novacore:z-50 novacore:bg-black/55 novacore:backdrop-blur-sm novacore:backdrop-saturate-150",o)})})}));Y.displayName=c.Overlay.displayName;var go=u.forwardRef(({className:o,children:e,modalAnimation:t,backdropAnimation:n,...r},a)=>{let[i,l]=u.useState(false);u.useEffect(()=>{l(G());},[]);let d=t??(i?po:fo);return jsxs(uo,{children:[jsx(Y,{backdropAnimation:n}),jsx(c.Content,{"aria-describedby":"tuwa:modal-content",ref:a,className:s("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),...r,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:d,transition:{duration:.2,ease:"easeInOut"},animate:"animate",initial:"initial",exit:"exit",className:"NovaNoScrolling novacore:relative novacore:overflow-hidden",children:jsx("div",{className:s("NovaNoScrolling NovaDialogContent__elements novacore:relative novacore:flex novacore:max-h-[98dvh] novacore:w-full novacore:flex-col novacore:overflow-y-auto novacore:rounded-t-[var(--tuwa-rounded-corners)] novacore:sm:rounded-[var(--tuwa-rounded-corners)]","novacore:border novacore:border-[var(--tuwa-border-primary)] novacore:bg-[var(--tuwa-bg-primary)] novacore:[transform:translateZ(0)] novacore:[backface-visibility:hidden]"),children:e})})})})})]})});go.displayName=c.Content.displayName;var wo=({className:o,...e})=>jsx("div",{"aria-describedby":"tuwa:modal-header",className:s("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});wo.displayName="DialogHeader";var bo=({className:o,...e})=>jsx("div",{"aria-describedby":"tuwa:modal-footer",className:s("novacore:flex novacore:flex-col-reverse novacore:sm:flex-row novacore:sm:justify-end novacore:sm:space-x-2",o),...e});bo.displayName="DialogFooter";var ho=u.forwardRef(({className:o,...e},t)=>jsx(c.Title,{ref:t,"aria-describedby":"tuwa:modal-title",className:s("novacore:text-lg novacore:font-bold novacore:leading-none novacore:tracking-tight novacore:text-[var(--tuwa-text-primary)] novacore:m-0 novacore:font-mono",o),...e}));ho.displayName=c.Title.displayName;var yo=u.forwardRef(({className:o,...e},t)=>jsx(c.Description,{"aria-describedby":"tuwa:modal-description",ref:t,className:s("novacore:text-sm novacore:text-[var(--tuwa-text-secondary)]",o),...e}));yo.displayName=c.Description.displayName;function h({children:o,iconId:e,alt:t,firstPathFill:n,...r}){let[a,i]=useState(null),l=useCallback(d=>{if(d){let w=N(d.outerHTML,n);i({id:e,src:w});}},[e,n]);return a&&a.id===e?jsx(C,{...r,src:a.src,alt:t}):jsx(Fragment,{children:o(l)})}var K=lazy(()=>import('@web3icons/react/dynamic').then(o=>({default:o.NetworkIcon}))),Io="var(--tuwa-testnet-icons)";function Je({chainId:o,variant:e="background",className:t}){let n=W(o),r=typeof o=="string",a=r?o.split(":")[0].toLowerCase():o,l=r&&x(o)||n.name.toLowerCase().includes("testnet")?Io:void 0,d=s("novacore:w-full novacore:h-full novacore:rounded-full",t),w=typeof a=="string"?a:n.filePath,b=`networks/${e}/${S(w)}`;return n.name==="Unknown"?typeof o=="number"?jsx(p,{content:"?",className:t}):jsx(P,{githubSrc:b,className:d,firstPathFill:l}):jsx(Suspense,{fallback:jsx(p,{animate:true,className:t}),children:jsx(h,{iconId:`${o}-${e}`,className:d,firstPathFill:l,children:g=>typeof a=="string"?jsx(K,{ref:g,id:a,variant:e}):jsx(K,{ref:g,chainId:a,variant:e})})})}function rt({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:`
1
+ import {motion,AnimatePresence}from'framer-motion';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {networks,wallets}from'@web3icons/common/metadata';import {jsxs,jsx,Fragment}from'react/jsx-runtime';import*as u from'react';import {lazy,useState,useEffect,useCallback,Suspense,useMemo}from'react';import*as c from'@radix-ui/react-dialog';var _o="novacore:cursor-pointer novacore:rounded-[var(--tuwa-rounded-corners)] 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-mono 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 novacore:min-h-[36px]";function s(...o){return twMerge(clsx(o))}var y=o=>o&&typeof o=="object"&&!Array.isArray(o);function J(o,e){let t={...o};return y(o)&&y(e)&&Object.keys(e).forEach(n=>{let r=o[n],a=e[n];y(r)&&y(a)?t[n]=J(r,a):t[n]=a;}),t}function x(o){if(typeof o!="string")return false;let e=o.toLowerCase();return e.includes("solana")&&(e.includes("devnet")||e.includes("testnet"))}var M="Unknown";function oo(o){return o.charAt(0).toUpperCase()+o.slice(1).toLowerCase()}function W(o){let e={name:M,id:M.toLowerCase(),filePath:M.toLowerCase(),chainId:o};if(typeof o=="number"){let i=networks.find(l=>l.chainId===o);return i?{name:i.name,id:i.id,filePath:i.filePath?.split(":")[1],chainId:o}:e}let[t,n]=o?o.split(":"):[o],r=networks.find(i=>i.id===t);return r?{name:n&&x(o)?`${r.name} ${oo(n)}`:r.name,id:r.id,filePath:r.filePath?.split(":")[1],chainId:o}:e}function G(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 r=e||t||n,a=window.innerWidth<=o;return r&&a}function eo(o){if(!o.startsWith("var("))return o;let e=o.match(/var\(\s*(--[\w-]+)/);if(!e)return o;let t=e[1];return getComputedStyle(document.documentElement).getPropertyValue(t).trim()||o}function to(o,e){let t=eo(e),r=new DOMParser().parseFromString(o,"image/svg+xml");if(r.querySelector("parsererror"))return console.warn("SVG parse error, returning original"),o;let i=r.querySelector("path");return i&&i.setAttribute("fill",t),new XMLSerializer().serializeToString(r.documentElement)}function N(o,e){let t=o;return e&&(t=to(t,e)),`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(t)))}`}var S=o=>`${o.replace(/\s+/g,"-").toLowerCase()}.svg`;function te(o,e,t){if(!o)return "";if(o.length<=e+t)return o;let n=o.slice(0,e),r=o.slice(o.length-t);return `${n}...${r}`}function ve({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:s("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 no=u.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:s("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"})]}));no.displayName="CloseIcon";var io="novacore:flex novacore:items-center novacore:justify-center novacore:w-full novacore:h-full novacore:rounded-full novacore:text-[var(--tuwa-text-secondary)] novacore:bg-[var(--tuwa-bg-muted)]",p=({animate:o=false,content:e="",className:t})=>jsx("div",{className:s(io,"Nova_Web3_Icon",t,{"novacore:animate-pulse":o}),children:e});function C({src:o,alt:e,...t}){return jsx("img",{...t,src:o,alt:e??"",draggable:false,onDragStart:n=>n.preventDefault(),style:{outline:"none",pointerEvents:"none"}})}var mo="https://raw.githubusercontent.com/0xa3k5/web3icons/refs/heads/main/raw-svgs",L=new Map;function P({githubSrc:o,className:e,alt:t,firstPathFill:n,...r}){let a=`${o}|${n??""}`,i=L.get(a),[l,d]=useState(null),[w,b]=useState("idle"),T=i||l,g=i?"success":w;return useEffect(()=>{let D=true;return L.has(a)?void 0:((async()=>{b("loading");try{let R=await fetch(`${mo}/${o}`);if(!R.ok)throw new Error(`Failed to load icon: ${R.status}`);let X=await R.text();if(D){let V=N(X,n);L.set(a,V),d(V),b("success");}}catch{D&&b("error");}})(),()=>{D=false;})},[o,n,a]),g==="loading"||g==="idle"?jsx(p,{animate:true,className:e}):g==="success"&&T?jsx(C,{...r,src:T,alt:t,className:e}):jsx(p,{content:"?",className:e})}var Ve=c.Root,ze=c.Trigger,uo=c.Portal,We=c.Close,fo={initial:{opacity:0,scale:.9,y:20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.9,transition:{duration:.2}}},po={initial:{opacity:0,y:"100%"},animate:{opacity:1,y:"0%"},exit:{opacity:0,y:"100%",transition:{duration:.2}}},vo={initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},Y=({className:o,backdropAnimation:e})=>(u.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??vo,transition:{duration:.2,ease:"easeInOut"},animate:"animate",initial:"initial",exit:"exit",className:"novacore:relative novacore:overflow-hidden",children:jsx("div",{className:s("novacore:fixed novacore:inset-0 novacore:z-50 novacore:bg-black/55 novacore:backdrop-blur-sm novacore:backdrop-saturate-150",o)})})}));Y.displayName=c.Overlay.displayName;var go=u.forwardRef(({className:o,children:e,modalAnimation:t,backdropAnimation:n,...r},a)=>{let[i,l]=u.useState(false);u.useEffect(()=>{l(G());},[]);let d=t??(i?po:fo);return jsxs(uo,{children:[jsx(Y,{backdropAnimation:n}),jsx(c.Content,{"aria-describedby":"tuwa:modal-content",ref:a,className:s("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),...r,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:d,transition:{duration:.2,ease:"easeInOut"},animate:"animate",initial:"initial",exit:"exit",className:"NovaNoScrolling novacore:relative novacore:overflow-hidden novacore:bg-[var(--tuwa-bg-primary)] novacore:border novacore:border-[var(--tuwa-border-primary)] novacore:rounded-t-[var(--tuwa-rounded-corners)] novacore:sm:rounded-[var(--tuwa-rounded-corners)]",children:jsx("div",{className:s("NovaNoScrolling NovaDialogContent__elements novacore:relative novacore:flex novacore:max-h-[98dvh] novacore:w-full novacore:flex-col novacore:overflow-y-auto","novacore:[transform:translateZ(0)] novacore:[backface-visibility:hidden]"),children:e})})})})})]})});go.displayName=c.Content.displayName;var wo=({className:o,...e})=>jsx("div",{"aria-describedby":"tuwa:modal-header",className:s("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});wo.displayName="DialogHeader";var bo=({className:o,...e})=>jsx("div",{"aria-describedby":"tuwa:modal-footer",className:s("novacore:flex novacore:flex-col-reverse novacore:sm:flex-row novacore:sm:justify-end novacore:sm:space-x-2",o),...e});bo.displayName="DialogFooter";var ho=u.forwardRef(({className:o,...e},t)=>jsx(c.Title,{ref:t,"aria-describedby":"tuwa:modal-title",className:s("novacore:text-lg novacore:font-bold novacore:leading-none novacore:tracking-tight novacore:text-[var(--tuwa-text-primary)] novacore:m-0 novacore:font-mono",o),...e}));ho.displayName=c.Title.displayName;var yo=u.forwardRef(({className:o,...e},t)=>jsx(c.Description,{"aria-describedby":"tuwa:modal-description",ref:t,className:s("novacore:text-sm novacore:text-[var(--tuwa-text-secondary)]",o),...e}));yo.displayName=c.Description.displayName;function h({children:o,iconId:e,alt:t,firstPathFill:n,...r}){let[a,i]=useState(null),l=useCallback(d=>{if(d){let w=N(d.outerHTML,n);i({id:e,src:w});}},[e,n]);return a&&a.id===e?jsx(C,{...r,src:a.src,alt:t}):jsx(Fragment,{children:o(l)})}var K=lazy(()=>import('@web3icons/react/dynamic').then(o=>({default:o.NetworkIcon}))),Io="var(--tuwa-testnet-icons)";function Je({chainId:o,variant:e="background",className:t}){let n=W(o),r=typeof o=="string",a=r?o.split(":")[0].toLowerCase():o,l=r&&x(o)||n.name.toLowerCase().includes("testnet")?Io:void 0,d=s("novacore:w-full novacore:h-full novacore:rounded-full",t),w=typeof a=="string"?a:n.filePath,b=`networks/${e}/${S(w)}`;return n.name==="Unknown"?typeof o=="number"?jsx(p,{content:"?",className:t}):jsx(P,{githubSrc:b,className:d,firstPathFill:l}):jsx(Suspense,{fallback:jsx(p,{animate:true,className:t}),children:jsx(h,{iconId:`${o}-${e}`,className:d,firstPathFill:l,children:g=>typeof a=="string"?jsx(K,{ref:g,id:a,variant:e}):jsx(K,{ref:g,chainId:a,variant:e})})})}function rt({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% {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tuwaio/nova-core",
3
- "version": "0.4.7",
3
+ "version": "0.4.9",
4
4
  "private": false,
5
5
  "author": "Oleksandr Tkach",
6
6
  "license": "Apache-2.0",
@@ -61,7 +61,7 @@
61
61
  "@tailwindcss/postcss": "^4.3.3",
62
62
  "@tailwindcss/vite": "^4.3.3",
63
63
  "@types/react": "^19.2.17",
64
- "@radix-ui/react-dialog": "^1.1.22",
64
+ "@radix-ui/react-dialog": "^1.1.23",
65
65
  "@web3icons/react": "^4.1.19",
66
66
  "@web3icons/common": "^0.11.48",
67
67
  "autoprefixer": "^10.5.4",