@tuwaio/docs-ui 0.0.15 → 0.0.17
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 +9 -0
- 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'),react=require('react'),nextraThemeDocs=require('nextra-theme-docs'),J=require('html-react-parser'),components=require('nextra/components');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var J__default=/*#__PURE__*/_interopDefault(J);function b({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 C({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(b,{isCopied:r,onCopy:()=>c(s)})})]}),e]})}function g({children:o}){let[t,e]=react.useState(false);return react.useEffect(()=>{e(true);},[]),t?jsxRuntime.jsx(jsxRuntime.Fragment,{children:o}):null}function k({children:o,language:t,resolvedTheme:e}){return jsxRuntime.jsx("div",{className:"tuwadocs:border-t tuwadocs:border-[var(--tuwa-border-secondary)]",children:jsxRuntime.jsx(g,{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 Ct({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 P=[{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"})})}],R=[{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 It({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??R).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 X="https://raw.githubusercontent.com/TuwaIO/workflows/refs/heads/main/preview/logo_v1.svg";async function Ot({url:o=X,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,"").trim(),m=J__default.default(c,{replace(a){if(a instanceof J.Element&&a.name==="svg"){let p=J.domToReact(a.children);return jsxRuntime.jsx("svg",{...a.attribs,className:t,style:e,...s,children:p})}}});return jsxRuntime.jsx(jsxRuntime.Fragment,{children:m})}function Dt({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??P).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 L=[{title:"pnpm",command:"pnpm add"},{title:"bun",command:"bun add"},{title:"npm",command:"npm install"},{title:"yarn",command:"yarn add"}];function Kt({packagesList:o,resolvedTheme:t}){return jsxRuntime.jsx("div",{className:"tuwadocs:my-4",children:jsxRuntime.jsx(components.Tabs,{items:L.map(e=>e.title),children:L.map(e=>jsxRuntime.jsx(components.Tabs.Tab,{children:jsxRuntime.jsx(C,{title:"Terminal",titleIcons:jsxRuntime.jsx(outline.CommandLineIcon,{}),textToCopy:`${e.command} ${o}`,children:jsxRuntime.jsx(k,{resolvedTheme:t,language:"bash",children:`${e.command} ${o}`})})},e.title))})})}function jt({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 ao=({src:o,poster:t,autoplay:e=false,muted:s=false,loop:r=false,controls:c=true,className:m="",aspectRatio:a="aspect-video",onPlay:p,onPause:I,onEnded:H,"aria-label":F})=>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",a,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:p,onPause:I,onEnded:H,"aria-label":F,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'),react=require('react'),nextraThemeDocs=require('nextra-theme-docs'),J=require('html-react-parser'),components=require('nextra/components');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var J__default=/*#__PURE__*/_interopDefault(J);function y({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 k({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(y,{isCopied:r,onCopy:()=>c(s)})})]}),e]})}function h({children:o}){let[t,e]=react.useState(false);return react.useEffect(()=>{e(true);},[]),t?jsxRuntime.jsx(jsxRuntime.Fragment,{children:o}):null}function P({children:o,language:t,resolvedTheme:e}){return jsxRuntime.jsx("div",{className:"tuwadocs:border-t tuwadocs:border-[var(--tuwa-border-secondary)]",children:jsxRuntime.jsx(h,{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 Ct({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 R=[{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"})})}],S=[{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 It({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??S).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 X="https://raw.githubusercontent.com/TuwaIO/workflows/refs/heads/main/preview/logo_v1.svg";async function Ot({url:o=X,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=J__default.default(c,{replace(a){if(a instanceof J.Element&&a.name==="svg"){let p=J.domToReact(a.children),f=[t,"remote-logo"].filter(Boolean).join(" ");return jsxRuntime.jsx("svg",{...a.attribs,className:f,style:e,...s,children:p})}}});return jsxRuntime.jsx(jsxRuntime.Fragment,{children:m})}function Dt({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??R).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 B=[{title:"pnpm",command:"pnpm add"},{title:"bun",command:"bun add"},{title:"npm",command:"npm install"},{title:"yarn",command:"yarn add"}];function Kt({packagesList:o,resolvedTheme:t}){return jsxRuntime.jsx("div",{className:"tuwadocs:my-4",children:jsxRuntime.jsx(components.Tabs,{items:B.map(e=>e.title),children:B.map(e=>jsxRuntime.jsx(components.Tabs.Tab,{children:jsxRuntime.jsx(k,{title:"Terminal",titleIcons:jsxRuntime.jsx(outline.CommandLineIcon,{}),textToCopy:`${e.command} ${o}`,children:jsxRuntime.jsx(P,{resolvedTheme:t,language:"bash",children:`${e.command} ${o}`})})},e.title))})})}function jt({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 ao=({src:o,poster:t,autoplay:e=false,muted:s=false,loop:r=false,controls:c=true,className:m="",aspectRatio:a="aspect-video",onPlay:p,onPause:f,onEnded:H,"aria-label":F})=>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",a,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:p,onPause:f,onEnded:H,"aria-label":F,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=k;exports.CodeHighlighter=P;exports.CopyIconButton=y;exports.Features=Ct;exports.Footer=It;exports.Navbar=Dt;exports.PackageInstallationTabs=Kt;exports.RemoteLogo=Ot;exports.StyledLink=jt;exports.VideoPlayer=ao;exports.baseFooterLinks=S;exports.baseNavLinks=R;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
|
@@ -940,6 +940,9 @@
|
|
|
940
940
|
--tuwa-footer-discord-hover: var(--tuwa-secondary);
|
|
941
941
|
--tuwa-footer-github-hover: rgb(243 244 246);
|
|
942
942
|
}
|
|
943
|
+
.dark .remote-logo {
|
|
944
|
+
filter: invert(1);
|
|
945
|
+
}
|
|
943
946
|
.tuwa-gradient-text {
|
|
944
947
|
background: var(--tuwa-gradient);
|
|
945
948
|
-webkit-background-clip: text;
|
|
@@ -1049,6 +1052,12 @@
|
|
|
1049
1052
|
border-color: var(--tuwa-primary) !important;
|
|
1050
1053
|
box-shadow: 0 0 0 2px var(--tuwa-primary) !important;
|
|
1051
1054
|
}
|
|
1055
|
+
[data-nextra-content] h1,
|
|
1056
|
+
[data-nextra-content] h2,
|
|
1057
|
+
[data-nextra-content] h3,
|
|
1058
|
+
[data-nextra-content] h4 {
|
|
1059
|
+
font-family: var(--font-geist-mono), ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
|
|
1060
|
+
}
|
|
1052
1061
|
[data-nextra-content] h1 {
|
|
1053
1062
|
background: var(--tuwa-gradient);
|
|
1054
1063
|
-webkit-background-clip: text;
|
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 {useState,useEffect}from'react';import {Footer,Navbar}from'nextra-theme-docs';import J,{Element,domToReact}from'html-react-parser';import {Tabs}from'nextra/components';function
|
|
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 {useState,useEffect}from'react';import {Footer,Navbar}from'nextra-theme-docs';import J,{Element,domToReact}from'html-react-parser';import {Tabs}from'nextra/components';function y({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 k({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(y,{isCopied:r,onCopy:()=>c(s)})})]}),e]})}function h({children:o}){let[t,e]=useState(false);return useEffect(()=>{e(true);},[]),t?jsx(Fragment,{children:o}):null}function P({children:o,language:t,resolvedTheme:e}){return jsx("div",{className:"tuwadocs:border-t tuwadocs:border-[var(--tuwa-border-secondary)]",children:jsx(h,{children:jsx(Prism,{language:t??"bash",customStyle:{margin:0,background:"transparent"},style:e==="dark"?materialOceanic:materialLight,children:String(o).replace(/\n$/,"")})})})}function Ct({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 R=[{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"})})}],S=[{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 It({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??S).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 X="https://raw.githubusercontent.com/TuwaIO/workflows/refs/heads/main/preview/logo_v1.svg";async function Ot({url:o=X,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=J(c,{replace(a){if(a instanceof Element&&a.name==="svg"){let p=domToReact(a.children),f=[t,"remote-logo"].filter(Boolean).join(" ");return jsx("svg",{...a.attribs,className:f,style:e,...s,children:p})}}});return jsx(Fragment,{children:m})}function Dt({links:o,logo:t}){return jsx(Navbar,{logo:t,children:jsx("div",{className:"tuwadocs:flex tuwadocs:items-center tuwadocs:gap-3",children:(o??R).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 B=[{title:"pnpm",command:"pnpm add"},{title:"bun",command:"bun add"},{title:"npm",command:"npm install"},{title:"yarn",command:"yarn add"}];function Kt({packagesList:o,resolvedTheme:t}){return jsx("div",{className:"tuwadocs:my-4",children:jsx(Tabs,{items:B.map(e=>e.title),children:B.map(e=>jsx(Tabs.Tab,{children:jsx(k,{title:"Terminal",titleIcons:jsx(CommandLineIcon,{}),textToCopy:`${e.command} ${o}`,children:jsx(P,{resolvedTheme:t,language:"bash",children:`${e.command} ${o}`})})},e.title))})})}function jt({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 ao=({src:o,poster:t,autoplay:e=false,muted:s=false,loop:r=false,controls:c=true,className:m="",aspectRatio:a="aspect-video",onPlay:p,onPause:f,onEnded:H,"aria-label":F})=>jsx("div",{className:cn("tuwadocs:relative tuwadocs:w-full tuwadocs:overflow-hidden tuwadocs:rounded-[var(--tuwa-rounded-corners)] tuwadocs:bg-black tuwadocs:my-4",a,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:p,onPause:f,onEnded:H,"aria-label":F,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{k as CodeBlock,P as CodeHighlighter,y as CopyIconButton,Ct as Features,It as Footer,Dt as Navbar,Kt as PackageInstallationTabs,Ot as RemoteLogo,jt as StyledLink,ao as VideoPlayer,S as baseFooterLinks,R as baseNavLinks};
|