@tuwaio/docs-ui 0.0.28 → 0.0.29

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,2 +1,2 @@
1
- 'use strict';var novaCore=require('@tuwaio/nova-core'),outline=require('@heroicons/react/24/outline'),jsxRuntime=require('react/jsx-runtime'),reactSyntaxHighlighter=require('react-syntax-highlighter'),prism=require('react-syntax-highlighter/dist/esm/styles/prism'),Nt=require('react'),nextraThemeDocs=require('nextra-theme-docs'),xt=require('html-react-parser'),components=require('nextra/components'),solid=require('@heroicons/react/24/solid');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var Nt__default=/*#__PURE__*/_interopDefault(Nt);var xt__default=/*#__PURE__*/_interopDefault(xt);function $({isCopied:e,onCopy:t}){return jsxRuntime.jsx("button",{onClick:t,type:"button",className:novaCore.cn("tuwadocs:h-6 tuwadocs:w-6 tuwadocs:cursor-pointer tuwadocs:transition-colors",e?"tuwadocs:text-[var(--tuwa-success-icon)]":"tuwadocs:text-[var(--tuwa-text-secondary)] tuwadocs:hover:text-[var(--tuwa-text-primary)]"),children:e?jsxRuntime.jsx(outline.CheckCircleIcon,{}):jsxRuntime.jsx(outline.Square2StackIcon,{})})}function V({title:e,titleIcons:t,children:a,textToCopy:d}){let{isCopied:r,copy:s}=novaCore.useCopyToClipboard(1500);return jsxRuntime.jsxs("div",{className:novaCore.cn("tuwadocs:group tuwadocs:overflow-hidden tuwadocs:rounded-[var(--tuwa-rounded-corners)] tuwadocs:border","tuwadocs:border-[var(--tuwa-border-secondary)] tuwadocs:bg-[var(--tuwa-bg-primary)]"),children:[jsxRuntime.jsxs("div",{className:novaCore.cn("tuwadocs:flex tuwadocs:items-center tuwadocs:justify-between tuwadocs:gap-4 tuwadocs:px-4 tuwadocs:py-2","tuwadocs:border-b tuwadocs:border-[var(--tuwa-border-secondary)] tuwadocs:bg-[var(--tuwa-bg-secondary)]"),children:[jsxRuntime.jsxs("div",{className:"tuwadocs:flex tuwadocs:items-center tuwadocs:gap-2",children:[jsxRuntime.jsx("div",{className:"tuwadocs:h-[20px] tuwadocs:w-[20px] tuwadocs:text-[var(--tuwa-text-secondary)]",children:t}),jsxRuntime.jsx("p",{className:"tuwadocs:text-sm tuwadocs:font-medium tuwadocs:text-[var(--tuwa-text-primary)]",children:e})]}),jsxRuntime.jsx("div",{className:"tuwadocs:transition tuwadocs:md:opacity-0 tuwadocs:group-hover:opacity-100",children:jsxRuntime.jsx($,{isCopied:r,onCopy:()=>s(d)})})]}),a]})}function P({children:e}){let[t,a]=Nt.useState(false);return Nt.useEffect(()=>{a(true);},[]),t?jsxRuntime.jsx(jsxRuntime.Fragment,{children:e}):null}function G({children:e,language:t,resolvedTheme:a}){return jsxRuntime.jsx("div",{className:"tuwadocs:border-t tuwadocs:border-[var(--tuwa-border-secondary)]",children:jsxRuntime.jsx(P,{children:jsxRuntime.jsx(reactSyntaxHighlighter.Prism,{language:t??"bash",customStyle:{margin:0,background:"transparent"},style:a==="dark"?prism.materialOceanic:prism.materialLight,children:String(e).replace(/\n$/,"")})})})}function uo({features:e}){return jsxRuntime.jsx("div",{className:"tuwadocs:grid tuwadocs:grid-cols-1 tuwadocs:md:grid-cols-3 tuwadocs:gap-6 tuwadocs:mt-12",children:e.map(t=>jsxRuntime.jsxs("div",{className:"tuwadocs:p-6 tuwadocs:border tuwadocs:rounded-[var(--tuwa-rounded-corners)] tuwadocs:hover:shadow-lg tuwadocs:transition-shadow",children:[jsxRuntime.jsx("div",{className:"tuwadocs:text-2xl tuwadocs:mb-3",children:t.icon}),jsxRuntime.jsx("h3",{className:"tuwadocs:text-lg tuwadocs:font-semibold tuwadocs:mb-2",children:t.title}),jsxRuntime.jsx("p",{className:"tuwadocs:text-[var(--tuwa-text-secondary)]",children:t.description})]},t.title))})}var q=[{title:"NPM",href:"https://npmjs.com/org/tuwaio",className:"tuwadocs:hover:text-red-600 tuwadocs:dark:hover:text-red-400",image:jsxRuntime.jsx("svg",{className:"tuwadocs:w-4 tuwadocs:h-4",fill:"currentColor",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0H1.763zM5.13 5.323l13.837.019-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113l.017-13.847z"})})}],U=[{title:"NPM",href:"https://npmjs.com/org/tuwaio",className:"tuwa-footer-link--npm",image:jsxRuntime.jsx("svg",{className:"tuwadocs:w-4 tuwadocs:h-4",fill:"currentColor",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0H1.763zM5.13 5.323l13.837.019-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113l.017-13.847z"})})},{title:"GitHub",href:"https://github.com/TuwaIO",className:"tuwa-footer-link--github",image:jsxRuntime.jsx("svg",{className:"tuwadocs:w-4 tuwadocs:h-4",fill:"currentColor",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"})})}];function go({links:e,logo:t}){return jsxRuntime.jsx(nextraThemeDocs.Footer,{children:jsxRuntime.jsxs("div",{className:"tuwadocs:flex tuwadocs:w-full tuwadocs:flex-col tuwadocs:items-center tuwadocs:sm:items-start tuwa-footer-border tuwadocs:pt-8",children:[jsxRuntime.jsxs("div",{className:"tuwadocs:mb-6 tuwadocs:flex tuwadocs:items-center tuwadocs:gap-4 tuwadocs:w-full tuwadocs:justify-between",children:[jsxRuntime.jsx("div",{className:"tuwadocs:flex tuwadocs:items-center",children:t}),jsxRuntime.jsx("div",{className:"tuwadocs:flex tuwadocs:items-center tuwadocs:gap-4 tuwadocs:text-sm",children:(e??U).map(({title:a,href:d,image:r,className:s})=>jsxRuntime.jsxs("a",{href:d,target:"_blank",rel:"noopener noreferrer",className:novaCore.cn("tuwa-footer-link tuwadocs:flex tuwadocs:items-center tuwadocs:gap-1",s),children:[r,jsxRuntime.jsx("span",{className:"tuwadocs:hidden tuwadocs:sm:inline",children:a})]},a))})]}),jsxRuntime.jsxs("div",{className:"tuwadocs:w-full tuwa-footer-border tuwadocs:pt-4",children:[jsxRuntime.jsxs("div",{className:"tuwadocs:flex tuwadocs:flex-col tuwadocs:sm:flex-row tuwadocs:justify-between tuwadocs:items-start tuwadocs:sm:items-center tuwadocs:gap-4",children:[jsxRuntime.jsxs("div",{className:"tuwadocs:flex-1",children:[jsxRuntime.jsx("p",{className:"tuwa-footer-description",children:"The modular, headless-first Web3 infrastructure. Build self-custodial applications with zero vendor lock-in."}),jsxRuntime.jsx("p",{className:"tuwa-footer-license",children:"Licensed under Apache 2.0. Open source and free to use."})]}),jsxRuntime.jsxs("div",{className:"tuwa-footer-copyright",children:["\xA9 2025 - ",new Date().getFullYear()," TUWA. All rights reserved."]})]}),jsxRuntime.jsx("div",{className:"tuwadocs:flex tuwadocs:flex-wrap tuwadocs:items-center tuwadocs:gap-3 tuwadocs:mt-4 tuwadocs:pt-4 tuwa-footer-border"})]})]})})}var St="https://cdn.jsdelivr.net/gh/TuwaIO/workflows@main/preview/logo_v1.svg";async function No({url:e=St,className:t,style:a,...d}){let r;try{let c=await fetch(e,{next:{revalidate:86400}});if(!c.ok)throw new Error(`Failed to fetch SVG: ${c.status}`);r=await c.text();}catch(c){return console.error("RemoteLogo: Failed to fetch SVG from remote source:",c),jsxRuntime.jsx("svg",{className:t,style:a,...d})}let s=r.replace(/<\?xml[\s\S]*?\?>/g,"").replace(/<!DOCTYPE[\s\S]*?>/gi,"").replace(/\sxml:space=/g," xmlSpace=").trim(),l=xt__default.default(s,{replace(c){if(c instanceof xt.Element&&c.name==="svg"){let C=xt.domToReact(c.children),u={...c.attribs};"xmlspace"in u&&(u.xmlSpace=u.xmlspace,delete u.xmlspace);let n=[t,"remote-logo"].filter(Boolean).join(" ");return jsxRuntime.jsx("svg",{...u,className:n,style:a,...d,children:C})}}}),p=(Array.isArray(l)?l:[l]).find(c=>Nt__default.default.isValidElement(c)&&c.type==="svg");return p||jsxRuntime.jsx("svg",{className:t,style:a,...d})}function Po({links:e,logo:t}){return jsxRuntime.jsx(nextraThemeDocs.Navbar,{logo:t,children:jsxRuntime.jsx("div",{className:"tuwadocs:flex tuwadocs:items-center tuwadocs:gap-3",children:(e??q).map(({title:a,href:d,image:r,className:s})=>jsxRuntime.jsxs("a",{href:d,target:"_blank",rel:"noopener noreferrer",className:novaCore.cn("tuwadocs:hidden tuwadocs:sm:flex tuwadocs:items-center tuwadocs:gap-1 tuwadocs:px-3 tuwadocs:py-1.5 tuwadocs:text-sm tuwadocs:font-medium tuwadocs:transition-colors tuwadocs:text-[var(--tuwa-text-primary)]",s),children:[r,a]},a))})})}var X=[{title:"pnpm",command:"pnpm add"},{title:"bun",command:"bun add"},{title:"npm",command:"npm install"},{title:"yarn",command:"yarn add"}];function Do({packagesList:e,resolvedTheme:t}){return jsxRuntime.jsx("div",{className:"tuwadocs:my-4",children:jsxRuntime.jsx(components.Tabs,{items:X.map(a=>a.title),children:X.map(a=>jsxRuntime.jsx(components.Tabs.Tab,{children:jsxRuntime.jsx(V,{title:"Terminal",titleIcons:jsxRuntime.jsx(outline.CommandLineIcon,{}),textToCopy:`${a.command} ${e}`,children:jsxRuntime.jsx(G,{resolvedTheme:t,language:"bash",children:`${a.command} ${e}`})})},a.title))})})}var Et=100,Q=.9,Mt=2.7,K=.3,It=.5,Lt=.5,I=150,_t=I*I,J=2,Z=120,j=Z*Z,At=.75,Ot=.001;function tt(){let e=Nt.useRef(null),t=Nt.useRef({x:0,y:0}),a=Nt.useRef([]),d=Nt.useRef(null);return Nt.useEffect(()=>{let r=e.current;if(!r)return;let s=r.getContext("2d");if(!s)return;let l=()=>{r.width=window.innerWidth,r.height=window.innerHeight;},k=()=>{let n=[];for(let w=0;w<Et;w++)n.push({x:Math.random()*r.width,y:Math.random()*r.height,radius:Math.random()*(Mt-Q)+Q,vx:(Math.random()-.5)*K,vy:(Math.random()-.5)*K,opacity:Math.random()*Lt+It});return n},p=n=>{t.current.x=n.clientX,t.current.y=n.clientY;},c=()=>{l(),a.current=k();},C=n=>{s.clearRect(0,0,r.width,r.height);let w=a.current,F=t.current,H=document.documentElement.classList.contains("dark");for(let o of w){o.x+=o.vx,o.y+=o.vy,(o.x<0||o.x>r.width)&&(o.vx=-o.vx),(o.y<0||o.y>r.height)&&(o.vy=-o.vy);let m=F.x-o.x,f=F.y-o.y,v=m*m+f*f;if(v<_t){let y=Math.sqrt(v),R=(I-y)/I,at=m/y*R*J,st=f/y*R*J;o.x-=at,o.y-=st;}o.opacity=.3+Math.sin(n*Ot+o.x)*.5+.5;let g=Math.min(o.opacity,1),i=s.createRadialGradient(o.x,o.y,0,o.x,o.y,o.radius);H?(i.addColorStop(0,`rgba(255, 255, 255, ${g})`),i.addColorStop(.5,`rgba(147, 197, 253, ${g*.6})`),i.addColorStop(1,"rgba(59, 130, 246, 0)")):(i.addColorStop(0,`rgba(15, 23, 42, ${g})`),i.addColorStop(.5,`rgba(71, 85, 105, ${g*.6})`),i.addColorStop(1,"rgba(148, 163, 184, 0)")),s.beginPath(),s.arc(o.x,o.y,o.radius,0,Math.PI*2),s.fillStyle=i,s.fill();}s.lineWidth=At;for(let o=0;o<w.length;o++){let m=w[o];for(let f=o+1;f<w.length;f++){let v=w[f],g=m.x-v.x,i=m.y-v.y,y=g*g+i*i;if(y<j){let R=.2*(1-y/j);H?s.strokeStyle=`rgba(147, 197, 253, ${R})`:s.strokeStyle=`rgba(71, 85, 105, ${R*1.5})`,s.beginPath(),s.moveTo(m.x,m.y),s.lineTo(v.x,v.y),s.stroke();}}}},u=()=>{let n=Date.now();C(n),d.current=requestAnimationFrame(u);};return l(),a.current=k(),u(),window.addEventListener("mousemove",p),window.addEventListener("resize",c),()=>{d.current&&cancelAnimationFrame(d.current),window.removeEventListener("mousemove",p),window.removeEventListener("resize",c);}},[]),jsxRuntime.jsx("canvas",{ref:e,className:"tuwadocs:absolute tuwadocs:inset-0 tuwadocs:w-full tuwadocs:h-full tuwadocs:bg-gradient-to-b tuwadocs:from-slate-200 tuwadocs:to-slate-350 tuwadocs:dark:from-[#0a0e27] tuwadocs:dark:to-[#1a1f3a]"})}function Go({href:e,children:t}){return jsxRuntime.jsx("a",{className:novaCore.cn("tuwadocs:font-medium tuwadocs:text-[var(--tuwa-text-accent)]","tuwadocs:transition-all tuwadocs:hover:underline tuwadocs:underline-offset-4"),href:e,target:"_blank",rel:"noopener noreferrer",children:t})}function Qo({theme:e,onToggle:t}){let[a,d]=Nt.useState(false);Nt.useEffect(()=>{d(true);},[]);let r="tuwadocs:bg-black/5 tuwadocs:border-black/5 tuwadocs:hover:bg-black/10 tuwadocs:dark:bg-white/10 tuwadocs:dark:border-white/10 tuwadocs:dark:hover:bg-white/20";if(!a)return jsxRuntime.jsx("div",{className:novaCore.cn("tuwadocs:relative tuwadocs:flex tuwadocs:h-10 tuwadocs:w-20 tuwadocs:md:h-8 tuwadocs:md:w-16 tuwadocs:rounded-[var(--tuwa-rounded-corners)] tuwadocs:border tuwadocs:opacity-0",r)});let s=e==="dark";return jsxRuntime.jsxs("button",{onClick:t,className:novaCore.cn("tuwadocs:group tuwadocs:relative tuwadocs:flex tuwadocs:h-10 tuwadocs:w-20 tuwadocs:md:h-8 tuwadocs:md:w-16 tuwadocs:cursor-pointer tuwadocs:items-center tuwadocs:rounded-[var(--tuwa-rounded-corners)] tuwadocs:p-1 tuwadocs:transition-all tuwadocs:duration-300 tuwadocs:ease-in-out tuwadocs:backdrop-blur-sm tuwadocs:border",r),"aria-label":"Toggle theme",children:[jsxRuntime.jsx("div",{className:novaCore.cn("tuwadocs:absolute tuwadocs:top-[1px] tuwadocs:left-[2px] tuwadocs:z-10 tuwadocs:h-9 tuwadocs:w-9 tuwadocs:rounded-[var(--tuwa-rounded-corners)] tuwadocs:bg-[var(--tuwa-bg-primary)] tuwadocs:shadow-md tuwadocs:md:hidden",s?"tuwa-slide-dark-mobile":"tuwa-slide-light-mobile")}),jsxRuntime.jsx("div",{className:novaCore.cn("tuwadocs:absolute tuwadocs:top-[1px] tuwadocs:left-[2px] tuwadocs:z-10 tuwadocs:h-9 tuwadocs:w-9 tuwadocs:md:h-7 tuwadocs:md:w-7 tuwadocs:rounded-[var(--tuwa-rounded-corners)] tuwadocs:bg-[var(--tuwa-bg-primary)] tuwadocs:shadow-md tuwadocs:hidden tuwadocs:md:block",s?"tuwa-slide-dark-desktop":"tuwa-slide-light-desktop")}),jsxRuntime.jsxs("div",{className:"tuwadocs:relative tuwadocs:z-20 tuwadocs:flex tuwadocs:w-full tuwadocs:justify-between",children:[jsxRuntime.jsx("div",{className:"tuwadocs:flex tuwadocs:flex-1 tuwadocs:items-center tuwadocs:justify-center",children:jsxRuntime.jsx(solid.SunIcon,{className:`tuwadocs:h-6 tuwadocs:w-6 tuwadocs:relative tuwadocs:-left-[2px] tuwadocs:md:h-5 tuwadocs:md:w-5 tuwadocs:transition-colors tuwadocs:duration-300 ${s?"tuwadocs:text-slate-500 tuwadocs:group-hover:text-yellow-400":"tuwadocs:text-yellow-500"}`})}),jsxRuntime.jsx("div",{className:"tuwadocs:flex tuwadocs:flex-1 tuwadocs:justify-center",children:jsxRuntime.jsx(solid.MoonIcon,{className:`tuwadocs:h-6 tuwadocs:w-6 tuwadocs:relative tuwadocs:left-[2px] tuwadocs:md:h-5 tuwadocs:md:w-5 tuwadocs:transition-colors tuwadocs:duration-300 ${s?"tuwadocs:text-indigo-400":"tuwadocs:text-slate-500 tuwadocs:group-hover:text-indigo-300"}`})})]})]})}var Gt={"aspect-square":"tuwadocs:aspect-square","aspect-video":"tuwadocs:aspect-video","aspect-[4/3]":"tuwadocs:aspect-[4/3]","aspect-[3/2]":"tuwadocs:aspect-[3/2]","aspect-[21/9]":"tuwadocs:aspect-[21/9]"},jo=({src:e,poster:t,autoplay:a=false,muted:d=false,loop:r=false,controls:s=true,className:l="",aspectRatio:k="aspect-video",onPlay:p,onPause:c,onEnded:C,"aria-label":u})=>{let n=Gt[k]||"tuwadocs:aspect-video";return jsxRuntime.jsx("div",{className:novaCore.cn("tuwadocs:relative tuwadocs:w-full tuwadocs:overflow-hidden tuwadocs:rounded-[var(--tuwa-rounded-corners)] tuwadocs:bg-black tuwadocs:my-4",n,l),children:jsxRuntime.jsxs("video",{src:e,poster:t,controls:s,autoPlay:a,muted:d,loop:r,className:novaCore.cn("tuwadocs:absolute tuwadocs:inset-0 tuwadocs:h-full tuwadocs:w-full tuwadocs:object-contain","tuwadocs:transition-opacity tuwadocs:duration-200","tuwadocs:focus:outline-none tuwadocs:focus:ring-[length:var(--tuwa-ring-width)] tuwadocs:focus:ring-[var(--tuwa-text-accent)] tuwadocs:focus:ring-offset-[length:var(--tuwa-ring-width)] tuwadocs:focus:ring-offset-[var(--tuwa-bg-primary)]"),onPlay:p,onPause:c,onEnded:C,"aria-label":u,preload:"metadata",children:[jsxRuntime.jsx("track",{kind:"captions"}),"Your browser does not support the video tag. Please"," ",jsxRuntime.jsx("a",{href:e,download:true,className:"tuwadocs:text-[var(--tuwa-text-accent)] tuwadocs:underline tuwadocs:hover:opacity-80",children:"download the video"})," ","to watch it."]})})};
1
+ 'use strict';var novaCore=require('@tuwaio/nova-core'),outline=require('@heroicons/react/24/outline'),jsxRuntime=require('react/jsx-runtime'),reactSyntaxHighlighter=require('react-syntax-highlighter'),prism=require('react-syntax-highlighter/dist/esm/styles/prism'),Nt=require('react'),nextraThemeDocs=require('nextra-theme-docs'),xt=require('html-react-parser'),components=require('nextra/components'),solid=require('@heroicons/react/24/solid');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var Nt__default=/*#__PURE__*/_interopDefault(Nt);var xt__default=/*#__PURE__*/_interopDefault(xt);function $({isCopied:e,onCopy:t}){return jsxRuntime.jsx("button",{onClick:t,type:"button",className:novaCore.cn("tuwadocs:h-6 tuwadocs:w-6 tuwadocs:cursor-pointer tuwadocs:transition-colors",e?"tuwadocs:text-[var(--tuwa-success-icon)]":"tuwadocs:text-[var(--tuwa-text-secondary)] tuwadocs:hover:text-[var(--tuwa-text-primary)]"),children:e?jsxRuntime.jsx(outline.CheckCircleIcon,{}):jsxRuntime.jsx(outline.Square2StackIcon,{})})}function V({title:e,titleIcons:t,children:a,textToCopy:d}){let{isCopied:r,copy:s}=novaCore.useCopyToClipboard(1500);return jsxRuntime.jsxs("div",{className:novaCore.cn("tuwadocs:group tuwadocs:overflow-hidden tuwadocs:rounded-[var(--tuwa-rounded-corners)] tuwadocs:border","tuwadocs:border-[var(--tuwa-border-secondary)] tuwadocs:bg-[var(--tuwa-bg-primary)]"),children:[jsxRuntime.jsxs("div",{className:novaCore.cn("tuwadocs:flex tuwadocs:items-center tuwadocs:justify-between tuwadocs:gap-4 tuwadocs:px-4 tuwadocs:py-2","tuwadocs:border-b tuwadocs:border-[var(--tuwa-border-secondary)] tuwadocs:bg-[var(--tuwa-bg-secondary)]"),children:[jsxRuntime.jsxs("div",{className:"tuwadocs:flex tuwadocs:items-center tuwadocs:gap-2",children:[jsxRuntime.jsx("div",{className:"tuwadocs:h-[20px] tuwadocs:w-[20px] tuwadocs:text-[var(--tuwa-text-secondary)]",children:t}),jsxRuntime.jsx("p",{className:"tuwadocs:text-sm tuwadocs:font-medium tuwadocs:text-[var(--tuwa-text-primary)]",children:e})]}),jsxRuntime.jsx("div",{className:"tuwadocs:transition tuwadocs:md:opacity-0 tuwadocs:group-hover:opacity-100",children:jsxRuntime.jsx($,{isCopied:r,onCopy:()=>s(d)})})]}),a]})}function P({children:e}){let[t,a]=Nt.useState(false);return Nt.useEffect(()=>{a(true);},[]),t?jsxRuntime.jsx(jsxRuntime.Fragment,{children:e}):null}function G({children:e,language:t,resolvedTheme:a}){return jsxRuntime.jsx("div",{className:"tuwadocs:border-t tuwadocs:border-[var(--tuwa-border-secondary)]",children:jsxRuntime.jsx(P,{children:jsxRuntime.jsx(reactSyntaxHighlighter.Prism,{language:t??"bash",customStyle:{margin:0,background:"transparent"},style:a==="dark"?prism.materialOceanic:prism.materialLight,children:String(e).replace(/\n$/,"")})})})}function uo({features:e}){return jsxRuntime.jsx("div",{className:"tuwadocs:grid tuwadocs:grid-cols-1 tuwadocs:md:grid-cols-3 tuwadocs:gap-6 tuwadocs:mt-12",children:e.map(t=>jsxRuntime.jsxs("div",{className:"tuwadocs:p-6 tuwadocs:border tuwadocs:rounded-[var(--tuwa-rounded-corners)] tuwadocs:hover:shadow-lg tuwadocs:transition-shadow",children:[jsxRuntime.jsx("div",{className:"tuwadocs:text-2xl tuwadocs:mb-3",children:t.icon}),jsxRuntime.jsx("h3",{className:"tuwadocs:text-lg tuwadocs:font-semibold tuwadocs:mb-2",children:t.title}),jsxRuntime.jsx("p",{className:"tuwadocs:text-[var(--tuwa-text-secondary)]",children:t.description})]},t.title))})}var q=[{title:"NPM",href:"https://npmjs.com/org/tuwaio",className:"tuwadocs:hover:text-red-600 tuwadocs:dark:hover:text-red-400",image:jsxRuntime.jsx("svg",{className:"tuwadocs:w-4 tuwadocs:h-4",fill:"currentColor",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0H1.763zM5.13 5.323l13.837.019-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113l.017-13.847z"})})}],U=[{title:"NPM",href:"https://npmjs.com/org/tuwaio",className:"tuwa-footer-link--npm",image:jsxRuntime.jsx("svg",{className:"tuwadocs:w-4 tuwadocs:h-4",fill:"currentColor",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0H1.763zM5.13 5.323l13.837.019-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113l.017-13.847z"})})},{title:"GitHub",href:"https://github.com/TuwaIO",className:"tuwa-footer-link--github",image:jsxRuntime.jsx("svg",{className:"tuwadocs:w-4 tuwadocs:h-4",fill:"currentColor",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"})})}];function go({links:e,logo:t}){return jsxRuntime.jsx(nextraThemeDocs.Footer,{children:jsxRuntime.jsxs("div",{className:"tuwadocs:flex tuwadocs:w-full tuwadocs:flex-col tuwadocs:items-center tuwadocs:sm:items-start tuwa-footer-border tuwadocs:pt-8",children:[jsxRuntime.jsxs("div",{className:"tuwadocs:mb-6 tuwadocs:flex tuwadocs:items-center tuwadocs:gap-4 tuwadocs:w-full tuwadocs:justify-between",children:[jsxRuntime.jsx("div",{className:"tuwadocs:flex tuwadocs:items-center",children:t}),jsxRuntime.jsx("div",{className:"tuwadocs:flex tuwadocs:items-center tuwadocs:gap-4 tuwadocs:text-sm",children:(e??U).map(({title:a,href:d,image:r,className:s})=>jsxRuntime.jsxs("a",{href:d,target:"_blank",rel:"noopener noreferrer",className:novaCore.cn("tuwa-footer-link tuwadocs:flex tuwadocs:items-center tuwadocs:gap-1",s),children:[r,jsxRuntime.jsx("span",{className:"tuwadocs:hidden tuwadocs:sm:inline",children:a})]},a))})]}),jsxRuntime.jsxs("div",{className:"tuwadocs:w-full tuwa-footer-border tuwadocs:pt-4",children:[jsxRuntime.jsxs("div",{className:"tuwadocs:flex tuwadocs:flex-col tuwadocs:sm:flex-row tuwadocs:justify-between tuwadocs:items-start tuwadocs:sm:items-center tuwadocs:gap-4",children:[jsxRuntime.jsxs("div",{className:"tuwadocs:flex-1",children:[jsxRuntime.jsx("p",{className:"tuwa-footer-description",children:"The modular, headless-first Web3 infrastructure. Build self-custodial applications with zero vendor lock-in."}),jsxRuntime.jsx("p",{className:"tuwa-footer-license",children:"Licensed under Apache 2.0. Open source and free to use."})]}),jsxRuntime.jsxs("div",{className:"tuwa-footer-copyright",children:["\xA9 2025 - ",new Date().getFullYear()," TUWA. All rights reserved."]})]}),jsxRuntime.jsx("div",{className:"tuwadocs:flex tuwadocs:flex-wrap tuwadocs:items-center tuwadocs:gap-3 tuwadocs:mt-4 tuwadocs:pt-4 tuwa-footer-border"})]})]})})}var St="https://cdn.jsdelivr.net/gh/TuwaIO/workflows@main/preview/logo_v1.svg";async function No({url:e=St,className:t,style:a,...d}){let r;try{let c=await fetch(e,{next:{revalidate:86400}});if(!c.ok)throw new Error(`Failed to fetch SVG: ${c.status}`);r=await c.text();}catch(c){return console.error("RemoteLogo: Failed to fetch SVG from remote source:",c),jsxRuntime.jsx("svg",{className:t,style:a,...d})}let s=r.replace(/<\?xml[\s\S]*?\?>/g,"").replace(/<!DOCTYPE[\s\S]*?>/gi,"").replace(/\sxml:space=/g," xmlSpace=").trim(),l=xt__default.default(s,{replace(c){if(c instanceof xt.Element&&c.name==="svg"){let C=xt.domToReact(c.children),u={...c.attribs};"xmlspace"in u&&(u.xmlSpace=u.xmlspace,delete u.xmlspace);let n=[t,"remote-logo"].filter(Boolean).join(" ");return jsxRuntime.jsx("svg",{...u,className:n,style:a,...d,children:C})}}}),p=(Array.isArray(l)?l:[l]).find(c=>Nt__default.default.isValidElement(c)&&c.type==="svg");return p||jsxRuntime.jsx("svg",{className:t,style:a,...d})}function Po({links:e,logo:t}){return jsxRuntime.jsx(nextraThemeDocs.Navbar,{logo:t,children:jsxRuntime.jsx("div",{className:"tuwadocs:flex tuwadocs:items-center tuwadocs:gap-3",children:(e??q).map(({title:a,href:d,image:r,className:s})=>jsxRuntime.jsxs("a",{href:d,target:"_blank",rel:"noopener noreferrer",className:novaCore.cn("tuwadocs:hidden tuwadocs:sm:flex tuwadocs:items-center tuwadocs:gap-1 tuwadocs:px-3 tuwadocs:py-1.5 tuwadocs:text-sm tuwadocs:font-medium tuwadocs:transition-colors tuwadocs:text-[var(--tuwa-text-primary)]",s),children:[r,a]},a))})})}var X=[{title:"pnpm",command:"pnpm add"},{title:"bun",command:"bun add"},{title:"npm",command:"npm install"},{title:"yarn",command:"yarn add"}];function Do({packagesList:e,resolvedTheme:t}){return jsxRuntime.jsx("div",{className:"tuwadocs:my-4",children:jsxRuntime.jsx(components.Tabs,{items:X.map(a=>a.title),children:X.map(a=>jsxRuntime.jsx(components.Tabs.Tab,{children:jsxRuntime.jsx(V,{title:"Terminal",titleIcons:jsxRuntime.jsx(outline.CommandLineIcon,{}),textToCopy:`${a.command} ${e}`,children:jsxRuntime.jsx(G,{resolvedTheme:t,language:"bash",children:`${a.command} ${e}`})})},a.title))})})}var Et=100,Q=.9,Mt=2.7,K=.3,It=.5,Lt=.5,I=150,_t=I*I,J=2,Z=120,j=Z*Z,At=.75,Ot=.001;function tt(){let e=Nt.useRef(null),t=Nt.useRef({x:0,y:0}),a=Nt.useRef([]),d=Nt.useRef(null);return Nt.useEffect(()=>{let r=e.current;if(!r)return;let s=r.getContext("2d");if(!s)return;let l=()=>{r.width=window.innerWidth,r.height=window.innerHeight;},k=()=>{let n=[];for(let w=0;w<Et;w++)n.push({x:Math.random()*r.width,y:Math.random()*r.height,radius:Math.random()*(Mt-Q)+Q,vx:(Math.random()-.5)*K,vy:(Math.random()-.5)*K,opacity:Math.random()*Lt+It});return n},p=n=>{t.current.x=n.clientX,t.current.y=n.clientY;},c=()=>{l(),a.current=k();},C=n=>{s.clearRect(0,0,r.width,r.height);let w=a.current,F=t.current,H=document.documentElement.classList.contains("dark");for(let o of w){o.x+=o.vx,o.y+=o.vy,(o.x<0||o.x>r.width)&&(o.vx=-o.vx),(o.y<0||o.y>r.height)&&(o.vy=-o.vy);let m=F.x-o.x,f=F.y-o.y,v=m*m+f*f;if(v<_t){let y=Math.sqrt(v),R=(I-y)/I,at=m/y*R*J,st=f/y*R*J;o.x-=at,o.y-=st;}o.opacity=.3+Math.sin(n*Ot+o.x)*.5+.5;let g=Math.min(o.opacity,1),i=s.createRadialGradient(o.x,o.y,0,o.x,o.y,o.radius);H?(i.addColorStop(0,`rgba(255, 255, 255, ${g})`),i.addColorStop(.5,`rgba(147, 197, 253, ${g*.6})`),i.addColorStop(1,"rgba(59, 130, 246, 0)")):(i.addColorStop(0,`rgba(15, 23, 42, ${g})`),i.addColorStop(.5,`rgba(71, 85, 105, ${g*.6})`),i.addColorStop(1,"rgba(148, 163, 184, 0)")),s.beginPath(),s.arc(o.x,o.y,o.radius,0,Math.PI*2),s.fillStyle=i,s.fill();}s.lineWidth=At;for(let o=0;o<w.length;o++){let m=w[o];for(let f=o+1;f<w.length;f++){let v=w[f],g=m.x-v.x,i=m.y-v.y,y=g*g+i*i;if(y<j){let R=.2*(1-y/j);H?s.strokeStyle=`rgba(147, 197, 253, ${R})`:s.strokeStyle=`rgba(71, 85, 105, ${R*1.5})`,s.beginPath(),s.moveTo(m.x,m.y),s.lineTo(v.x,v.y),s.stroke();}}}},u=()=>{let n=Date.now();C(n),d.current=requestAnimationFrame(u);};return l(),a.current=k(),u(),window.addEventListener("mousemove",p),window.addEventListener("resize",c),()=>{d.current&&cancelAnimationFrame(d.current),window.removeEventListener("mousemove",p),window.removeEventListener("resize",c);}},[]),jsxRuntime.jsx("canvas",{ref:e,className:"tuwadocs:absolute tuwadocs:inset-0 tuwadocs:w-full tuwadocs:h-full tuwadocs:bg-gradient-to-b tuwadocs:from-slate-200 tuwadocs:to-slate-350 tuwadocs:dark:from-[#0a0e27] tuwadocs:dark:to-[#1a1f3a]"})}function Go({href:e,children:t}){return jsxRuntime.jsx("a",{className:novaCore.cn("tuwadocs:font-medium tuwadocs:text-[var(--tuwa-text-accent)]","tuwadocs:transition-all tuwadocs:hover:underline tuwadocs:underline-offset-4"),href:e,target:"_blank",rel:"noopener noreferrer",children:t})}function Qo({theme:e,onToggle:t}){let[a,d]=Nt.useState(false);Nt.useEffect(()=>{d(true);},[]);let r="tuwadocs:bg-black/5 tuwadocs:border-black/5 tuwadocs:hover:bg-black/10 tuwadocs:dark:bg-white/10 tuwadocs:dark:border-white/10 tuwadocs:dark:hover:bg-white/20";if(!a)return jsxRuntime.jsx("div",{className:novaCore.cn("tuwadocs:relative tuwadocs:flex tuwadocs:h-10 tuwadocs:w-20 tuwadocs:md:h-8 tuwadocs:md:w-16 tuwadocs:rounded-[var(--tuwa-rounded-corners)] tuwadocs:border tuwadocs:opacity-0",r)});let s=e==="dark";return jsxRuntime.jsxs("button",{onClick:t,className:novaCore.cn("tuwadocs:group tuwadocs:relative tuwadocs:flex tuwadocs:h-10 tuwadocs:w-20 tuwadocs:md:h-8 tuwadocs:md:w-16 tuwadocs:cursor-pointer tuwadocs:items-center tuwadocs:rounded-[var(--tuwa-rounded-corners)] tuwadocs:p-1 tuwadocs:transition-all tuwadocs:duration-300 tuwadocs:ease-in-out tuwadocs:backdrop-blur-sm tuwadocs:border",r),"aria-label":"Toggle theme",children:[jsxRuntime.jsx("div",{className:novaCore.cn("tuwadocs:absolute tuwadocs:top-[1px] tuwadocs:left-[2px] tuwadocs:z-10 tuwadocs:h-9 tuwadocs:w-9 tuwadocs:rounded-[var(--tuwa-rounded-corners)] tuwadocs:bg-[var(--tuwa-bg-primary)] tuwadocs:shadow-md tuwadocs:md:hidden",s?"tuwa-slide-dark":"tuwa-slide-light")}),jsxRuntime.jsx("div",{className:novaCore.cn("tuwadocs:absolute tuwadocs:top-[1px] tuwadocs:left-[2px] tuwadocs:z-10 tuwadocs:h-9 tuwadocs:w-9 tuwadocs:md:h-7 tuwadocs:md:w-7 tuwadocs:rounded-[var(--tuwa-rounded-corners)] tuwadocs:bg-[var(--tuwa-bg-primary)] tuwadocs:shadow-md tuwadocs:hidden tuwadocs:md:block",s?"tuwa-slide-dark":"tuwa-slide-light")}),jsxRuntime.jsxs("div",{className:"tuwadocs:relative tuwadocs:z-20 tuwadocs:flex tuwadocs:w-full tuwadocs:justify-between",children:[jsxRuntime.jsx("div",{className:"tuwadocs:flex tuwadocs:flex-1 tuwadocs:items-center tuwadocs:justify-center",children:jsxRuntime.jsx(solid.SunIcon,{className:`tuwadocs:h-6 tuwadocs:w-6 tuwadocs:relative tuwadocs:-left-[2px] tuwadocs:md:h-5 tuwadocs:md:w-5 tuwadocs:transition-colors tuwadocs:duration-300 ${s?"tuwadocs:text-slate-500 tuwadocs:group-hover:text-yellow-400":"tuwadocs:text-yellow-500"}`})}),jsxRuntime.jsx("div",{className:"tuwadocs:flex tuwadocs:flex-1 tuwadocs:justify-center",children:jsxRuntime.jsx(solid.MoonIcon,{className:`tuwadocs:h-6 tuwadocs:w-6 tuwadocs:relative tuwadocs:left-[2px] tuwadocs:md:h-5 tuwadocs:md:w-5 tuwadocs:transition-colors tuwadocs:duration-300 ${s?"tuwadocs:text-indigo-400":"tuwadocs:text-slate-500 tuwadocs:group-hover:text-indigo-300"}`})})]})]})}var Gt={"aspect-square":"tuwadocs:aspect-square","aspect-video":"tuwadocs:aspect-video","aspect-[4/3]":"tuwadocs:aspect-[4/3]","aspect-[3/2]":"tuwadocs:aspect-[3/2]","aspect-[21/9]":"tuwadocs:aspect-[21/9]"},jo=({src:e,poster:t,autoplay:a=false,muted:d=false,loop:r=false,controls:s=true,className:l="",aspectRatio:k="aspect-video",onPlay:p,onPause:c,onEnded:C,"aria-label":u})=>{let n=Gt[k]||"tuwadocs:aspect-video";return jsxRuntime.jsx("div",{className:novaCore.cn("tuwadocs:relative tuwadocs:w-full tuwadocs:overflow-hidden tuwadocs:rounded-[var(--tuwa-rounded-corners)] tuwadocs:bg-black tuwadocs:my-4",n,l),children:jsxRuntime.jsxs("video",{src:e,poster:t,controls:s,autoPlay:a,muted:d,loop:r,className:novaCore.cn("tuwadocs:absolute tuwadocs:inset-0 tuwadocs:h-full tuwadocs:w-full tuwadocs:object-contain","tuwadocs:transition-opacity tuwadocs:duration-200","tuwadocs:focus:outline-none tuwadocs:focus:ring-[length:var(--tuwa-ring-width)] tuwadocs:focus:ring-[var(--tuwa-text-accent)] tuwadocs:focus:ring-offset-[length:var(--tuwa-ring-width)] tuwadocs:focus:ring-offset-[var(--tuwa-bg-primary)]"),onPlay:p,onPause:c,onEnded:C,"aria-label":u,preload:"metadata",children:[jsxRuntime.jsx("track",{kind:"captions"}),"Your browser does not support the video tag. Please"," ",jsxRuntime.jsx("a",{href:e,download:true,className:"tuwadocs:text-[var(--tuwa-text-accent)] tuwadocs:underline tuwadocs:hover:opacity-80",children:"download the video"})," ","to watch it."]})})};
2
2
  exports.CodeBlock=V;exports.CodeHighlighter=G;exports.CopyIconButton=$;exports.Features=uo;exports.Footer=go;exports.Navbar=Po;exports.NoSSR=P;exports.PackageInstallationTabs=Do;exports.RemoteLogo=No;exports.StarryBackground=tt;exports.StyledLink=Go;exports.ThemeSwitcher=Qo;exports.VideoPlayer=jo;exports.baseFooterLinks=U;exports.baseNavLinks=q;Object.keys(novaCore).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return novaCore[k]}})});
package/dist/index.css CHANGED
@@ -1404,49 +1404,27 @@ article .nextra-border a:hover {
1404
1404
  transform: translateY(-1px);
1405
1405
  box-shadow: 0 4px 12px rgb(99 102 241 / 0.3);
1406
1406
  }
1407
- @keyframes slideToDarkMobile {
1407
+ @keyframes slideToDark {
1408
1408
  from {
1409
1409
  transform: translateX(0);
1410
1410
  }
1411
1411
  to {
1412
- transform: translateX(38px);
1412
+ transform: translateX(100%);
1413
1413
  }
1414
1414
  }
1415
- @keyframes slideToLightMobile {
1415
+ @keyframes slideToLight {
1416
1416
  from {
1417
- transform: translateX(38px);
1417
+ transform: translateX(100%);
1418
1418
  }
1419
1419
  to {
1420
1420
  transform: translateX(0);
1421
1421
  }
1422
1422
  }
1423
- @keyframes slideToDarkDesktop {
1424
- from {
1425
- transform: translateX(0);
1426
- }
1427
- to {
1428
- transform: translateX(30px);
1429
- }
1430
- }
1431
- @keyframes slideToLightDesktop {
1432
- from {
1433
- transform: translateX(30px);
1434
- }
1435
- to {
1436
- transform: translateX(0);
1437
- }
1438
- }
1439
- .tuwa-slide-dark-mobile {
1440
- animation: slideToDarkMobile 300ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
1441
- }
1442
- .tuwa-slide-light-mobile {
1443
- animation: slideToLightMobile 300ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
1444
- }
1445
- .tuwa-slide-dark-desktop {
1446
- animation: slideToDarkDesktop 300ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
1423
+ .tuwa-slide-dark {
1424
+ animation: slideToDark 300ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
1447
1425
  }
1448
- .tuwa-slide-light-desktop {
1449
- animation: slideToLightDesktop 300ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
1426
+ .tuwa-slide-light {
1427
+ animation: slideToLight 300ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
1450
1428
  }
1451
1429
  .tuwa-card {
1452
1430
  border-radius: var(--tuwa-rounded-corners);
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import {cn,useCopyToClipboard}from'@tuwaio/nova-core';export*from'@tuwaio/nova-core';import {CheckCircleIcon,Square2StackIcon,CommandLineIcon}from'@heroicons/react/24/outline';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {Prism}from'react-syntax-highlighter';import {materialOceanic,materialLight}from'react-syntax-highlighter/dist/esm/styles/prism';import Nt,{useState,useEffect,useRef}from'react';import {Footer,Navbar}from'nextra-theme-docs';import xt,{Element,domToReact}from'html-react-parser';import {Tabs}from'nextra/components';import {SunIcon,MoonIcon}from'@heroicons/react/24/solid';function $({isCopied:e,onCopy:t}){return jsx("button",{onClick:t,type:"button",className:cn("tuwadocs:h-6 tuwadocs:w-6 tuwadocs:cursor-pointer tuwadocs:transition-colors",e?"tuwadocs:text-[var(--tuwa-success-icon)]":"tuwadocs:text-[var(--tuwa-text-secondary)] tuwadocs:hover:text-[var(--tuwa-text-primary)]"),children:e?jsx(CheckCircleIcon,{}):jsx(Square2StackIcon,{})})}function V({title:e,titleIcons:t,children:a,textToCopy:d}){let{isCopied:r,copy:s}=useCopyToClipboard(1500);return jsxs("div",{className:cn("tuwadocs:group tuwadocs:overflow-hidden tuwadocs:rounded-[var(--tuwa-rounded-corners)] tuwadocs:border","tuwadocs:border-[var(--tuwa-border-secondary)] tuwadocs:bg-[var(--tuwa-bg-primary)]"),children:[jsxs("div",{className:cn("tuwadocs:flex tuwadocs:items-center tuwadocs:justify-between tuwadocs:gap-4 tuwadocs:px-4 tuwadocs:py-2","tuwadocs:border-b tuwadocs:border-[var(--tuwa-border-secondary)] tuwadocs:bg-[var(--tuwa-bg-secondary)]"),children:[jsxs("div",{className:"tuwadocs:flex tuwadocs:items-center tuwadocs:gap-2",children:[jsx("div",{className:"tuwadocs:h-[20px] tuwadocs:w-[20px] tuwadocs:text-[var(--tuwa-text-secondary)]",children:t}),jsx("p",{className:"tuwadocs:text-sm tuwadocs:font-medium tuwadocs:text-[var(--tuwa-text-primary)]",children:e})]}),jsx("div",{className:"tuwadocs:transition tuwadocs:md:opacity-0 tuwadocs:group-hover:opacity-100",children:jsx($,{isCopied:r,onCopy:()=>s(d)})})]}),a]})}function P({children:e}){let[t,a]=useState(false);return useEffect(()=>{a(true);},[]),t?jsx(Fragment,{children:e}):null}function G({children:e,language:t,resolvedTheme:a}){return jsx("div",{className:"tuwadocs:border-t tuwadocs:border-[var(--tuwa-border-secondary)]",children:jsx(P,{children:jsx(Prism,{language:t??"bash",customStyle:{margin:0,background:"transparent"},style:a==="dark"?materialOceanic:materialLight,children:String(e).replace(/\n$/,"")})})})}function uo({features:e}){return jsx("div",{className:"tuwadocs:grid tuwadocs:grid-cols-1 tuwadocs:md:grid-cols-3 tuwadocs:gap-6 tuwadocs:mt-12",children:e.map(t=>jsxs("div",{className:"tuwadocs:p-6 tuwadocs:border tuwadocs:rounded-[var(--tuwa-rounded-corners)] tuwadocs:hover:shadow-lg tuwadocs:transition-shadow",children:[jsx("div",{className:"tuwadocs:text-2xl tuwadocs:mb-3",children:t.icon}),jsx("h3",{className:"tuwadocs:text-lg tuwadocs:font-semibold tuwadocs:mb-2",children:t.title}),jsx("p",{className:"tuwadocs:text-[var(--tuwa-text-secondary)]",children:t.description})]},t.title))})}var q=[{title:"NPM",href:"https://npmjs.com/org/tuwaio",className:"tuwadocs:hover:text-red-600 tuwadocs:dark:hover:text-red-400",image:jsx("svg",{className:"tuwadocs:w-4 tuwadocs:h-4",fill:"currentColor",viewBox:"0 0 24 24",children:jsx("path",{d:"M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0H1.763zM5.13 5.323l13.837.019-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113l.017-13.847z"})})}],U=[{title:"NPM",href:"https://npmjs.com/org/tuwaio",className:"tuwa-footer-link--npm",image:jsx("svg",{className:"tuwadocs:w-4 tuwadocs:h-4",fill:"currentColor",viewBox:"0 0 24 24",children:jsx("path",{d:"M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0H1.763zM5.13 5.323l13.837.019-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113l.017-13.847z"})})},{title:"GitHub",href:"https://github.com/TuwaIO",className:"tuwa-footer-link--github",image:jsx("svg",{className:"tuwadocs:w-4 tuwadocs:h-4",fill:"currentColor",viewBox:"0 0 24 24",children:jsx("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"})})}];function go({links:e,logo:t}){return jsx(Footer,{children:jsxs("div",{className:"tuwadocs:flex tuwadocs:w-full tuwadocs:flex-col tuwadocs:items-center tuwadocs:sm:items-start tuwa-footer-border tuwadocs:pt-8",children:[jsxs("div",{className:"tuwadocs:mb-6 tuwadocs:flex tuwadocs:items-center tuwadocs:gap-4 tuwadocs:w-full tuwadocs:justify-between",children:[jsx("div",{className:"tuwadocs:flex tuwadocs:items-center",children:t}),jsx("div",{className:"tuwadocs:flex tuwadocs:items-center tuwadocs:gap-4 tuwadocs:text-sm",children:(e??U).map(({title:a,href:d,image:r,className:s})=>jsxs("a",{href:d,target:"_blank",rel:"noopener noreferrer",className:cn("tuwa-footer-link tuwadocs:flex tuwadocs:items-center tuwadocs:gap-1",s),children:[r,jsx("span",{className:"tuwadocs:hidden tuwadocs:sm:inline",children:a})]},a))})]}),jsxs("div",{className:"tuwadocs:w-full tuwa-footer-border tuwadocs:pt-4",children:[jsxs("div",{className:"tuwadocs:flex tuwadocs:flex-col tuwadocs:sm:flex-row tuwadocs:justify-between tuwadocs:items-start tuwadocs:sm:items-center tuwadocs:gap-4",children:[jsxs("div",{className:"tuwadocs:flex-1",children:[jsx("p",{className:"tuwa-footer-description",children:"The modular, headless-first Web3 infrastructure. Build self-custodial applications with zero vendor lock-in."}),jsx("p",{className:"tuwa-footer-license",children:"Licensed under Apache 2.0. Open source and free to use."})]}),jsxs("div",{className:"tuwa-footer-copyright",children:["\xA9 2025 - ",new Date().getFullYear()," TUWA. All rights reserved."]})]}),jsx("div",{className:"tuwadocs:flex tuwadocs:flex-wrap tuwadocs:items-center tuwadocs:gap-3 tuwadocs:mt-4 tuwadocs:pt-4 tuwa-footer-border"})]})]})})}var St="https://cdn.jsdelivr.net/gh/TuwaIO/workflows@main/preview/logo_v1.svg";async function No({url:e=St,className:t,style:a,...d}){let r;try{let c=await fetch(e,{next:{revalidate:86400}});if(!c.ok)throw new Error(`Failed to fetch SVG: ${c.status}`);r=await c.text();}catch(c){return console.error("RemoteLogo: Failed to fetch SVG from remote source:",c),jsx("svg",{className:t,style:a,...d})}let s=r.replace(/<\?xml[\s\S]*?\?>/g,"").replace(/<!DOCTYPE[\s\S]*?>/gi,"").replace(/\sxml:space=/g," xmlSpace=").trim(),l=xt(s,{replace(c){if(c instanceof Element&&c.name==="svg"){let C=domToReact(c.children),u={...c.attribs};"xmlspace"in u&&(u.xmlSpace=u.xmlspace,delete u.xmlspace);let n=[t,"remote-logo"].filter(Boolean).join(" ");return jsx("svg",{...u,className:n,style:a,...d,children:C})}}}),p=(Array.isArray(l)?l:[l]).find(c=>Nt.isValidElement(c)&&c.type==="svg");return p||jsx("svg",{className:t,style:a,...d})}function Po({links:e,logo:t}){return jsx(Navbar,{logo:t,children:jsx("div",{className:"tuwadocs:flex tuwadocs:items-center tuwadocs:gap-3",children:(e??q).map(({title:a,href:d,image:r,className:s})=>jsxs("a",{href:d,target:"_blank",rel:"noopener noreferrer",className:cn("tuwadocs:hidden tuwadocs:sm:flex tuwadocs:items-center tuwadocs:gap-1 tuwadocs:px-3 tuwadocs:py-1.5 tuwadocs:text-sm tuwadocs:font-medium tuwadocs:transition-colors tuwadocs:text-[var(--tuwa-text-primary)]",s),children:[r,a]},a))})})}var X=[{title:"pnpm",command:"pnpm add"},{title:"bun",command:"bun add"},{title:"npm",command:"npm install"},{title:"yarn",command:"yarn add"}];function Do({packagesList:e,resolvedTheme:t}){return jsx("div",{className:"tuwadocs:my-4",children:jsx(Tabs,{items:X.map(a=>a.title),children:X.map(a=>jsx(Tabs.Tab,{children:jsx(V,{title:"Terminal",titleIcons:jsx(CommandLineIcon,{}),textToCopy:`${a.command} ${e}`,children:jsx(G,{resolvedTheme:t,language:"bash",children:`${a.command} ${e}`})})},a.title))})})}var Et=100,Q=.9,Mt=2.7,K=.3,It=.5,Lt=.5,I=150,_t=I*I,J=2,Z=120,j=Z*Z,At=.75,Ot=.001;function tt(){let e=useRef(null),t=useRef({x:0,y:0}),a=useRef([]),d=useRef(null);return useEffect(()=>{let r=e.current;if(!r)return;let s=r.getContext("2d");if(!s)return;let l=()=>{r.width=window.innerWidth,r.height=window.innerHeight;},k=()=>{let n=[];for(let w=0;w<Et;w++)n.push({x:Math.random()*r.width,y:Math.random()*r.height,radius:Math.random()*(Mt-Q)+Q,vx:(Math.random()-.5)*K,vy:(Math.random()-.5)*K,opacity:Math.random()*Lt+It});return n},p=n=>{t.current.x=n.clientX,t.current.y=n.clientY;},c=()=>{l(),a.current=k();},C=n=>{s.clearRect(0,0,r.width,r.height);let w=a.current,F=t.current,H=document.documentElement.classList.contains("dark");for(let o of w){o.x+=o.vx,o.y+=o.vy,(o.x<0||o.x>r.width)&&(o.vx=-o.vx),(o.y<0||o.y>r.height)&&(o.vy=-o.vy);let m=F.x-o.x,f=F.y-o.y,v=m*m+f*f;if(v<_t){let y=Math.sqrt(v),R=(I-y)/I,at=m/y*R*J,st=f/y*R*J;o.x-=at,o.y-=st;}o.opacity=.3+Math.sin(n*Ot+o.x)*.5+.5;let g=Math.min(o.opacity,1),i=s.createRadialGradient(o.x,o.y,0,o.x,o.y,o.radius);H?(i.addColorStop(0,`rgba(255, 255, 255, ${g})`),i.addColorStop(.5,`rgba(147, 197, 253, ${g*.6})`),i.addColorStop(1,"rgba(59, 130, 246, 0)")):(i.addColorStop(0,`rgba(15, 23, 42, ${g})`),i.addColorStop(.5,`rgba(71, 85, 105, ${g*.6})`),i.addColorStop(1,"rgba(148, 163, 184, 0)")),s.beginPath(),s.arc(o.x,o.y,o.radius,0,Math.PI*2),s.fillStyle=i,s.fill();}s.lineWidth=At;for(let o=0;o<w.length;o++){let m=w[o];for(let f=o+1;f<w.length;f++){let v=w[f],g=m.x-v.x,i=m.y-v.y,y=g*g+i*i;if(y<j){let R=.2*(1-y/j);H?s.strokeStyle=`rgba(147, 197, 253, ${R})`:s.strokeStyle=`rgba(71, 85, 105, ${R*1.5})`,s.beginPath(),s.moveTo(m.x,m.y),s.lineTo(v.x,v.y),s.stroke();}}}},u=()=>{let n=Date.now();C(n),d.current=requestAnimationFrame(u);};return l(),a.current=k(),u(),window.addEventListener("mousemove",p),window.addEventListener("resize",c),()=>{d.current&&cancelAnimationFrame(d.current),window.removeEventListener("mousemove",p),window.removeEventListener("resize",c);}},[]),jsx("canvas",{ref:e,className:"tuwadocs:absolute tuwadocs:inset-0 tuwadocs:w-full tuwadocs:h-full tuwadocs:bg-gradient-to-b tuwadocs:from-slate-200 tuwadocs:to-slate-350 tuwadocs:dark:from-[#0a0e27] tuwadocs:dark:to-[#1a1f3a]"})}function Go({href:e,children:t}){return jsx("a",{className:cn("tuwadocs:font-medium tuwadocs:text-[var(--tuwa-text-accent)]","tuwadocs:transition-all tuwadocs:hover:underline tuwadocs:underline-offset-4"),href:e,target:"_blank",rel:"noopener noreferrer",children:t})}function Qo({theme:e,onToggle:t}){let[a,d]=useState(false);useEffect(()=>{d(true);},[]);let r="tuwadocs:bg-black/5 tuwadocs:border-black/5 tuwadocs:hover:bg-black/10 tuwadocs:dark:bg-white/10 tuwadocs:dark:border-white/10 tuwadocs:dark:hover:bg-white/20";if(!a)return jsx("div",{className:cn("tuwadocs:relative tuwadocs:flex tuwadocs:h-10 tuwadocs:w-20 tuwadocs:md:h-8 tuwadocs:md:w-16 tuwadocs:rounded-[var(--tuwa-rounded-corners)] tuwadocs:border tuwadocs:opacity-0",r)});let s=e==="dark";return jsxs("button",{onClick:t,className:cn("tuwadocs:group tuwadocs:relative tuwadocs:flex tuwadocs:h-10 tuwadocs:w-20 tuwadocs:md:h-8 tuwadocs:md:w-16 tuwadocs:cursor-pointer tuwadocs:items-center tuwadocs:rounded-[var(--tuwa-rounded-corners)] tuwadocs:p-1 tuwadocs:transition-all tuwadocs:duration-300 tuwadocs:ease-in-out tuwadocs:backdrop-blur-sm tuwadocs:border",r),"aria-label":"Toggle theme",children:[jsx("div",{className:cn("tuwadocs:absolute tuwadocs:top-[1px] tuwadocs:left-[2px] tuwadocs:z-10 tuwadocs:h-9 tuwadocs:w-9 tuwadocs:rounded-[var(--tuwa-rounded-corners)] tuwadocs:bg-[var(--tuwa-bg-primary)] tuwadocs:shadow-md tuwadocs:md:hidden",s?"tuwa-slide-dark-mobile":"tuwa-slide-light-mobile")}),jsx("div",{className:cn("tuwadocs:absolute tuwadocs:top-[1px] tuwadocs:left-[2px] tuwadocs:z-10 tuwadocs:h-9 tuwadocs:w-9 tuwadocs:md:h-7 tuwadocs:md:w-7 tuwadocs:rounded-[var(--tuwa-rounded-corners)] tuwadocs:bg-[var(--tuwa-bg-primary)] tuwadocs:shadow-md tuwadocs:hidden tuwadocs:md:block",s?"tuwa-slide-dark-desktop":"tuwa-slide-light-desktop")}),jsxs("div",{className:"tuwadocs:relative tuwadocs:z-20 tuwadocs:flex tuwadocs:w-full tuwadocs:justify-between",children:[jsx("div",{className:"tuwadocs:flex tuwadocs:flex-1 tuwadocs:items-center tuwadocs:justify-center",children:jsx(SunIcon,{className:`tuwadocs:h-6 tuwadocs:w-6 tuwadocs:relative tuwadocs:-left-[2px] tuwadocs:md:h-5 tuwadocs:md:w-5 tuwadocs:transition-colors tuwadocs:duration-300 ${s?"tuwadocs:text-slate-500 tuwadocs:group-hover:text-yellow-400":"tuwadocs:text-yellow-500"}`})}),jsx("div",{className:"tuwadocs:flex tuwadocs:flex-1 tuwadocs:justify-center",children:jsx(MoonIcon,{className:`tuwadocs:h-6 tuwadocs:w-6 tuwadocs:relative tuwadocs:left-[2px] tuwadocs:md:h-5 tuwadocs:md:w-5 tuwadocs:transition-colors tuwadocs:duration-300 ${s?"tuwadocs:text-indigo-400":"tuwadocs:text-slate-500 tuwadocs:group-hover:text-indigo-300"}`})})]})]})}var Gt={"aspect-square":"tuwadocs:aspect-square","aspect-video":"tuwadocs:aspect-video","aspect-[4/3]":"tuwadocs:aspect-[4/3]","aspect-[3/2]":"tuwadocs:aspect-[3/2]","aspect-[21/9]":"tuwadocs:aspect-[21/9]"},jo=({src:e,poster:t,autoplay:a=false,muted:d=false,loop:r=false,controls:s=true,className:l="",aspectRatio:k="aspect-video",onPlay:p,onPause:c,onEnded:C,"aria-label":u})=>{let n=Gt[k]||"tuwadocs:aspect-video";return jsx("div",{className:cn("tuwadocs:relative tuwadocs:w-full tuwadocs:overflow-hidden tuwadocs:rounded-[var(--tuwa-rounded-corners)] tuwadocs:bg-black tuwadocs:my-4",n,l),children:jsxs("video",{src:e,poster:t,controls:s,autoPlay:a,muted:d,loop:r,className:cn("tuwadocs:absolute tuwadocs:inset-0 tuwadocs:h-full tuwadocs:w-full tuwadocs:object-contain","tuwadocs:transition-opacity tuwadocs:duration-200","tuwadocs:focus:outline-none tuwadocs:focus:ring-[length:var(--tuwa-ring-width)] tuwadocs:focus:ring-[var(--tuwa-text-accent)] tuwadocs:focus:ring-offset-[length:var(--tuwa-ring-width)] tuwadocs:focus:ring-offset-[var(--tuwa-bg-primary)]"),onPlay:p,onPause:c,onEnded:C,"aria-label":u,preload:"metadata",children:[jsx("track",{kind:"captions"}),"Your browser does not support the video tag. Please"," ",jsx("a",{href:e,download:true,className:"tuwadocs:text-[var(--tuwa-text-accent)] tuwadocs:underline tuwadocs:hover:opacity-80",children:"download the video"})," ","to watch it."]})})};
1
+ import {cn,useCopyToClipboard}from'@tuwaio/nova-core';export*from'@tuwaio/nova-core';import {CheckCircleIcon,Square2StackIcon,CommandLineIcon}from'@heroicons/react/24/outline';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {Prism}from'react-syntax-highlighter';import {materialOceanic,materialLight}from'react-syntax-highlighter/dist/esm/styles/prism';import Nt,{useState,useEffect,useRef}from'react';import {Footer,Navbar}from'nextra-theme-docs';import xt,{Element,domToReact}from'html-react-parser';import {Tabs}from'nextra/components';import {SunIcon,MoonIcon}from'@heroicons/react/24/solid';function $({isCopied:e,onCopy:t}){return jsx("button",{onClick:t,type:"button",className:cn("tuwadocs:h-6 tuwadocs:w-6 tuwadocs:cursor-pointer tuwadocs:transition-colors",e?"tuwadocs:text-[var(--tuwa-success-icon)]":"tuwadocs:text-[var(--tuwa-text-secondary)] tuwadocs:hover:text-[var(--tuwa-text-primary)]"),children:e?jsx(CheckCircleIcon,{}):jsx(Square2StackIcon,{})})}function V({title:e,titleIcons:t,children:a,textToCopy:d}){let{isCopied:r,copy:s}=useCopyToClipboard(1500);return jsxs("div",{className:cn("tuwadocs:group tuwadocs:overflow-hidden tuwadocs:rounded-[var(--tuwa-rounded-corners)] tuwadocs:border","tuwadocs:border-[var(--tuwa-border-secondary)] tuwadocs:bg-[var(--tuwa-bg-primary)]"),children:[jsxs("div",{className:cn("tuwadocs:flex tuwadocs:items-center tuwadocs:justify-between tuwadocs:gap-4 tuwadocs:px-4 tuwadocs:py-2","tuwadocs:border-b tuwadocs:border-[var(--tuwa-border-secondary)] tuwadocs:bg-[var(--tuwa-bg-secondary)]"),children:[jsxs("div",{className:"tuwadocs:flex tuwadocs:items-center tuwadocs:gap-2",children:[jsx("div",{className:"tuwadocs:h-[20px] tuwadocs:w-[20px] tuwadocs:text-[var(--tuwa-text-secondary)]",children:t}),jsx("p",{className:"tuwadocs:text-sm tuwadocs:font-medium tuwadocs:text-[var(--tuwa-text-primary)]",children:e})]}),jsx("div",{className:"tuwadocs:transition tuwadocs:md:opacity-0 tuwadocs:group-hover:opacity-100",children:jsx($,{isCopied:r,onCopy:()=>s(d)})})]}),a]})}function P({children:e}){let[t,a]=useState(false);return useEffect(()=>{a(true);},[]),t?jsx(Fragment,{children:e}):null}function G({children:e,language:t,resolvedTheme:a}){return jsx("div",{className:"tuwadocs:border-t tuwadocs:border-[var(--tuwa-border-secondary)]",children:jsx(P,{children:jsx(Prism,{language:t??"bash",customStyle:{margin:0,background:"transparent"},style:a==="dark"?materialOceanic:materialLight,children:String(e).replace(/\n$/,"")})})})}function uo({features:e}){return jsx("div",{className:"tuwadocs:grid tuwadocs:grid-cols-1 tuwadocs:md:grid-cols-3 tuwadocs:gap-6 tuwadocs:mt-12",children:e.map(t=>jsxs("div",{className:"tuwadocs:p-6 tuwadocs:border tuwadocs:rounded-[var(--tuwa-rounded-corners)] tuwadocs:hover:shadow-lg tuwadocs:transition-shadow",children:[jsx("div",{className:"tuwadocs:text-2xl tuwadocs:mb-3",children:t.icon}),jsx("h3",{className:"tuwadocs:text-lg tuwadocs:font-semibold tuwadocs:mb-2",children:t.title}),jsx("p",{className:"tuwadocs:text-[var(--tuwa-text-secondary)]",children:t.description})]},t.title))})}var q=[{title:"NPM",href:"https://npmjs.com/org/tuwaio",className:"tuwadocs:hover:text-red-600 tuwadocs:dark:hover:text-red-400",image:jsx("svg",{className:"tuwadocs:w-4 tuwadocs:h-4",fill:"currentColor",viewBox:"0 0 24 24",children:jsx("path",{d:"M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0H1.763zM5.13 5.323l13.837.019-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113l.017-13.847z"})})}],U=[{title:"NPM",href:"https://npmjs.com/org/tuwaio",className:"tuwa-footer-link--npm",image:jsx("svg",{className:"tuwadocs:w-4 tuwadocs:h-4",fill:"currentColor",viewBox:"0 0 24 24",children:jsx("path",{d:"M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0H1.763zM5.13 5.323l13.837.019-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113l.017-13.847z"})})},{title:"GitHub",href:"https://github.com/TuwaIO",className:"tuwa-footer-link--github",image:jsx("svg",{className:"tuwadocs:w-4 tuwadocs:h-4",fill:"currentColor",viewBox:"0 0 24 24",children:jsx("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"})})}];function go({links:e,logo:t}){return jsx(Footer,{children:jsxs("div",{className:"tuwadocs:flex tuwadocs:w-full tuwadocs:flex-col tuwadocs:items-center tuwadocs:sm:items-start tuwa-footer-border tuwadocs:pt-8",children:[jsxs("div",{className:"tuwadocs:mb-6 tuwadocs:flex tuwadocs:items-center tuwadocs:gap-4 tuwadocs:w-full tuwadocs:justify-between",children:[jsx("div",{className:"tuwadocs:flex tuwadocs:items-center",children:t}),jsx("div",{className:"tuwadocs:flex tuwadocs:items-center tuwadocs:gap-4 tuwadocs:text-sm",children:(e??U).map(({title:a,href:d,image:r,className:s})=>jsxs("a",{href:d,target:"_blank",rel:"noopener noreferrer",className:cn("tuwa-footer-link tuwadocs:flex tuwadocs:items-center tuwadocs:gap-1",s),children:[r,jsx("span",{className:"tuwadocs:hidden tuwadocs:sm:inline",children:a})]},a))})]}),jsxs("div",{className:"tuwadocs:w-full tuwa-footer-border tuwadocs:pt-4",children:[jsxs("div",{className:"tuwadocs:flex tuwadocs:flex-col tuwadocs:sm:flex-row tuwadocs:justify-between tuwadocs:items-start tuwadocs:sm:items-center tuwadocs:gap-4",children:[jsxs("div",{className:"tuwadocs:flex-1",children:[jsx("p",{className:"tuwa-footer-description",children:"The modular, headless-first Web3 infrastructure. Build self-custodial applications with zero vendor lock-in."}),jsx("p",{className:"tuwa-footer-license",children:"Licensed under Apache 2.0. Open source and free to use."})]}),jsxs("div",{className:"tuwa-footer-copyright",children:["\xA9 2025 - ",new Date().getFullYear()," TUWA. All rights reserved."]})]}),jsx("div",{className:"tuwadocs:flex tuwadocs:flex-wrap tuwadocs:items-center tuwadocs:gap-3 tuwadocs:mt-4 tuwadocs:pt-4 tuwa-footer-border"})]})]})})}var St="https://cdn.jsdelivr.net/gh/TuwaIO/workflows@main/preview/logo_v1.svg";async function No({url:e=St,className:t,style:a,...d}){let r;try{let c=await fetch(e,{next:{revalidate:86400}});if(!c.ok)throw new Error(`Failed to fetch SVG: ${c.status}`);r=await c.text();}catch(c){return console.error("RemoteLogo: Failed to fetch SVG from remote source:",c),jsx("svg",{className:t,style:a,...d})}let s=r.replace(/<\?xml[\s\S]*?\?>/g,"").replace(/<!DOCTYPE[\s\S]*?>/gi,"").replace(/\sxml:space=/g," xmlSpace=").trim(),l=xt(s,{replace(c){if(c instanceof Element&&c.name==="svg"){let C=domToReact(c.children),u={...c.attribs};"xmlspace"in u&&(u.xmlSpace=u.xmlspace,delete u.xmlspace);let n=[t,"remote-logo"].filter(Boolean).join(" ");return jsx("svg",{...u,className:n,style:a,...d,children:C})}}}),p=(Array.isArray(l)?l:[l]).find(c=>Nt.isValidElement(c)&&c.type==="svg");return p||jsx("svg",{className:t,style:a,...d})}function Po({links:e,logo:t}){return jsx(Navbar,{logo:t,children:jsx("div",{className:"tuwadocs:flex tuwadocs:items-center tuwadocs:gap-3",children:(e??q).map(({title:a,href:d,image:r,className:s})=>jsxs("a",{href:d,target:"_blank",rel:"noopener noreferrer",className:cn("tuwadocs:hidden tuwadocs:sm:flex tuwadocs:items-center tuwadocs:gap-1 tuwadocs:px-3 tuwadocs:py-1.5 tuwadocs:text-sm tuwadocs:font-medium tuwadocs:transition-colors tuwadocs:text-[var(--tuwa-text-primary)]",s),children:[r,a]},a))})})}var X=[{title:"pnpm",command:"pnpm add"},{title:"bun",command:"bun add"},{title:"npm",command:"npm install"},{title:"yarn",command:"yarn add"}];function Do({packagesList:e,resolvedTheme:t}){return jsx("div",{className:"tuwadocs:my-4",children:jsx(Tabs,{items:X.map(a=>a.title),children:X.map(a=>jsx(Tabs.Tab,{children:jsx(V,{title:"Terminal",titleIcons:jsx(CommandLineIcon,{}),textToCopy:`${a.command} ${e}`,children:jsx(G,{resolvedTheme:t,language:"bash",children:`${a.command} ${e}`})})},a.title))})})}var Et=100,Q=.9,Mt=2.7,K=.3,It=.5,Lt=.5,I=150,_t=I*I,J=2,Z=120,j=Z*Z,At=.75,Ot=.001;function tt(){let e=useRef(null),t=useRef({x:0,y:0}),a=useRef([]),d=useRef(null);return useEffect(()=>{let r=e.current;if(!r)return;let s=r.getContext("2d");if(!s)return;let l=()=>{r.width=window.innerWidth,r.height=window.innerHeight;},k=()=>{let n=[];for(let w=0;w<Et;w++)n.push({x:Math.random()*r.width,y:Math.random()*r.height,radius:Math.random()*(Mt-Q)+Q,vx:(Math.random()-.5)*K,vy:(Math.random()-.5)*K,opacity:Math.random()*Lt+It});return n},p=n=>{t.current.x=n.clientX,t.current.y=n.clientY;},c=()=>{l(),a.current=k();},C=n=>{s.clearRect(0,0,r.width,r.height);let w=a.current,F=t.current,H=document.documentElement.classList.contains("dark");for(let o of w){o.x+=o.vx,o.y+=o.vy,(o.x<0||o.x>r.width)&&(o.vx=-o.vx),(o.y<0||o.y>r.height)&&(o.vy=-o.vy);let m=F.x-o.x,f=F.y-o.y,v=m*m+f*f;if(v<_t){let y=Math.sqrt(v),R=(I-y)/I,at=m/y*R*J,st=f/y*R*J;o.x-=at,o.y-=st;}o.opacity=.3+Math.sin(n*Ot+o.x)*.5+.5;let g=Math.min(o.opacity,1),i=s.createRadialGradient(o.x,o.y,0,o.x,o.y,o.radius);H?(i.addColorStop(0,`rgba(255, 255, 255, ${g})`),i.addColorStop(.5,`rgba(147, 197, 253, ${g*.6})`),i.addColorStop(1,"rgba(59, 130, 246, 0)")):(i.addColorStop(0,`rgba(15, 23, 42, ${g})`),i.addColorStop(.5,`rgba(71, 85, 105, ${g*.6})`),i.addColorStop(1,"rgba(148, 163, 184, 0)")),s.beginPath(),s.arc(o.x,o.y,o.radius,0,Math.PI*2),s.fillStyle=i,s.fill();}s.lineWidth=At;for(let o=0;o<w.length;o++){let m=w[o];for(let f=o+1;f<w.length;f++){let v=w[f],g=m.x-v.x,i=m.y-v.y,y=g*g+i*i;if(y<j){let R=.2*(1-y/j);H?s.strokeStyle=`rgba(147, 197, 253, ${R})`:s.strokeStyle=`rgba(71, 85, 105, ${R*1.5})`,s.beginPath(),s.moveTo(m.x,m.y),s.lineTo(v.x,v.y),s.stroke();}}}},u=()=>{let n=Date.now();C(n),d.current=requestAnimationFrame(u);};return l(),a.current=k(),u(),window.addEventListener("mousemove",p),window.addEventListener("resize",c),()=>{d.current&&cancelAnimationFrame(d.current),window.removeEventListener("mousemove",p),window.removeEventListener("resize",c);}},[]),jsx("canvas",{ref:e,className:"tuwadocs:absolute tuwadocs:inset-0 tuwadocs:w-full tuwadocs:h-full tuwadocs:bg-gradient-to-b tuwadocs:from-slate-200 tuwadocs:to-slate-350 tuwadocs:dark:from-[#0a0e27] tuwadocs:dark:to-[#1a1f3a]"})}function Go({href:e,children:t}){return jsx("a",{className:cn("tuwadocs:font-medium tuwadocs:text-[var(--tuwa-text-accent)]","tuwadocs:transition-all tuwadocs:hover:underline tuwadocs:underline-offset-4"),href:e,target:"_blank",rel:"noopener noreferrer",children:t})}function Qo({theme:e,onToggle:t}){let[a,d]=useState(false);useEffect(()=>{d(true);},[]);let r="tuwadocs:bg-black/5 tuwadocs:border-black/5 tuwadocs:hover:bg-black/10 tuwadocs:dark:bg-white/10 tuwadocs:dark:border-white/10 tuwadocs:dark:hover:bg-white/20";if(!a)return jsx("div",{className:cn("tuwadocs:relative tuwadocs:flex tuwadocs:h-10 tuwadocs:w-20 tuwadocs:md:h-8 tuwadocs:md:w-16 tuwadocs:rounded-[var(--tuwa-rounded-corners)] tuwadocs:border tuwadocs:opacity-0",r)});let s=e==="dark";return jsxs("button",{onClick:t,className:cn("tuwadocs:group tuwadocs:relative tuwadocs:flex tuwadocs:h-10 tuwadocs:w-20 tuwadocs:md:h-8 tuwadocs:md:w-16 tuwadocs:cursor-pointer tuwadocs:items-center tuwadocs:rounded-[var(--tuwa-rounded-corners)] tuwadocs:p-1 tuwadocs:transition-all tuwadocs:duration-300 tuwadocs:ease-in-out tuwadocs:backdrop-blur-sm tuwadocs:border",r),"aria-label":"Toggle theme",children:[jsx("div",{className:cn("tuwadocs:absolute tuwadocs:top-[1px] tuwadocs:left-[2px] tuwadocs:z-10 tuwadocs:h-9 tuwadocs:w-9 tuwadocs:rounded-[var(--tuwa-rounded-corners)] tuwadocs:bg-[var(--tuwa-bg-primary)] tuwadocs:shadow-md tuwadocs:md:hidden",s?"tuwa-slide-dark":"tuwa-slide-light")}),jsx("div",{className:cn("tuwadocs:absolute tuwadocs:top-[1px] tuwadocs:left-[2px] tuwadocs:z-10 tuwadocs:h-9 tuwadocs:w-9 tuwadocs:md:h-7 tuwadocs:md:w-7 tuwadocs:rounded-[var(--tuwa-rounded-corners)] tuwadocs:bg-[var(--tuwa-bg-primary)] tuwadocs:shadow-md tuwadocs:hidden tuwadocs:md:block",s?"tuwa-slide-dark":"tuwa-slide-light")}),jsxs("div",{className:"tuwadocs:relative tuwadocs:z-20 tuwadocs:flex tuwadocs:w-full tuwadocs:justify-between",children:[jsx("div",{className:"tuwadocs:flex tuwadocs:flex-1 tuwadocs:items-center tuwadocs:justify-center",children:jsx(SunIcon,{className:`tuwadocs:h-6 tuwadocs:w-6 tuwadocs:relative tuwadocs:-left-[2px] tuwadocs:md:h-5 tuwadocs:md:w-5 tuwadocs:transition-colors tuwadocs:duration-300 ${s?"tuwadocs:text-slate-500 tuwadocs:group-hover:text-yellow-400":"tuwadocs:text-yellow-500"}`})}),jsx("div",{className:"tuwadocs:flex tuwadocs:flex-1 tuwadocs:justify-center",children:jsx(MoonIcon,{className:`tuwadocs:h-6 tuwadocs:w-6 tuwadocs:relative tuwadocs:left-[2px] tuwadocs:md:h-5 tuwadocs:md:w-5 tuwadocs:transition-colors tuwadocs:duration-300 ${s?"tuwadocs:text-indigo-400":"tuwadocs:text-slate-500 tuwadocs:group-hover:text-indigo-300"}`})})]})]})}var Gt={"aspect-square":"tuwadocs:aspect-square","aspect-video":"tuwadocs:aspect-video","aspect-[4/3]":"tuwadocs:aspect-[4/3]","aspect-[3/2]":"tuwadocs:aspect-[3/2]","aspect-[21/9]":"tuwadocs:aspect-[21/9]"},jo=({src:e,poster:t,autoplay:a=false,muted:d=false,loop:r=false,controls:s=true,className:l="",aspectRatio:k="aspect-video",onPlay:p,onPause:c,onEnded:C,"aria-label":u})=>{let n=Gt[k]||"tuwadocs:aspect-video";return jsx("div",{className:cn("tuwadocs:relative tuwadocs:w-full tuwadocs:overflow-hidden tuwadocs:rounded-[var(--tuwa-rounded-corners)] tuwadocs:bg-black tuwadocs:my-4",n,l),children:jsxs("video",{src:e,poster:t,controls:s,autoPlay:a,muted:d,loop:r,className:cn("tuwadocs:absolute tuwadocs:inset-0 tuwadocs:h-full tuwadocs:w-full tuwadocs:object-contain","tuwadocs:transition-opacity tuwadocs:duration-200","tuwadocs:focus:outline-none tuwadocs:focus:ring-[length:var(--tuwa-ring-width)] tuwadocs:focus:ring-[var(--tuwa-text-accent)] tuwadocs:focus:ring-offset-[length:var(--tuwa-ring-width)] tuwadocs:focus:ring-offset-[var(--tuwa-bg-primary)]"),onPlay:p,onPause:c,onEnded:C,"aria-label":u,preload:"metadata",children:[jsx("track",{kind:"captions"}),"Your browser does not support the video tag. Please"," ",jsx("a",{href:e,download:true,className:"tuwadocs:text-[var(--tuwa-text-accent)] tuwadocs:underline tuwadocs:hover:opacity-80",children:"download the video"})," ","to watch it."]})})};
2
2
  export{V as CodeBlock,G as CodeHighlighter,$ as CopyIconButton,uo as Features,go as Footer,Po as Navbar,P as NoSSR,Do as PackageInstallationTabs,No as RemoteLogo,tt as StarryBackground,Go as StyledLink,Qo as ThemeSwitcher,jo as VideoPlayer,U as baseFooterLinks,q as baseNavLinks};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tuwaio/docs-ui",
3
- "version": "0.0.28",
3
+ "version": "0.0.29",
4
4
  "private": false,
5
5
  "author": "Oleksandr Tkach",
6
6
  "license": "Apache-2.0",