@tuwaio/docs-ui 0.0.2 → 0.0.3

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 +1,2 @@
1
- 'use strict';var novaCore=require('@tuwaio/nova-core'),jsxRuntime=require('react/jsx-runtime');function a({href:e,children:t}){return jsxRuntime.jsx("a",{className:novaCore.cn("tuwadocs:font-medium tuwadocs:text-[var(--tuwa-text-accent)]","tuwadocs:transition-all tuwadocs:hover:underline tuwadocs:underline-offset-4"),href:e,target:"_blank",rel:"noopener noreferrer",children:t})}exports.StyledLink=a;
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.d.cts CHANGED
@@ -1,9 +1,132 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { ReactNode } from 'react';
2
+ import react, { ReactNode } from 'react';
3
+ export * from '@tuwaio/nova-core';
4
+
5
+ interface CodeBlockProps {
6
+ /** The title displayed in the header of the code block. */
7
+ title: string;
8
+ /** An icon or other React node to display next to the title. */
9
+ titleIcons: ReactNode;
10
+ /** The code or content to display within the block. */
11
+ children: ReactNode;
12
+ /** The raw text content that will be copied to the clipboard. */
13
+ textToCopy: string;
14
+ }
15
+ /**
16
+ * A UI component that wraps content, typically code snippets, in a styled block
17
+ * with a header containing a title, an icon, and a copy button.
18
+ */
19
+ declare function CodeBlock({ title, titleIcons, children, textToCopy }: CodeBlockProps): react_jsx_runtime.JSX.Element;
20
+
21
+ interface CodeHighlighterProps {
22
+ children: string | string[];
23
+ language?: string;
24
+ resolvedTheme: string;
25
+ }
26
+ declare function CodeHighlighter({ children, language, resolvedTheme }: CodeHighlighterProps): react_jsx_runtime.JSX.Element;
27
+
28
+ interface CopyIconButtonProps {
29
+ isCopied: boolean;
30
+ onCopy: () => void;
31
+ }
32
+ declare function CopyIconButton({ isCopied, onCopy }: CopyIconButtonProps): react_jsx_runtime.JSX.Element;
33
+
34
+ declare function Features({ features }: {
35
+ features: {
36
+ title: string;
37
+ icon: string;
38
+ description: string;
39
+ }[];
40
+ }): react_jsx_runtime.JSX.Element;
41
+
42
+ type SocialLink = {
43
+ title: string;
44
+ href: string;
45
+ image: ReactNode;
46
+ className?: string;
47
+ };
48
+ interface NavProps {
49
+ links?: SocialLink[];
50
+ }
51
+ declare function Navbar({ links }: NavProps): react_jsx_runtime.JSX.Element;
52
+
53
+ declare function Footer({ links }: NavProps): react_jsx_runtime.JSX.Element;
54
+
55
+ declare function PackageInstallationTabs({ packagesList, resolvedTheme, }: {
56
+ packagesList: string;
57
+ } & Pick<CodeHighlighterProps, 'resolvedTheme'>): react_jsx_runtime.JSX.Element;
3
58
 
4
59
  declare function StyledLink({ href, children }: {
5
60
  href: string;
6
61
  children: ReactNode;
7
62
  }): react_jsx_runtime.JSX.Element;
8
63
 
