@tuwaio/docs-ui 0.0.24 → 0.0.26
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 +264 -2
- package/dist/index.d.cts +9 -26
- package/dist/index.d.ts +9 -26
- 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'),Z=require('react'),nextraThemeDocs=require('nextra-theme-docs'),K=require('html-react-parser'),components=require('nextra/components');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var Z__default=/*#__PURE__*/_interopDefault(Z);var K__default=/*#__PURE__*/_interopDefault(K);function k({isCopied:o,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",o?"tuwadocs:text-[var(--tuwa-success-icon)]":"tuwadocs:text-[var(--tuwa-text-secondary)] tuwadocs:hover:text-[var(--tuwa-text-primary)]"),children:o?jsxRuntime.jsx(outline.CheckCircleIcon,{}):jsxRuntime.jsx(outline.Square2StackIcon,{})})}function R({title:o,titleIcons:t,children:e,textToCopy:s}){let{isCopied:r,copy:c}=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:o})]}),jsxRuntime.jsx("div",{className:"tuwadocs:transition tuwadocs:md:opacity-0 tuwadocs:group-hover:opacity-100",children:jsxRuntime.jsx(k,{isCopied:r,onCopy:()=>c(s)})})]}),e]})}function f({children:o}){let[t,e]=Z.useState(false);return Z.useEffect(()=>{e(true);},[]),t?jsxRuntime.jsx(jsxRuntime.Fragment,{children:o}):null}function S({children:o,language:t,resolvedTheme:e}){return jsxRuntime.jsx("div",{className:"tuwadocs:border-t tuwadocs:border-[var(--tuwa-border-secondary)]",children:jsxRuntime.jsx(f,{children:jsxRuntime.jsx(reactSyntaxHighlighter.Prism,{language:t??"bash",customStyle:{margin:0,background:"transparent"},style:e==="dark"?prism.materialOceanic:prism.materialLight,children:String(o).replace(/\n$/,"")})})})}function kt({features:o}){return jsxRuntime.jsx("div",{className:"tuwadocs:grid tuwadocs:grid-cols-1 tuwadocs:md:grid-cols-3 tuwadocs:gap-6 tuwadocs:mt-12",children:o.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 T=[{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"})})}],L=[{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 Ht({links:o,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:(o??L).map(({title:e,href:s,image:r,className:c})=>jsxRuntime.jsxs("a",{href:s,target:"_blank",rel:"noopener noreferrer",className:novaCore.cn("tuwa-footer-link tuwadocs:flex tuwadocs:items-center tuwadocs:gap-1",c),children:[r,jsxRuntime.jsx("span",{className:"tuwadocs:hidden tuwadocs:sm:inline",children:e})]},e))})]}),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 j="https://cdn.jsdelivr.net/gh/TuwaIO/workflows@main/preview/logo_v1.svg";async function Et({url:o=j,className:t,style:e,...s}){let r;try{let a=await fetch(o,{next:{revalidate:86400}});if(!a.ok)throw new Error(`Failed to fetch SVG: ${a.status}`);r=await a.text();}catch(a){return console.error("RemoteLogo: Failed to fetch SVG from remote source:",a),jsxRuntime.jsx("svg",{className:t,style:e,...s})}let c=r.replace(/<\?xml[\s\S]*?\?>/g,"").replace(/<!DOCTYPE[\s\S]*?>/gi,"").replace(/\sxml:space=/g," xmlSpace=").trim(),m=K__default.default(c,{replace(a){if(a instanceof K.Element&&a.name==="svg"){let g=K.domToReact(a.children),d={...a.attribs};"xmlspace"in d&&(d.xmlSpace=d.xmlspace,delete d.xmlspace);let M=[t,"remote-logo"].filter(Boolean).join(" ");return jsxRuntime.jsx("svg",{...d,className:M,style:e,...s,children:g})}}}),w=(Array.isArray(m)?m:[m]).find(a=>Z__default.default.isValidElement(a)&&a.type==="svg");return w||jsxRuntime.jsx("svg",{className:t,style:e,...s})}function _t({links:o,logo:t}){return jsxRuntime.jsx(nextraThemeDocs.Navbar,{logo:t,children:jsxRuntime.jsx("div",{className:"tuwadocs:flex tuwadocs:items-center tuwadocs:gap-3",children:(o??T).map(({title:e,href:s,image:r,className:c})=>jsxRuntime.jsxs("a",{href:s,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)]",c),children:[r,e]},e))})})}var H=[{title:"pnpm",command:"pnpm add"},{title:"bun",command:"bun add"},{title:"npm",command:"npm install"},{title:"yarn",command:"yarn add"}];function Xt({packagesList:o,resolvedTheme:t}){return jsxRuntime.jsx("div",{className:"tuwadocs:my-4",children:jsxRuntime.jsx(components.Tabs,{items:H.map(e=>e.title),children:H.map(e=>jsxRuntime.jsx(components.Tabs.Tab,{children:jsxRuntime.jsx(R,{title:"Terminal",titleIcons:jsxRuntime.jsx(outline.CommandLineIcon,{}),textToCopy:`${e.command} ${o}`,children:jsxRuntime.jsx(S,{resolvedTheme:t,language:"bash",children:`${e.command} ${o}`})})},e.title))})})}function oo({href:o,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:o,target:"_blank",rel:"noopener noreferrer",children:t})}var ro=({src:o,poster:t,autoplay:e=false,muted:s=false,loop:r=false,controls:c=true,className:m="",aspectRatio:C="aspect-video",onPlay:w,onPause:a,onEnded:g,"aria-label":d})=>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:o,poster:t,controls:c,autoPlay:e,muted:s,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:w,onPause:a,onEnded:g,"aria-label":d,preload:"metadata",children:[jsxRuntime.jsx("track",{kind:"captions"}),"Your browser does not support the video tag. Please"," ",jsxRuntime.jsx("a",{href:o,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=
|
|
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=G;exports.CodeHighlighter=X;exports.CopyIconButton=$;exports.Features=lo;exports.Footer=xo;exports.Navbar=Mo;exports.NoSSR=P;exports.PackageInstallationTabs=zo;exports.RemoteLogo=Co;exports.StarryBackground=et;exports.StyledLink=Vo;exports.ThemeSwitcher=Zo;exports.VideoPlayer=Uo;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
|
@@ -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,29 @@
|
|
|
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\:shadow-md {
|
|
842
|
+
--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
|
+
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
844
|
+
}
|
|
845
|
+
.tuwadocs\:backdrop-blur-sm {
|
|
846
|
+
--tw-backdrop-blur: blur(var(--tuwadocs-blur-sm));
|
|
847
|
+
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,);
|
|
848
|
+
}
|
|
755
849
|
.tuwadocs\:transition {
|
|
756
850
|
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
851
|
transition-timing-function: var(--tw-ease, var(--tuwadocs-default-transition-timing-function));
|
|
@@ -781,6 +875,28 @@
|
|
|
781
875
|
--tw-duration: 200ms;
|
|
782
876
|
transition-duration: 200ms;
|
|
783
877
|
}
|
|
878
|
+
.tuwadocs\:duration-300 {
|
|
879
|
+
--tw-duration: 300ms;
|
|
880
|
+
transition-duration: 300ms;
|
|
881
|
+
}
|
|
882
|
+
.tuwadocs\:ease-in-out {
|
|
883
|
+
--tw-ease: var(--tuwadocs-ease-in-out);
|
|
884
|
+
transition-timing-function: var(--tuwadocs-ease-in-out);
|
|
885
|
+
}
|
|
886
|
+
.tuwadocs\:group-hover\:text-indigo-300 {
|
|
887
|
+
&:is(:where(.tuwadocs\:group):hover *) {
|
|
888
|
+
@media (hover: hover) {
|
|
889
|
+
color: var(--tuwadocs-color-indigo-300);
|
|
890
|
+
}
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
.tuwadocs\:group-hover\:text-yellow-400 {
|
|
894
|
+
&:is(:where(.tuwadocs\:group):hover *) {
|
|
895
|
+
@media (hover: hover) {
|
|
896
|
+
color: var(--tuwadocs-color-yellow-400);
|
|
897
|
+
}
|
|
898
|
+
}
|
|
899
|
+
}
|
|
784
900
|
.tuwadocs\:group-hover\:opacity-100 {
|
|
785
901
|
&:is(:where(.tuwadocs\:group):hover *) {
|
|
786
902
|
@media (hover: hover) {
|
|
@@ -788,6 +904,16 @@
|
|
|
788
904
|
}
|
|
789
905
|
}
|
|
790
906
|
}
|
|
907
|
+
.tuwadocs\:hover\:bg-black\/10 {
|
|
908
|
+
&:hover {
|
|
909
|
+
@media (hover: hover) {
|
|
910
|
+
background-color: var(--tuwadocs-color-black);
|
|
911
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
912
|
+
background-color: color-mix(in oklab, var(--tuwadocs-color-black) 10%, transparent);
|
|
913
|
+
}
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
}
|
|
791
917
|
.tuwadocs\:hover\:text-\[var\(--tuwa-text-primary\)\] {
|
|
792
918
|
&:hover {
|
|
793
919
|
@media (hover: hover) {
|
|
@@ -877,6 +1003,46 @@
|
|
|
877
1003
|
align-items: flex-start;
|
|
878
1004
|
}
|
|
879
1005
|
}
|
|
1006
|
+
.tuwadocs\:md\:block {
|
|
1007
|
+
@media (width >= 48rem) {
|
|
1008
|
+
display: block;
|
|
1009
|
+
}
|
|
1010
|
+
}
|
|
1011
|
+
.tuwadocs\:md\:hidden {
|
|
1012
|
+
@media (width >= 48rem) {
|
|
1013
|
+
display: none;
|
|
1014
|
+
}
|
|
1015
|
+
}
|
|
1016
|
+
.tuwadocs\:md\:h-5 {
|
|
1017
|
+
@media (width >= 48rem) {
|
|
1018
|
+
height: calc(var(--tuwadocs-spacing) * 5);
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
.tuwadocs\:md\:h-7 {
|
|
1022
|
+
@media (width >= 48rem) {
|
|
1023
|
+
height: calc(var(--tuwadocs-spacing) * 7);
|
|
1024
|
+
}
|
|
1025
|
+
}
|
|
1026
|
+
.tuwadocs\:md\:h-8 {
|
|
1027
|
+
@media (width >= 48rem) {
|
|
1028
|
+
height: calc(var(--tuwadocs-spacing) * 8);
|
|
1029
|
+
}
|
|
1030
|
+
}
|
|
1031
|
+
.tuwadocs\:md\:w-5 {
|
|
1032
|
+
@media (width >= 48rem) {
|
|
1033
|
+
width: calc(var(--tuwadocs-spacing) * 5);
|
|
1034
|
+
}
|
|
1035
|
+
}
|
|
1036
|
+
.tuwadocs\:md\:w-7 {
|
|
1037
|
+
@media (width >= 48rem) {
|
|
1038
|
+
width: calc(var(--tuwadocs-spacing) * 7);
|
|
1039
|
+
}
|
|
1040
|
+
}
|
|
1041
|
+
.tuwadocs\:md\:w-16 {
|
|
1042
|
+
@media (width >= 48rem) {
|
|
1043
|
+
width: calc(var(--tuwadocs-spacing) * 16);
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
880
1046
|
.tuwadocs\:md\:grid-cols-3 {
|
|
881
1047
|
@media (width >= 48rem) {
|
|
882
1048
|
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
@@ -887,6 +1053,46 @@
|
|
|
887
1053
|
opacity: 0%;
|
|
888
1054
|
}
|
|
889
1055
|
}
|
|
1056
|
+
.tuwadocs\:dark\:border-white\/10 {
|
|
1057
|
+
@media (prefers-color-scheme: dark) {
|
|
1058
|
+
border-color: var(--tuwadocs-color-white);
|
|
1059
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1060
|
+
border-color: color-mix(in oklab, var(--tuwadocs-color-white) 10%, transparent);
|
|
1061
|
+
}
|
|
1062
|
+
}
|
|
1063
|
+
}
|
|
1064
|
+
.tuwadocs\:dark\:bg-white\/10 {
|
|
1065
|
+
@media (prefers-color-scheme: dark) {
|
|
1066
|
+
background-color: var(--tuwadocs-color-white);
|
|
1067
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1068
|
+
background-color: color-mix(in oklab, var(--tuwadocs-color-white) 10%, transparent);
|
|
1069
|
+
}
|
|
1070
|
+
}
|
|
1071
|
+
}
|
|
1072
|
+
.tuwadocs\:dark\:from-\[\#0a0e27\] {
|
|
1073
|
+
@media (prefers-color-scheme: dark) {
|
|
1074
|
+
--tw-gradient-from: #0a0e27;
|
|
1075
|
+
--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
|
+
}
|
|
1077
|
+
}
|
|
1078
|
+
.tuwadocs\:dark\:to-\[\#1a1f3a\] {
|
|
1079
|
+
@media (prefers-color-scheme: dark) {
|
|
1080
|
+
--tw-gradient-to: #1a1f3a;
|
|
1081
|
+
--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
|
+
}
|
|
1083
|
+
}
|
|
1084
|
+
.tuwadocs\:dark\:hover\:bg-white\/20 {
|
|
1085
|
+
@media (prefers-color-scheme: dark) {
|
|
1086
|
+
&:hover {
|
|
1087
|
+
@media (hover: hover) {
|
|
1088
|
+
background-color: var(--tuwadocs-color-white);
|
|
1089
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1090
|
+
background-color: color-mix(in oklab, var(--tuwadocs-color-white) 20%, transparent);
|
|
1091
|
+
}
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1094
|
+
}
|
|
1095
|
+
}
|
|
890
1096
|
.tuwadocs\:dark\:hover\:text-red-400 {
|
|
891
1097
|
@media (prefers-color-scheme: dark) {
|
|
892
1098
|
&:hover {
|
|
@@ -1277,10 +1483,48 @@ article:focus {
|
|
|
1277
1483
|
outline: 2px solid var(--tuwa-primary);
|
|
1278
1484
|
outline-offset: 2px;
|
|
1279
1485
|
}
|
|
1280
|
-
@property --tw-
|
|
1486
|
+
@property --tw-gradient-position {
|
|
1487
|
+
syntax: "*";
|
|
1488
|
+
inherits: false;
|
|
1489
|
+
}
|
|
1490
|
+
@property --tw-gradient-from {
|
|
1491
|
+
syntax: "<color>";
|
|
1492
|
+
inherits: false;
|
|
1493
|
+
initial-value: #0000;
|
|
1494
|
+
}
|
|
1495
|
+
@property --tw-gradient-via {
|
|
1496
|
+
syntax: "<color>";
|
|
1497
|
+
inherits: false;
|
|
1498
|
+
initial-value: #0000;
|
|
1499
|
+
}
|
|
1500
|
+
@property --tw-gradient-to {
|
|
1501
|
+
syntax: "<color>";
|
|
1502
|
+
inherits: false;
|
|
1503
|
+
initial-value: #0000;
|
|
1504
|
+
}
|
|
1505
|
+
@property --tw-gradient-stops {
|
|
1281
1506
|
syntax: "*";
|
|
1282
1507
|
inherits: false;
|
|
1283
1508
|
}
|
|
1509
|
+
@property --tw-gradient-via-stops {
|
|
1510
|
+
syntax: "*";
|
|
1511
|
+
inherits: false;
|
|
1512
|
+
}
|
|
1513
|
+
@property --tw-gradient-from-position {
|
|
1514
|
+
syntax: "<length-percentage>";
|
|
1515
|
+
inherits: false;
|
|
1516
|
+
initial-value: 0%;
|
|
1517
|
+
}
|
|
1518
|
+
@property --tw-gradient-via-position {
|
|
1519
|
+
syntax: "<length-percentage>";
|
|
1520
|
+
inherits: false;
|
|
1521
|
+
initial-value: 50%;
|
|
1522
|
+
}
|
|
1523
|
+
@property --tw-gradient-to-position {
|
|
1524
|
+
syntax: "<length-percentage>";
|
|
1525
|
+
inherits: false;
|
|
1526
|
+
initial-value: 100%;
|
|
1527
|
+
}
|
|
1284
1528
|
@property --tw-shadow {
|
|
1285
1529
|
syntax: "*";
|
|
1286
1530
|
inherits: false;
|
|
@@ -1346,6 +1590,14 @@ article:focus {
|
|
|
1346
1590
|
inherits: false;
|
|
1347
1591
|
initial-value: 0 0 #0000;
|
|
1348
1592
|
}
|
|
1593
|
+
@property --tw-duration {
|
|
1594
|
+
syntax: "*";
|
|
1595
|
+
inherits: false;
|
|
1596
|
+
}
|
|
1597
|
+
@property --tw-ease {
|
|
1598
|
+
syntax: "*";
|
|
1599
|
+
inherits: false;
|
|
1600
|
+
}
|
|
1349
1601
|
@keyframes pulse {
|
|
1350
1602
|
50% {
|
|
1351
1603
|
opacity: 0.5;
|
|
@@ -1371,7 +1623,15 @@ article:focus {
|
|
|
1371
1623
|
--tw-translate-y: 0;
|
|
1372
1624
|
--tw-translate-z: 0;
|
|
1373
1625
|
--tw-space-x-reverse: 0;
|
|
1374
|
-
--tw-
|
|
1626
|
+
--tw-gradient-position: initial;
|
|
1627
|
+
--tw-gradient-from: #0000;
|
|
1628
|
+
--tw-gradient-via: #0000;
|
|
1629
|
+
--tw-gradient-to: #0000;
|
|
1630
|
+
--tw-gradient-stops: initial;
|
|
1631
|
+
--tw-gradient-via-stops: initial;
|
|
1632
|
+
--tw-gradient-from-position: 0%;
|
|
1633
|
+
--tw-gradient-via-position: 50%;
|
|
1634
|
+
--tw-gradient-to-position: 100%;
|
|
1375
1635
|
--tw-shadow: 0 0 #0000;
|
|
1376
1636
|
--tw-shadow-color: initial;
|
|
1377
1637
|
--tw-shadow-alpha: 100%;
|
|
@@ -1386,6 +1646,8 @@ article:focus {
|
|
|
1386
1646
|
--tw-ring-offset-width: 0px;
|
|
1387
1647
|
--tw-ring-offset-color: #fff;
|
|
1388
1648
|
--tw-ring-offset-shadow: 0 0 #0000;
|
|
1649
|
+
--tw-duration: initial;
|
|
1650
|
+
--tw-ease: initial;
|
|
1389
1651
|
}
|
|
1390
1652
|
}
|
|
1391
1653
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -114,31 +114,6 @@ interface VideoPlayerProps {
|
|
|
114
114
|
/** ARIA label for accessibility */
|
|
115
115
|
'aria-label'?: string;
|
|
116
116
|
}
|
|
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
117
|
declare const VideoPlayer: react__default.FC<VideoPlayerProps>;
|
|
143
118
|
|
|
144
119
|
declare const baseNavLinks: {
|
|
@@ -154,4 +129,12 @@ declare const baseFooterLinks: {
|
|
|
154
129
|
image: react.JSX.Element;
|
|
155
130
|
}[];
|
|
156
131
|
|
|
157
|
-
|
|
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
|
+
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
|
@@ -114,31 +114,6 @@ interface VideoPlayerProps {
|
|
|
114
114
|
/** ARIA label for accessibility */
|
|
115
115
|
'aria-label'?: string;
|
|
116
116
|
}
|
|
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
117
|
declare const VideoPlayer: react__default.FC<VideoPlayerProps>;
|
|
143
118
|
|
|
144
119
|
declare const baseNavLinks: {
|
|
@@ -154,4 +129,12 @@ declare const baseFooterLinks: {
|
|
|
154
129
|
image: react.JSX.Element;
|
|
155
130
|
}[];
|
|
156
131
|
|
|
157
|
-
|
|
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
|
+
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 Z,{useState,useEffect}from'react';import {Footer,Navbar}from'nextra-theme-docs';import K,{Element,domToReact}from'html-react-parser';import {Tabs}from'nextra/components';function k({isCopied:o,onCopy:t}){return jsx("button",{onClick:t,type:"button",className:cn("tuwadocs:h-6 tuwadocs:w-6 tuwadocs:cursor-pointer tuwadocs:transition-colors",o?"tuwadocs:text-[var(--tuwa-success-icon)]":"tuwadocs:text-[var(--tuwa-text-secondary)] tuwadocs:hover:text-[var(--tuwa-text-primary)]"),children:o?jsx(CheckCircleIcon,{}):jsx(Square2StackIcon,{})})}function R({title:o,titleIcons:t,children:e,textToCopy:s}){let{isCopied:r,copy:c}=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:o})]}),jsx("div",{className:"tuwadocs:transition tuwadocs:md:opacity-0 tuwadocs:group-hover:opacity-100",children:jsx(k,{isCopied:r,onCopy:()=>c(s)})})]}),e]})}function f({children:o}){let[t,e]=useState(false);return useEffect(()=>{e(true);},[]),t?jsx(Fragment,{children:o}):null}function S({children:o,language:t,resolvedTheme:e}){return jsx("div",{className:"tuwadocs:border-t tuwadocs:border-[var(--tuwa-border-secondary)]",children:jsx(f,{children:jsx(Prism,{language:t??"bash",customStyle:{margin:0,background:"transparent"},style:e==="dark"?materialOceanic:materialLight,children:String(o).replace(/\n$/,"")})})})}function kt({features:o}){return jsx("div",{className:"tuwadocs:grid tuwadocs:grid-cols-1 tuwadocs:md:grid-cols-3 tuwadocs:gap-6 tuwadocs:mt-12",children:o.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 T=[{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"})})}],L=[{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 Ht({links:o,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:(o??L).map(({title:e,href:s,image:r,className:c})=>jsxs("a",{href:s,target:"_blank",rel:"noopener noreferrer",className:cn("tuwa-footer-link tuwadocs:flex tuwadocs:items-center tuwadocs:gap-1",c),children:[r,jsx("span",{className:"tuwadocs:hidden tuwadocs:sm:inline",children:e})]},e))})]}),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 j="https://cdn.jsdelivr.net/gh/TuwaIO/workflows@main/preview/logo_v1.svg";async function Et({url:o=j,className:t,style:e,...s}){let r;try{let a=await fetch(o,{next:{revalidate:86400}});if(!a.ok)throw new Error(`Failed to fetch SVG: ${a.status}`);r=await a.text();}catch(a){return console.error("RemoteLogo: Failed to fetch SVG from remote source:",a),jsx("svg",{className:t,style:e,...s})}let c=r.replace(/<\?xml[\s\S]*?\?>/g,"").replace(/<!DOCTYPE[\s\S]*?>/gi,"").replace(/\sxml:space=/g," xmlSpace=").trim(),m=K(c,{replace(a){if(a instanceof Element&&a.name==="svg"){let g=domToReact(a.children),d={...a.attribs};"xmlspace"in d&&(d.xmlSpace=d.xmlspace,delete d.xmlspace);let M=[t,"remote-logo"].filter(Boolean).join(" ");return jsx("svg",{...d,className:M,style:e,...s,children:g})}}}),w=(Array.isArray(m)?m:[m]).find(a=>Z.isValidElement(a)&&a.type==="svg");return w||jsx("svg",{className:t,style:e,...s})}function _t({links:o,logo:t}){return jsx(Navbar,{logo:t,children:jsx("div",{className:"tuwadocs:flex tuwadocs:items-center tuwadocs:gap-3",children:(o??T).map(({title:e,href:s,image:r,className:c})=>jsxs("a",{href:s,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)]",c),children:[r,e]},e))})})}var H=[{title:"pnpm",command:"pnpm add"},{title:"bun",command:"bun add"},{title:"npm",command:"npm install"},{title:"yarn",command:"yarn add"}];function Xt({packagesList:o,resolvedTheme:t}){return jsx("div",{className:"tuwadocs:my-4",children:jsx(Tabs,{items:H.map(e=>e.title),children:H.map(e=>jsx(Tabs.Tab,{children:jsx(R,{title:"Terminal",titleIcons:jsx(CommandLineIcon,{}),textToCopy:`${e.command} ${o}`,children:jsx(S,{resolvedTheme:t,language:"bash",children:`${e.command} ${o}`})})},e.title))})})}function oo({href:o,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:o,target:"_blank",rel:"noopener noreferrer",children:t})}var ro=({src:o,poster:t,autoplay:e=false,muted:s=false,loop:r=false,controls:c=true,className:m="",aspectRatio:C="aspect-video",onPlay:w,onPause:a,onEnded:g,"aria-label":d})=>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:o,poster:t,controls:c,autoPlay:e,muted:s,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:w,onPause:a,onEnded:g,"aria-label":d,preload:"metadata",children:[jsx("track",{kind:"captions"}),"Your browser does not support the video tag. Please"," ",jsx("a",{href:o,download:true,className:"tuwadocs:text-[var(--tuwa-text-accent)] tuwadocs:underline tuwadocs:hover:opacity-80",children:"download the video"})," ","to watch it."]})});
|
|
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: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{G as CodeBlock,X as CodeHighlighter,$ as CopyIconButton,lo as Features,xo as Footer,Mo as Navbar,P as NoSSR,zo as PackageInstallationTabs,Co as RemoteLogo,et as StarryBackground,Vo as StyledLink,Zo as ThemeSwitcher,Uo as VideoPlayer,U as baseFooterLinks,q as baseNavLinks};
|