@tuwaio/docs-ui 0.5.3 → 0.5.5

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.
@@ -26,8 +26,8 @@ var import_utils = require("@tuwaio/nova-core/utils");
26
26
  var import_nextra_theme_docs = require("nextra-theme-docs");
27
27
  var import_policies = require("../policies");
28
28
  var import_utils2 = require("../utils");
29
- function Footer({ links, logo }) {
30
- 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: [
29
+ function Footer({ links, logo, labels, policyLanguage = "en" }) {
30
+ 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", children: [
31
31
  /* @__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: [
32
32
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "tuwadocs:flex tuwadocs:items-center", children: logo }),
33
33
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "tuwadocs:flex tuwadocs:items-center tuwadocs:gap-4 tuwadocs:text-sm", children: (links ?? import_utils2.baseFooterLinks).map(({ title, href, image, className }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
@@ -48,23 +48,23 @@ function Footer({ links, logo }) {
48
48
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "tuwadocs:w-full tuwa-footer-border tuwadocs:pt-4", children: [
49
49
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "tuwadocs:flex tuwadocs:flex-col tuwadocs:sm:flex-row tuwadocs:justify-between tuwadocs:items-center tuwadocs:sm:items-start tuwadocs:gap-4", children: [
50
50
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "tuwadocs:flex-1 tuwadocs:text-center tuwadocs:sm:text-left", children: [
51
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "tuwa-footer-description", children: "The modular, headless-first Web3 infrastructure. Build self-custodial applications on open-source, portable building blocks." }),
52
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "tuwa-footer-license", children: "Licensed under Apache 2.0. Open source and free to use." })
51
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "tuwa-footer-description", children: labels?.description ?? "The modular, headless-first Web3 infrastructure. Build self-custodial applications on open-source, portable building blocks." }),
52
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "tuwa-footer-license", children: labels?.license ?? "Licensed under Apache 2.0. Open source and free to use." })
53
53
  ] }),
54
54
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
55
55
  "nav",
56
56
  {
57
- "aria-label": "Policies",
57
+ "aria-label": labels?.policiesAriaLabel ?? "Policies",
58
58
  className: "tuwadocs:flex tuwadocs:flex-wrap tuwadocs:items-center tuwadocs:justify-center tuwadocs:sm:justify-end tuwadocs:gap-x-4 tuwadocs:gap-y-2 tuwadocs:text-xs",
59
59
  children: [
60
60
  import_policies.footerPolicies.map((policy) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
61
61
  "a",
62
62
  {
63
- href: (0, import_policies.getPolicyPageUrl)(policy.slug),
63
+ href: (0, import_policies.getPolicyPageUrl)(policy.slug, void 0, policyLanguage),
64
64
  target: "_blank",
65
65
  rel: "noopener noreferrer",
66
66
  className: "tuwa-footer-link",
67
- children: policy.title
67
+ children: labels?.policyTitles?.[policy.slug] ?? policy.title
68
68
  },
69
69
  policy.slug
70
70
  )),
@@ -75,7 +75,7 @@ function Footer({ links, logo }) {
75
75
  target: "_blank",
76
76
  rel: "noopener noreferrer",
77
77
  className: "tuwa-footer-link tuwadocs:font-semibold",
78
- children: "All policies"
78
+ children: labels?.allPolicies ?? "All policies"
79
79
  }
80
80
  )
81
81
  ]
@@ -85,7 +85,8 @@ function Footer({ links, logo }) {
85
85
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "tuwadocs:flex tuwadocs:flex-wrap tuwadocs:items-center tuwadocs:justify-center tuwadocs:gap-3 tuwadocs:mt-4 tuwadocs:pt-4 tuwa-footer-border", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "tuwa-footer-copyright", children: [
86
86
  "\xA9 2025 - ",
87
87
  (/* @__PURE__ */ new Date()).getFullYear(),
88
- " TUWA. All rights reserved."
88
+ " TUWA. ",
89
+ labels?.copyright ?? "All rights reserved."
89
90
  ] }) })
90
91
  ] })
91
92
  ] }) });
@@ -1,15 +1,43 @@
1
1
  import * as react from 'react';
2
+ import { PolicySlug, PolicyLanguage } from '../policies.cjs';
2
3
  import { NavProps } from './NavBar.cjs';
3
4
 