9
- export { StyledLink };
64
+ /**
65
+ * Props for the VideoPlayer component.
66
+ */
67
+ interface VideoPlayerProps {
68
+ /** Path to the video file in the /public directory */
69
+ src: string;
70
+ /** Optional poster image to display before video plays */
71
+ poster?: string;
72
+ /** Whether the video should autoplay (Note: most browsers require muted for autoplay) */
73
+ autoplay?: boolean;
74
+ /** Whether the video should be muted */
75
+ muted?: boolean;
76
+ /** Whether the video should loop */
77
+ loop?: boolean;
78
+ /** Whether to show video controls */
79
+ controls?: boolean;
80
+ /** Optional CSS class name for the container */
81
+ className?: string;
82
+ /** Custom aspect ratio using Tailwind aspect-ratio classes (default: 'aspect-video' for 16:9) */
83
+ aspectRatio?: 'aspect-square' | 'aspect-video' | 'aspect-[4/3]' | 'aspect-[3/2]' | 'aspect-[21/9]';
84
+ /** Callback function called when video starts playing */
85
+ onPlay?: () => void;
86
+ /** Callback function called when video is paused */
87
+ onPause?: () => void;
88
+ /** Callback function called when video ends */
89
+ onEnded?: () => void;
90
+ /** ARIA label for accessibility */
91
+ 'aria-label'?: string;
92
+ }
93
+ /**
94
+ * A responsive video player component that maintains aspect ratio using Tailwind CSS.
95
+ *
96
+ * @example
97
+ * ```tsx
98
+ * <VideoPlayer
99
+ * src="/videos/demo.mp4"
100
+ * poster="/images/video-thumbnail.jpg"
101
+ * aria-label="Product demonstration video"
102
+ * />
103
+ * ```
104
+ *
105
+ * @example
106
+ * ```tsx
107
+ * // Custom aspect ratio (4:3) with autoplay
108
+ * <VideoPlayer
109
+ * src="/videos/demo.mp4"
110
+ * aspectRatio="aspect-[4/3]"
111
+ * autoplay
112
+ * muted
113
+ * loop
114
+ * className="shadow-lg"
115
+ * />
116
+ * ```
117
+ */
118
+ declare const VideoPlayer: react.FC<VideoPlayerProps>;
119
+
120
+ declare const baseNavLinks: {
121
+ title: string;
122
+ href: string;
123
+ className: string;
124
+ image: react_jsx_runtime.JSX.Element;
125
+ }[];
126
+ declare const baseFooterLinks: {
127
+ title: string;
128
+ href: string;
129
+ image: react_jsx_runtime.JSX.Element;
130
+ }[];
131
+
132
+ export { CodeBlock, CodeHighlighter, type CodeHighlighterProps, CopyIconButton, Features, Footer, type NavProps, Navbar, PackageInstallationTabs, type SocialLink, StyledLink, VideoPlayer, type VideoPlayerProps, baseFooterLinks, baseNavLinks };
package/dist/index.d.ts CHANGED
@@ -1,9 +1,132 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { ReactNode } from 'react';
2
+ import react, { ReactNode } from 'react';
3
+ export * from '@tuwaio/nova-core';
4
+
5
+ interface CodeBlockProps {
6
+ /** The title displayed in the header of the code block. */
7
+ title: string;
8
+ /** An icon or other React node to display next to the title. */
9
+ titleIcons: ReactNode;
10
+ /** The code or content to display within the block. */
11
+ children: ReactNode;
12
+ /** The raw text content that will be copied to the clipboard. */
13
+ textToCopy: string;
14
+ }
15
+ /**
16
+ * A UI component that wraps content, typically code snippets, in a styled block
17
+ * with a header containing a title, an icon, and a copy button.
18
+ */
19
+ declare function CodeBlock({ title, titleIcons, children, textToCopy }: CodeBlockProps): react_jsx_runtime.JSX.Element;
20
+
21
+ interface CodeHighlighterProps {
22
+ children: string | string[];
23
+ language?: string;
24
+ resolvedTheme: string;
25
+ }
26
+ declare function CodeHighlighter({ children, language, resolvedTheme }: CodeHighlighterProps): react_jsx_runtime.JSX.Element;
27
+
28
+ interface CopyIconButtonProps {
29
+ isCopied: boolean;
30
+ onCopy: () => void;
31
+ }
32
+ declare function CopyIconButton({ isCopied, onCopy }: CopyIconButtonProps): react_jsx_runtime.JSX.Element;
33
+
34
+ declare function Features({ features }: {
35
+ features: {
36
+ title: string;
37
+ icon: string;
38
+ description: string;
39
+ }[];
40
+ }): react_jsx_runtime.JSX.Element;
41
+
42
+ type SocialLink = {
43
+ title: string;
44
+ href: string;
45
+ image: ReactNode;
46
+ className?: string;
47
+ };
48
+ interface NavProps {
49
+ links?: SocialLink[];
50
+ }
51
+ declare function Navbar({ links }: NavProps): react_jsx_runtime.JSX.Element;
52
+
53
+ declare function Footer({ links }: NavProps): react_jsx_runtime.JSX.Element;
54
+
55
+ declare function PackageInstallationTabs({ packagesList, resolvedTheme, }: {
56
+ packagesList: string;
57
+ } & Pick<CodeHighlighterProps, 'resolvedTheme'>): react_jsx_runtime.JSX.Element;
3
58
 
4
59
  declare function StyledLink({ href, children }: {
5
60
  href: string;
6
61
  children: ReactNode;
7
62
  }): react_jsx_runtime.JSX.Element;
8
63
 
