@tuwaio/docs-ui 1.0.0-fix-components-alpha.1.c574a38 → 1.0.0-fix-components-alpha.2.c5df58a

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
- 'use strict';var novaCore=require('@tuwaio/nova-core'),outline=require('@heroicons/react/24/outline'),jsxRuntime=require('react/jsx-runtime'),reactSyntaxHighlighter=require('react-syntax-highlighter'),V=require('next/dynamic'),E=require('next/image'),nextraThemeDocs=require('nextra-theme-docs'),components=require('nextra/components');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var V__default=/*#__PURE__*/_interopDefault(V);var E__default=/*#__PURE__*/_interopDefault(E);var b=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(o,t)=>(typeof require<"u"?require:o)[t]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});function N({isCopied:e,onCopy:o}){return jsxRuntime.jsx("button",{onClick:o,type:"button",className:novaCore.cn("h-6 w-6 cursor-pointer transition-colors",e?"text-[var(--tuwa-success-icon)]":"text-[var(--tuwa-text-secondary)] hover:text-[var(--tuwa-text-primary)]"),children:e?jsxRuntime.jsx(outline.CheckCircleIcon,{}):jsxRuntime.jsx(outline.Square2StackIcon,{})})}function x({title:e,titleIcons:o,children:t,textToCopy:a}){let{isCopied:c,copy:f}=novaCore.useCopyToClipboard(1500);return jsxRuntime.jsxs("div",{className:novaCore.cn("group overflow-hidden rounded-lg border","border-[var(--tuwa-border-secondary)] bg-[var(--tuwa-bg-primary)]"),children:[jsxRuntime.jsxs("div",{className:novaCore.cn("flex items-center justify-between gap-4 px-4 py-2","border-b border-[var(--tuwa-border-secondary)] bg-[var(--tuwa-bg-secondary)]"),children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("div",{className:"h-[20px] w-[20px] text-[var(--tuwa-text-secondary)]",children:o}),jsxRuntime.jsx("p",{className:"text-sm font-medium text-[var(--tuwa-text-primary)]",children:e})]}),jsxRuntime.jsx("div",{className:"transition md:opacity-0 group-hover:opacity-100",children:jsxRuntime.jsx(N,{isCopied:c,onCopy:()=>f(a)})})]}),t]})}var _=({children:e})=>jsxRuntime.jsx(jsxRuntime.Fragment,{children:e}),s=V__default.default(()=>Promise.resolve(_),{ssr:false});function y({children:e,language:o,resolvedTheme:t}){return jsxRuntime.jsx("div",{className:"border-t border-[var(--tuwa-border-secondary)]",children:jsxRuntime.jsx(s,{children:jsxRuntime.jsx(reactSyntaxHighlighter.Prism,{language:o??"bash",customStyle:{margin:0,background:"transparent"},style:t==="dark"?b("react-syntax-highlighter/dist/esm/styles/prism").materialOceanic:b("react-syntax-highlighter/dist/esm/styles/prism").materialLight,children:String(e).replace(/\n$/,"")})})})}function ve({features:e}){return jsxRuntime.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 mt-12",children:e.map(o=>jsxRuntime.jsxs("div",{className:"p-6 border rounded-lg hover:shadow-lg transition-shadow",children:[jsxRuntime.jsx("div",{className:"text-2xl mb-3",children:o.icon}),jsxRuntime.jsx("h3",{className:"text-lg font-semibold mb-2",children:o.title}),jsxRuntime.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:o.description})]},o.title))})}var C=[{title:"NPM",href:"https://npmjs.com/org/tuwaio",className:"hover:text-red-600 dark:hover:text-red-400",image:jsxRuntime.jsx("svg",{className:"w-4 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"})})}],k=[{title:"NPM",href:"https://npmjs.com/org/tuwaio",image:jsxRuntime.jsx("svg",{className:"w-4 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",image:jsxRuntime.jsx("svg",{className:"w-4 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 Pe({links:e}){return jsxRuntime.jsx(nextraThemeDocs.Footer,{children:jsxRuntime.jsxs("div",{className:"flex w-full flex-col items-center sm:items-start tuwa-footer-border pt-8",children:[jsxRuntime.jsxs("div",{className:"mb-6 flex items-center gap-4 w-full justify-between",children:[jsxRuntime.jsx("div",{className:"flex items-center",children:jsxRuntime.jsx(s,{children:jsxRuntime.jsx(E__default.default,{width:120,height:40,src:"https://raw.githubusercontent.com/TuwaIO/workflows/refs/heads/main/preview/tuwa_logo.svg",alt:"TUWA Logo",className:"transition-opacity duration-300"})})}),jsxRuntime.jsx("div",{className:"flex items-center gap-4 text-sm",children:(e??k).map(({title:o,href:t,image:a})=>jsxRuntime.jsxs("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"tuwa-footer-link tuwa-footer-link--npm flex items-center gap-1",children:[a,jsxRuntime.jsx("span",{className:"hidden sm:inline",children:o})]},o))})]}),jsxRuntime.jsxs("div",{className:"w-full tuwa-footer-border pt-4",children:[jsxRuntime.jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4",children:[jsxRuntime.jsxs("div",{className:"flex-1",children:[jsxRuntime.jsx("p",{className:"tuwa-footer-description",children:"A useful and powerful utils for building decentralized applications."}),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. Built with"," ",jsxRuntime.jsx("span",{className:"tuwa-heart","aria-label":"love",children:"\u2764\uFE0F"})," ","for Web3."]})]}),jsxRuntime.jsx("div",{className:"flex flex-wrap items-center gap-3 mt-4 pt-4 tuwa-footer-border"})]})]})})}function Fe({links:e}){return jsxRuntime.jsx(nextraThemeDocs.Navbar,{logo:jsxRuntime.jsx(s,{children:jsxRuntime.jsx(E__default.default,{width:120,height:40,src:"https://raw.githubusercontent.com/TuwaIO/workflows/refs/heads/main/preview/tuwa_logo.svg",alt:"TUWA Logo"})}),children:jsxRuntime.jsx("div",{className:"flex items-center gap-3",children:(e??C).map(({title:o,href:t,image:a,className:c})=>jsxRuntime.jsxs("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:novaCore.cn("hidden sm:flex items-center gap-1 px-3 py-1.5 text-sm font-medium transition-colors text-gray-700 dark:text-gray-300",c),children:[a,o]},o))})})}var S=[{title:"pnpm",command:"pnpm add"},{title:"bun",command:"bun add"},{title:"npm",command:"npm install"},{title:"yarn",command:"yarn add"}];function qe({packagesList:e,resolvedTheme:o}){return jsxRuntime.jsx("div",{className:"my-4",children:jsxRuntime.jsx(components.Tabs,{items:S.map(t=>t.title),children:S.map(t=>jsxRuntime.jsx(components.Tabs.Tab,{children:jsxRuntime.jsx(x,{title:"Terminal",titleIcons:jsxRuntime.jsx(outline.CommandLineIcon,{}),textToCopy:`${t.command} ${e}`,children:jsxRuntime.jsx(y,{resolvedTheme:o,language:"bash",children:`${t.command} ${e}`})})},t.title))})})}function Ye({href:e,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:e,target:"_blank",rel:"noopener noreferrer",children:o})}var Ke=({src:e,poster:o,autoplay:t=false,muted:a=false,loop:c=false,controls:f=true,className:T="",aspectRatio:I="aspect-video",onPlay:L,onPause:B,onEnded:H,"aria-label":F})=>jsxRuntime.jsx("div",{className:novaCore.cn("relative w-full overflow-hidden rounded-lg bg-black my-4",I,T),children:jsxRuntime.jsxs("video",{src:e,poster:o,controls:f,autoPlay:t,muted:a,loop:c,className:novaCore.cn("absolute inset-0 h-full w-full object-contain","transition-opacity duration-200","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2"),onPlay:L,onPause:B,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:e,download:true,className:"text-blue-400 underline hover:text-blue-300",children:"download the video"})," ","to watch it."]})});
2
- exports.CodeBlock=x;exports.CodeHighlighter=y;exports.CopyIconButton=N;exports.Features=ve;exports.Footer=Pe;exports.Navbar=Fe;exports.PackageInstallationTabs=qe;exports.StyledLink=Ye;exports.VideoPlayer=Ke;exports.baseFooterLinks=k;exports.baseNavLinks=C;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]}})});
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'),V=require('next/dynamic'),E=require('next/image'),nextraThemeDocs=require('nextra-theme-docs'),components=require('nextra/components');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var V__default=/*#__PURE__*/_interopDefault(V);var E__default=/*#__PURE__*/_interopDefault(E);var h=(o=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(o,{get:(t,a)=>(typeof require<"u"?require:t)[a]}):o)(function(o){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+o+'" is not supported')});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 x({title:o,titleIcons:t,children:a,textToCopy:s}){let{isCopied:u,copy:m}=novaCore.useCopyToClipboard(1500);return jsxRuntime.jsxs("div",{className:novaCore.cn("tuwadocs:group tuwadocs:overflow-hidden tuwadocs:rounded-lg 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:u,onCopy:()=>m(s)})})]}),a]})}var _=({children:o})=>jsxRuntime.jsx(jsxRuntime.Fragment,{children:o}),c=V__default.default(()=>Promise.resolve(_),{ssr:false});function y({children:o,language:t,resolvedTheme:a}){return jsxRuntime.jsx("div",{className:"tuwadocs:border-t tuwadocs:border-[var(--tuwa-border-secondary)]",children:jsxRuntime.jsx(c,{children:jsxRuntime.jsx(reactSyntaxHighlighter.Prism,{language:t??"bash",customStyle:{margin:0,background:"transparent"},style:a==="dark"?h("react-syntax-highlighter/dist/esm/styles/prism").materialOceanic:h("react-syntax-highlighter/dist/esm/styles/prism").materialLight,children:String(o).replace(/\n$/,"")})})})}function vo({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-lg 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-gray-600 tuwadocs:dark:text-gray-400",children:t.description})]},t.title))})}var C=[{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"})})}],k=[{title:"NPM",href:"https://npmjs.com/org/tuwaio",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",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 So({links: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:jsxRuntime.jsx(c,{children:jsxRuntime.jsx(E__default.default,{width:120,height:40,src:"https://raw.githubusercontent.com/TuwaIO/workflows/refs/heads/main/preview/tuwa_logo.svg",alt:"TUWA Logo",className:"tuwadocs:transition-opacity tuwadocs:duration-300"})})}),jsxRuntime.jsx("div",{className:"tuwadocs:flex tuwadocs:items-center tuwadocs:gap-4 tuwadocs:text-sm",children:(o??k).map(({title:t,href:a,image:s})=>jsxRuntime.jsxs("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:"tuwa-footer-link tuwa-footer-link--npm tuwadocs:flex tuwadocs:items-center tuwadocs:gap-1",children:[s,jsxRuntime.jsx("span",{className:"tuwadocs:hidden tuwadocs:sm:inline",children:t})]},t))})]}),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:"A useful and powerful utils for building decentralized applications."}),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. Built with"," ",jsxRuntime.jsx("span",{className:"tuwa-heart","aria-label":"love",children:"\u2764\uFE0F"})," ","for Web3."]})]}),jsxRuntime.jsx("div",{className:"tuwadocs:flex tuwadocs:flex-wrap tuwadocs:items-center tuwadocs:gap-3 tuwadocs:mt-4 tuwadocs:pt-4 tuwa-footer-border"})]})]})})}function Mo({links:o}){return jsxRuntime.jsx(nextraThemeDocs.Navbar,{logo:jsxRuntime.jsx(c,{children:jsxRuntime.jsx(E__default.default,{width:120,height:40,src:"https://raw.githubusercontent.com/TuwaIO/workflows/refs/heads/main/preview/tuwa_logo.svg",alt:"TUWA Logo"})}),children:jsxRuntime.jsx("div",{className:"tuwadocs:flex tuwadocs:items-center tuwadocs:gap-3",children:(o??C).map(({title:t,href:a,image:s,className:u})=>jsxRuntime.jsxs("a",{href:a,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-gray-700 tuwadocs:dark:text-gray-300",u),children:[s,t]},t))})})}var S=[{title:"pnpm",command:"pnpm add"},{title:"bun",command:"bun add"},{title:"npm",command:"npm install"},{title:"yarn",command:"yarn add"}];function Wo({packagesList:o,resolvedTheme:t}){return jsxRuntime.jsx("div",{className:"tuwadocs:my-4",children:jsxRuntime.jsx(components.Tabs,{items:S.map(a=>a.title),children:S.map(a=>jsxRuntime.jsx(components.Tabs.Tab,{children:jsxRuntime.jsx(x,{title:"Terminal",titleIcons:jsxRuntime.jsx(outline.CommandLineIcon,{}),textToCopy:`${a.command} ${o}`,children:jsxRuntime.jsx(y,{resolvedTheme:t,language:"bash",children:`${a.command} ${o}`})})},a.title))})})}function Do({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 Qo=({src:o,poster:t,autoplay:a=false,muted:s=false,loop:u=false,controls:m=true,className:T="",aspectRatio:I="aspect-video",onPlay:L,onPause:B,onEnded:H,"aria-label":F})=>jsxRuntime.jsx("div",{className:novaCore.cn("tuwadocs:relative tuwadocs:w-full tuwadocs:overflow-hidden tuwadocs:rounded-lg tuwadocs:bg-black tuwadocs:my-4",I,T),children:jsxRuntime.jsxs("video",{src:o,poster:t,controls:m,autoPlay:a,muted:s,loop:u,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-2 tuwadocs:focus:ring-blue-500 tuwadocs:focus:ring-offset-2"),onPlay:L,onPause:B,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-blue-400 tuwadocs:underline tuwadocs:hover:text-blue-300",children:"download the video"})," ","to watch it."]})});
2
+ exports.CodeBlock=x;exports.CodeHighlighter=y;exports.CopyIconButton=b;exports.Features=vo;exports.Footer=So;exports.Navbar=Mo;exports.PackageInstallationTabs=Wo;exports.StyledLink=Do;exports.VideoPlayer=Qo;exports.baseFooterLinks=k;exports.baseNavLinks=C;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
@@ -618,7 +618,15 @@
618
618
  @layer theme, base, components, utilities;
619
619
  @layer theme {
620
620
  :root, :host {
621
+ --tuwadocs-color-red-400: oklch(70.4% 0.191 22.216);
622
+ --tuwadocs-color-red-600: oklch(57.7% 0.245 27.325);
623
+ --tuwadocs-color-blue-300: oklch(80.9% 0.105 251.813);
624
+ --tuwadocs-color-blue-400: oklch(70.7% 0.165 254.624);
625
+ --tuwadocs-color-blue-500: oklch(62.3% 0.214 259.815);
621
626
  --tuwadocs-color-gray-200: oklch(92.8% 0.006 264.531);
627
+ --tuwadocs-color-gray-300: oklch(87.2% 0.01 258.338);
628
+ --tuwadocs-color-gray-400: oklch(70.7% 0.022 261.325);
629
+ --tuwadocs-color-gray-600: oklch(44.6% 0.03 256.802);
622
630
  --tuwadocs-color-gray-700: oklch(37.3% 0.034 259.733);
623
631
  --tuwadocs-color-gray-900: oklch(21% 0.034 264.665);
624
632
  --tuwadocs-color-black: #000;
@@ -630,11 +638,14 @@
630
638
  --tuwadocs-text-sm--line-height: calc(1.25 / 0.875);
631
639
  --tuwadocs-text-lg: 1.125rem;
632
640
  --tuwadocs-text-lg--line-height: calc(1.75 / 1.125);
641
+ --tuwadocs-text-2xl: 1.5rem;
642
+ --tuwadocs-text-2xl--line-height: calc(2 / 1.5);
633
643
  --tuwadocs-font-weight-medium: 500;
634
644
  --tuwadocs-font-weight-semibold: 600;
635
645
  --tuwadocs-font-weight-bold: 700;
636
646
  --tuwadocs-tracking-tight: -0.025em;
637
647
  --tuwadocs-radius-md: 0.375rem;
648
+ --tuwadocs-radius-lg: 0.5rem;
638
649
  --tuwadocs-radius-xl: 0.75rem;
639
650
  --tuwadocs-radius-2xl: 1rem;
640
651
  --tuwadocs-animate-pulse: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
@@ -644,21 +655,268 @@
644
655
  }
645
656
  }
646
657
  @layer utilities {
658
+ .tuwadocs\:absolute {
659
+ position: absolute;
660
+ }
661
+ .tuwadocs\:relative {
662
+ position: relative;
663
+ }
664
+ .tuwadocs\:inset-0 {
665
+ inset: calc(var(--tuwadocs-spacing) * 0);
666
+ }
667
+ .tuwadocs\:my-4 {
668
+ margin-block: calc(var(--tuwadocs-spacing) * 4);
669
+ }
670
+ .tuwadocs\:mt-4 {
671
+ margin-top: calc(var(--tuwadocs-spacing) * 4);
672
+ }
673
+ .tuwadocs\:mt-12 {
674
+ margin-top: calc(var(--tuwadocs-spacing) * 12);
675
+ }
676
+ .tuwadocs\:mb-2 {
677
+ margin-bottom: calc(var(--tuwadocs-spacing) * 2);
678
+ }
679
+ .tuwadocs\:mb-3 {
680
+ margin-bottom: calc(var(--tuwadocs-spacing) * 3);
681
+ }
682
+ .tuwadocs\:mb-6 {
683
+ margin-bottom: calc(var(--tuwadocs-spacing) * 6);
684
+ }
685
+ .tuwadocs\:flex {
686
+ display: flex;
687
+ }
688
+ .tuwadocs\:grid {
689
+ display: grid;
690
+ }
691
+ .tuwadocs\:hidden {
692
+ display: none;
693
+ }
694
+ .tuwadocs\:h-4 {
695
+ height: calc(var(--tuwadocs-spacing) * 4);
696
+ }
697
+ .tuwadocs\:h-6 {
698
+ height: calc(var(--tuwadocs-spacing) * 6);
699
+ }
700
+ .tuwadocs\:h-\[20px\] {
701
+ height: 20px;
702
+ }
703
+ .tuwadocs\:h-full {
704
+ height: 100%;
705
+ }
706
+ .tuwadocs\:w-4 {
707
+ width: calc(var(--tuwadocs-spacing) * 4);
708
+ }
709
+ .tuwadocs\:w-6 {
710
+ width: calc(var(--tuwadocs-spacing) * 6);
711
+ }
712
+ .tuwadocs\:w-\[20px\] {
713
+ width: 20px;
714
+ }
715
+ .tuwadocs\:w-full {
716
+ width: 100%;
717
+ }
718
+ .tuwadocs\:flex-1 {
719
+ flex: 1;
720
+ }
721
+ .tuwadocs\:cursor-pointer {
722
+ cursor: pointer;
723
+ }
724
+ .tuwadocs\:grid-cols-1 {
725
+ grid-template-columns: repeat(1, minmax(0, 1fr));
726
+ }
727
+ .tuwadocs\:flex-col {
728
+ flex-direction: column;
729
+ }
730
+ .tuwadocs\:flex-wrap {
731
+ flex-wrap: wrap;
732
+ }
733
+ .tuwadocs\:items-center {
734
+ align-items: center;
735
+ }
736
+ .tuwadocs\:items-start {
737
+ align-items: flex-start;
738
+ }
739
+ .tuwadocs\:justify-between {
740
+ justify-content: space-between;
741
+ }
742
+ .tuwadocs\:gap-1 {
743
+ gap: calc(var(--tuwadocs-spacing) * 1);
744
+ }
745
+ .tuwadocs\:gap-2 {
746
+ gap: calc(var(--tuwadocs-spacing) * 2);
747
+ }
748
+ .tuwadocs\:gap-3 {
749
+ gap: calc(var(--tuwadocs-spacing) * 3);
750
+ }
751
+ .tuwadocs\:gap-4 {
752
+ gap: calc(var(--tuwadocs-spacing) * 4);
753
+ }
754
+ .tuwadocs\:gap-6 {
755
+ gap: calc(var(--tuwadocs-spacing) * 6);
756
+ }
757
+ .tuwadocs\:overflow-hidden {
758
+ overflow: hidden;
759
+ }
760
+ .tuwadocs\:rounded-lg {
761
+ border-radius: var(--tuwadocs-radius-lg);
762
+ }
763
+ .tuwadocs\:border {
764
+ border-style: var(--tw-border-style);
765
+ border-width: 1px;
766
+ }
767
+ .tuwadocs\:border-t {
768
+ border-top-style: var(--tw-border-style);
769
+ border-top-width: 1px;
770
+ }
771
+ .tuwadocs\:border-b {
772
+ border-bottom-style: var(--tw-border-style);
773
+ border-bottom-width: 1px;
774
+ }
775
+ .tuwadocs\:border-\[var\(--tuwa-border-secondary\)\] {
776
+ border-color: var(--tuwa-border-secondary);
777
+ }
778
+ .tuwadocs\:bg-\[var\(--tuwa-bg-primary\)\] {
779
+ background-color: var(--tuwa-bg-primary);
780
+ }
781
+ .tuwadocs\:bg-\[var\(--tuwa-bg-secondary\)\] {
782
+ background-color: var(--tuwa-bg-secondary);
783
+ }
784
+ .tuwadocs\:bg-black {
785
+ background-color: var(--tuwadocs-color-black);
786
+ }
787
+ .tuwadocs\:object-contain {
788
+ -o-object-fit: contain;
789
+ object-fit: contain;
790
+ }
791
+ .tuwadocs\:p-6 {
792
+ padding: calc(var(--tuwadocs-spacing) * 6);
793
+ }
794
+ .tuwadocs\:px-3 {
795
+ padding-inline: calc(var(--tuwadocs-spacing) * 3);
796
+ }
797
+ .tuwadocs\:px-4 {
798
+ padding-inline: calc(var(--tuwadocs-spacing) * 4);
799
+ }
800
+ .tuwadocs\:py-1\.5 {
801
+ padding-block: calc(var(--tuwadocs-spacing) * 1.5);
802
+ }
803
+ .tuwadocs\:py-2 {
804
+ padding-block: calc(var(--tuwadocs-spacing) * 2);
805
+ }
806
+ .tuwadocs\:pt-4 {
807
+ padding-top: calc(var(--tuwadocs-spacing) * 4);
808
+ }
809
+ .tuwadocs\:pt-8 {
810
+ padding-top: calc(var(--tuwadocs-spacing) * 8);
811
+ }
812
+ .tuwadocs\:text-2xl {
813
+ font-size: var(--tuwadocs-text-2xl);
814
+ line-height: var(--tw-leading, var(--tuwadocs-text-2xl--line-height));
815
+ }
816
+ .tuwadocs\:text-lg {
817
+ font-size: var(--tuwadocs-text-lg);
818
+ line-height: var(--tw-leading, var(--tuwadocs-text-lg--line-height));
819
+ }
820
+ .tuwadocs\:text-sm {
821
+ font-size: var(--tuwadocs-text-sm);
822
+ line-height: var(--tw-leading, var(--tuwadocs-text-sm--line-height));
823
+ }
647
824
  .tuwadocs\:font-medium {
648
825
  --tw-font-weight: var(--tuwadocs-font-weight-medium);
649
826
  font-weight: var(--tuwadocs-font-weight-medium);
650
827
  }
828
+ .tuwadocs\:font-semibold {
829
+ --tw-font-weight: var(--tuwadocs-font-weight-semibold);
830
+ font-weight: var(--tuwadocs-font-weight-semibold);
831
+ }
832
+ .tuwadocs\:text-\[var\(--tuwa-success-icon\)\] {
833
+ color: var(--tuwa-success-icon);
834
+ }
651
835
  .tuwadocs\:text-\[var\(--tuwa-text-accent\)\] {
652
836
  color: var(--tuwa-text-accent);
653
837
  }
838
+ .tuwadocs\:text-\[var\(--tuwa-text-primary\)\] {
839
+ color: var(--tuwa-text-primary);
840
+ }
841
+ .tuwadocs\:text-\[var\(--tuwa-text-secondary\)\] {
842
+ color: var(--tuwa-text-secondary);
843
+ }
844
+ .tuwadocs\:text-blue-400 {
845
+ color: var(--tuwadocs-color-blue-400);
846
+ }
847
+ .tuwadocs\:text-gray-600 {
848
+ color: var(--tuwadocs-color-gray-600);
849
+ }
850
+ .tuwadocs\:text-gray-700 {
851
+ color: var(--tuwadocs-color-gray-700);
852
+ }
853
+ .tuwadocs\:underline {
854
+ text-decoration-line: underline;
855
+ }
654
856
  .tuwadocs\:underline-offset-4 {
655
857
  text-underline-offset: 4px;
656
858
  }
859
+ .tuwadocs\:transition {
860
+ 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;
861
+ transition-timing-function: var(--tw-ease, var(--tuwadocs-default-transition-timing-function));
862
+ transition-duration: var(--tw-duration, var(--tuwadocs-default-transition-duration));
863
+ }
657
864
  .tuwadocs\:transition-all {
658
865
  transition-property: all;
659
866
  transition-timing-function: var(--tw-ease, var(--tuwadocs-default-transition-timing-function));
660
867
  transition-duration: var(--tw-duration, var(--tuwadocs-default-transition-duration));
661
868
  }
869
+ .tuwadocs\:transition-colors {
870
+ transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;
871
+ transition-timing-function: var(--tw-ease, var(--tuwadocs-default-transition-timing-function));
872
+ transition-duration: var(--tw-duration, var(--tuwadocs-default-transition-duration));
873
+ }
874
+ .tuwadocs\:transition-opacity {
875
+ transition-property: opacity;
876
+ transition-timing-function: var(--tw-ease, var(--tuwadocs-default-transition-timing-function));
877
+ transition-duration: var(--tw-duration, var(--tuwadocs-default-transition-duration));
878
+ }
879
+ .tuwadocs\:transition-shadow {
880
+ transition-property: box-shadow;
881
+ transition-timing-function: var(--tw-ease, var(--tuwadocs-default-transition-timing-function));
882
+ transition-duration: var(--tw-duration, var(--tuwadocs-default-transition-duration));
883
+ }
884
+ .tuwadocs\:duration-200 {
885
+ --tw-duration: 200ms;
886
+ transition-duration: 200ms;
887
+ }
888
+ .tuwadocs\:duration-300 {
889
+ --tw-duration: 300ms;
890
+ transition-duration: 300ms;
891
+ }
892
+ .tuwadocs\:group-hover\:opacity-100 {
893
+ &:is(:where(.tuwadocs\:group):hover *) {
894
+ @media (hover: hover) {
895
+ opacity: 100%;
896
+ }
897
+ }
898
+ }
899
+ .tuwadocs\:hover\:text-\[var\(--tuwa-text-primary\)\] {
900
+ &:hover {
901
+ @media (hover: hover) {
902
+ color: var(--tuwa-text-primary);
903
+ }
904
+ }
905
+ }
906
+ .tuwadocs\:hover\:text-blue-300 {
907
+ &:hover {
908
+ @media (hover: hover) {
909
+ color: var(--tuwadocs-color-blue-300);
910
+ }
911
+ }
912
+ }
913
+ .tuwadocs\:hover\:text-red-600 {
914
+ &:hover {
915
+ @media (hover: hover) {
916
+ color: var(--tuwadocs-color-red-600);
917
+ }
918
+ }
919
+ }
662
920
  .tuwadocs\:hover\:underline {
663
921
  &:hover {
664
922
  @media (hover: hover) {
@@ -666,6 +924,91 @@
666
924
  }
667
925
  }
668
926
  }
927
+ .tuwadocs\:hover\:shadow-lg {
928
+ &:hover {
929
+ @media (hover: hover) {
930
+ --tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
931
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
932
+ }
933
+ }
934
+ }
935
+ .tuwadocs\:focus\:ring-2 {
936
+ &:focus {
937
+ --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
938
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
939
+ }
940
+ }
941
+ .tuwadocs\:focus\:ring-blue-500 {
942
+ &:focus {
943
+ --tw-ring-color: var(--tuwadocs-color-blue-500);
944
+ }
945
+ }
946
+ .tuwadocs\:focus\:ring-offset-2 {
947
+ &:focus {
948
+ --tw-ring-offset-width: 2px;
949
+ --tw-ring-offset-shadow: var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
950
+ }
951
+ }
952
+ .tuwadocs\:focus\:outline-none {
953
+ &:focus {
954
+ --tw-outline-style: none;
955
+ outline-style: none;
956
+ }
957
+ }
958
+ .tuwadocs\:sm\:flex {
959
+ @media (width >= 40rem) {
960
+ display: flex;
961
+ }
962
+ }
963
+ .tuwadocs\:sm\:inline {
964
+ @media (width >= 40rem) {
965
+ display: inline;
966
+ }
967
+ }
968
+ .tuwadocs\:sm\:flex-row {
969
+ @media (width >= 40rem) {
970
+ flex-direction: row;
971
+ }
972
+ }
973
+ .tuwadocs\:sm\:items-center {
974
+ @media (width >= 40rem) {
975
+ align-items: center;
976
+ }
977
+ }
978
+ .tuwadocs\:sm\:items-start {
979
+ @media (width >= 40rem) {
980
+ align-items: flex-start;
981
+ }
982
+ }
983
+ .tuwadocs\:md\:grid-cols-3 {
984
+ @media (width >= 48rem) {
985
+ grid-template-columns: repeat(3, minmax(0, 1fr));
986
+ }
987
+ }
988
+ .tuwadocs\:md\:opacity-0 {
989
+ @media (width >= 48rem) {
990
+ opacity: 0%;
991
+ }
992
+ }
993
+ .tuwadocs\:dark\:text-gray-300 {
994
+ @media (prefers-color-scheme: dark) {
995
+ color: var(--tuwadocs-color-gray-300);
996
+ }
997
+ }
998
+ .tuwadocs\:dark\:text-gray-400 {
999
+ @media (prefers-color-scheme: dark) {
1000
+ color: var(--tuwadocs-color-gray-400);
1001
+ }
1002
+ }
1003
+ .tuwadocs\:dark\:hover\:text-red-400 {
1004
+ @media (prefers-color-scheme: dark) {
1005
+ &:hover {
1006
+ @media (hover: hover) {
1007
+ color: var(--tuwadocs-color-red-400);
1008
+ }
1009
+ }
1010
+ }
1011
+ }
669
1012
  }
670
1013
  :root {
671
1014
  --tuwa-primary: #6366f1;
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,Fragment,jsxs}from'react/jsx-runtime';import {Prism}from'react-syntax-highlighter';import V from'next/dynamic';import E from'next/image';import {Footer,Navbar}from'nextra-theme-docs';import {Tabs}from'nextra/components';var b=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(o,t)=>(typeof require<"u"?require:o)[t]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});function N({isCopied:e,onCopy:o}){return jsx("button",{onClick:o,type:"button",className:cn("h-6 w-6 cursor-pointer transition-colors",e?"text-[var(--tuwa-success-icon)]":"text-[var(--tuwa-text-secondary)] hover:text-[var(--tuwa-text-primary)]"),children:e?jsx(CheckCircleIcon,{}):jsx(Square2StackIcon,{})})}function x({title:e,titleIcons:o,children:t,textToCopy:a}){let{isCopied:c,copy:f}=useCopyToClipboard(1500);return jsxs("div",{className:cn("group overflow-hidden rounded-lg border","border-[var(--tuwa-border-secondary)] bg-[var(--tuwa-bg-primary)]"),children:[jsxs("div",{className:cn("flex items-center justify-between gap-4 px-4 py-2","border-b border-[var(--tuwa-border-secondary)] bg-[var(--tuwa-bg-secondary)]"),children:[jsxs("div",{className:"flex items-center gap-2",children:[jsx("div",{className:"h-[20px] w-[20px] text-[var(--tuwa-text-secondary)]",children:o}),jsx("p",{className:"text-sm font-medium text-[var(--tuwa-text-primary)]",children:e})]}),jsx("div",{className:"transition md:opacity-0 group-hover:opacity-100",children:jsx(N,{isCopied:c,onCopy:()=>f(a)})})]}),t]})}var _=({children:e})=>jsx(Fragment,{children:e}),s=V(()=>Promise.resolve(_),{ssr:false});function y({children:e,language:o,resolvedTheme:t}){return jsx("div",{className:"border-t border-[var(--tuwa-border-secondary)]",children:jsx(s,{children:jsx(Prism,{language:o??"bash",customStyle:{margin:0,background:"transparent"},style:t==="dark"?b("react-syntax-highlighter/dist/esm/styles/prism").materialOceanic:b("react-syntax-highlighter/dist/esm/styles/prism").materialLight,children:String(e).replace(/\n$/,"")})})})}function ve({features:e}){return jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 mt-12",children:e.map(o=>jsxs("div",{className:"p-6 border rounded-lg hover:shadow-lg transition-shadow",children:[jsx("div",{className:"text-2xl mb-3",children:o.icon}),jsx("h3",{className:"text-lg font-semibold mb-2",children:o.title}),jsx("p",{className:"text-gray-600 dark:text-gray-400",children:o.description})]},o.title))})}var C=[{title:"NPM",href:"https://npmjs.com/org/tuwaio",className:"hover:text-red-600 dark:hover:text-red-400",image:jsx("svg",{className:"w-4 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"})})}],k=[{title:"NPM",href:"https://npmjs.com/org/tuwaio",image:jsx("svg",{className:"w-4 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",image:jsx("svg",{className:"w-4 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 Pe({links:e}){return jsx(Footer,{children:jsxs("div",{className:"flex w-full flex-col items-center sm:items-start tuwa-footer-border pt-8",children:[jsxs("div",{className:"mb-6 flex items-center gap-4 w-full justify-between",children:[jsx("div",{className:"flex items-center",children:jsx(s,{children:jsx(E,{width:120,height:40,src:"https://raw.githubusercontent.com/TuwaIO/workflows/refs/heads/main/preview/tuwa_logo.svg",alt:"TUWA Logo",className:"transition-opacity duration-300"})})}),jsx("div",{className:"flex items-center gap-4 text-sm",children:(e??k).map(({title:o,href:t,image:a})=>jsxs("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"tuwa-footer-link tuwa-footer-link--npm flex items-center gap-1",children:[a,jsx("span",{className:"hidden sm:inline",children:o})]},o))})]}),jsxs("div",{className:"w-full tuwa-footer-border pt-4",children:[jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4",children:[jsxs("div",{className:"flex-1",children:[jsx("p",{className:"tuwa-footer-description",children:"A useful and powerful utils for building decentralized applications."}),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. Built with"," ",jsx("span",{className:"tuwa-heart","aria-label":"love",children:"\u2764\uFE0F"})," ","for Web3."]})]}),jsx("div",{className:"flex flex-wrap items-center gap-3 mt-4 pt-4 tuwa-footer-border"})]})]})})}function Fe({links:e}){return jsx(Navbar,{logo:jsx(s,{children:jsx(E,{width:120,height:40,src:"https://raw.githubusercontent.com/TuwaIO/workflows/refs/heads/main/preview/tuwa_logo.svg",alt:"TUWA Logo"})}),children:jsx("div",{className:"flex items-center gap-3",children:(e??C).map(({title:o,href:t,image:a,className:c})=>jsxs("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:cn("hidden sm:flex items-center gap-1 px-3 py-1.5 text-sm font-medium transition-colors text-gray-700 dark:text-gray-300",c),children:[a,o]},o))})})}var S=[{title:"pnpm",command:"pnpm add"},{title:"bun",command:"bun add"},{title:"npm",command:"npm install"},{title:"yarn",command:"yarn add"}];function qe({packagesList:e,resolvedTheme:o}){return jsx("div",{className:"my-4",children:jsx(Tabs,{items:S.map(t=>t.title),children:S.map(t=>jsx(Tabs.Tab,{children:jsx(x,{title:"Terminal",titleIcons:jsx(CommandLineIcon,{}),textToCopy:`${t.command} ${e}`,children:jsx(y,{resolvedTheme:o,language:"bash",children:`${t.command} ${e}`})})},t.title))})})}function Ye({href:e,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:e,target:"_blank",rel:"noopener noreferrer",children:o})}var Ke=({src:e,poster:o,autoplay:t=false,muted:a=false,loop:c=false,controls:f=true,className:T="",aspectRatio:I="aspect-video",onPlay:L,onPause:B,onEnded:H,"aria-label":F})=>jsx("div",{className:cn("relative w-full overflow-hidden rounded-lg bg-black my-4",I,T),children:jsxs("video",{src:e,poster:o,controls:f,autoPlay:t,muted:a,loop:c,className:cn("absolute inset-0 h-full w-full object-contain","transition-opacity duration-200","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2"),onPlay:L,onPause:B,onEnded:H,"aria-label":F,preload:"metadata",children:[jsx("track",{kind:"captions"}),"Your browser does not support the video tag. Please"," ",jsx("a",{href:e,download:true,className:"text-blue-400 underline hover:text-blue-300",children:"download the video"})," ","to watch it."]})});
2
- export{x as CodeBlock,y as CodeHighlighter,N as CopyIconButton,ve as Features,Pe as Footer,Fe as Navbar,qe as PackageInstallationTabs,Ye as StyledLink,Ke as VideoPlayer,k as baseFooterLinks,C as baseNavLinks};
1
+ import {cn,useCopyToClipboard}from'@tuwaio/nova-core';export*from'@tuwaio/nova-core';import {CheckCircleIcon,Square2StackIcon,CommandLineIcon}from'@heroicons/react/24/outline';import {jsx,Fragment,jsxs}from'react/jsx-runtime';import {Prism}from'react-syntax-highlighter';import V from'next/dynamic';import E from'next/image';import {Footer,Navbar}from'nextra-theme-docs';import {Tabs}from'nextra/components';var h=(o=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(o,{get:(t,a)=>(typeof require<"u"?require:t)[a]}):o)(function(o){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+o+'" is not supported')});function b({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 x({title:o,titleIcons:t,children:a,textToCopy:s}){let{isCopied:u,copy:m}=useCopyToClipboard(1500);return jsxs("div",{className:cn("tuwadocs:group tuwadocs:overflow-hidden tuwadocs:rounded-lg 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(b,{isCopied:u,onCopy:()=>m(s)})})]}),a]})}var _=({children:o})=>jsx(Fragment,{children:o}),c=V(()=>Promise.resolve(_),{ssr:false});function y({children:o,language:t,resolvedTheme:a}){return jsx("div",{className:"tuwadocs:border-t tuwadocs:border-[var(--tuwa-border-secondary)]",children:jsx(c,{children:jsx(Prism,{language:t??"bash",customStyle:{margin:0,background:"transparent"},style:a==="dark"?h("react-syntax-highlighter/dist/esm/styles/prism").materialOceanic:h("react-syntax-highlighter/dist/esm/styles/prism").materialLight,children:String(o).replace(/\n$/,"")})})})}function vo({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-lg 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-gray-600 tuwadocs:dark:text-gray-400",children:t.description})]},t.title))})}var C=[{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"})})}],k=[{title:"NPM",href:"https://npmjs.com/org/tuwaio",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",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 So({links: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:jsx(c,{children:jsx(E,{width:120,height:40,src:"https://raw.githubusercontent.com/TuwaIO/workflows/refs/heads/main/preview/tuwa_logo.svg",alt:"TUWA Logo",className:"tuwadocs:transition-opacity tuwadocs:duration-300"})})}),jsx("div",{className:"tuwadocs:flex tuwadocs:items-center tuwadocs:gap-4 tuwadocs:text-sm",children:(o??k).map(({title:t,href:a,image:s})=>jsxs("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:"tuwa-footer-link tuwa-footer-link--npm tuwadocs:flex tuwadocs:items-center tuwadocs:gap-1",children:[s,jsx("span",{className:"tuwadocs:hidden tuwadocs:sm:inline",children:t})]},t))})]}),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:"A useful and powerful utils for building decentralized applications."}),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. Built with"," ",jsx("span",{className:"tuwa-heart","aria-label":"love",children:"\u2764\uFE0F"})," ","for Web3."]})]}),jsx("div",{className:"tuwadocs:flex tuwadocs:flex-wrap tuwadocs:items-center tuwadocs:gap-3 tuwadocs:mt-4 tuwadocs:pt-4 tuwa-footer-border"})]})]})})}function Mo({links:o}){return jsx(Navbar,{logo:jsx(c,{children:jsx(E,{width:120,height:40,src:"https://raw.githubusercontent.com/TuwaIO/workflows/refs/heads/main/preview/tuwa_logo.svg",alt:"TUWA Logo"})}),children:jsx("div",{className:"tuwadocs:flex tuwadocs:items-center tuwadocs:gap-3",children:(o??C).map(({title:t,href:a,image:s,className:u})=>jsxs("a",{href:a,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-gray-700 tuwadocs:dark:text-gray-300",u),children:[s,t]},t))})})}var S=[{title:"pnpm",command:"pnpm add"},{title:"bun",command:"bun add"},{title:"npm",command:"npm install"},{title:"yarn",command:"yarn add"}];function Wo({packagesList:o,resolvedTheme:t}){return jsx("div",{className:"tuwadocs:my-4",children:jsx(Tabs,{items:S.map(a=>a.title),children:S.map(a=>jsx(Tabs.Tab,{children:jsx(x,{title:"Terminal",titleIcons:jsx(CommandLineIcon,{}),textToCopy:`${a.command} ${o}`,children:jsx(y,{resolvedTheme:t,language:"bash",children:`${a.command} ${o}`})})},a.title))})})}function Do({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 Qo=({src:o,poster:t,autoplay:a=false,muted:s=false,loop:u=false,controls:m=true,className:T="",aspectRatio:I="aspect-video",onPlay:L,onPause:B,onEnded:H,"aria-label":F})=>jsx("div",{className:cn("tuwadocs:relative tuwadocs:w-full tuwadocs:overflow-hidden tuwadocs:rounded-lg tuwadocs:bg-black tuwadocs:my-4",I,T),children:jsxs("video",{src:o,poster:t,controls:m,autoPlay:a,muted:s,loop:u,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-2 tuwadocs:focus:ring-blue-500 tuwadocs:focus:ring-offset-2"),onPlay:L,onPause:B,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-blue-400 tuwadocs:underline tuwadocs:hover:text-blue-300",children:"download the video"})," ","to watch it."]})});
2
+ export{x as CodeBlock,y as CodeHighlighter,b as CopyIconButton,vo as Features,So as Footer,Mo as Navbar,Wo as PackageInstallationTabs,Do as StyledLink,Qo as VideoPlayer,k as baseFooterLinks,C as baseNavLinks};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tuwaio/docs-ui",
3
- "version": "1.0.0-fix-components-alpha.1.c574a38",
3
+ "version": "1.0.0-fix-components-alpha.2.c5df58a",
4
4
  "private": false,
5
5
  "author": "Oleksandr Tkach",
6
6
  "license": "Apache-2.0",