@tuwaio/docs-ui 0.0.29 → 0.0.31
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/components/CodeBlock.cjs +61 -0
- package/dist/components/CodeBlock.d.cts +20 -0
- package/dist/components/CodeBlock.d.ts +20 -0
- package/dist/components/CodeBlock.js +37 -0
- package/dist/components/CodeHighlighter.cjs +52 -0
- package/dist/components/CodeHighlighter.d.cts +10 -0
- package/dist/components/CodeHighlighter.d.ts +10 -0
- package/dist/components/CodeHighlighter.js +18 -0
- package/dist/components/CopyIconButton.cjs +44 -0
- package/dist/components/CopyIconButton.d.cts +9 -0
- package/dist/components/CopyIconButton.d.ts +9 -0
- package/dist/components/CopyIconButton.js +20 -0
- package/dist/components/Features.cjs +42 -0
- package/dist/components/Features.d.cts +11 -0
- package/dist/components/Features.d.ts +11 -0
- package/dist/components/Features.js +18 -0
- package/dist/components/Footer.cjs +66 -0
- package/dist/components/Footer.d.cts +9 -0
- package/dist/components/Footer.d.ts +9 -0
- package/dist/components/Footer.js +42 -0
- package/dist/components/Logo.cjs +75 -0
- package/dist/components/Logo.d.cts +12 -0
- package/dist/components/Logo.d.ts +12 -0
- package/dist/components/Logo.js +41 -0
- package/dist/components/NavBar.cjs +50 -0
- package/dist/components/NavBar.d.cts +16 -0
- package/dist/components/NavBar.d.ts +16 -0
- package/dist/components/NavBar.js +26 -0
- package/dist/components/NoSSR.cjs +36 -0
- package/dist/components/NoSSR.d.cts +16 -0
- package/dist/components/NoSSR.d.ts +16 -0
- package/dist/components/NoSSR.js +16 -0
- package/dist/components/PackageInstallationTabs.cjs +64 -0
- package/dist/components/PackageInstallationTabs.d.cts +8 -0
- package/dist/components/PackageInstallationTabs.d.ts +8 -0
- package/dist/components/PackageInstallationTabs.js +40 -0
- package/dist/components/StarryBackground.cjs +162 -0
- package/dist/components/StarryBackground.d.cts +5 -0
- package/dist/components/StarryBackground.d.ts +5 -0
- package/dist/components/StarryBackground.js +142 -0
- package/dist/components/StyledLink.cjs +44 -0
- package/dist/components/StyledLink.d.cts +9 -0
- package/dist/components/StyledLink.d.ts +9 -0
- package/dist/components/StyledLink.js +20 -0
- package/dist/components/ThemeSwitcher.cjs +96 -0
- package/dist/components/ThemeSwitcher.d.cts +9 -0
- package/dist/components/ThemeSwitcher.d.ts +9 -0
- package/dist/components/ThemeSwitcher.js +72 -0
- package/dist/components/VideoPlayer.cjs +103 -0
- package/dist/components/VideoPlayer.d.cts +34 -0
- package/dist/components/VideoPlayer.d.ts +34 -0
- package/dist/components/VideoPlayer.js +79 -0
- package/dist/index.cjs +68 -2
- package/dist/index.css +3 -3
- package/dist/index.d.cts +15 -139
- package/dist/index.d.ts +15 -139
- package/dist/index.js +19 -2
- package/dist/utils.cjs +52 -0
- package/dist/utils.d.cts +16 -0
- package/dist/utils.d.ts +16 -0
- package/dist/utils.js +27 -0
- package/package.json +11 -10
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var CodeBlock_exports = {};
|
|
20
|
+
__export(CodeBlock_exports, {
|
|
21
|
+
CodeBlock: () => CodeBlock
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(CodeBlock_exports);
|
|
24
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
|
+
var import_nova_core = require("@tuwaio/nova-core");
|
|
26
|
+
var import_CopyIconButton = require("./CopyIconButton");
|
|
27
|
+
function CodeBlock({ title, titleIcons, children, textToCopy }) {
|
|
28
|
+
const { isCopied, copy } = (0, import_nova_core.useCopyToClipboard)(1500);
|
|
29
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
30
|
+
"div",
|
|
31
|
+
{
|
|
32
|
+
className: (0, import_nova_core.cn)(
|
|
33
|
+
"tuwadocs:group tuwadocs:overflow-hidden tuwadocs:rounded-[var(--tuwa-rounded-corners)] tuwadocs:border",
|
|
34
|
+
"tuwadocs:border-[var(--tuwa-border-secondary)] tuwadocs:bg-[var(--tuwa-bg-primary)]"
|
|
35
|
+
),
|
|
36
|
+
children: [
|
|
37
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
38
|
+
"div",
|
|
39
|
+
{
|
|
40
|
+
className: (0, import_nova_core.cn)(
|
|
41
|
+
"tuwadocs:flex tuwadocs:items-center tuwadocs:justify-between tuwadocs:gap-4 tuwadocs:px-4 tuwadocs:py-2",
|
|
42
|
+
"tuwadocs:border-b tuwadocs:border-[var(--tuwa-border-secondary)] tuwadocs:bg-[var(--tuwa-bg-secondary)]"
|
|
43
|
+
),
|
|
44
|
+
children: [
|
|
45
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "tuwadocs:flex tuwadocs:items-center tuwadocs:gap-2", children: [
|
|
46
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "tuwadocs:h-[20px] tuwadocs:w-[20px] tuwadocs:text-[var(--tuwa-text-secondary)]", children: titleIcons }),
|
|
47
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "tuwadocs:text-sm tuwadocs:font-medium tuwadocs:text-[var(--tuwa-text-primary)]", children: title })
|
|
48
|
+
] }),
|
|
49
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "tuwadocs:transition tuwadocs:md:opacity-0 tuwadocs:group-hover:opacity-100", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_CopyIconButton.CopyIconButton, { isCopied, onCopy: () => copy(textToCopy) }) })
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
),
|
|
53
|
+
children
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
59
|
+
0 && (module.exports = {
|
|
60
|
+
CodeBlock
|
|
61
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
interface CodeBlockProps {
|
|
5
|
+
/** The title displayed in the header of the code block. */
|
|
6
|
+
title: string;
|
|
7
|
+
/** An icon or other React node to display next to the title. */
|
|
8
|
+
titleIcons: ReactNode;
|
|
9
|
+
/** The code or content to display within the block. */
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
/** The raw text content that will be copied to the clipboard. */
|
|
12
|
+
textToCopy: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* A UI component that wraps content, typically code snippets, in a styled block
|
|
16
|
+
* with a header containing a title, an icon, and a copy button.
|
|
17
|
+
*/
|
|
18
|
+
declare function CodeBlock({ title, titleIcons, children, textToCopy }: CodeBlockProps): react.JSX.Element;
|
|
19
|
+
|
|
20
|
+
export { CodeBlock };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
interface CodeBlockProps {
|
|
5
|
+
/** The title displayed in the header of the code block. */
|
|
6
|
+
title: string;
|
|
7
|
+
/** An icon or other React node to display next to the title. */
|
|
8
|
+
titleIcons: ReactNode;
|
|
9
|
+
/** The code or content to display within the block. */
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
/** The raw text content that will be copied to the clipboard. */
|
|
12
|
+
textToCopy: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* A UI component that wraps content, typically code snippets, in a styled block
|
|
16
|
+
* with a header containing a title, an icon, and a copy button.
|
|
17
|
+
*/
|
|
18
|
+
declare function CodeBlock({ title, titleIcons, children, textToCopy }: CodeBlockProps): react.JSX.Element;
|
|
19
|
+
|
|
20
|
+
export { CodeBlock };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn, useCopyToClipboard } from "@tuwaio/nova-core";
|
|
3
|
+
import { CopyIconButton } from "./CopyIconButton";
|
|
4
|
+
function CodeBlock({ title, titleIcons, children, textToCopy }) {
|
|
5
|
+
const { isCopied, copy } = useCopyToClipboard(1500);
|
|
6
|
+
return /* @__PURE__ */ jsxs(
|
|
7
|
+
"div",
|
|
8
|
+
{
|
|
9
|
+
className: cn(
|
|
10
|
+
"tuwadocs:group tuwadocs:overflow-hidden tuwadocs:rounded-[var(--tuwa-rounded-corners)] tuwadocs:border",
|
|
11
|
+
"tuwadocs:border-[var(--tuwa-border-secondary)] tuwadocs:bg-[var(--tuwa-bg-primary)]"
|
|
12
|
+
),
|
|
13
|
+
children: [
|
|
14
|
+
/* @__PURE__ */ jsxs(
|
|
15
|
+
"div",
|
|
16
|
+
{
|
|
17
|
+
className: cn(
|
|
18
|
+
"tuwadocs:flex tuwadocs:items-center tuwadocs:justify-between tuwadocs:gap-4 tuwadocs:px-4 tuwadocs:py-2",
|
|
19
|
+
"tuwadocs:border-b tuwadocs:border-[var(--tuwa-border-secondary)] tuwadocs:bg-[var(--tuwa-bg-secondary)]"
|
|
20
|
+
),
|
|
21
|
+
children: [
|
|
22
|
+
/* @__PURE__ */ jsxs("div", { className: "tuwadocs:flex tuwadocs:items-center tuwadocs:gap-2", children: [
|
|
23
|
+
/* @__PURE__ */ jsx("div", { className: "tuwadocs:h-[20px] tuwadocs:w-[20px] tuwadocs:text-[var(--tuwa-text-secondary)]", children: titleIcons }),
|
|
24
|
+
/* @__PURE__ */ jsx("p", { className: "tuwadocs:text-sm tuwadocs:font-medium tuwadocs:text-[var(--tuwa-text-primary)]", children: title })
|
|
25
|
+
] }),
|
|
26
|
+
/* @__PURE__ */ jsx("div", { className: "tuwadocs:transition tuwadocs:md:opacity-0 tuwadocs:group-hover:opacity-100", children: /* @__PURE__ */ jsx(CopyIconButton, { isCopied, onCopy: () => copy(textToCopy) }) })
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
),
|
|
30
|
+
children
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
export {
|
|
36
|
+
CodeBlock
|
|
37
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var CodeHighlighter_exports = {};
|
|
30
|
+
__export(CodeHighlighter_exports, {
|
|
31
|
+
CodeHighlighter: () => CodeHighlighter
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(CodeHighlighter_exports);
|
|
34
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
35
|
+
var import_react_syntax_highlighter = require("react-syntax-highlighter");
|
|
36
|
+
var import_prism = require("react-syntax-highlighter/dist/esm/styles/prism");
|
|
37
|
+
var import_NoSSR = __toESM(require("./NoSSR"), 1);
|
|
38
|
+
function CodeHighlighter({ children, language, resolvedTheme }) {
|
|
39
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "tuwadocs:border-t tuwadocs:border-[var(--tuwa-border-secondary)]", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_NoSSR.default, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
40
|
+
import_react_syntax_highlighter.Prism,
|
|
41
|
+
{
|
|
42
|
+
language: language ?? "bash",
|
|
43
|
+
customStyle: { margin: 0, background: "transparent" },
|
|
44
|
+
style: resolvedTheme === "dark" ? import_prism.materialOceanic : import_prism.materialLight,
|
|
45
|
+
children: String(children).replace(/\n$/, "")
|
|
46
|
+
}
|
|
47
|
+
) }) });
|
|
48
|
+
}
|
|
49
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
50
|
+
0 && (module.exports = {
|
|
51
|
+
CodeHighlighter
|
|
52
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
|
|
3
|
+
interface CodeHighlighterProps {
|
|
4
|
+
children: string | string[];
|
|
5
|
+
language?: string;
|
|
6
|
+
resolvedTheme: string;
|
|
7
|
+
}
|
|
8
|
+
declare function CodeHighlighter({ children, language, resolvedTheme }: CodeHighlighterProps): react.JSX.Element;
|
|
9
|
+
|
|
10
|
+
export { CodeHighlighter, type CodeHighlighterProps };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
|
|
3
|
+
interface CodeHighlighterProps {
|
|
4
|
+
children: string | string[];
|
|
5
|
+
language?: string;
|
|
6
|
+
resolvedTheme: string;
|
|
7
|
+
}
|
|
8
|
+
declare function CodeHighlighter({ children, language, resolvedTheme }: CodeHighlighterProps): react.JSX.Element;
|
|
9
|
+
|
|
10
|
+
export { CodeHighlighter, type CodeHighlighterProps };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Prism } from "react-syntax-highlighter";
|
|
3
|
+
import { materialLight, materialOceanic } from "react-syntax-highlighter/dist/esm/styles/prism";
|
|
4
|
+
import NoSSR from "./NoSSR";
|
|
5
|
+
function CodeHighlighter({ children, language, resolvedTheme }) {
|
|
6
|
+
return /* @__PURE__ */ jsx("div", { className: "tuwadocs:border-t tuwadocs:border-[var(--tuwa-border-secondary)]", children: /* @__PURE__ */ jsx(NoSSR, { children: /* @__PURE__ */ jsx(
|
|
7
|
+
Prism,
|
|
8
|
+
{
|
|
9
|
+
language: language ?? "bash",
|
|
10
|
+
customStyle: { margin: 0, background: "transparent" },
|
|
11
|
+
style: resolvedTheme === "dark" ? materialOceanic : materialLight,
|
|
12
|
+
children: String(children).replace(/\n$/, "")
|
|
13
|
+
}
|
|
14
|
+
) }) });
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
CodeHighlighter
|
|
18
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var CopyIconButton_exports = {};
|
|
20
|
+
__export(CopyIconButton_exports, {
|
|
21
|
+
CopyIconButton: () => CopyIconButton
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(CopyIconButton_exports);
|
|
24
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
|
+
var import_outline = require("@heroicons/react/24/outline");
|
|
26
|
+
var import_nova_core = require("@tuwaio/nova-core");
|
|
27
|
+
function CopyIconButton({ isCopied, onCopy }) {
|
|
28
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
29
|
+
"button",
|
|
30
|
+
{
|
|
31
|
+
onClick: onCopy,
|
|
32
|
+
type: "button",
|
|
33
|
+
className: (0, import_nova_core.cn)(
|
|
34
|
+
"tuwadocs:h-6 tuwadocs:w-6 tuwadocs:cursor-pointer tuwadocs:transition-colors",
|
|
35
|
+
isCopied ? "tuwadocs:text-[var(--tuwa-success-icon)]" : "tuwadocs:text-[var(--tuwa-text-secondary)] tuwadocs:hover:text-[var(--tuwa-text-primary)]"
|
|
36
|
+
),
|
|
37
|
+
children: isCopied ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_outline.CheckCircleIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_outline.Square2StackIcon, {})
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
42
|
+
0 && (module.exports = {
|
|
43
|
+
CopyIconButton
|
|
44
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { CheckCircleIcon, Square2StackIcon } from "@heroicons/react/24/outline";
|
|
3
|
+
import { cn } from "@tuwaio/nova-core";
|
|
4
|
+
function CopyIconButton({ isCopied, onCopy }) {
|
|
5
|
+
return /* @__PURE__ */ jsx(
|
|
6
|
+
"button",
|
|
7
|
+
{
|
|
8
|
+
onClick: onCopy,
|
|
9
|
+
type: "button",
|
|
10
|
+
className: cn(
|
|
11
|
+
"tuwadocs:h-6 tuwadocs:w-6 tuwadocs:cursor-pointer tuwadocs:transition-colors",
|
|
12
|
+
isCopied ? "tuwadocs:text-[var(--tuwa-success-icon)]" : "tuwadocs:text-[var(--tuwa-text-secondary)] tuwadocs:hover:text-[var(--tuwa-text-primary)]"
|
|
13
|
+
),
|
|
14
|
+
children: isCopied ? /* @__PURE__ */ jsx(CheckCircleIcon, {}) : /* @__PURE__ */ jsx(Square2StackIcon, {})
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
CopyIconButton
|
|
20
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var Features_exports = {};
|
|
20
|
+
__export(Features_exports, {
|
|
21
|
+
Features: () => Features
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(Features_exports);
|
|
24
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
|
+
function Features({ features }) {
|
|
26
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "tuwadocs:grid tuwadocs:grid-cols-1 tuwadocs:md:grid-cols-3 tuwadocs:gap-6 tuwadocs:mt-12", children: features.map((feature) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
27
|
+
"div",
|
|
28
|
+
{
|
|
29
|
+
className: "tuwadocs:p-6 tuwadocs:border tuwadocs:rounded-[var(--tuwa-rounded-corners)] tuwadocs:hover:shadow-lg tuwadocs:transition-shadow",
|
|
30
|
+
children: [
|
|
31
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "tuwadocs:text-2xl tuwadocs:mb-3", children: feature.icon }),
|
|
32
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", { className: "tuwadocs:text-lg tuwadocs:font-semibold tuwadocs:mb-2", children: feature.title }),
|
|
33
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "tuwadocs:text-[var(--tuwa-text-secondary)]", children: feature.description })
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
feature.title
|
|
37
|
+
)) });
|
|
38
|
+
}
|
|
39
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
40
|
+
0 && (module.exports = {
|
|
41
|
+
Features
|
|
42
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
function Features({ features }) {
|
|
3
|
+
return /* @__PURE__ */ jsx("div", { className: "tuwadocs:grid tuwadocs:grid-cols-1 tuwadocs:md:grid-cols-3 tuwadocs:gap-6 tuwadocs:mt-12", children: features.map((feature) => /* @__PURE__ */ jsxs(
|
|
4
|
+
"div",
|
|
5
|
+
{
|
|
6
|
+
className: "tuwadocs:p-6 tuwadocs:border tuwadocs:rounded-[var(--tuwa-rounded-corners)] tuwadocs:hover:shadow-lg tuwadocs:transition-shadow",
|
|
7
|
+
children: [
|
|
8
|
+
/* @__PURE__ */ jsx("div", { className: "tuwadocs:text-2xl tuwadocs:mb-3", children: feature.icon }),
|
|
9
|
+
/* @__PURE__ */ jsx("h3", { className: "tuwadocs:text-lg tuwadocs:font-semibold tuwadocs:mb-2", children: feature.title }),
|
|
10
|
+
/* @__PURE__ */ jsx("p", { className: "tuwadocs:text-[var(--tuwa-text-secondary)]", children: feature.description })
|
|
11
|
+
]
|
|
12
|
+
},
|
|
13
|
+
feature.title
|
|
14
|
+
)) });
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
Features
|
|
18
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var Footer_exports = {};
|
|
20
|
+
__export(Footer_exports, {
|
|
21
|
+
Footer: () => Footer
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(Footer_exports);
|
|
24
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
|
+
var import_nova_core = require("@tuwaio/nova-core");
|
|
26
|
+
var import_nextra_theme_docs = require("nextra-theme-docs");
|
|
27
|
+
var import_utils = require("../utils");
|
|
28
|
+
function Footer({ links, logo }) {
|
|
29
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_nextra_theme_docs.Footer, { children: /* @__PURE__ */ (0, import_jsx_runtime.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: [
|
|
30
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "tuwadocs:mb-6 tuwadocs:flex tuwadocs:items-center tuwadocs:gap-4 tuwadocs:w-full tuwadocs:justify-between", children: [
|
|
31
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "tuwadocs:flex tuwadocs:items-center", children: logo }),
|
|
32
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "tuwadocs:flex tuwadocs:items-center tuwadocs:gap-4 tuwadocs:text-sm", children: (links ?? import_utils.baseFooterLinks).map(({ title, href, image, className }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
33
|
+
"a",
|
|
34
|
+
{
|
|
35
|
+
href,
|
|
36
|
+
target: "_blank",
|
|
37
|
+
rel: "noopener noreferrer",
|
|
38
|
+
className: (0, import_nova_core.cn)("tuwa-footer-link tuwadocs:flex tuwadocs:items-center tuwadocs:gap-1", className),
|
|
39
|
+
children: [
|
|
40
|
+
image,
|
|
41
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "tuwadocs:hidden tuwadocs:sm:inline", children: title })
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
title
|
|
45
|
+
)) })
|
|
46
|
+
] }),
|
|
47
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "tuwadocs:w-full tuwa-footer-border tuwadocs:pt-4", children: [
|
|
48
|
+
/* @__PURE__ */ (0, import_jsx_runtime.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: [
|
|
49
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "tuwadocs:flex-1", children: [
|
|
50
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "tuwa-footer-description", children: "The modular, headless-first Web3 infrastructure. Build self-custodial applications with zero vendor lock-in." }),
|
|
51
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "tuwa-footer-license", children: "Licensed under Apache 2.0. Open source and free to use." })
|
|
52
|
+
] }),
|
|
53
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "tuwa-footer-copyright", children: [
|
|
54
|
+
"\xA9 2025 - ",
|
|
55
|
+
(/* @__PURE__ */ new Date()).getFullYear(),
|
|
56
|
+
" TUWA. All rights reserved."
|
|
57
|
+
] })
|
|
58
|
+
] }),
|
|
59
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "tuwadocs:flex tuwadocs:flex-wrap tuwadocs:items-center tuwadocs:gap-3 tuwadocs:mt-4 tuwadocs:pt-4 tuwa-footer-border" })
|
|
60
|
+
] })
|
|
61
|
+
] }) });
|
|
62
|
+
}
|
|
63
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
64
|
+
0 && (module.exports = {
|
|
65
|
+
Footer
|
|
66
|
+
});
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "@tuwaio/nova-core";
|
|
3
|
+
import { Footer as NextraFooter } from "nextra-theme-docs";
|
|
4
|
+
import { baseFooterLinks } from "../utils";
|
|
5
|
+
function Footer({ links, logo }) {
|
|
6
|
+
return /* @__PURE__ */ jsx(NextraFooter, { children: /* @__PURE__ */ 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: [
|
|
7
|
+
/* @__PURE__ */ jsxs("div", { className: "tuwadocs:mb-6 tuwadocs:flex tuwadocs:items-center tuwadocs:gap-4 tuwadocs:w-full tuwadocs:justify-between", children: [
|
|
8
|
+
/* @__PURE__ */ jsx("div", { className: "tuwadocs:flex tuwadocs:items-center", children: logo }),
|
|
9
|
+
/* @__PURE__ */ jsx("div", { className: "tuwadocs:flex tuwadocs:items-center tuwadocs:gap-4 tuwadocs:text-sm", children: (links ?? baseFooterLinks).map(({ title, href, image, className }) => /* @__PURE__ */ jsxs(
|
|
10
|
+
"a",
|
|
11
|
+
{
|
|
12
|
+
href,
|
|
13
|
+
target: "_blank",
|
|
14
|
+
rel: "noopener noreferrer",
|
|
15
|
+
className: cn("tuwa-footer-link tuwadocs:flex tuwadocs:items-center tuwadocs:gap-1", className),
|
|
16
|
+
children: [
|
|
17
|
+
image,
|
|
18
|
+
/* @__PURE__ */ jsx("span", { className: "tuwadocs:hidden tuwadocs:sm:inline", children: title })
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
title
|
|
22
|
+
)) })
|
|
23
|
+
] }),
|
|
24
|
+
/* @__PURE__ */ jsxs("div", { className: "tuwadocs:w-full tuwa-footer-border tuwadocs:pt-4", children: [
|
|
25
|
+
/* @__PURE__ */ 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: [
|
|
26
|
+
/* @__PURE__ */ jsxs("div", { className: "tuwadocs:flex-1", children: [
|
|
27
|
+
/* @__PURE__ */ jsx("p", { className: "tuwa-footer-description", children: "The modular, headless-first Web3 infrastructure. Build self-custodial applications with zero vendor lock-in." }),
|
|
28
|
+
/* @__PURE__ */ jsx("p", { className: "tuwa-footer-license", children: "Licensed under Apache 2.0. Open source and free to use." })
|
|
29
|
+
] }),
|
|
30
|
+
/* @__PURE__ */ jsxs("div", { className: "tuwa-footer-copyright", children: [
|
|
31
|
+
"\xA9 2025 - ",
|
|
32
|
+
(/* @__PURE__ */ new Date()).getFullYear(),
|
|
33
|
+
" TUWA. All rights reserved."
|
|
34
|
+
] })
|
|
35
|
+
] }),
|
|
36
|
+
/* @__PURE__ */ jsx("div", { className: "tuwadocs:flex tuwadocs:flex-wrap tuwadocs:items-center tuwadocs:gap-3 tuwadocs:mt-4 tuwadocs:pt-4 tuwa-footer-border" })
|
|
37
|
+
] })
|
|
38
|
+
] }) });
|
|
39
|
+
}
|
|
40
|
+
export {
|
|
41
|
+
Footer
|
|
42
|
+
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var Logo_exports = {};
|
|
30
|
+
__export(Logo_exports, {
|
|
31
|
+
RemoteLogo: () => RemoteLogo
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(Logo_exports);
|
|
34
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
35
|
+
var import_html_react_parser = __toESM(require("html-react-parser"), 1);
|
|
36
|
+
var import_react = __toESM(require("react"), 1);
|
|
37
|
+
const LOGO_URL = "https://cdn.jsdelivr.net/gh/TuwaIO/workflows@main/preview/logo_v2.svg";
|
|
38
|
+
async function RemoteLogo({ url = LOGO_URL, className, style, ...props }) {
|
|
39
|
+
let rawSvg;
|
|
40
|
+
try {
|
|
41
|
+
const response = await fetch(url, {
|
|
42
|
+
next: { revalidate: 86400 }
|
|
43
|
+
// Cache for 24 hours
|
|
44
|
+
});
|
|
45
|
+
if (!response.ok) {
|
|
46
|
+
throw new Error(`Failed to fetch SVG: ${response.status}`);
|
|
47
|
+
}
|
|
48
|
+
rawSvg = await response.text();
|
|
49
|
+
} catch (error) {
|
|
50
|
+
console.error("RemoteLogo: Failed to fetch SVG from remote source:", error);
|
|
51
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { className, style, ...props });
|
|
52
|
+
}
|
|
53
|
+
const cleanSvg = rawSvg.replace(/<\?xml[\s\S]*?\?>/g, "").replace(/<!DOCTYPE[\s\S]*?>/gi, "").replace(/\sxml:space=/g, " xmlSpace=").trim();
|
|
54
|
+
const parsed = (0, import_html_react_parser.default)(cleanSvg, {
|
|
55
|
+
replace(domNode) {
|
|
56
|
+
if (domNode instanceof import_html_react_parser.Element && domNode.name === "svg") {
|
|
57
|
+
const children = (0, import_html_react_parser.domToReact)(domNode.children);
|
|
58
|
+
const attribs = { ...domNode.attribs };
|
|
59
|
+
if ("xmlspace" in attribs) {
|
|
60
|
+
attribs.xmlSpace = attribs.xmlspace;
|
|
61
|
+
delete attribs.xmlspace;
|
|
62
|
+
}
|
|
63
|
+
const svgClassName = [className, "remote-logo"].filter(Boolean).join(" ");
|
|
64
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { ...attribs, className: svgClassName, style, ...props, children });
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
const elements = Array.isArray(parsed) ? parsed : [parsed];
|
|
69
|
+
const svgElement = elements.find((el) => import_react.default.isValidElement(el) && el.type === "svg");
|
|
70
|
+
return svgElement ? svgElement : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { className, style, ...props });
|
|
71
|
+
}
|
|
72
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
73
|
+
0 && (module.exports = {
|
|
74
|
+
RemoteLogo
|
|
75
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import react__default from 'react';
|
|
2
|
+
|
|
3
|
+
interface RemoteLogoProps extends react__default.SVGProps<SVGSVGElement> {
|
|
4
|
+
url?: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Async Server Component that fetches a remote SVG and renders it
|
|
8
|
+
* as native React elements using html-react-parser.
|
|
9
|
+
*/
|
|
10
|
+
declare function RemoteLogo({ url, className, style, ...props }: RemoteLogoProps): Promise<string | react__default.JSX.Element>;
|
|
11
|
+
|
|
12
|
+
export { RemoteLogo, type RemoteLogoProps };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import react__default from 'react';
|
|
2
|
+
|
|
3
|
+
interface RemoteLogoProps extends react__default.SVGProps<SVGSVGElement> {
|
|
4
|
+
url?: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Async Server Component that fetches a remote SVG and renders it
|
|
8
|
+
* as native React elements using html-react-parser.
|
|
9
|
+
*/
|
|
10
|
+
declare function RemoteLogo({ url, className, style, ...props }: RemoteLogoProps): Promise<string | react__default.JSX.Element>;
|
|
11
|
+
|
|
12
|
+
export { RemoteLogo, type RemoteLogoProps };
|