9
- export { StyledLink };
64
+ /**
65
+ * Props for the VideoPlayer component.
66
+ */
67
+ interface VideoPlayerProps {
68
+ /** Path to the video file in the /public directory */
69
+ src: string;
70
+ /** Optional poster image to display before video plays */
71
+ poster?: string;
72
+ /** Whether the video should autoplay (Note: most browsers require muted for autoplay) */
73
+ autoplay?: boolean;
74
+ /** Whether the video should be muted */
75
+ muted?: boolean;
76
+ /** Whether the video should loop */
77
+ loop?: boolean;
78
+ /** Whether to show video controls */
79
+ controls?: boolean;
80
+ /** Optional CSS class name for the container */
81
+ className?: string;
82
+ /** Custom aspect ratio using Tailwind aspect-ratio classes (default: 'aspect-video' for 16:9) */
83
+ aspectRatio?: 'aspect-square' | 'aspect-video' | 'aspect-[4/3]' | 'aspect-[3/2]' | 'aspect-[21/9]';
84
+ /** Callback function called when video starts playing */
85
+ onPlay?: () => void;
86
+ /** Callback function called when video is paused */
87
+ onPause?: () => void;
88
+ /** Callback function called when video ends */
89
+ onEnded?: () => void;
90
+ /** ARIA label for accessibility */
91
+ 'aria-label'?: string;
92
+ }
93
+ /**
94
+ * A responsive video player component that maintains aspect ratio using Tailwind CSS.
95
+ *
96
+ * @example
97
+ * ```tsx
98
+ * <VideoPlayer
99
+ * src="/videos/demo.mp4"
100
+ * poster="/images/video-thumbnail.jpg"
101
+ * aria-label="Product demonstration video"
102
+ * />
103
+ * ```
104
+ *
105
+ * @example
106
+ * ```tsx
107
+ * // Custom aspect ratio (4:3) with autoplay
108
+ * <VideoPlayer
109
+ * src="/videos/demo.mp4"
110
+ * aspectRatio="aspect-[4/3]"
111
+ * autoplay
112
+ * muted
113
+ * loop
114
+ * className="shadow-lg"
115
+ * />
116
+ * ```
117
+ */
118
+ declare const VideoPlayer: react.FC<VideoPlayerProps>;
119
+
120
+ declare const baseNavLinks: {
121
+ title: string;
122
+ href: string;
123
+ className: string;
124
+ image: react_jsx_runtime.JSX.Element;
125
+ }[];
126
+ declare const baseFooterLinks: {
127
+ title: string;
128
+ href: string;
129
+ image: react_jsx_runtime.JSX.Element;
130
+ }[];
131
+
132
+ export { CodeBlock, CodeHighlighter, type CodeHighlighterProps, CopyIconButton, Features, Footer, type NavProps, Navbar, PackageInstallationTabs, type SocialLink, StyledLink, VideoPlayer, type VideoPlayerProps, baseFooterLinks, baseNavLinks };
package/dist/index.js CHANGED
@@ -1 +1,2 @@
1
- import {cn}from'@tuwaio/nova-core';import {jsx}from'react/jsx-runtime';function a({href:e,children:t}){return jsx("a",{className:cn("tuwadocs:font-medium tuwadocs:text-[var(--tuwa-text-accent)]","tuwadocs:transition-all tuwadocs:hover:underline tuwadocs:underline-offset-4"),href:e,target:"_blank",rel:"noopener noreferrer",children:t})}export{a as StyledLink};
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": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "private": false,
5
5
  "author": "Oleksandr Tkach",
6
6
  "license": "Apache-2.0",
@@ -47,7 +47,6 @@
47
47
  }
48
48
  ],
49
49
  "dependencies": {
50
- "@heroicons/react": "^2.2.0",
51
50
  "@tuwaio/nova-core": "^0.2.6",
52
51
  "clsx": "^2.1.1",
53
52
  "react-syntax-highlighter": "^16.1.0",
@@ -55,11 +54,20 @@
55
54
  "tailwind-merge": "^3.4.0"
56
55
  },
57
56
  "peerDependencies": {
58
- "react": ">=19.2.3"
57
+ "@heroicons/react": ">=2",
58
+ "react": ">=19.2.3",
59
+ "next": ">=16.1",
60
+ "nextra": ">=4.6",
61
+ "nextra-theme-docs": ">=4.6"
59
62
  },
60
63
  "devDependencies": {
64
+ "next": "16.1.4",
65
+ "nextra": "^4.6.1",
66
+ "nextra-theme-docs": "^4.6.1",
67
+ "@heroicons/react": "^2.2.0",
61
68
  "@tailwindcss/postcss": "^4.1.18",
62
69
  "@tailwindcss/vite": "^4.1.18",
70
+ "@types/node": "^25",
63
71
  "@types/react": "^19.2.9",
64
72
  "autoprefixer": "^10.4.23",
65
73
  "postcss": "^8.5.6",