5
+ /**
6
+ * Optional localized strings for {@link Footer}.
7
+ */
8
+ interface FooterLabels {
9
+ /** Description of TUWA */
10
+ description?: string;
11
+ /** License notice */
12
+ license?: string;
13
+ /** Accessible name of the policies nav */
14
+ policiesAriaLabel?: string;
15
+ /** Label of the link to all policies */
16
+ allPolicies?: string;
17
+ /** Copyright text after the year */
18
+ copyright?: string;
19
+ /** Localized titles for policies by slug */
20
+ policyTitles?: Partial<Record<PolicySlug, string>>;
21
+ }
22
+ /**
23
+ * Props of {@link Footer}.
24
+ */
25
+ interface FooterProps extends NavProps {
26
+ /** Optional localized strings */
27
+ labels?: FooterLabels;
28
+ /** Language of the policy page links (default: `'en'`) */
29
+ policyLanguage?: PolicyLanguage;
30
+ }
4
31
  /**
5
32
  * The footer of a TUWA documentation site: the `Footer` of `nextra-theme-docs` with the logo, external links, the
6
33
  * TUWA description and the license on the left, links to the policies in force on tuwa.io (`footerPolicies`) and to
7
34
  * the list of all policies on the docs hub on the right, and the copyright line (the current year is read on render)
8
35
  * centered below; on narrow screens everything is centered. Render it in the `footer` prop of the Nextra `Layout`.
9
36
  *
10
- * @param props - See {@link NavProps}.
37
+ * @param props - See {@link FooterProps}.
11
38
  * @returns The footer.
12
39
  */
13
- declare function Footer({ links, logo }: NavProps): react.JSX.Element;
40
+ declare function Footer({ links, logo, labels, policyLanguage }: FooterProps): react.JSX.Element;
14
41
 
15
42
  export { Footer };
43
+ export type { FooterLabels, FooterProps };
@@ -1,15 +1,43 @@
1
1
  import * as react from 'react';
2
+ import { PolicySlug, PolicyLanguage } from '../policies.js';
2
3
  import { NavProps } from './NavBar.js';
3
4
 
5
+ /**
6
+ * Optional localized strings for {@link Footer}.
7
+ */
8
+ interface FooterLabels {
9
+ /** Description of TUWA */
10
+ description?: string;
11
+ /** License notice */
12
+ license?: string;
13
+ /** Accessible name of the policies nav */
14
+ policiesAriaLabel?: string;
15
+ /** Label of the link to all policies */
16
+ allPolicies?: string;
17
+ /** Copyright text after the year */
18
+ copyright?: string;
19
+ /** Localized titles for policies by slug */
20
+ policyTitles?: Partial<Record<PolicySlug, string>>;
21
+ }
22
+ /**
23
+ * Props of {@link Footer}.
24
+ */
25
+ interface FooterProps extends NavProps {
26
+ /** Optional localized strings */
27
+ labels?: FooterLabels;
28
+ /** Language of the policy page links (default: `'en'`) */
29
+ policyLanguage?: PolicyLanguage;
30
+ }
4
31
  /**
5
32
  * The footer of a TUWA documentation site: the `Footer` of `nextra-theme-docs` with the logo, external links, the
6
33
  * TUWA description and the license on the left, links to the policies in force on tuwa.io (`footerPolicies`) and to
7
34
  * the list of all policies on the docs hub on the right, and the copyright line (the current year is read on render)
8
35
  * centered below; on narrow screens everything is centered. Render it in the `footer` prop of the Nextra `Layout`.
9
36
  *
10
- * @param props - See {@link NavProps}.
37
+ * @param props - See {@link FooterProps}.
11
38
  * @returns The footer.
12
39
  */
13
- declare function Footer({ links, logo }: NavProps): react.JSX.Element;
40
+ declare function Footer({ links, logo, labels, policyLanguage }: FooterProps): react.JSX.Element;
14
41
 
15
42
  export { Footer };
43
+ export type { FooterLabels, FooterProps };
@@ -1,10 +1,14 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { cn } from "@tuwaio/nova-core/utils";
3
3
  import { Footer as NextraFooter } from "nextra-theme-docs";
4
- import { footerPolicies, getPolicyPageUrl, POLICIES_INDEX_URL } from "../policies";
4
+ import {
5
+ footerPolicies,
6
+ getPolicyPageUrl,
7
+ POLICIES_INDEX_URL
8
+ } from "../policies";
5
9
  import { baseFooterLinks } from "../utils";
