@tuwaio/docs-ui 0.0.26 → 0.0.28
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 +2 -2
- package/dist/index.css +53 -6
- package/dist/index.d.cts +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.js +2 -2
- package/package.json +1 -1
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:t,onCopy:o}){return jsxRuntime.jsx("button",{onClick:o,type:"button",className:novaCore.cn("tuwadocs:h-6 tuwadocs:w-6 tuwadocs:cursor-pointer tuwadocs:transition-colors",t?"tuwadocs:text-[var(--tuwa-success-icon)]":"tuwadocs:text-[var(--tuwa-text-secondary)] tuwadocs:hover:text-[var(--tuwa-text-primary)]"),children:t?jsxRuntime.jsx(outline.CheckCircleIcon,{}):jsxRuntime.jsx(outline.Square2StackIcon,{})})}function G({title:t,titleIcons:o,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:o}),jsxRuntime.jsx("p",{className:"tuwadocs:text-sm tuwadocs:font-medium tuwadocs:text-[var(--tuwa-text-primary)]",children:t})]}),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:t}){let[o,a]=Nt.useState(false);return Nt.useEffect(()=>{a(true);},[]),o?jsxRuntime.jsx(jsxRuntime.Fragment,{children:t}):null}function X({children:t,language:o,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:o??"bash",customStyle:{margin:0,background:"transparent"},style:a==="dark"?prism.materialOceanic:prism.materialLight,children:String(t).replace(/\n$/,"")})})})}function lo({features:t}){return jsxRuntime.jsx("div",{className:"tuwadocs:grid tuwadocs:grid-cols-1 tuwadocs:md:grid-cols-3 tuwadocs:gap-6 tuwadocs:mt-12",children:t.map(o=>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:o.icon}),jsxRuntime.jsx("h3",{className:"tuwadocs:text-lg tuwadocs:font-semibold tuwadocs:mb-2",children:o.title}),jsxRuntime.jsx("p",{className:"tuwadocs:text-[var(--tuwa-text-secondary)]",children:o.description})]},o.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 xo({links:t,logo:o}){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:o}),jsxRuntime.jsx("div",{className:"tuwadocs:flex tuwadocs:items-center tuwadocs:gap-4 tuwadocs:text-sm",children:(t??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 Co({url:t=St,className:o,style:a,...d}){let r;try{let c=await fetch(t,{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:o,style:a,...d})}let s=r.replace(/<\?xml[\s\S]*?\?>/g,"").replace(/<!DOCTYPE[\s\S]*?>/gi,"").replace(/\sxml:space=/g," xmlSpace=").trim(),w=xt__default.default(s,{replace(c){if(c instanceof xt.Element&&c.name==="svg"){let k=xt.domToReact(c.children),u={...c.attribs};"xmlspace"in u&&(u.xmlSpace=u.xmlspace,delete u.xmlspace);let n=[o,"remote-logo"].filter(Boolean).join(" ");return jsxRuntime.jsx("svg",{...u,className:n,style:a,...d,children:k})}}}),f=(Array.isArray(w)?w:[w]).find(c=>Nt__default.default.isValidElement(c)&&c.type==="svg");return f||jsxRuntime.jsx("svg",{className:o,style:a,...d})}function Mo({links:t,logo:o}){return jsxRuntime.jsx(nextraThemeDocs.Navbar,{logo:o,children:jsxRuntime.jsx("div",{className:"tuwadocs:flex tuwadocs:items-center tuwadocs:gap-3",children:(t??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 Q=[{title:"pnpm",command:"pnpm add"},{title:"bun",command:"bun add"},{title:"npm",command:"npm install"},{title:"yarn",command:"yarn add"}];function zo({packagesList:t,resolvedTheme:o}){return jsxRuntime.jsx("div",{className:"tuwadocs:my-4",children:jsxRuntime.jsx(components.Tabs,{items:Q.map(a=>a.title),children:Q.map(a=>jsxRuntime.jsx(components.Tabs.Tab,{children:jsxRuntime.jsx(G,{title:"Terminal",titleIcons:jsxRuntime.jsx(outline.CommandLineIcon,{}),textToCopy:`${a.command} ${t}`,children:jsxRuntime.jsx(X,{resolvedTheme:o,language:"bash",children:`${a.command} ${t}`})})},a.title))})})}function Vo({href:t,children:o}){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:t,target:"_blank",rel:"noopener noreferrer",children:o})}var Mt={"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]"},Uo=({src:t,poster:o,autoplay:a=false,muted:d=false,loop:r=false,controls:s=true,className:w="",aspectRatio:C="aspect-video",onPlay:f,onPause:c,onEnded:k,"aria-label":u})=>{let n=Mt[C]||"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,w),children:jsxRuntime.jsxs("video",{src:t,poster:o,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:f,onPause:c,onEnded:k,"aria-label":u,preload:"metadata",children:[jsxRuntime.jsx("track",{kind:"captions"}),"Your browser does not support the video tag. Please"," ",jsxRuntime.jsx("a",{href:t,download:true,className:"tuwadocs:text-[var(--tuwa-text-accent)] tuwadocs:underline tuwadocs:hover:opacity-80",children:"download the video"})," ","to watch it."]})})};function D({children:t}){let[o,a]=Nt.useState(false);return Nt.useEffect(()=>{a(true);},[]),o?jsxRuntime.jsx(jsxRuntime.Fragment,{children:t}):null}function Zo({theme:t,onToggle:o}){return jsxRuntime.jsxs("button",{onClick:o,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","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"),"aria-label":"Toggle theme",children:[jsxRuntime.jsxs(D,{children:[jsxRuntime.jsx("div",{className:"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",style:{transform:t==="dark"?"translateX(38px)":"translateX(0)",transition:"transform 450ms cubic-bezier(0.34, 1.56, 0.64, 1)"}}),jsxRuntime.jsx("div",{className:"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",style:{transform:t==="dark"?"translateX(30px)":"translateX(0)",transition:"transform 450ms cubic-bezier(0.34, 1.56, 0.64, 1)"}})]}),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(D,{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 ${t==="light"?"tuwadocs:text-yellow-500":"tuwadocs:text-slate-500 tuwadocs:group-hover:text-yellow-400"}`})})}),jsxRuntime.jsx("div",{className:"tuwadocs:flex tuwadocs:flex-1 tuwadocs:justify-center",children:jsxRuntime.jsx(D,{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 ${t==="dark"?"tuwadocs:text-indigo-400":"tuwadocs:text-slate-500 tuwadocs:group-hover:text-indigo-300"}`})})})]})]})}var Ft=100,J=.9,Ht=2.7,Z=.3,$t=.5,Vt=.5,I=150,Gt=I*I,j=2,tt=120,ot=tt*tt,Xt=.75,qt=.001;function et(){let t=Nt.useRef(null),o=Nt.useRef({x:0,y:0}),a=Nt.useRef([]),d=Nt.useRef(null);return Nt.useEffect(()=>{let r=t.current;if(!r)return;let s=r.getContext("2d");if(!s)return;let w=()=>{r.width=window.innerWidth,r.height=window.innerHeight;},C=()=>{let n=[];for(let m=0;m<Ft;m++)n.push({x:Math.random()*r.width,y:Math.random()*r.height,radius:Math.random()*(Ht-J)+J,vx:(Math.random()-.5)*Z,vy:(Math.random()-.5)*Z,opacity:Math.random()*Vt+$t});return n},f=n=>{o.current.x=n.clientX,o.current.y=n.clientY;},c=()=>{w(),a.current=C();},k=n=>{s.clearRect(0,0,r.width,r.height);let m=a.current,F=o.current,H=document.documentElement.classList.contains("dark");for(let e of m){e.x+=e.vx,e.y+=e.vy,(e.x<0||e.x>r.width)&&(e.vx=-e.vx),(e.y<0||e.y>r.height)&&(e.vy=-e.vy);let p=F.x-e.x,v=F.y-e.y,g=p*p+v*v;if(g<Gt){let y=Math.sqrt(g),R=(I-y)/I,at=p/y*R*j,st=v/y*R*j;e.x-=at,e.y-=st;}e.opacity=.3+Math.sin(n*qt+e.x)*.5+.5;let h=Math.min(e.opacity,1),i=s.createRadialGradient(e.x,e.y,0,e.x,e.y,e.radius);H?(i.addColorStop(0,`rgba(255, 255, 255, ${h})`),i.addColorStop(.5,`rgba(147, 197, 253, ${h*.6})`),i.addColorStop(1,"rgba(59, 130, 246, 0)")):(i.addColorStop(0,`rgba(15, 23, 42, ${h})`),i.addColorStop(.5,`rgba(71, 85, 105, ${h*.6})`),i.addColorStop(1,"rgba(148, 163, 184, 0)")),s.beginPath(),s.arc(e.x,e.y,e.radius,0,Math.PI*2),s.fillStyle=i,s.fill();}s.lineWidth=Xt;for(let e=0;e<m.length;e++){let p=m[e];for(let v=e+1;v<m.length;v++){let g=m[v],h=p.x-g.x,i=p.y-g.y,y=h*h+i*i;if(y<ot){let R=.2*(1-y/ot);H?s.strokeStyle=`rgba(147, 197, 253, ${R})`:s.strokeStyle=`rgba(71, 85, 105, ${R*1.5})`,s.beginPath(),s.moveTo(p.x,p.y),s.lineTo(g.x,g.y),s.stroke();}}}},u=()=>{let n=Date.now();k(n),d.current=requestAnimationFrame(u);};return w(),a.current=C(),u(),window.addEventListener("mousemove",f),window.addEventListener("resize",c),()=>{d.current&&cancelAnimationFrame(d.current),window.removeEventListener("mousemove",f),window.removeEventListener("resize",c);}},[]),jsxRuntime.jsx("canvas",{ref:t,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]"})}
|
|
2
|
-
exports.CodeBlock=
|
|
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."]})})};
|
|
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
|
@@ -838,6 +838,9 @@
|
|
|
838
838
|
.tuwadocs\:underline-offset-4 {
|
|
839
839
|
text-underline-offset: 4px;
|
|
840
840
|
}
|
|
841
|
+
.tuwadocs\:opacity-0 {
|
|
842
|
+
opacity: 0%;
|
|
843
|
+
}
|
|
841
844
|
.tuwadocs\:shadow-md {
|
|
842
845
|
--tw-shadow: 0 4px 6px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 2px 4px -2px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
|
|
843
846
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
@@ -1054,7 +1057,7 @@
|
|
|
1054
1057
|
}
|
|
1055
1058
|
}
|
|
1056
1059
|
.tuwadocs\:dark\:border-white\/10 {
|
|
1057
|
-
|
|
1060
|
+
&:where(.dark, .dark *) {
|
|
1058
1061
|
border-color: var(--tuwadocs-color-white);
|
|
1059
1062
|
@supports (color: color-mix(in lab, red, red)) {
|
|
1060
1063
|
border-color: color-mix(in oklab, var(--tuwadocs-color-white) 10%, transparent);
|
|
@@ -1062,7 +1065,7 @@
|
|
|
1062
1065
|
}
|
|
1063
1066
|
}
|
|
1064
1067
|
.tuwadocs\:dark\:bg-white\/10 {
|
|
1065
|
-
|
|
1068
|
+
&:where(.dark, .dark *) {
|
|
1066
1069
|
background-color: var(--tuwadocs-color-white);
|
|
1067
1070
|
@supports (color: color-mix(in lab, red, red)) {
|
|
1068
1071
|
background-color: color-mix(in oklab, var(--tuwadocs-color-white) 10%, transparent);
|
|
@@ -1070,19 +1073,19 @@
|
|
|
1070
1073
|
}
|
|
1071
1074
|
}
|
|
1072
1075
|
.tuwadocs\:dark\:from-\[\#0a0e27\] {
|
|
1073
|
-
|
|
1076
|
+
&:where(.dark, .dark *) {
|
|
1074
1077
|
--tw-gradient-from: #0a0e27;
|
|
1075
1078
|
--tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
|
|
1076
1079
|
}
|
|
1077
1080
|
}
|
|
1078
1081
|
.tuwadocs\:dark\:to-\[\#1a1f3a\] {
|
|
1079
|
-
|
|
1082
|
+
&:where(.dark, .dark *) {
|
|
1080
1083
|
--tw-gradient-to: #1a1f3a;
|
|
1081
1084
|
--tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
|
|
1082
1085
|
}
|
|
1083
1086
|
}
|
|
1084
1087
|
.tuwadocs\:dark\:hover\:bg-white\/20 {
|
|
1085
|
-
|
|
1088
|
+
&:where(.dark, .dark *) {
|
|
1086
1089
|
&:hover {
|
|
1087
1090
|
@media (hover: hover) {
|
|
1088
1091
|
background-color: var(--tuwadocs-color-white);
|
|
@@ -1094,7 +1097,7 @@
|
|
|
1094
1097
|
}
|
|
1095
1098
|
}
|
|
1096
1099
|
.tuwadocs\:dark\:hover\:text-red-400 {
|
|
1097
|
-
|
|
1100
|
+
&:where(.dark, .dark *) {
|
|
1098
1101
|
&:hover {
|
|
1099
1102
|
@media (hover: hover) {
|
|
1100
1103
|
color: var(--tuwadocs-color-red-400);
|
|
@@ -1401,6 +1404,50 @@ article .nextra-border a:hover {
|
|
|
1401
1404
|
transform: translateY(-1px);
|
|
1402
1405
|
box-shadow: 0 4px 12px rgb(99 102 241 / 0.3);
|
|
1403
1406
|
}
|
|
1407
|
+
@keyframes slideToDarkMobile {
|
|
1408
|
+
from {
|
|
1409
|
+
transform: translateX(0);
|
|
1410
|
+
}
|
|
1411
|
+
to {
|
|
1412
|
+
transform: translateX(38px);
|
|
1413
|
+
}
|
|
1414
|
+
}
|
|
1415
|
+
@keyframes slideToLightMobile {
|
|
1416
|
+
from {
|
|
1417
|
+
transform: translateX(38px);
|
|
1418
|
+
}
|
|
1419
|
+
to {
|
|
1420
|
+
transform: translateX(0);
|
|
1421
|
+
}
|
|
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;
|
|
1447
|
+
}
|
|
1448
|
+
.tuwa-slide-light-desktop {
|
|
1449
|
+
animation: slideToLightDesktop 300ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
|
|
1450
|
+
}
|
|
1404
1451
|
.tuwa-card {
|
|
1405
1452
|
border-radius: var(--tuwa-rounded-corners);
|
|
1406
1453
|
border-style: var(--tw-border-style);
|
package/dist/index.d.cts
CHANGED
|
@@ -80,11 +80,19 @@ declare function PackageInstallationTabs({ packagesList, resolvedTheme, }: {
|
|
|
80
80
|
packagesList: string;
|
|
81
81
|
} & Pick<CodeHighlighterProps, 'resolvedTheme'>): react.JSX.Element;
|
|
82
82
|
|
|
83
|
+
declare function StarryBackground(): react.JSX.Element;
|
|
84
|
+
|
|
83
85
|
declare function StyledLink({ href, children }: {
|
|
84
86
|
href: string;
|
|
85
87
|
children: ReactNode;
|
|
86
88
|
}): react.JSX.Element;
|
|
87
89
|
|
|
90
|
+
interface ThemeSwitcherProps {
|
|
91
|
+
theme: string;
|
|
92
|
+
onToggle: () => void;
|
|
93
|
+
}
|
|
94
|
+
declare function ThemeSwitcher({ theme, onToggle }: ThemeSwitcherProps): react.JSX.Element;
|
|
95
|
+
|
|
88
96
|
/**
|
|
89
97
|
* Props for the VideoPlayer component.
|
|
90
98
|
*/
|
|
@@ -129,12 +137,4 @@ declare const baseFooterLinks: {
|
|
|
129
137
|
image: react.JSX.Element;
|
|
130
138
|
}[];
|
|
131
139
|
|
|
132
|
-
interface ThemeSwitcherProps {
|
|
133
|
-
theme: string;
|
|
134
|
-
onToggle: () => void;
|
|
135
|
-
}
|
|
136
|
-
declare function ThemeSwitcher({ theme, onToggle }: ThemeSwitcherProps): react.JSX.Element;
|
|
137
|
-
|
|
138
|
-
declare function StarryBackground(): react.JSX.Element;
|
|
139
|
-
|
|
140
140
|
export { CodeBlock, CodeHighlighter, type CodeHighlighterProps, CopyIconButton, Features, Footer, type NavProps, Navbar, NoSSR, PackageInstallationTabs, RemoteLogo, type RemoteLogoProps, type SocialLink, StarryBackground, StyledLink, ThemeSwitcher, type ThemeSwitcherProps, VideoPlayer, type VideoPlayerProps, baseFooterLinks, baseNavLinks };
|
package/dist/index.d.ts
CHANGED
|
@@ -80,11 +80,19 @@ declare function PackageInstallationTabs({ packagesList, resolvedTheme, }: {
|
|
|
80
80
|
packagesList: string;
|
|
81
81
|
} & Pick<CodeHighlighterProps, 'resolvedTheme'>): react.JSX.Element;
|
|
82
82
|
|
|
83
|
+
declare function StarryBackground(): react.JSX.Element;
|
|
84
|
+
|
|
83
85
|
declare function StyledLink({ href, children }: {
|
|
84
86
|
href: string;
|
|
85
87
|
children: ReactNode;
|
|
86
88
|
}): react.JSX.Element;
|
|
87
89
|
|
|
90
|
+
interface ThemeSwitcherProps {
|
|
91
|
+
theme: string;
|
|
92
|
+
onToggle: () => void;
|
|
93
|
+
}
|
|
94
|
+
declare function ThemeSwitcher({ theme, onToggle }: ThemeSwitcherProps): react.JSX.Element;
|
|
95
|
+
|
|
88
96
|
/**
|
|
89
97
|
* Props for the VideoPlayer component.
|
|
90
98
|
*/
|
|
@@ -129,12 +137,4 @@ declare const baseFooterLinks: {
|
|
|
129
137
|
image: react.JSX.Element;
|
|
130
138
|
}[];
|
|
131
139
|
|
|
132
|
-
interface ThemeSwitcherProps {
|
|
133
|
-
theme: string;
|
|
134
|
-
onToggle: () => void;
|
|
135
|
-
}
|
|
136
|
-
declare function ThemeSwitcher({ theme, onToggle }: ThemeSwitcherProps): react.JSX.Element;
|
|
137
|
-
|
|
138
|
-
declare function StarryBackground(): react.JSX.Element;
|
|
139
|
-
|
|
140
140
|
export { CodeBlock, CodeHighlighter, type CodeHighlighterProps, CopyIconButton, Features, Footer, type NavProps, Navbar, NoSSR, PackageInstallationTabs, RemoteLogo, type RemoteLogoProps, type SocialLink, StarryBackground, StyledLink, ThemeSwitcher, type ThemeSwitcherProps, VideoPlayer, type VideoPlayerProps, baseFooterLinks, baseNavLinks };
|
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:t,onCopy:o}){return jsx("button",{onClick:o,type:"button",className:cn("tuwadocs:h-6 tuwadocs:w-6 tuwadocs:cursor-pointer tuwadocs:transition-colors",t?"tuwadocs:text-[var(--tuwa-success-icon)]":"tuwadocs:text-[var(--tuwa-text-secondary)] tuwadocs:hover:text-[var(--tuwa-text-primary)]"),children:t?jsx(CheckCircleIcon,{}):jsx(Square2StackIcon,{})})}function G({title:t,titleIcons:o,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:o}),jsx("p",{className:"tuwadocs:text-sm tuwadocs:font-medium tuwadocs:text-[var(--tuwa-text-primary)]",children:t})]}),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:t}){let[o,a]=useState(false);return useEffect(()=>{a(true);},[]),o?jsx(Fragment,{children:t}):null}function X({children:t,language:o,resolvedTheme:a}){return jsx("div",{className:"tuwadocs:border-t tuwadocs:border-[var(--tuwa-border-secondary)]",children:jsx(P,{children:jsx(Prism,{language:o??"bash",customStyle:{margin:0,background:"transparent"},style:a==="dark"?materialOceanic:materialLight,children:String(t).replace(/\n$/,"")})})})}function lo({features:t}){return jsx("div",{className:"tuwadocs:grid tuwadocs:grid-cols-1 tuwadocs:md:grid-cols-3 tuwadocs:gap-6 tuwadocs:mt-12",children:t.map(o=>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:o.icon}),jsx("h3",{className:"tuwadocs:text-lg tuwadocs:font-semibold tuwadocs:mb-2",children:o.title}),jsx("p",{className:"tuwadocs:text-[var(--tuwa-text-secondary)]",children:o.description})]},o.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 xo({links:t,logo:o}){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:o}),jsx("div",{className:"tuwadocs:flex tuwadocs:items-center tuwadocs:gap-4 tuwadocs:text-sm",children:(t??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 Co({url:t=St,className:o,style:a,...d}){let r;try{let c=await fetch(t,{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:o,style:a,...d})}let s=r.replace(/<\?xml[\s\S]*?\?>/g,"").replace(/<!DOCTYPE[\s\S]*?>/gi,"").replace(/\sxml:space=/g," xmlSpace=").trim(),w=xt(s,{replace(c){if(c instanceof Element&&c.name==="svg"){let k=domToReact(c.children),u={...c.attribs};"xmlspace"in u&&(u.xmlSpace=u.xmlspace,delete u.xmlspace);let n=[o,"remote-logo"].filter(Boolean).join(" ");return jsx("svg",{...u,className:n,style:a,...d,children:k})}}}),f=(Array.isArray(w)?w:[w]).find(c=>Nt.isValidElement(c)&&c.type==="svg");return f||jsx("svg",{className:o,style:a,...d})}function Mo({links:t,logo:o}){return jsx(Navbar,{logo:o,children:jsx("div",{className:"tuwadocs:flex tuwadocs:items-center tuwadocs:gap-3",children:(t??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 Q=[{title:"pnpm",command:"pnpm add"},{title:"bun",command:"bun add"},{title:"npm",command:"npm install"},{title:"yarn",command:"yarn add"}];function zo({packagesList:t,resolvedTheme:o}){return jsx("div",{className:"tuwadocs:my-4",children:jsx(Tabs,{items:Q.map(a=>a.title),children:Q.map(a=>jsx(Tabs.Tab,{children:jsx(G,{title:"Terminal",titleIcons:jsx(CommandLineIcon,{}),textToCopy:`${a.command} ${t}`,children:jsx(X,{resolvedTheme:o,language:"bash",children:`${a.command} ${t}`})})},a.title))})})}function Vo({href:t,children:o}){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:t,target:"_blank",rel:"noopener noreferrer",children:o})}var Mt={"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]"},Uo=({src:t,poster:o,autoplay:a=false,muted:d=false,loop:r=false,controls:s=true,className:w="",aspectRatio:C="aspect-video",onPlay:f,onPause:c,onEnded:k,"aria-label":u})=>{let n=Mt[C]||"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,w),children:jsxs("video",{src:t,poster:o,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:f,onPause:c,onEnded:k,"aria-label":u,preload:"metadata",children:[jsx("track",{kind:"captions"}),"Your browser does not support the video tag. Please"," ",jsx("a",{href:t,download:true,className:"tuwadocs:text-[var(--tuwa-text-accent)] tuwadocs:underline tuwadocs:hover:opacity-80",children:"download the video"})," ","to watch it."]})})};function D({children:t}){let[o,a]=useState(false);return useEffect(()=>{a(true);},[]),o?jsx(Fragment,{children:t}):null}function Zo({theme:t,onToggle:o}){return jsxs("button",{onClick:o,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","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"),"aria-label":"Toggle theme",children:[jsxs(D,{children:[jsx("div",{className:"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",style:{transform:t==="dark"?"translateX(38px)":"translateX(0)",transition:"transform 450ms cubic-bezier(0.34, 1.56, 0.64, 1)"}}),jsx("div",{className:"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",style:{transform:t==="dark"?"translateX(30px)":"translateX(0)",transition:"transform 450ms cubic-bezier(0.34, 1.56, 0.64, 1)"}})]}),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(D,{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 ${t==="light"?"tuwadocs:text-yellow-500":"tuwadocs:text-slate-500 tuwadocs:group-hover:text-yellow-400"}`})})}),jsx("div",{className:"tuwadocs:flex tuwadocs:flex-1 tuwadocs:justify-center",children:jsx(D,{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 ${t==="dark"?"tuwadocs:text-indigo-400":"tuwadocs:text-slate-500 tuwadocs:group-hover:text-indigo-300"}`})})})]})]})}var Ft=100,J=.9,Ht=2.7,Z=.3,$t=.5,Vt=.5,I=150,Gt=I*I,j=2,tt=120,ot=tt*tt,Xt=.75,qt=.001;function et(){let t=useRef(null),o=useRef({x:0,y:0}),a=useRef([]),d=useRef(null);return useEffect(()=>{let r=t.current;if(!r)return;let s=r.getContext("2d");if(!s)return;let w=()=>{r.width=window.innerWidth,r.height=window.innerHeight;},C=()=>{let n=[];for(let m=0;m<Ft;m++)n.push({x:Math.random()*r.width,y:Math.random()*r.height,radius:Math.random()*(Ht-J)+J,vx:(Math.random()-.5)*Z,vy:(Math.random()-.5)*Z,opacity:Math.random()*Vt+$t});return n},f=n=>{o.current.x=n.clientX,o.current.y=n.clientY;},c=()=>{w(),a.current=C();},k=n=>{s.clearRect(0,0,r.width,r.height);let m=a.current,F=o.current,H=document.documentElement.classList.contains("dark");for(let e of m){e.x+=e.vx,e.y+=e.vy,(e.x<0||e.x>r.width)&&(e.vx=-e.vx),(e.y<0||e.y>r.height)&&(e.vy=-e.vy);let p=F.x-e.x,v=F.y-e.y,g=p*p+v*v;if(g<Gt){let y=Math.sqrt(g),R=(I-y)/I,at=p/y*R*j,st=v/y*R*j;e.x-=at,e.y-=st;}e.opacity=.3+Math.sin(n*qt+e.x)*.5+.5;let h=Math.min(e.opacity,1),i=s.createRadialGradient(e.x,e.y,0,e.x,e.y,e.radius);H?(i.addColorStop(0,`rgba(255, 255, 255, ${h})`),i.addColorStop(.5,`rgba(147, 197, 253, ${h*.6})`),i.addColorStop(1,"rgba(59, 130, 246, 0)")):(i.addColorStop(0,`rgba(15, 23, 42, ${h})`),i.addColorStop(.5,`rgba(71, 85, 105, ${h*.6})`),i.addColorStop(1,"rgba(148, 163, 184, 0)")),s.beginPath(),s.arc(e.x,e.y,e.radius,0,Math.PI*2),s.fillStyle=i,s.fill();}s.lineWidth=Xt;for(let e=0;e<m.length;e++){let p=m[e];for(let v=e+1;v<m.length;v++){let g=m[v],h=p.x-g.x,i=p.y-g.y,y=h*h+i*i;if(y<ot){let R=.2*(1-y/ot);H?s.strokeStyle=`rgba(147, 197, 253, ${R})`:s.strokeStyle=`rgba(71, 85, 105, ${R*1.5})`,s.beginPath(),s.moveTo(p.x,p.y),s.lineTo(g.x,g.y),s.stroke();}}}},u=()=>{let n=Date.now();k(n),d.current=requestAnimationFrame(u);};return w(),a.current=C(),u(),window.addEventListener("mousemove",f),window.addEventListener("resize",c),()=>{d.current&&cancelAnimationFrame(d.current),window.removeEventListener("mousemove",f),window.removeEventListener("resize",c);}},[]),jsx("canvas",{ref:t,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]"})}
|
|
2
|
-
export{
|
|
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."]})})};
|
|
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};
|