@tuwaio/docs-ui 0.0.25 → 0.0.27
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 +268 -3
- package/dist/index.d.cts +8 -33
- package/dist/index.d.ts +8 -33
- 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:e}){return jsxRuntime.jsx("button",{onClick:e,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:e,children:a,textToCopy:n}){let{isCopied:s,copy:r}=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:e}),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:s,onCopy:()=>r(n)})})]}),a]})}function P({children:t}){let[e,a]=Nt.useState(false);return Nt.useEffect(()=>{a(true);},[]),e?jsxRuntime.jsx(jsxRuntime.Fragment,{children:t}):null}function X({children:t,language:e,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:e??"bash",customStyle:{margin:0,background:"transparent"},style:a==="dark"?prism.materialOceanic:prism.materialLight,children:String(t).replace(/\n$/,"")})})})}function de({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(e=>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:e.icon}),jsxRuntime.jsx("h3",{className:"tuwadocs:text-lg tuwadocs:font-semibold tuwadocs:mb-2",children:e.title}),jsxRuntime.jsx("p",{className:"tuwadocs:text-[var(--tuwa-text-secondary)]",children:e.description})]},e.title))})}var U=[{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"})})}],Y=[{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 ve({links:t,logo:e}){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:e}),jsxRuntime.jsx("div",{className:"tuwadocs:flex tuwadocs:items-center tuwadocs:gap-4 tuwadocs:text-sm",children:(t??Y).map(({title:a,href:n,image:s,className:r})=>jsxRuntime.jsxs("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:novaCore.cn("tuwa-footer-link tuwadocs:flex tuwadocs:items-center tuwadocs:gap-1",r),children:[s,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 ye({url:t=St,className:e,style:a,...n}){let s;try{let c=await fetch(t,{next:{revalidate:86400}});if(!c.ok)throw new Error(`Failed to fetch SVG: ${c.status}`);s=await c.text();}catch(c){return console.error("RemoteLogo: Failed to fetch SVG from remote source:",c),jsxRuntime.jsx("svg",{className:e,style:a,...n})}let r=s.replace(/<\?xml[\s\S]*?\?>/g,"").replace(/<!DOCTYPE[\s\S]*?>/gi,"").replace(/\sxml:space=/g," xmlSpace=").trim(),m=xt__default.default(r,{replace(c){if(c instanceof xt.Element&&c.name==="svg"){let k=xt.domToReact(c.children),i={...c.attribs};"xmlspace"in i&&(i.xmlSpace=i.xmlspace,delete i.xmlspace);let d=[e,"remote-logo"].filter(Boolean).join(" ");return jsxRuntime.jsx("svg",{...i,className:d,style:a,...n,children:k})}}}),f=(Array.isArray(m)?m:[m]).find(c=>Nt__default.default.isValidElement(c)&&c.type==="svg");return f||jsxRuntime.jsx("svg",{className:e,style:a,...n})}function Te({links:t,logo:e}){return jsxRuntime.jsx(nextraThemeDocs.Navbar,{logo:e,children:jsxRuntime.jsx("div",{className:"tuwadocs:flex tuwadocs:items-center tuwadocs:gap-3",children:(t??U).map(({title:a,href:n,image:s,className:r})=>jsxRuntime.jsxs("a",{href:n,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)]",r),children:[s,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 Oe({packagesList:t,resolvedTheme:e}){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:e,language:"bash",children:`${a.command} ${t}`})})},a.title))})})}function Fe({href:t,children:e}){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:e})}var Ge=({src:t,poster:e,autoplay:a=false,muted:n=false,loop:s=false,controls:r=true,className:m="",aspectRatio:C="aspect-video",onPlay:f,onPause:c,onEnded:k,"aria-label":i})=>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",C,m),children:jsxRuntime.jsxs("video",{src:t,poster:e,controls:r,autoPlay:a,muted:n,loop:s,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":i,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[e,a]=Nt.useState(false);return Nt.useEffect(()=>{a(true);},[]),e?jsxRuntime.jsx(jsxRuntime.Fragment,{children:t}):null}function We({theme:t,onToggle:e}){return jsxRuntime.jsxs("button",{onClick:e,className:"group relative flex h-10 w-20 md:h-8 md:w-16 cursor-pointer items-center rounded-[var(--tuwa-rounded-corners)] p-1 transition-all duration-300 ease-in-out backdrop-blur-sm border bg-black/5 border-black/5 hover:bg-black/10 dark:bg-white/10 dark:border-white/10 dark:hover:bg-white/20","aria-label":"Toggle theme",children:[jsxRuntime.jsxs(D,{children:[jsxRuntime.jsx("div",{className:"absolute top-[1px] left-[2px] z-10 h-9 w-9 md:h-7 md:w-7 rounded-[var(--tuwa-rounded-corners)] bg-[var(--tuwa-bg-primary)] shadow-md 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:"absolute top-[1px] left-[2px] z-10 h-9 w-9 md:h-7 md:w-7 rounded-[var(--tuwa-rounded-corners)] bg-[var(--tuwa-bg-primary)] shadow-md hidden 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:"relative z-20 flex w-full justify-between",children:[jsxRuntime.jsx("div",{className:"flex flex-1 items-center justify-center",children:jsxRuntime.jsx(D,{children:jsxRuntime.jsx(solid.SunIcon,{className:`h-6 w-6 relative -left-[2px] md:h-5 md:w-5 transition-colors duration-300 ${t==="light"?"text-yellow-500":"text-slate-500 group-hover:text-yellow-400"}`})})}),jsxRuntime.jsx("div",{className:"flex flex-1 justify-center",children:jsxRuntime.jsx(D,{children:jsxRuntime.jsx(solid.MoonIcon,{className:`h-6 w-6 relative left-[2px] md:h-5 md:w-5 transition-colors duration-300 ${t==="dark"?"text-indigo-400":"text-slate-500 group-hover:text-indigo-300"}`})})})]})]})}var Dt=100,J=.9,zt=2.7,Z=.3,Ft=.5,Ht=.5,M=150,$t=M*M,j=2,tt=120,et=tt*tt,Vt=.75,Gt=.001;function ot(){let t=Nt.useRef(null),e=Nt.useRef({x:0,y:0}),a=Nt.useRef([]),n=Nt.useRef(null);return Nt.useEffect(()=>{let s=t.current;if(!s)return;let r=s.getContext("2d");if(!r)return;let m=()=>{s.width=window.innerWidth,s.height=window.innerHeight;},C=()=>{let d=[];for(let w=0;w<Dt;w++)d.push({x:Math.random()*s.width,y:Math.random()*s.height,radius:Math.random()*(zt-J)+J,vx:(Math.random()-.5)*Z,vy:(Math.random()-.5)*Z,opacity:Math.random()*Ht+Ft});return d},f=d=>{e.current.x=d.clientX,e.current.y=d.clientY;},c=()=>{m(),a.current=C();},k=d=>{r.clearRect(0,0,s.width,s.height);let w=a.current,F=e.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>s.width)&&(o.vx=-o.vx),(o.y<0||o.y>s.height)&&(o.vy=-o.vy);let p=F.x-o.x,v=F.y-o.y,g=p*p+v*v;if(g<$t){let y=Math.sqrt(g),R=(M-y)/M,at=p/y*R*j,rt=v/y*R*j;o.x-=at,o.y-=rt;}o.opacity=.3+Math.sin(d*Gt+o.x)*.5+.5;let h=Math.min(o.opacity,1),l=r.createRadialGradient(o.x,o.y,0,o.x,o.y,o.radius);H?(l.addColorStop(0,`rgba(255, 255, 255, ${h})`),l.addColorStop(.5,`rgba(147, 197, 253, ${h*.6})`),l.addColorStop(1,"rgba(59, 130, 246, 0)")):(l.addColorStop(0,`rgba(15, 23, 42, ${h})`),l.addColorStop(.5,`rgba(71, 85, 105, ${h*.6})`),l.addColorStop(1,"rgba(148, 163, 184, 0)")),r.beginPath(),r.arc(o.x,o.y,o.radius,0,Math.PI*2),r.fillStyle=l,r.fill();}r.lineWidth=Vt;for(let o=0;o<w.length;o++){let p=w[o];for(let v=o+1;v<w.length;v++){let g=w[v],h=p.x-g.x,l=p.y-g.y,y=h*h+l*l;if(y<et){let R=.2*(1-y/et);H?r.strokeStyle=`rgba(147, 197, 253, ${R})`:r.strokeStyle=`rgba(71, 85, 105, ${R*1.5})`,r.beginPath(),r.moveTo(p.x,p.y),r.lineTo(g.x,g.y),r.stroke();}}}},i=()=>{let d=Date.now();k(d),n.current=requestAnimationFrame(i);};return m(),a.current=C(),i(),window.addEventListener("mousemove",f),window.addEventListener("resize",c),()=>{n.current&&cancelAnimationFrame(n.current),window.removeEventListener("mousemove",f),window.removeEventListener("resize",c);}},[]),jsxRuntime.jsx("canvas",{ref:t,className:"absolute inset-0 w-full h-full bg-gradient-to-b from-slate-200 to-slate-350 dark:from-[#0a0e27] 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 F({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 $({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(F,{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 V({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 G=[{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"})})}],X=[{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??X).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 k=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:k})}}}),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??G).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 Y=[{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:Y.map(a=>a.title),children:Y.map(a=>jsxRuntime.jsx(components.Tabs.Tab,{children:jsxRuntime.jsx($,{title:"Terminal",titleIcons:jsxRuntime.jsx(outline.CommandLineIcon,{}),textToCopy:`${a.command} ${e}`,children:jsxRuntime.jsx(V,{resolvedTheme:t,language:"bash",children:`${a.command} ${e}`})})},a.title))})})}var Et=100,W=.9,Mt=2.7,Q=.3,It=.5,Lt=.5,I=150,_t=I*I,K=2,J=120,Z=J*J,At=.75,Ot=.001;function j(){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;},C=()=>{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-W)+W,vx:(Math.random()-.5)*Q,vy:(Math.random()-.5)*Q,opacity:Math.random()*Lt+It});return n},p=n=>{t.current.x=n.clientX,t.current.y=n.clientY;},c=()=>{l(),a.current=C();},k=n=>{s.clearRect(0,0,r.width,r.height);let w=a.current,B=t.current,z=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=B.x-o.x,f=B.y-o.y,v=m*m+f*f;if(v<_t){let y=Math.sqrt(v),R=(I-y)/I,at=m/y*R*K,st=f/y*R*K;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);z?(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<Z){let R=.2*(1-y/Z);z?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();k(n),d.current=requestAnimationFrame(u);};return l(),a.current=C(),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:"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:s?"translateX(38px)":"translateX(0)",transition:"transform 300ms 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:s?"translateX(30px)":"translateX(0)",transition:"transform 300ms 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(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:C="aspect-video",onPlay:p,onPause:c,onEnded:k,"aria-label":u})=>{let n=Gt[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,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: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: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=$;exports.CodeHighlighter=V;exports.CopyIconButton=F;exports.Features=uo;exports.Footer=go;exports.Navbar=Po;exports.NoSSR=P;exports.PackageInstallationTabs=Do;exports.RemoteLogo=No;exports.StarryBackground=j;exports.StyledLink=Go;exports.ThemeSwitcher=Qo;exports.VideoPlayer=jo;exports.baseFooterLinks=X;exports.baseNavLinks=G;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
|
@@ -530,7 +530,14 @@
|
|
|
530
530
|
:root, :host {
|
|
531
531
|
--tuwadocs-color-red-400: oklch(70.4% 0.191 22.216);
|
|
532
532
|
--tuwadocs-color-red-600: oklch(57.7% 0.245 27.325);
|
|
533
|
+
--tuwadocs-color-yellow-400: oklch(85.2% 0.199 91.936);
|
|
534
|
+
--tuwadocs-color-yellow-500: oklch(79.5% 0.184 86.047);
|
|
535
|
+
--tuwadocs-color-indigo-300: oklch(78.5% 0.115 274.713);
|
|
536
|
+
--tuwadocs-color-indigo-400: oklch(67.3% 0.182 276.935);
|
|
537
|
+
--tuwadocs-color-slate-200: oklch(92.9% 0.013 255.508);
|
|
538
|
+
--tuwadocs-color-slate-500: oklch(55.4% 0.046 257.417);
|
|
533
539
|
--tuwadocs-color-black: #000;
|
|
540
|
+
--tuwadocs-color-white: #fff;
|
|
534
541
|
--tuwadocs-spacing: 0.25rem;
|
|
535
542
|
--tuwadocs-text-xs: 0.75rem;
|
|
536
543
|
--tuwadocs-text-xs--line-height: calc(1 / 0.75);
|
|
@@ -553,8 +560,10 @@
|
|
|
553
560
|
--tuwadocs-font-weight-bold: 700;
|
|
554
561
|
--tuwadocs-font-weight-extrabold: 800;
|
|
555
562
|
--tuwadocs-tracking-tight: -0.025em;
|
|
563
|
+
--tuwadocs-ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
|
|
556
564
|
--tuwadocs-animate-pulse: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
|
|
557
565
|
--tuwadocs-blur-sm: 8px;
|
|
566
|
+
--tuwadocs-aspect-video: 16 / 9;
|
|
558
567
|
--tuwadocs-default-transition-duration: 150ms;
|
|
559
568
|
--tuwadocs-default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
560
569
|
}
|
|
@@ -569,6 +578,21 @@
|
|
|
569
578
|
.tuwadocs\:inset-0 {
|
|
570
579
|
inset: 0;
|
|
571
580
|
}
|
|
581
|
+
.tuwadocs\:top-\[1px\] {
|
|
582
|
+
top: 1px;
|
|
583
|
+
}
|
|
584
|
+
.tuwadocs\:-left-\[2px\] {
|
|
585
|
+
left: calc(2px * -1);
|
|
586
|
+
}
|
|
587
|
+
.tuwadocs\:left-\[2px\] {
|
|
588
|
+
left: 2px;
|
|
589
|
+
}
|
|
590
|
+
.tuwadocs\:z-10 {
|
|
591
|
+
z-index: 10;
|
|
592
|
+
}
|
|
593
|
+
.tuwadocs\:z-20 {
|
|
594
|
+
z-index: 20;
|
|
595
|
+
}
|
|
572
596
|
.tuwadocs\:my-4 {
|
|
573
597
|
margin-block: calc(var(--tuwadocs-spacing) * 4);
|
|
574
598
|
}
|
|
@@ -596,12 +620,33 @@
|
|
|
596
620
|
.tuwadocs\:hidden {
|
|
597
621
|
display: none;
|
|
598
622
|
}
|
|
623
|
+
.tuwadocs\:aspect-\[3\/2\] {
|
|
624
|
+
aspect-ratio: 3/2;
|
|
625
|
+
}
|
|
626
|
+
.tuwadocs\:aspect-\[4\/3\] {
|
|
627
|
+
aspect-ratio: 4/3;
|
|
628
|
+
}
|
|
629
|
+
.tuwadocs\:aspect-\[21\/9\] {
|
|
630
|
+
aspect-ratio: 21/9;
|
|
631
|
+
}
|
|
632
|
+
.tuwadocs\:aspect-square {
|
|
633
|
+
aspect-ratio: 1 / 1;
|
|
634
|
+
}
|
|
635
|
+
.tuwadocs\:aspect-video {
|
|
636
|
+
aspect-ratio: var(--tuwadocs-aspect-video);
|
|
637
|
+
}
|
|
599
638
|
.tuwadocs\:h-4 {
|
|
600
639
|
height: calc(var(--tuwadocs-spacing) * 4);
|
|
601
640
|
}
|
|
602
641
|
.tuwadocs\:h-6 {
|
|
603
642
|
height: calc(var(--tuwadocs-spacing) * 6);
|
|
604
643
|
}
|
|
644
|
+
.tuwadocs\:h-9 {
|
|
645
|
+
height: calc(var(--tuwadocs-spacing) * 9);
|
|
646
|
+
}
|
|
647
|
+
.tuwadocs\:h-10 {
|
|
648
|
+
height: calc(var(--tuwadocs-spacing) * 10);
|
|
649
|
+
}
|
|
605
650
|
.tuwadocs\:h-\[20px\] {
|
|
606
651
|
height: 20px;
|
|
607
652
|
}
|
|
@@ -614,6 +659,12 @@
|
|
|
614
659
|
.tuwadocs\:w-6 {
|
|
615
660
|
width: calc(var(--tuwadocs-spacing) * 6);
|
|
616
661
|
}
|
|
662
|
+
.tuwadocs\:w-9 {
|
|
663
|
+
width: calc(var(--tuwadocs-spacing) * 9);
|
|
664
|
+
}
|
|
665
|
+
.tuwadocs\:w-20 {
|
|
666
|
+
width: calc(var(--tuwadocs-spacing) * 20);
|
|
667
|
+
}
|
|
617
668
|
.tuwadocs\:w-\[20px\] {
|
|
618
669
|
width: 20px;
|
|
619
670
|
}
|
|
@@ -644,6 +695,9 @@
|
|
|
644
695
|
.tuwadocs\:justify-between {
|
|
645
696
|
justify-content: space-between;
|
|
646
697
|
}
|
|
698
|
+
.tuwadocs\:justify-center {
|
|
699
|
+
justify-content: center;
|
|
700
|
+
}
|
|
647
701
|
.tuwadocs\:gap-1 {
|
|
648
702
|
gap: var(--tuwadocs-spacing);
|
|
649
703
|
}
|
|
@@ -680,6 +734,12 @@
|
|
|
680
734
|
.tuwadocs\:border-\[var\(--tuwa-border-secondary\)\] {
|
|
681
735
|
border-color: var(--tuwa-border-secondary);
|
|
682
736
|
}
|
|
737
|
+
.tuwadocs\:border-black\/5 {
|
|
738
|
+
border-color: var(--tuwadocs-color-black);
|
|
739
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
740
|
+
border-color: color-mix(in oklab, var(--tuwadocs-color-black) 5%, transparent);
|
|
741
|
+
}
|
|
742
|
+
}
|
|
683
743
|
.tuwadocs\:bg-\[var\(--tuwa-bg-primary\)\] {
|
|
684
744
|
background-color: var(--tuwa-bg-primary);
|
|
685
745
|
}
|
|
@@ -689,10 +749,27 @@
|
|
|
689
749
|
.tuwadocs\:bg-black {
|
|
690
750
|
background-color: var(--tuwadocs-color-black);
|
|
691
751
|
}
|
|
752
|
+
.tuwadocs\:bg-black\/5 {
|
|
753
|
+
background-color: var(--tuwadocs-color-black);
|
|
754
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
755
|
+
background-color: color-mix(in oklab, var(--tuwadocs-color-black) 5%, transparent);
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
.tuwadocs\:bg-gradient-to-b {
|
|
759
|
+
--tw-gradient-position: to bottom in oklab;
|
|
760
|
+
background-image: linear-gradient(var(--tw-gradient-stops));
|
|
761
|
+
}
|
|
762
|
+
.tuwadocs\:from-slate-200 {
|
|
763
|
+
--tw-gradient-from: var(--tuwadocs-color-slate-200);
|
|
764
|
+
--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));
|
|
765
|
+
}
|
|
692
766
|
.tuwadocs\:object-contain {
|
|
693
767
|
-o-object-fit: contain;
|
|
694
768
|
object-fit: contain;
|
|
695
769
|
}
|
|
770
|
+
.tuwadocs\:p-1 {
|
|
771
|
+
padding: var(--tuwadocs-spacing);
|
|
772
|
+
}
|
|
696
773
|
.tuwadocs\:p-6 {
|
|
697
774
|
padding: calc(var(--tuwadocs-spacing) * 6);
|
|
698
775
|
}
|
|
@@ -746,12 +823,32 @@
|
|
|
746
823
|
.tuwadocs\:text-\[var\(--tuwa-text-secondary\)\] {
|
|
747
824
|
color: var(--tuwa-text-secondary);
|
|
748
825
|
}
|
|
826
|
+
.tuwadocs\:text-indigo-400 {
|
|
827
|
+
color: var(--tuwadocs-color-indigo-400);
|
|
828
|
+
}
|
|
829
|
+
.tuwadocs\:text-slate-500 {
|
|
830
|
+
color: var(--tuwadocs-color-slate-500);
|
|
831
|
+
}
|
|
832
|
+
.tuwadocs\:text-yellow-500 {
|
|
833
|
+
color: var(--tuwadocs-color-yellow-500);
|
|
834
|
+
}
|
|
749
835
|
.tuwadocs\:underline {
|
|
750
836
|
text-decoration-line: underline;
|
|
751
837
|
}
|
|
752
838
|
.tuwadocs\:underline-offset-4 {
|
|
753
839
|
text-underline-offset: 4px;
|
|
754
840
|
}
|
|
841
|
+
.tuwadocs\:opacity-0 {
|
|
842
|
+
opacity: 0%;
|
|
843
|
+
}
|
|
844
|
+
.tuwadocs\:shadow-md {
|
|
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));
|
|
846
|
+
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
847
|
+
}
|
|
848
|
+
.tuwadocs\:backdrop-blur-sm {
|
|
849
|
+
--tw-backdrop-blur: blur(var(--tuwadocs-blur-sm));
|
|
850
|
+
backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);
|
|
851
|
+
}
|
|
755
852
|
.tuwadocs\:transition {
|
|
756
853
|
transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, backdrop-filter, display, content-visibility, overlay, pointer-events;
|
|
757
854
|
transition-timing-function: var(--tw-ease, var(--tuwadocs-default-transition-timing-function));
|
|
@@ -781,6 +878,28 @@
|
|
|
781
878
|
--tw-duration: 200ms;
|
|
782
879
|
transition-duration: 200ms;
|
|
783
880
|
}
|
|
881
|
+
.tuwadocs\:duration-300 {
|
|
882
|
+
--tw-duration: 300ms;
|
|
883
|
+
transition-duration: 300ms;
|
|
884
|
+
}
|
|
885
|
+
.tuwadocs\:ease-in-out {
|
|
886
|
+
--tw-ease: var(--tuwadocs-ease-in-out);
|
|
887
|
+
transition-timing-function: var(--tuwadocs-ease-in-out);
|
|
888
|
+
}
|
|
889
|
+
.tuwadocs\:group-hover\:text-indigo-300 {
|
|
890
|
+
&:is(:where(.tuwadocs\:group):hover *) {
|
|
891
|
+
@media (hover: hover) {
|
|
892
|
+
color: var(--tuwadocs-color-indigo-300);
|
|
893
|
+
}
|
|
894
|
+
}
|
|
895
|
+
}
|
|
896
|
+
.tuwadocs\:group-hover\:text-yellow-400 {
|
|
897
|
+
&:is(:where(.tuwadocs\:group):hover *) {
|
|
898
|
+
@media (hover: hover) {
|
|
899
|
+
color: var(--tuwadocs-color-yellow-400);
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
}
|
|
784
903
|
.tuwadocs\:group-hover\:opacity-100 {
|
|
785
904
|
&:is(:where(.tuwadocs\:group):hover *) {
|
|
786
905
|
@media (hover: hover) {
|
|
@@ -788,6 +907,16 @@
|
|
|
788
907
|
}
|
|
789
908
|
}
|
|
790
909
|
}
|
|
910
|
+
.tuwadocs\:hover\:bg-black\/10 {
|
|
911
|
+
&:hover {
|
|
912
|
+
@media (hover: hover) {
|
|
913
|
+
background-color: var(--tuwadocs-color-black);
|
|
914
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
915
|
+
background-color: color-mix(in oklab, var(--tuwadocs-color-black) 10%, transparent);
|
|
916
|
+
}
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
}
|
|
791
920
|
.tuwadocs\:hover\:text-\[var\(--tuwa-text-primary\)\] {
|
|
792
921
|
&:hover {
|
|
793
922
|
@media (hover: hover) {
|
|
@@ -877,6 +1006,46 @@
|
|
|
877
1006
|
align-items: flex-start;
|
|
878
1007
|
}
|
|
879
1008
|
}
|
|
1009
|
+
.tuwadocs\:md\:block {
|
|
1010
|
+
@media (width >= 48rem) {
|
|
1011
|
+
display: block;
|
|
1012
|
+
}
|
|
1013
|
+
}
|
|
1014
|
+
.tuwadocs\:md\:hidden {
|
|
1015
|
+
@media (width >= 48rem) {
|
|
1016
|
+
display: none;
|
|
1017
|
+
}
|
|
1018
|
+
}
|
|
1019
|
+
.tuwadocs\:md\:h-5 {
|
|
1020
|
+
@media (width >= 48rem) {
|
|
1021
|
+
height: calc(var(--tuwadocs-spacing) * 5);
|
|
1022
|
+
}
|
|
1023
|
+
}
|
|
1024
|
+
.tuwadocs\:md\:h-7 {
|
|
1025
|
+
@media (width >= 48rem) {
|
|
1026
|
+
height: calc(var(--tuwadocs-spacing) * 7);
|
|
1027
|
+
}
|
|
1028
|
+
}
|
|
1029
|
+
.tuwadocs\:md\:h-8 {
|
|
1030
|
+
@media (width >= 48rem) {
|
|
1031
|
+
height: calc(var(--tuwadocs-spacing) * 8);
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
.tuwadocs\:md\:w-5 {
|
|
1035
|
+
@media (width >= 48rem) {
|
|
1036
|
+
width: calc(var(--tuwadocs-spacing) * 5);
|
|
1037
|
+
}
|
|
1038
|
+
}
|
|
1039
|
+
.tuwadocs\:md\:w-7 {
|
|
1040
|
+
@media (width >= 48rem) {
|
|
1041
|
+
width: calc(var(--tuwadocs-spacing) * 7);
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
.tuwadocs\:md\:w-16 {
|
|
1045
|
+
@media (width >= 48rem) {
|
|
1046
|
+
width: calc(var(--tuwadocs-spacing) * 16);
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
880
1049
|
.tuwadocs\:md\:grid-cols-3 {
|
|
881
1050
|
@media (width >= 48rem) {
|
|
882
1051
|
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
@@ -887,8 +1056,48 @@
|
|
|
887
1056
|
opacity: 0%;
|
|
888
1057
|
}
|
|
889
1058
|
}
|
|
1059
|
+
.tuwadocs\:dark\:border-white\/10 {
|
|
1060
|
+
&:where(.dark, .dark *) {
|
|
1061
|
+
border-color: var(--tuwadocs-color-white);
|
|
1062
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1063
|
+
border-color: color-mix(in oklab, var(--tuwadocs-color-white) 10%, transparent);
|
|
1064
|
+
}
|
|
1065
|
+
}
|
|
1066
|
+
}
|
|
1067
|
+
.tuwadocs\:dark\:bg-white\/10 {
|
|
1068
|
+
&:where(.dark, .dark *) {
|
|
1069
|
+
background-color: var(--tuwadocs-color-white);
|
|
1070
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1071
|
+
background-color: color-mix(in oklab, var(--tuwadocs-color-white) 10%, transparent);
|
|
1072
|
+
}
|
|
1073
|
+
}
|
|
1074
|
+
}
|
|
1075
|
+
.tuwadocs\:dark\:from-\[\#0a0e27\] {
|
|
1076
|
+
&:where(.dark, .dark *) {
|
|
1077
|
+
--tw-gradient-from: #0a0e27;
|
|
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));
|
|
1079
|
+
}
|
|
1080
|
+
}
|
|
1081
|
+
.tuwadocs\:dark\:to-\[\#1a1f3a\] {
|
|
1082
|
+
&:where(.dark, .dark *) {
|
|
1083
|
+
--tw-gradient-to: #1a1f3a;
|
|
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));
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1087
|
+
.tuwadocs\:dark\:hover\:bg-white\/20 {
|
|
1088
|
+
&:where(.dark, .dark *) {
|
|
1089
|
+
&:hover {
|
|
1090
|
+
@media (hover: hover) {
|
|
1091
|
+
background-color: var(--tuwadocs-color-white);
|
|
1092
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1093
|
+
background-color: color-mix(in oklab, var(--tuwadocs-color-white) 20%, transparent);
|
|
1094
|
+
}
|
|
1095
|
+
}
|
|
1096
|
+
}
|
|
1097
|
+
}
|
|
1098
|
+
}
|
|
890
1099
|
.tuwadocs\:dark\:hover\:text-red-400 {
|
|
891
|
-
|
|
1100
|
+
&:where(.dark, .dark *) {
|
|
892
1101
|
&:hover {
|
|
893
1102
|
@media (hover: hover) {
|
|
894
1103
|
color: var(--tuwadocs-color-red-400);
|
|
@@ -1277,10 +1486,48 @@ article:focus {
|
|
|
1277
1486
|
outline: 2px solid var(--tuwa-primary);
|
|
1278
1487
|
outline-offset: 2px;
|
|
1279
1488
|
}
|
|
1280
|
-
@property --tw-
|
|
1489
|
+
@property --tw-gradient-position {
|
|
1281
1490
|
syntax: "*";
|
|
1282
1491
|
inherits: false;
|
|
1283
1492
|
}
|
|
1493
|
+
@property --tw-gradient-from {
|
|
1494
|
+
syntax: "<color>";
|
|
1495
|
+
inherits: false;
|
|
1496
|
+
initial-value: #0000;
|
|
1497
|
+
}
|
|
1498
|
+
@property --tw-gradient-via {
|
|
1499
|
+
syntax: "<color>";
|
|
1500
|
+
inherits: false;
|
|
1501
|
+
initial-value: #0000;
|
|
1502
|
+
}
|
|
1503
|
+
@property --tw-gradient-to {
|
|
1504
|
+
syntax: "<color>";
|
|
1505
|
+
inherits: false;
|
|
1506
|
+
initial-value: #0000;
|
|
1507
|
+
}
|
|
1508
|
+
@property --tw-gradient-stops {
|
|
1509
|
+
syntax: "*";
|
|
1510
|
+
inherits: false;
|
|
1511
|
+
}
|
|
1512
|
+
@property --tw-gradient-via-stops {
|
|
1513
|
+
syntax: "*";
|
|
1514
|
+
inherits: false;
|
|
1515
|
+
}
|
|
1516
|
+
@property --tw-gradient-from-position {
|
|
1517
|
+
syntax: "<length-percentage>";
|
|
1518
|
+
inherits: false;
|
|
1519
|
+
initial-value: 0%;
|
|
1520
|
+
}
|
|
1521
|
+
@property --tw-gradient-via-position {
|
|
1522
|
+
syntax: "<length-percentage>";
|
|
1523
|
+
inherits: false;
|
|
1524
|
+
initial-value: 50%;
|
|
1525
|
+
}
|
|
1526
|
+
@property --tw-gradient-to-position {
|
|
1527
|
+
syntax: "<length-percentage>";
|
|
1528
|
+
inherits: false;
|
|
1529
|
+
initial-value: 100%;
|
|
1530
|
+
}
|
|
1284
1531
|
@property --tw-shadow {
|
|
1285
1532
|
syntax: "*";
|
|
1286
1533
|
inherits: false;
|
|
@@ -1346,6 +1593,14 @@ article:focus {
|
|
|
1346
1593
|
inherits: false;
|
|
1347
1594
|
initial-value: 0 0 #0000;
|
|
1348
1595
|
}
|
|
1596
|
+
@property --tw-duration {
|
|
1597
|
+
syntax: "*";
|
|
1598
|
+
inherits: false;
|
|
1599
|
+
}
|
|
1600
|
+
@property --tw-ease {
|
|
1601
|
+
syntax: "*";
|
|
1602
|
+
inherits: false;
|
|
1603
|
+
}
|
|
1349
1604
|
@keyframes pulse {
|
|
1350
1605
|
50% {
|
|
1351
1606
|
opacity: 0.5;
|
|
@@ -1371,7 +1626,15 @@ article:focus {
|
|
|
1371
1626
|
--tw-translate-y: 0;
|
|
1372
1627
|
--tw-translate-z: 0;
|
|
1373
1628
|
--tw-space-x-reverse: 0;
|
|
1374
|
-
--tw-
|
|
1629
|
+
--tw-gradient-position: initial;
|
|
1630
|
+
--tw-gradient-from: #0000;
|
|
1631
|
+
--tw-gradient-via: #0000;
|
|
1632
|
+
--tw-gradient-to: #0000;
|
|
1633
|
+
--tw-gradient-stops: initial;
|
|
1634
|
+
--tw-gradient-via-stops: initial;
|
|
1635
|
+
--tw-gradient-from-position: 0%;
|
|
1636
|
+
--tw-gradient-via-position: 50%;
|
|
1637
|
+
--tw-gradient-to-position: 100%;
|
|
1375
1638
|
--tw-shadow: 0 0 #0000;
|
|
1376
1639
|
--tw-shadow-color: initial;
|
|
1377
1640
|
--tw-shadow-alpha: 100%;
|
|
@@ -1386,6 +1649,8 @@ article:focus {
|
|
|
1386
1649
|
--tw-ring-offset-width: 0px;
|
|
1387
1650
|
--tw-ring-offset-color: #fff;
|
|
1388
1651
|
--tw-ring-offset-shadow: 0 0 #0000;
|
|
1652
|
+
--tw-duration: initial;
|
|
1653
|
+
--tw-ease: initial;
|
|
1389
1654
|
}
|
|
1390
1655
|
}
|
|
1391
1656
|
}
|
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
|
*/
|
|
@@ -114,31 +122,6 @@ interface VideoPlayerProps {
|
|
|
114
122
|
/** ARIA label for accessibility */
|
|
115
123
|
'aria-label'?: string;
|
|
116
124
|
}
|
|
117
|
-
/**
|
|
118
|
-
* A responsive video player component that maintains aspect ratio using Tailwind CSS.
|
|
119
|
-
*
|
|
120
|
-
* @example
|
|
121
|
-
* ```tsx
|
|
122
|
-
* <VideoPlayer
|
|
123
|
-
* src="/videos/demo.mp4"
|
|
124
|
-
* poster="/images/video-thumbnail.jpg"
|
|
125
|
-
* aria-label="Product demonstration video"
|
|
126
|
-
* />
|
|
127
|
-
* ```
|
|
128
|
-
*
|
|
129
|
-
* @example
|
|
130
|
-
* ```tsx
|
|
131
|
-
* // Custom aspect ratio (4:3) with autoplay
|
|
132
|
-
* <VideoPlayer
|
|
133
|
-
* src="/videos/demo.mp4"
|
|
134
|
-
* aspectRatio="aspect-[4/3]"
|
|
135
|
-
* autoplay
|
|
136
|
-
* muted
|
|
137
|
-
* loop
|
|
138
|
-
* className="shadow-lg"
|
|
139
|
-
* />
|
|
140
|
-
* ```
|
|
141
|
-
*/
|
|
142
125
|
declare const VideoPlayer: react__default.FC<VideoPlayerProps>;
|
|
143
126
|
|
|
144
127
|
declare const baseNavLinks: {
|
|
@@ -154,12 +137,4 @@ declare const baseFooterLinks: {
|
|
|
154
137
|
image: react.JSX.Element;
|
|
155
138
|
}[];
|
|
156
139
|
|
|
157
|
-
interface ThemeSwitcherProps {
|
|
158
|
-
theme: string;
|
|
159
|
-
onToggle: () => void;
|
|
160
|
-
}
|
|
161
|
-
declare function ThemeSwitcher({ theme, onToggle }: ThemeSwitcherProps): react.JSX.Element;
|
|
162
|
-
|
|
163
|
-
declare function StarryBackground(): react.JSX.Element;
|
|
164
|
-
|
|
165
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
|
*/
|
|
@@ -114,31 +122,6 @@ interface VideoPlayerProps {
|
|
|
114
122
|
/** ARIA label for accessibility */
|
|
115
123
|
'aria-label'?: string;
|
|
116
124
|
}
|
|
117
|
-
/**
|
|
118
|
-
* A responsive video player component that maintains aspect ratio using Tailwind CSS.
|
|
119
|
-
*
|
|
120
|
-
* @example
|
|
121
|
-
* ```tsx
|
|
122
|
-
* <VideoPlayer
|
|
123
|
-
* src="/videos/demo.mp4"
|
|
124
|
-
* poster="/images/video-thumbnail.jpg"
|
|
125
|
-
* aria-label="Product demonstration video"
|
|
126
|
-
* />
|
|
127
|
-
* ```
|
|
128
|
-
*
|
|
129
|
-
* @example
|
|
130
|
-
* ```tsx
|
|
131
|
-
* // Custom aspect ratio (4:3) with autoplay
|
|
132
|
-
* <VideoPlayer
|
|
133
|
-
* src="/videos/demo.mp4"
|
|
134
|
-
* aspectRatio="aspect-[4/3]"
|
|
135
|
-
* autoplay
|
|
136
|
-
* muted
|
|
137
|
-
* loop
|
|
138
|
-
* className="shadow-lg"
|
|
139
|
-
* />
|
|
140
|
-
* ```
|
|
141
|
-
*/
|
|
142
125
|
declare const VideoPlayer: react__default.FC<VideoPlayerProps>;
|
|
143
126
|
|
|
144
127
|
declare const baseNavLinks: {
|
|
@@ -154,12 +137,4 @@ declare const baseFooterLinks: {
|
|
|
154
137
|
image: react.JSX.Element;
|
|
155
138
|
}[];
|
|
156
139
|
|
|
157
|
-
interface ThemeSwitcherProps {
|
|
158
|
-
theme: string;
|
|
159
|
-
onToggle: () => void;
|
|
160
|
-
}
|
|
161
|
-
declare function ThemeSwitcher({ theme, onToggle }: ThemeSwitcherProps): react.JSX.Element;
|
|
162
|
-
|
|
163
|
-
declare function StarryBackground(): react.JSX.Element;
|
|
164
|
-
|
|
165
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:e}){return jsx("button",{onClick:e,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:e,children:a,textToCopy:n}){let{isCopied:s,copy:r}=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:e}),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:s,onCopy:()=>r(n)})})]}),a]})}function P({children:t}){let[e,a]=useState(false);return useEffect(()=>{a(true);},[]),e?jsx(Fragment,{children:t}):null}function X({children:t,language:e,resolvedTheme:a}){return jsx("div",{className:"tuwadocs:border-t tuwadocs:border-[var(--tuwa-border-secondary)]",children:jsx(P,{children:jsx(Prism,{language:e??"bash",customStyle:{margin:0,background:"transparent"},style:a==="dark"?materialOceanic:materialLight,children:String(t).replace(/\n$/,"")})})})}function de({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(e=>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:e.icon}),jsx("h3",{className:"tuwadocs:text-lg tuwadocs:font-semibold tuwadocs:mb-2",children:e.title}),jsx("p",{className:"tuwadocs:text-[var(--tuwa-text-secondary)]",children:e.description})]},e.title))})}var U=[{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"})})}],Y=[{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 ve({links:t,logo:e}){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:e}),jsx("div",{className:"tuwadocs:flex tuwadocs:items-center tuwadocs:gap-4 tuwadocs:text-sm",children:(t??Y).map(({title:a,href:n,image:s,className:r})=>jsxs("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:cn("tuwa-footer-link tuwadocs:flex tuwadocs:items-center tuwadocs:gap-1",r),children:[s,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 ye({url:t=St,className:e,style:a,...n}){let s;try{let c=await fetch(t,{next:{revalidate:86400}});if(!c.ok)throw new Error(`Failed to fetch SVG: ${c.status}`);s=await c.text();}catch(c){return console.error("RemoteLogo: Failed to fetch SVG from remote source:",c),jsx("svg",{className:e,style:a,...n})}let r=s.replace(/<\?xml[\s\S]*?\?>/g,"").replace(/<!DOCTYPE[\s\S]*?>/gi,"").replace(/\sxml:space=/g," xmlSpace=").trim(),m=xt(r,{replace(c){if(c instanceof Element&&c.name==="svg"){let k=domToReact(c.children),i={...c.attribs};"xmlspace"in i&&(i.xmlSpace=i.xmlspace,delete i.xmlspace);let d=[e,"remote-logo"].filter(Boolean).join(" ");return jsx("svg",{...i,className:d,style:a,...n,children:k})}}}),f=(Array.isArray(m)?m:[m]).find(c=>Nt.isValidElement(c)&&c.type==="svg");return f||jsx("svg",{className:e,style:a,...n})}function Te({links:t,logo:e}){return jsx(Navbar,{logo:e,children:jsx("div",{className:"tuwadocs:flex tuwadocs:items-center tuwadocs:gap-3",children:(t??U).map(({title:a,href:n,image:s,className:r})=>jsxs("a",{href:n,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)]",r),children:[s,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 Oe({packagesList:t,resolvedTheme:e}){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:e,language:"bash",children:`${a.command} ${t}`})})},a.title))})})}function Fe({href:t,children:e}){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:e})}var Ge=({src:t,poster:e,autoplay:a=false,muted:n=false,loop:s=false,controls:r=true,className:m="",aspectRatio:C="aspect-video",onPlay:f,onPause:c,onEnded:k,"aria-label":i})=>jsx("div",{className:cn("tuwadocs:relative tuwadocs:w-full tuwadocs:overflow-hidden tuwadocs:rounded-[var(--tuwa-rounded-corners)] tuwadocs:bg-black tuwadocs:my-4",C,m),children:jsxs("video",{src:t,poster:e,controls:r,autoPlay:a,muted:n,loop:s,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":i,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[e,a]=useState(false);return useEffect(()=>{a(true);},[]),e?jsx(Fragment,{children:t}):null}function We({theme:t,onToggle:e}){return jsxs("button",{onClick:e,className:"group relative flex h-10 w-20 md:h-8 md:w-16 cursor-pointer items-center rounded-[var(--tuwa-rounded-corners)] p-1 transition-all duration-300 ease-in-out backdrop-blur-sm border bg-black/5 border-black/5 hover:bg-black/10 dark:bg-white/10 dark:border-white/10 dark:hover:bg-white/20","aria-label":"Toggle theme",children:[jsxs(D,{children:[jsx("div",{className:"absolute top-[1px] left-[2px] z-10 h-9 w-9 md:h-7 md:w-7 rounded-[var(--tuwa-rounded-corners)] bg-[var(--tuwa-bg-primary)] shadow-md 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:"absolute top-[1px] left-[2px] z-10 h-9 w-9 md:h-7 md:w-7 rounded-[var(--tuwa-rounded-corners)] bg-[var(--tuwa-bg-primary)] shadow-md hidden 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:"relative z-20 flex w-full justify-between",children:[jsx("div",{className:"flex flex-1 items-center justify-center",children:jsx(D,{children:jsx(SunIcon,{className:`h-6 w-6 relative -left-[2px] md:h-5 md:w-5 transition-colors duration-300 ${t==="light"?"text-yellow-500":"text-slate-500 group-hover:text-yellow-400"}`})})}),jsx("div",{className:"flex flex-1 justify-center",children:jsx(D,{children:jsx(MoonIcon,{className:`h-6 w-6 relative left-[2px] md:h-5 md:w-5 transition-colors duration-300 ${t==="dark"?"text-indigo-400":"text-slate-500 group-hover:text-indigo-300"}`})})})]})]})}var Dt=100,J=.9,zt=2.7,Z=.3,Ft=.5,Ht=.5,M=150,$t=M*M,j=2,tt=120,et=tt*tt,Vt=.75,Gt=.001;function ot(){let t=useRef(null),e=useRef({x:0,y:0}),a=useRef([]),n=useRef(null);return useEffect(()=>{let s=t.current;if(!s)return;let r=s.getContext("2d");if(!r)return;let m=()=>{s.width=window.innerWidth,s.height=window.innerHeight;},C=()=>{let d=[];for(let w=0;w<Dt;w++)d.push({x:Math.random()*s.width,y:Math.random()*s.height,radius:Math.random()*(zt-J)+J,vx:(Math.random()-.5)*Z,vy:(Math.random()-.5)*Z,opacity:Math.random()*Ht+Ft});return d},f=d=>{e.current.x=d.clientX,e.current.y=d.clientY;},c=()=>{m(),a.current=C();},k=d=>{r.clearRect(0,0,s.width,s.height);let w=a.current,F=e.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>s.width)&&(o.vx=-o.vx),(o.y<0||o.y>s.height)&&(o.vy=-o.vy);let p=F.x-o.x,v=F.y-o.y,g=p*p+v*v;if(g<$t){let y=Math.sqrt(g),R=(M-y)/M,at=p/y*R*j,rt=v/y*R*j;o.x-=at,o.y-=rt;}o.opacity=.3+Math.sin(d*Gt+o.x)*.5+.5;let h=Math.min(o.opacity,1),l=r.createRadialGradient(o.x,o.y,0,o.x,o.y,o.radius);H?(l.addColorStop(0,`rgba(255, 255, 255, ${h})`),l.addColorStop(.5,`rgba(147, 197, 253, ${h*.6})`),l.addColorStop(1,"rgba(59, 130, 246, 0)")):(l.addColorStop(0,`rgba(15, 23, 42, ${h})`),l.addColorStop(.5,`rgba(71, 85, 105, ${h*.6})`),l.addColorStop(1,"rgba(148, 163, 184, 0)")),r.beginPath(),r.arc(o.x,o.y,o.radius,0,Math.PI*2),r.fillStyle=l,r.fill();}r.lineWidth=Vt;for(let o=0;o<w.length;o++){let p=w[o];for(let v=o+1;v<w.length;v++){let g=w[v],h=p.x-g.x,l=p.y-g.y,y=h*h+l*l;if(y<et){let R=.2*(1-y/et);H?r.strokeStyle=`rgba(147, 197, 253, ${R})`:r.strokeStyle=`rgba(71, 85, 105, ${R*1.5})`,r.beginPath(),r.moveTo(p.x,p.y),r.lineTo(g.x,g.y),r.stroke();}}}},i=()=>{let d=Date.now();k(d),n.current=requestAnimationFrame(i);};return m(),a.current=C(),i(),window.addEventListener("mousemove",f),window.addEventListener("resize",c),()=>{n.current&&cancelAnimationFrame(n.current),window.removeEventListener("mousemove",f),window.removeEventListener("resize",c);}},[]),jsx("canvas",{ref:t,className:"absolute inset-0 w-full h-full bg-gradient-to-b from-slate-200 to-slate-350 dark:from-[#0a0e27] 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 F({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 $({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(F,{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 V({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 G=[{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"})})}],X=[{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??X).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 k=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:k})}}}),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??G).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 Y=[{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:Y.map(a=>a.title),children:Y.map(a=>jsx(Tabs.Tab,{children:jsx($,{title:"Terminal",titleIcons:jsx(CommandLineIcon,{}),textToCopy:`${a.command} ${e}`,children:jsx(V,{resolvedTheme:t,language:"bash",children:`${a.command} ${e}`})})},a.title))})})}var Et=100,W=.9,Mt=2.7,Q=.3,It=.5,Lt=.5,I=150,_t=I*I,K=2,J=120,Z=J*J,At=.75,Ot=.001;function j(){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;},C=()=>{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-W)+W,vx:(Math.random()-.5)*Q,vy:(Math.random()-.5)*Q,opacity:Math.random()*Lt+It});return n},p=n=>{t.current.x=n.clientX,t.current.y=n.clientY;},c=()=>{l(),a.current=C();},k=n=>{s.clearRect(0,0,r.width,r.height);let w=a.current,B=t.current,z=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=B.x-o.x,f=B.y-o.y,v=m*m+f*f;if(v<_t){let y=Math.sqrt(v),R=(I-y)/I,at=m/y*R*K,st=f/y*R*K;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);z?(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<Z){let R=.2*(1-y/Z);z?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();k(n),d.current=requestAnimationFrame(u);};return l(),a.current=C(),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:"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:s?"translateX(38px)":"translateX(0)",transition:"transform 300ms 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:s?"translateX(30px)":"translateX(0)",transition:"transform 300ms 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(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:C="aspect-video",onPlay:p,onPause:c,onEnded:k,"aria-label":u})=>{let n=Gt[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,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:k,"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{$ as CodeBlock,V as CodeHighlighter,F as CopyIconButton,uo as Features,go as Footer,Po as Navbar,P as NoSSR,Do as PackageInstallationTabs,No as RemoteLogo,j as StarryBackground,Go as StyledLink,Qo as ThemeSwitcher,jo as VideoPlayer,X as baseFooterLinks,G as baseNavLinks};
|