6
- function Footer({ links, logo }) {
7
- 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: [
10
+ function Footer({ links, logo, labels, policyLanguage = "en" }) {
11
+ return /* @__PURE__ */ jsx(NextraFooter, { children: /* @__PURE__ */ jsxs("div", { className: "tuwadocs:flex tuwadocs:w-full tuwadocs:flex-col tuwadocs:items-center tuwadocs:sm:items-start", children: [
8
12
  /* @__PURE__ */ jsxs("div", { className: "tuwadocs:mb-6 tuwadocs:flex tuwadocs:items-center tuwadocs:gap-4 tuwadocs:w-full tuwadocs:justify-between", children: [
9
13
  /* @__PURE__ */ jsx("div", { className: "tuwadocs:flex tuwadocs:items-center", children: logo }),
10
14
  /* @__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(
@@ -25,23 +29,23 @@ function Footer({ links, logo }) {
25
29
  /* @__PURE__ */ jsxs("div", { className: "tuwadocs:w-full tuwa-footer-border tuwadocs:pt-4", children: [
26
30
  /* @__PURE__ */ jsxs("div", { className: "tuwadocs:flex tuwadocs:flex-col tuwadocs:sm:flex-row tuwadocs:justify-between tuwadocs:items-center tuwadocs:sm:items-start tuwadocs:gap-4", children: [
27
31
  /* @__PURE__ */ jsxs("div", { className: "tuwadocs:flex-1 tuwadocs:text-center tuwadocs:sm:text-left", children: [
28
- /* @__PURE__ */ jsx("p", { className: "tuwa-footer-description", children: "The modular, headless-first Web3 infrastructure. Build self-custodial applications on open-source, portable building blocks." }),
29
- /* @__PURE__ */ jsx("p", { className: "tuwa-footer-license", children: "Licensed under Apache 2.0. Open source and free to use." })
32
+ /* @__PURE__ */ jsx("p", { className: "tuwa-footer-description", children: labels?.description ?? "The modular, headless-first Web3 infrastructure. Build self-custodial applications on open-source, portable building blocks." }),
33
+ /* @__PURE__ */ jsx("p", { className: "tuwa-footer-license", children: labels?.license ?? "Licensed under Apache 2.0. Open source and free to use." })
30
34
  ] }),
31
35
  /* @__PURE__ */ jsxs(
32
36
  "nav",
33
37
  {
34
- "aria-label": "Policies",
38
+ "aria-label": labels?.policiesAriaLabel ?? "Policies",
35
39
  className: "tuwadocs:flex tuwadocs:flex-wrap tuwadocs:items-center tuwadocs:justify-center tuwadocs:sm:justify-end tuwadocs:gap-x-4 tuwadocs:gap-y-2 tuwadocs:text-xs",
36
40
  children: [
37
41
  footerPolicies.map((policy) => /* @__PURE__ */ jsx(
38
42
  "a",
39
43
  {
40
- href: getPolicyPageUrl(policy.slug),
44
+ href: getPolicyPageUrl(policy.slug, void 0, policyLanguage),
41
45
  target: "_blank",
42
46
  rel: "noopener noreferrer",
43
47
  className: "tuwa-footer-link",
44
- children: policy.title
48
+ children: labels?.policyTitles?.[policy.slug] ?? policy.title
45
49
  },
46
50
  policy.slug
47
51
  )),
@@ -52,7 +56,7 @@ function Footer({ links, logo }) {
52
56
  target: "_blank",
53
57
  rel: "noopener noreferrer",
54
58
  className: "tuwa-footer-link tuwadocs:font-semibold",
55
- children: "All policies"
59
+ children: labels?.allPolicies ?? "All policies"
56
60
  }
57
61
  )
58
62
  ]
@@ -62,7 +66,8 @@ function Footer({ links, logo }) {
62
66
  /* @__PURE__ */ jsx("div", { className: "tuwadocs:flex tuwadocs:flex-wrap tuwadocs:items-center tuwadocs:justify-center tuwadocs:gap-3 tuwadocs:mt-4 tuwadocs:pt-4 tuwa-footer-border", children: /* @__PURE__ */ jsxs("div", { className: "tuwa-footer-copyright", children: [
63
67
  "\xA9 2025 - ",
64
68
  (/* @__PURE__ */ new Date()).getFullYear(),
65
- " TUWA. All rights reserved."
69
+ " TUWA. ",
70
+ labels?.copyright ?? "All rights reserved."
66
71
  ] }) })
67
72
  ] })
68
73
  ] }) });
@@ -28,13 +28,64 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
29
  var Logo_exports = {};
30
30
  __export(Logo_exports, {
31
- RemoteLogo: () => RemoteLogo
31
+ RemoteLogo: () => RemoteLogo,
32
+ SiteLogo: () => SiteLogo,
33
+ TuwaLogo: () => TuwaLogo
32
34
  });
33
35
  module.exports = __toCommonJS(Logo_exports);
34
36
  var import_jsx_runtime = require("react/jsx-runtime");
35
37
  var import_html_react_parser = __toESM(require("html-react-parser"), 1);
36
38
  var import_react = __toESM(require("react"), 1);
37
39
  const LOGO_URL = "https://tuwa.io/brand/logo_v2.svg";
40
+ const LIGHT_LOGO_URL = "https://tuwa.io/brand/logo_v2.svg";
41
+ const DARK_LOGO_URL = "https://tuwa.io/brand/logo_glow.svg";
42
+ function SiteLogo({
43
+ width = 126,
44
+ height = 40,
45
+ className = "",
46
+ lightSrc = LIGHT_LOGO_URL,
47
+ darkSrc = DARK_LOGO_URL
48
+ }) {
49
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
50
+ "div",
51
+ {
52
+ className: `tuwadocs:relative tuwadocs:flex tuwadocs:items-center tuwadocs:justify-center tuwadocs:shrink-0 ${className}`,
53
+ children: [
54
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
55
+ "img",
56
+ {
57
+ src: lightSrc,
58
+ alt: "TUWA",
59
+ width,
60
+ height,
61
+ className: "tuwadocs:block tuwadocs:dark:hidden tuwadocs:h-auto tuwadocs:transition-opacity tuwadocs:duration-300",
62
+ style: { width: `${width}px`, height: "auto" },
63
+ loading: "eager",
64
+ decoding: "async"
65
+ }
66
+ ),
67
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
68
+ "img",
69
+ {
70
+ src: darkSrc,
71
+ alt: "TUWA",
72
+ width,
73
+ height,
74
+ className: "tuwadocs:hidden tuwadocs:dark:block tuwadocs:h-auto tuwadocs:transition-opacity tuwadocs:duration-300",
75
+ style: {
76
+ width: `${width}px`,
77
+ height: "auto",
78
+ filter: "drop-shadow(0 0 12px rgba(103, 232, 249, 0.45))"
79
+ },
80
+ loading: "eager",
81
+ decoding: "async"
82
+ }
83
+ )
84
+ ]
85
+ }
86
+ );
87
+ }
88
+ const TuwaLogo = SiteLogo;
38
89
  async function RemoteLogo({ url = LOGO_URL, className, style, ...props }) {
39
90
  let rawSvg;
40
91
  try {
@@ -77,5 +128,7 @@ async function RemoteLogo({ url = LOGO_URL, className, style, ...props }) {
77
128
  }
78
129
  // Annotate the CommonJS export names for ESM import in node:
79
130
  0 && (module.exports = {
80
- RemoteLogo
131
+ RemoteLogo,
132
+ SiteLogo,
133
+ TuwaLogo
81
134
  });
@@ -1,5 +1,28 @@
1
1
  import react__default from 'react';
2
2
 
3
+ interface SiteLogoProps {
4
+ /** Width in pixels (default: 126) */
5
+ width?: number;
6
+ /** Height in pixels (default: 40) */
7
+ height?: number;
8
+ /** Additional CSS classes for wrapper */
9
+ className?: string;
10
+ /** Light mode logo source (default: https://tuwa.io/brand/logo_v2.svg) */
11
+ lightSrc?: string;
12
+ /** Dark mode logo source (default: https://tuwa.io/brand/logo_glow.svg) */
13
+ darkSrc?: string;
14
+ }
15
+ /**
16
+ * SiteLogo renders the TUWA brand logo:
17
+ * - Light mode: black vector logo (https://tuwa.io/brand/logo_v2.svg)
18
+ * - Dark mode: glowing cyan vector logo (https://tuwa.io/brand/logo_glow.svg) with constellation nodes/lines and ambient drop-shadow
19
+ *
20
+ * Using standalone <img> tags isolates each SVG document context, completely avoiding
21
+ * WebKit/Safari SVG ID collision and gradient-rendering bugs.
22
+ * Pure presentation element with no event handlers, ensuring it can safely cross Server/Client component boundaries.
23
+ */
24
+ declare function SiteLogo({ width, height, className, lightSrc, darkSrc, }: SiteLogoProps): react__default.JSX.Element;
25
+ declare const TuwaLogo: typeof SiteLogo;
3
26
  /**
4
27
  * Props of {@link RemoteLogo}: the SVG attributes are applied to the root `svg` element.
5
28
  */
@@ -21,5 +44,5 @@ interface RemoteLogoProps extends react__default.SVGProps<SVGSVGElement> {
21
44
  */
22
45
  declare function RemoteLogo({ url, className, style, ...props }: RemoteLogoProps): Promise<string | react__default.JSX.Element>;
23
46
 
24
- export { RemoteLogo };
25
- export type { RemoteLogoProps };
47
+ export { RemoteLogo, SiteLogo, TuwaLogo };
48
+ export type { RemoteLogoProps, SiteLogoProps };
@@ -1,5 +1,28 @@
1
1
  import react__default from 'react';
2
2
 
3
+ interface SiteLogoProps {
4
+ /** Width in pixels (default: 126) */
5
+ width?: number;
6
+ /** Height in pixels (default: 40) */
7
+ height?: number;
8
+ /** Additional CSS classes for wrapper */
9
+ className?: string;
10
+ /** Light mode logo source (default: https://tuwa.io/brand/logo_v2.svg) */
11
+ lightSrc?: string;
12
+ /** Dark mode logo source (default: https://tuwa.io/brand/logo_glow.svg) */
13
+ darkSrc?: string;
14
+ }
15
+ /**
16
+ * SiteLogo renders the TUWA brand logo:
17
+ * - Light mode: black vector logo (https://tuwa.io/brand/logo_v2.svg)
18
+ * - Dark mode: glowing cyan vector logo (https://tuwa.io/brand/logo_glow.svg) with constellation nodes/lines and ambient drop-shadow
19
+ *
20
+ * Using standalone <img> tags isolates each SVG document context, completely avoiding
21
+ * WebKit/Safari SVG ID collision and gradient-rendering bugs.
22
+ * Pure presentation element with no event handlers, ensuring it can safely cross Server/Client component boundaries.
23
+ */
24
+ declare function SiteLogo({ width, height, className, lightSrc, darkSrc, }: SiteLogoProps): react__default.JSX.Element;
25
+ declare const TuwaLogo: typeof SiteLogo;
3
26
  /**
4
27
  * Props of {@link RemoteLogo}: the SVG attributes are applied to the root `svg` element.
5
28
  */
@@ -21,5 +44,5 @@ interface RemoteLogoProps extends react__default.SVGProps<SVGSVGElement> {
21
44
  */
22
45
  declare function RemoteLogo({ url, className, style, ...props }: RemoteLogoProps): Promise<string | react__default.JSX.Element>;
23
46
 
24
- export { RemoteLogo };
25
- export type { RemoteLogoProps };
47
+ export { RemoteLogo, SiteLogo, TuwaLogo };
48
+ export type { RemoteLogoProps, SiteLogoProps };
@@ -2,6 +2,55 @@ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import parse, { domToReact, Element } from "html-react-parser";
3
3
  import React from "react";
4
4
  const LOGO_URL = "https://tuwa.io/brand/logo_v2.svg";
5
+ const LIGHT_LOGO_URL = "https://tuwa.io/brand/logo_v2.svg";
6
+ const DARK_LOGO_URL = "https://tuwa.io/brand/logo_glow.svg";
7
+ function SiteLogo({
8
+ width = 126,
9
+ height = 40,
10
+ className = "",
11
+ lightSrc = LIGHT_LOGO_URL,
12
+ darkSrc = DARK_LOGO_URL
13
+ }) {
14
+ return /* @__PURE__ */ jsxs(
15
+ "div",
16
+ {
17
+ className: `tuwadocs:relative tuwadocs:flex tuwadocs:items-center tuwadocs:justify-center tuwadocs:shrink-0 ${className}`,
18
+ children: [
19
+ /* @__PURE__ */ jsx(
20
+ "img",
21
+ {
22
+ src: lightSrc,
23
+ alt: "TUWA",
24
+ width,
25
+ height,
26
+ className: "tuwadocs:block tuwadocs:dark:hidden tuwadocs:h-auto tuwadocs:transition-opacity tuwadocs:duration-300",
27
+ style: { width: `${width}px`, height: "auto" },
28
+ loading: "eager",
29
+ decoding: "async"
30
+ }
31
+ ),
32
+ /* @__PURE__ */ jsx(
33
+ "img",
34
+ {
35
+ src: darkSrc,
36
+ alt: "TUWA",
37
+ width,
38
+ height,
39
+ className: "tuwadocs:hidden tuwadocs:dark:block tuwadocs:h-auto tuwadocs:transition-opacity tuwadocs:duration-300",
40
+ style: {
41
+ width: `${width}px`,
42
+ height: "auto",
43
+ filter: "drop-shadow(0 0 12px rgba(103, 232, 249, 0.45))"
44
+ },
45
+ loading: "eager",
46
+ decoding: "async"
47
+ }
48
+ )
49
+ ]
50
+ }
51
+ );
52
+ }
53
+ const TuwaLogo = SiteLogo;
5
54
  async function RemoteLogo({ url = LOGO_URL, className, style, ...props }) {
6
55
  let rawSvg;
7
56
  try {
@@ -43,5 +92,7 @@ async function RemoteLogo({ url = LOGO_URL, className, style, ...props }) {
43
92
  return svgElement ? svgElement : /* @__PURE__ */ jsx("svg", { className, style, ...props });
44
93
  }
45
94
  export {
46
- RemoteLogo
95
+ RemoteLogo,
96
+ SiteLogo,
97
+ TuwaLogo
47
98
  };
@@ -25,24 +25,27 @@ var import_jsx_runtime = require("react/jsx-runtime");
25
25
  var import_utils = require("@tuwaio/nova-core/utils");
26
26
  var import_nextra_theme_docs = require("nextra-theme-docs");
27
27
  var import_utils2 = require("../utils");
28
- function Navbar({ links, logo }) {
29
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_nextra_theme_docs.Navbar, { logo, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "tuwadocs:flex tuwadocs:items-center tuwadocs:gap-3", children: (links ?? import_utils2.baseNavLinks).map(({ title, href, image, className }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
30
- "a",
31
- {
32
- href,
33
- target: "_blank",
34
- rel: "noopener noreferrer",
35
- className: (0, import_utils.cn)(
36
- "tuwadocs:hidden tuwadocs:sm:flex tuwadocs:items-center tuwadocs:gap-1 tuwadocs:px-3 tuwadocs:py-1.5 tuwadocs:text-sm tuwadocs:font-medium tuwadocs:transition-colors tuwadocs:text-[var(--tuwa-text-primary)]",
37
- className
38
- ),
39
- children: [
40
- image,
41
- title
42
- ]
43
- },
44
- title
45
- )) }) });
28
+ function Navbar({ links, logo, children }) {
29
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_nextra_theme_docs.Navbar, { logo, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "tuwadocs:flex tuwadocs:items-center tuwadocs:gap-3", children: [
30
+ (links ?? import_utils2.baseNavLinks).map(({ title, href, image, className }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
31
+ "a",
32
+ {
33
+ href,
34
+ target: "_blank",
35
+ rel: "noopener noreferrer",
36
+ className: (0, import_utils.cn)(
37
+ "tuwadocs:hidden tuwadocs:sm:flex tuwadocs:items-center tuwadocs:gap-1 tuwadocs:px-3 tuwadocs:py-1.5 tuwadocs:text-sm tuwadocs:font-medium tuwadocs:transition-colors tuwadocs:text-[var(--tuwa-text-primary)]",
38
+ className
39
+ ),
40
+ children: [
41
+ image,
42
+ title
43
+ ]
44
+ },
45
+ title
46
+ )),
47
+ children
48
+ ] }) });
46
49
  }
47
50
  // Annotate the CommonJS export names for ESM import in node:
48
51
  0 && (module.exports = {
@@ -22,6 +22,8 @@ interface NavProps {
22
22
  links?: SocialLink[];
23
23
  /** Logo of the site, for example {@link RemoteLogo} */
24
24
  logo?: ReactNode;
25
+ /** Extra elements rendered in the navbar next to the links, for example {@link LocaleSwitcher} */
26
+ children?: ReactNode;
25
27
  }
26
28
  /**
27
29
  * The navbar of a TUWA documentation site: the `Navbar` of `nextra-theme-docs` with the logo and a row of external
@@ -30,7 +32,7 @@ interface NavProps {
30
32
  * @param props - See {@link NavProps}.
31
33
  * @returns The navbar.
32
34
  */
33
- declare function Navbar({ links, logo }: NavProps): react.JSX.Element;
35
+ declare function Navbar({ links, logo, children }: NavProps): react.JSX.Element;
34
36
 
35
37
  export { Navbar };
36
38
  export type { NavProps, SocialLink };
@@ -22,6 +22,8 @@ interface NavProps {
22
22
  links?: SocialLink[];
23
23
  /** Logo of the site, for example {@link RemoteLogo} */
24
24
  logo?: ReactNode;
25
+ /** Extra elements rendered in the navbar next to the links, for example {@link LocaleSwitcher} */
26
+ children?: ReactNode;
25
27
  }
26
28
  /**
27
29
  * The navbar of a TUWA documentation site: the `Navbar` of `nextra-theme-docs` with the logo and a row of external
@@ -30,7 +32,7 @@ interface NavProps {
30
32
  * @param props - See {@link NavProps}.
31
33
  * @returns The navbar.
32
34
  */
33
- declare function Navbar({ links, logo }: NavProps): react.JSX.Element;
35
+ declare function Navbar({ links, logo, children }: NavProps): react.JSX.Element;
34
36
 
35
37
  export { Navbar };
36
38
  export type { NavProps, SocialLink };
@@ -2,24 +2,27 @@ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { cn } from "@tuwaio/nova-core/utils";
3
3
  import { Navbar as NextraNavbar } from "nextra-theme-docs";
4
4
  import { baseNavLinks } from "../utils";
5
- function Navbar({ links, logo }) {
6
- return /* @__PURE__ */ jsx(NextraNavbar, { logo, children: /* @__PURE__ */ jsx("div", { className: "tuwadocs:flex tuwadocs:items-center tuwadocs:gap-3", children: (links ?? baseNavLinks).map(({ title, href, image, className }) => /* @__PURE__ */ jsxs(
7
- "a",
8
- {
9
- href,
10
- target: "_blank",
11
- rel: "noopener noreferrer",
12
- className: cn(
13
- "tuwadocs:hidden tuwadocs:sm:flex tuwadocs:items-center tuwadocs:gap-1 tuwadocs:px-3 tuwadocs:py-1.5 tuwadocs:text-sm tuwadocs:font-medium tuwadocs:transition-colors tuwadocs:text-[var(--tuwa-text-primary)]",
14
- className
15
- ),
16
- children: [
17
- image,
18
- title
19
- ]
20
- },
21
- title
22
- )) }) });
5
+ function Navbar({ links, logo, children }) {
6
+ return /* @__PURE__ */ jsx(NextraNavbar, { logo, children: /* @__PURE__ */ jsxs("div", { className: "tuwadocs:flex tuwadocs:items-center tuwadocs:gap-3", children: [
7
+ (links ?? baseNavLinks).map(({ title, href, image, className }) => /* @__PURE__ */ jsxs(
8
+ "a",
9
+ {
10
+ href,
11
+ target: "_blank",
12
+ rel: "noopener noreferrer",
13
+ className: cn(
14
+ "tuwadocs:hidden tuwadocs:sm:flex tuwadocs:items-center tuwadocs:gap-1 tuwadocs:px-3 tuwadocs:py-1.5 tuwadocs:text-sm tuwadocs:font-medium tuwadocs:transition-colors tuwadocs:text-[var(--tuwa-text-primary)]",
15
+ className
16
+ ),
17
+ children: [
18
+ image,
19
+ title
20
+ ]
21
+ },
22
+ title
23
+ )),
24
+ children
25
+ ] }) });
23
26
  }
24
27
  export {
25
28
  Navbar
@@ -38,20 +38,20 @@ var import_react = __toESM(require("react"), 1);
38
38
  const packageColors = {
39
39
  siwx: "#10b981",
40
40
  orbit: "#0d9488",
41
- satellite: "#6366f1",
41
+ satellite: "#0052ff",
42
42
  pulsar: "#f59e0b",
43
- quasar: "#06b6d4",
44
- nova: "#8b5cf6",
45
- sdk: "#3b82f6"
43
+ quasar: "#2563eb",
44
+ nova: "#0284c7",
45
+ sdk: "#1d4ed8"
46
46
  };
47
47
  const packageTints = {
48
48
  siwx: "rgba(16,185,129,0.12)",
49
49
  orbit: "rgba(13,148,136,0.12)",
50
- satellite: "rgba(99,102,241,0.12)",
50
+ satellite: "rgba(0,82,255,0.12)",
51
51
  pulsar: "rgba(245,158,11,0.12)",
52
- quasar: "rgba(6,182,212,0.12)",
53
- nova: "rgba(139,92,246,0.12)",
54
- sdk: "rgba(59,130,246,0.12)"
52
+ quasar: "rgba(37,99,235,0.12)",
53
+ nova: "rgba(2,132,199,0.12)",
54
+ sdk: "rgba(29,78,216,0.12)"
55
55
  };
56
56
  const getCosmicFilter = (type, id) => {
57
57
  const starField = (freq, seed, dur) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
@@ -5,20 +5,20 @@ import React from "react";
5
5
  const packageColors = {
6
6
  siwx: "#10b981",
7
7
  orbit: "#0d9488",
8
- satellite: "#6366f1",
8
+ satellite: "#0052ff",
9
9
  pulsar: "#f59e0b",
10
- quasar: "#06b6d4",
11
- nova: "#8b5cf6",
12
- sdk: "#3b82f6"
10
+ quasar: "#2563eb",
11
+ nova: "#0284c7",
12
+ sdk: "#1d4ed8"
13
13
  };
14
14
  const packageTints = {
15
15
  siwx: "rgba(16,185,129,0.12)",
16
16
  orbit: "rgba(13,148,136,0.12)",
17
- satellite: "rgba(99,102,241,0.12)",
17
+ satellite: "rgba(0,82,255,0.12)",
18
18
  pulsar: "rgba(245,158,11,0.12)",
19
- quasar: "rgba(6,182,212,0.12)",
20
- nova: "rgba(139,92,246,0.12)",
21
- sdk: "rgba(59,130,246,0.12)"
19
+ quasar: "rgba(37,99,235,0.12)",
20
+ nova: "rgba(2,132,199,0.12)",
21
+ sdk: "rgba(29,78,216,0.12)"
22
22
  };
23
23
  const getCosmicFilter = (type, id) => {
24
24
  const starField = (freq, seed, dur) => /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -113,7 +113,7 @@ function PolicyDocument({
113
113
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { className: (0, import_utils.cn)("tuwadocs:text-sm tuwadocs:text-[var(--tuwa-text-secondary)]", classNames?.updated), children: [
114
114
  texts.updated,
115
115
  " ",
116
- content.updated
116
+ (0, import_policies.formatPolicyDate)(content.updated, language)
117
117
  ] }),
118
118
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "tuwadocs:flex tuwadocs:flex-wrap tuwadocs:items-center tuwadocs:gap-2", children: [
119
119
  languages.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
@@ -3,6 +3,7 @@ import { ArrowDownTrayIcon } from "@heroicons/react/24/outline";
3
3
  import { cn } from "@tuwaio/nova-core/utils";
4
4
  import parse, { Element } from "html-react-parser";
5
5
  import {
6
+ formatPolicyDate,
6
7
  getPolicyFileUrl,
7
8
  POLICY_DOCUMENT_LABELS,
8
9
  POLICY_LANGUAGE_NAMES,
@@ -85,7 +86,7 @@ function PolicyDocument({
85
86
  /* @__PURE__ */ jsxs("p", { className: cn("tuwadocs:text-sm tuwadocs:text-[var(--tuwa-text-secondary)]", classNames?.updated), children: [
86
87
  texts.updated,
87
88
  " ",
88
- content.updated
89
+ formatPolicyDate(content.updated, language)
89
90
  ] }),
90
91
  /* @__PURE__ */ jsxs("div", { className: "tuwadocs:flex tuwadocs:flex-wrap tuwadocs:items-center tuwadocs:gap-2", children: [
91
92
  languages.length > 1 && /* @__PURE__ */ jsx(