@netfoundry/docusaurus-theme 0.2.1 → 0.2.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/src/components/Alert/Alert.js +51 -6
- package/dist/src/components/Alert/Alert.js.map +7 -1
- package/dist/src/components/Alert/index.js +29 -2
- package/dist/src/components/Alert/index.js.map +7 -1
- package/dist/src/components/CodeBlock/CodeBlock.js +53 -7
- package/dist/src/components/CodeBlock/CodeBlock.js.map +7 -1
- package/dist/src/components/CodeBlock/index.js +29 -2
- package/dist/src/components/CodeBlock/index.js.map +7 -1
- package/dist/src/components/Common/Common.js +59 -16
- package/dist/src/components/Common/Common.js.map +7 -1
- package/dist/src/components/Common/Logos.js +92 -6
- package/dist/src/components/Common/Logos.js.map +7 -1
- package/dist/src/components/Common/index.js +25 -3
- package/dist/src/components/Common/index.js.map +7 -1
- package/dist/src/components/NetFoundry/Divider/Divider.js +46 -5
- package/dist/src/components/NetFoundry/Divider/Divider.js.map +7 -1
- package/dist/src/components/NetFoundry/Divider/index.js +23 -2
- package/dist/src/components/NetFoundry/Divider/index.js.map +7 -1
- package/dist/src/components/NetFoundry/index.js +23 -2
- package/dist/src/components/NetFoundry/index.js.map +7 -1
- package/dist/src/components/NetFoundryFooter/NetFoundryFooter.d.ts +2 -21
- package/dist/src/components/NetFoundryFooter/NetFoundryFooter.d.ts.map +1 -1
- package/dist/src/components/NetFoundryFooter/NetFoundryFooter.js +115 -58
- package/dist/src/components/NetFoundryFooter/NetFoundryFooter.js.map +7 -1
- package/dist/src/components/NetFoundryFooter/defaults.js +50 -23
- package/dist/src/components/NetFoundryFooter/defaults.js.map +7 -1
- package/dist/src/components/NetFoundryFooter/index.js +23 -2
- package/dist/src/components/NetFoundryFooter/index.js.map +7 -1
- package/dist/src/components/NetFoundryFooter/types.d.ts +27 -0
- package/dist/src/components/NetFoundryFooter/types.d.ts.map +1 -0
- package/dist/src/components/NetFoundryFooter/types.js +53 -0
- package/dist/src/components/NetFoundryFooter/types.js.map +7 -0
- package/dist/src/components/NetFoundryHighlight/NetFoundryHighlight.js +32 -5
- package/dist/src/components/NetFoundryHighlight/NetFoundryHighlight.js.map +7 -1
- package/dist/src/components/NetFoundryHighlight/index.js +29 -2
- package/dist/src/components/NetFoundryHighlight/index.js.map +7 -1
- package/dist/src/components/NetFoundryHorizontalSection/NetFoundryHorizontalSection.js +52 -7
- package/dist/src/components/NetFoundryHorizontalSection/NetFoundryHorizontalSection.js.map +7 -1
- package/dist/src/components/NetFoundryHorizontalSection/index.js +29 -2
- package/dist/src/components/NetFoundryHorizontalSection/index.js.map +7 -1
- package/dist/src/components/NetFoundryLayout/NetFoundryLayout.js +111 -34
- package/dist/src/components/NetFoundryLayout/NetFoundryLayout.js.map +7 -1
- package/dist/src/components/NetFoundryLayout/index.js +23 -2
- package/dist/src/components/NetFoundryLayout/index.js.map +7 -1
- package/dist/src/components/NetFoundryNavbarItems/NetFoundryNavbarItems.js +40 -13
- package/dist/src/components/NetFoundryNavbarItems/NetFoundryNavbarItems.js.map +7 -1
- package/dist/src/components/NetFoundryNavbarItems/index.js +29 -2
- package/dist/src/components/NetFoundryNavbarItems/index.js.map +7 -1
- package/dist/src/components/OsTabs/OsTabs.js +53 -17
- package/dist/src/components/OsTabs/OsTabs.js.map +7 -1
- package/dist/src/components/OsTabs/index.js +29 -2
- package/dist/src/components/OsTabs/index.js.map +7 -1
- package/dist/src/components/ProductSearch/ProductSearch.js +243 -122
- package/dist/src/components/ProductSearch/ProductSearch.js.map +7 -1
- package/dist/src/components/ProductSearch/index.js +42 -4
- package/dist/src/components/ProductSearch/index.js.map +7 -1
- package/dist/src/components/StarUs/StarUs.js +45 -6
- package/dist/src/components/StarUs/StarUs.js.map +7 -1
- package/dist/src/components/StarUs/index.js +39 -2
- package/dist/src/components/StarUs/index.js.map +7 -1
- package/dist/src/components/index.js +45 -13
- package/dist/src/components/index.js.map +7 -1
- package/dist/src/config.d.ts +9 -0
- package/dist/src/config.d.ts.map +1 -0
- package/dist/src/config.js +34 -0
- package/dist/src/config.js.map +7 -0
- package/dist/src/css-modules.d.js +2 -0
- package/dist/src/css-modules.d.js.map +7 -0
- package/dist/src/docusaurus-envhelper.js +111 -64
- package/dist/src/docusaurus-envhelper.js.map +7 -1
- package/dist/src/docusaurus-plugins/index.js +35 -8
- package/dist/src/docusaurus-plugins/index.js.map +7 -1
- package/dist/src/docusaurus-plugins/logger.js +66 -38
- package/dist/src/docusaurus-plugins/logger.js.map +7 -1
- package/dist/src/docusaurus-plugins/remarkCodeSections.js +127 -94
- package/dist/src/docusaurus-plugins/remarkCodeSections.js.map +7 -1
- package/dist/src/docusaurus-plugins/remarkReplaceMetaUrl.js +50 -22
- package/dist/src/docusaurus-plugins/remarkReplaceMetaUrl.js.map +7 -1
- package/dist/src/docusaurus-plugins/remarkScopedPath.js +78 -46
- package/dist/src/docusaurus-plugins/remarkScopedPath.js.map +7 -1
- package/dist/src/docusaurus-plugins/remarkYamlTable.js +84 -49
- package/dist/src/docusaurus-plugins/remarkYamlTable.js.map +7 -1
- package/dist/src/docusaurus-plugins/remarkYouTube.js +65 -42
- package/dist/src/docusaurus-plugins/remarkYouTube.js.map +7 -1
- package/dist/src/docusaurus-plugins/timedPlugin.js +42 -15
- package/dist/src/docusaurus-plugins/timedPlugin.js.map +7 -1
- package/dist/src/docusaurus.d.js +2 -0
- package/dist/src/docusaurus.d.js.map +7 -0
- package/dist/src/index.js +63 -36
- package/dist/src/index.js.map +7 -1
- package/dist/src/node.js +23 -7
- package/dist/src/node.js.map +7 -1
- package/dist/src/options.js +17 -2
- package/dist/src/options.js.map +7 -1
- package/dist/src/plugins.js +23 -7
- package/dist/src/plugins.js.map +7 -1
- package/dist/src/ui.js +25 -8
- package/dist/src/ui.js.map +7 -1
- package/dist/src/version.js +29 -2
- package/dist/src/version.js.map +7 -1
- package/dist/theme/BlogPostPage/Metadata.js +35 -2
- package/dist/theme/BlogPostPage/Metadata.js.map +7 -1
- package/dist/theme/BlogPostPage/StructuredData.js +35 -2
- package/dist/theme/BlogPostPage/StructuredData.js.map +7 -1
- package/dist/theme/BlogPostPage/index.js +98 -24
- package/dist/theme/BlogPostPage/index.js.map +7 -1
- package/dist/theme/DocSearch/index.js +95 -27
- package/dist/theme/DocSearch/index.js.map +7 -1
- package/dist/theme/Layout/index.js +81 -35
- package/dist/theme/Layout/index.js.map +7 -1
- package/dist/theme/Navbar/Content/index.js +69 -26
- package/dist/theme/Navbar/Content/index.js.map +7 -1
- package/dist/theme/Navbar/Logo/index.js +88 -39
- package/dist/theme/Navbar/Logo/index.js.map +7 -1
- package/dist/theme/OsTabs/index.js +50 -19
- package/dist/theme/OsTabs/index.js.map +7 -1
- package/dist/theme/SearchBar/index.js +89 -34
- package/dist/theme/SearchBar/index.js.map +7 -1
- package/package.json +11 -25
- package/css/layout.css +0 -14
- package/css/legacy.css +0 -2313
- package/css/tabs-v1-gradient.css +0 -92
- package/css/tabs-v2-glass.css +0 -116
- package/css/tabs-v3-minimal.css +0 -86
- package/css/tabs-v4-segmented.css +0 -85
- package/css/tabs-v5-neon.css +0 -99
- package/css/tabs-v6-neumorphic.css +0 -89
- package/css/tabs-v7-brutalist.css +0 -81
- package/css/tabs-v8-float.css +0 -114
- package/css/tabs-v9-line.css +0 -104
- package/css/theme.css +0 -72
- package/css/vars-dark.css +0 -7
- package/css/vars.css +0 -8
|
@@ -1,37 +1,83 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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 Layout_exports = {};
|
|
30
|
+
__export(Layout_exports, {
|
|
31
|
+
default: () => Layout
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(Layout_exports);
|
|
34
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
35
|
+
var import_useDocusaurusContext = __toESM(require("@docusaurus/useDocusaurusContext"));
|
|
36
|
+
var import_router = require("@docusaurus/router");
|
|
37
|
+
var import_ui = require("../../src/ui");
|
|
38
|
+
function Layout({
|
|
39
|
+
children,
|
|
40
|
+
noFooter,
|
|
41
|
+
wrapperClassName,
|
|
42
|
+
title,
|
|
43
|
+
description
|
|
44
|
+
}) {
|
|
45
|
+
const { siteConfig } = (0, import_useDocusaurusContext.default)();
|
|
46
|
+
const { pathname } = (0, import_router.useLocation)();
|
|
47
|
+
const themeConfig = siteConfig.themeConfig;
|
|
48
|
+
const nfConfig = themeConfig.netfoundry ?? {};
|
|
49
|
+
const product = nfConfig.products?.find((p) => pathname.startsWith(p.pathPrefix));
|
|
50
|
+
let footerProps = void 0;
|
|
51
|
+
if (!noFooter) {
|
|
52
|
+
const baseFooter = product?.footer || nfConfig.footer;
|
|
53
|
+
footerProps = {
|
|
54
|
+
...(0, import_ui.defaultNetFoundryFooterProps)(),
|
|
55
|
+
...baseFooter,
|
|
56
|
+
socialProps: {
|
|
57
|
+
...import_ui.defaultSocialProps,
|
|
58
|
+
...baseFooter?.socialProps
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
const baseStar = product?.starBanner || nfConfig.starBanner;
|
|
63
|
+
const starProps = nfConfig.showStarBanner && baseStar ? {
|
|
64
|
+
repoUrl: baseStar.repoUrl,
|
|
65
|
+
label: baseStar.label
|
|
66
|
+
} : void 0;
|
|
67
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
68
|
+
import_ui.NetFoundryLayout,
|
|
69
|
+
{
|
|
70
|
+
title,
|
|
71
|
+
description,
|
|
72
|
+
className: wrapperClassName,
|
|
73
|
+
noFooter,
|
|
74
|
+
footerProps,
|
|
75
|
+
starProps,
|
|
76
|
+
meta: {
|
|
77
|
+
siteName: siteConfig.title
|
|
78
|
+
},
|
|
79
|
+
children
|
|
24
80
|
}
|
|
25
|
-
|
|
26
|
-
const baseStar = product?.starBanner || nfConfig.starBanner;
|
|
27
|
-
const starProps = (nfConfig.showStarBanner && baseStar)
|
|
28
|
-
? {
|
|
29
|
-
repoUrl: baseStar.repoUrl,
|
|
30
|
-
label: baseStar.label,
|
|
31
|
-
}
|
|
32
|
-
: undefined;
|
|
33
|
-
return (_jsx(NetFoundryLayout, { title: title, description: description, className: wrapperClassName, noFooter: noFooter, footerProps: footerProps, starProps: starProps, meta: {
|
|
34
|
-
siteName: siteConfig.title,
|
|
35
|
-
}, children: children }));
|
|
81
|
+
);
|
|
36
82
|
}
|
|
37
|
-
//# sourceMappingURL=index.js.map
|
|
83
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../theme/Layout/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import React, { type ReactNode } from 'react';\nimport useDocusaurusContext from '@docusaurus/useDocusaurusContext';\nimport { useLocation } from '@docusaurus/router';\nimport {\n NetFoundryLayout,\n defaultNetFoundryFooterProps,\n defaultSocialProps,\n} from '../../src/ui';\nimport type { ThemeConfigWithNetFoundry, FooterConfig, StarBannerConfig } from '../../src/options';\n\nexport interface LayoutProps {\n children: ReactNode;\n noFooter?: boolean;\n wrapperClassName?: string;\n title?: string;\n description?: string;\n}\n\nexport default function Layout({\n children,\n noFooter,\n wrapperClassName,\n title,\n description,\n}: LayoutProps): ReactNode {\n const { siteConfig } = useDocusaurusContext();\n const { pathname } = useLocation();\n const themeConfig = siteConfig.themeConfig as ThemeConfigWithNetFoundry;\n const nfConfig = themeConfig.netfoundry ?? {};\n\n // Find product override if any\n const product = nfConfig.products?.find(p => pathname.startsWith(p.pathPrefix));\n\n // Determine footer props\n let footerProps: any = undefined;\n if (!noFooter) {\n const baseFooter = product?.footer || nfConfig.footer;\n footerProps = {\n ...defaultNetFoundryFooterProps(),\n ...baseFooter,\n socialProps: {\n ...defaultSocialProps,\n ...baseFooter?.socialProps,\n },\n };\n }\n\n // Determine star props\n const baseStar = product?.starBanner || nfConfig.starBanner;\n const starProps = (nfConfig.showStarBanner && baseStar)\n ? {\n repoUrl: baseStar.repoUrl,\n label: baseStar.label,\n }\n : undefined;\n\n return (\n <NetFoundryLayout\n title={title}\n description={description}\n className={wrapperClassName}\n noFooter={noFooter}\n footerProps={footerProps}\n starProps={starProps}\n meta={{\n siteName: siteConfig.title,\n }}\n >\n {children}\n </NetFoundryLayout>\n );\n}"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAyDI;AAxDJ,kCAAiC;AACjC,oBAA4B;AAC5B,gBAIO;AAWQ,SAAR,OAAwB;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAA2B;AACzB,QAAM,EAAE,WAAW,QAAI,4BAAAA,SAAqB;AAC5C,QAAM,EAAE,SAAS,QAAI,2BAAY;AACjC,QAAM,cAAc,WAAW;AAC/B,QAAM,WAAW,YAAY,cAAc,CAAC;AAG5C,QAAM,UAAU,SAAS,UAAU,KAAK,OAAK,SAAS,WAAW,EAAE,UAAU,CAAC;AAG9E,MAAI,cAAmB;AACvB,MAAI,CAAC,UAAU;AACb,UAAM,aAAa,SAAS,UAAU,SAAS;AAC/C,kBAAc;AAAA,MACZ,OAAG,wCAA6B;AAAA,MAChC,GAAG;AAAA,MACH,aAAa;AAAA,QACX,GAAG;AAAA,QACH,GAAG,YAAY;AAAA,MACjB;AAAA,IACF;AAAA,EACF;AAGA,QAAM,WAAW,SAAS,cAAc,SAAS;AACjD,QAAM,YAAa,SAAS,kBAAkB,WAC1C;AAAA,IACE,SAAS,SAAS;AAAA,IAClB,OAAO,SAAS;AAAA,EAClB,IACA;AAEJ,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA,WAAW;AAAA,MACX;AAAA,MACA;AAAA,MACA;AAAA,MACA,MAAM;AAAA,QACJ,UAAU,WAAW;AAAA,MACvB;AAAA,MAEC;AAAA;AAAA,EACH;AAEJ;",
|
|
6
|
+
"names": ["useDocusaurusContext"]
|
|
7
|
+
}
|
|
@@ -1,27 +1,70 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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 Content_exports = {};
|
|
30
|
+
__export(Content_exports, {
|
|
31
|
+
default: () => NavbarContent
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(Content_exports);
|
|
34
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
35
|
+
var import_react = require("react");
|
|
36
|
+
var import_router = require("@docusaurus/router");
|
|
37
|
+
var import_NavbarItem = __toESM(require("@theme/NavbarItem"));
|
|
38
|
+
var import_SearchBar = __toESM(require("@theme/SearchBar"));
|
|
39
|
+
var import_Logo = __toESM(require("@theme/Navbar/Logo"));
|
|
40
|
+
var import_ColorModeToggle = __toESM(require("@theme/ColorModeToggle"));
|
|
41
|
+
var import_theme_common = require("@docusaurus/theme-common");
|
|
42
|
+
var import_Toggle = __toESM(require("@theme/Navbar/MobileSidebar/Toggle"));
|
|
43
|
+
var import_internal = require("@docusaurus/theme-common/internal");
|
|
44
|
+
var import_useDocusaurusContext = __toESM(require("@docusaurus/useDocusaurusContext"));
|
|
45
|
+
function NavbarContent(props) {
|
|
46
|
+
const { pathname } = (0, import_router.useLocation)();
|
|
47
|
+
const { siteConfig } = (0, import_useDocusaurusContext.default)();
|
|
48
|
+
const { colorMode, setColorMode } = (0, import_theme_common.useColorMode)();
|
|
49
|
+
const { colorMode: cmCfg } = (0, import_theme_common.useThemeConfig)();
|
|
50
|
+
const themeConfig = siteConfig.themeConfig;
|
|
51
|
+
const nfConfig = themeConfig.netfoundry ?? {};
|
|
52
|
+
const product = nfConfig.products?.find((p) => pathname.startsWith(p.pathPrefix));
|
|
53
|
+
const items = product?.navbarItems || themeConfig.navbar?.items || [];
|
|
54
|
+
const left = items.filter((i) => i.position !== "right");
|
|
55
|
+
const right = items.filter((i) => i.position === "right");
|
|
56
|
+
const mobileSidebar = (0, import_internal.useNavbarMobileSidebar)();
|
|
57
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "navbar__inner", children: [
|
|
58
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "navbar__items", children: [
|
|
59
|
+
!mobileSidebar.disabled && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Toggle.default, {}),
|
|
60
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Logo.default, {}),
|
|
61
|
+
left.map((item, i) => /* @__PURE__ */ (0, import_react.createElement)(import_NavbarItem.default, { ...item, key: `l-${i}` }))
|
|
62
|
+
] }),
|
|
63
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "navbar__items navbar__items--right", children: [
|
|
64
|
+
!cmCfg?.disableSwitch && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ColorModeToggle.default, { value: colorMode, onChange: setColorMode }),
|
|
65
|
+
right.map((item, i) => /* @__PURE__ */ (0, import_react.createElement)(import_NavbarItem.default, { ...item, key: `r-${i}` })),
|
|
66
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_SearchBar.default, {})
|
|
67
|
+
] })
|
|
68
|
+
] });
|
|
26
69
|
}
|
|
27
|
-
//# sourceMappingURL=index.js.map
|
|
70
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../theme/Navbar/Content/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import React, {JSX} from 'react';\nimport {useLocation} from '@docusaurus/router';\nimport NavbarItem from '@theme/NavbarItem';\nimport SearchBar from '@theme/SearchBar';\nimport OriginalNavbarContent from '@theme-original/Navbar/Content';\nimport NavbarLogo from \"@theme/Navbar/Logo\";\nimport ColorModeToggle from '@theme/ColorModeToggle';\nimport {useColorMode, useThemeConfig} from '@docusaurus/theme-common';\nimport styles from './index.module.css'\n\nimport NavbarMobileSidebarToggle from \"@theme/Navbar/MobileSidebar/Toggle\";\nimport {useNavbarMobileSidebar} from \"@docusaurus/theme-common/internal\";\nimport useDocusaurusContext from \"@docusaurus/useDocusaurusContext\";\nimport {ThemeConfigWithNetFoundry} from \"../../../src/options\";\n\ntype Props = React.ComponentProps<typeof OriginalNavbarContent>;\n\nexport default function NavbarContent(props: Props): JSX.Element {\n const {pathname} = useLocation();\n const {siteConfig} = useDocusaurusContext();\n const {colorMode, setColorMode} = useColorMode();\n const {colorMode: cmCfg} = useThemeConfig();\n \n const themeConfig = siteConfig.themeConfig as ThemeConfigWithNetFoundry;\n const nfConfig = themeConfig.netfoundry ?? {};\n\n // Find product override for navbar items, fallback to standard navbar items\n const product = nfConfig.products?.find(p => pathname.startsWith(p.pathPrefix));\n const items = product?.navbarItems || (themeConfig.navbar as any)?.items || [];\n\n const left = items.filter((i: any) => i.position !== 'right');\n const right = items.filter((i: any) => i.position === 'right');\n\n const mobileSidebar = useNavbarMobileSidebar();\n\n return (\n <div className=\"navbar__inner\">\n <div className=\"navbar__items\">\n {!mobileSidebar.disabled && <NavbarMobileSidebarToggle />}\n <NavbarLogo />\n {left.map((item: any, i: number) => (\n <NavbarItem {...item} key={`l-${i}`} />\n ))}\n </div>\n <div className=\"navbar__items navbar__items--right\">\n {!cmCfg?.disableSwitch && (\n <ColorModeToggle value={colorMode} onChange={setColorMode} />\n )}\n {right.map((item: any, i: number) => (\n <NavbarItem {...item} key={`r-${i}`} />\n ))}\n <SearchBar />\n </div>\n </div>\n );\n}"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAqCY;AAIQ;AAxCpB,oBAA0B;AAC1B,wBAAuB;AACvB,uBAAsB;AAEtB,kBAAuB;AACvB,6BAA4B;AAC5B,0BAA2C;AAG3C,oBAAsC;AACtC,sBAAqC;AACrC,kCAAiC;AAKlB,SAAR,cAA+B,OAA2B;AAC7D,QAAM,EAAC,SAAQ,QAAI,2BAAY;AAC/B,QAAM,EAAC,WAAU,QAAI,4BAAAA,SAAqB;AAC1C,QAAM,EAAC,WAAW,aAAY,QAAI,kCAAa;AAC/C,QAAM,EAAC,WAAW,MAAK,QAAI,oCAAe;AAE1C,QAAM,cAAc,WAAW;AAC/B,QAAM,WAAW,YAAY,cAAc,CAAC;AAG5C,QAAM,UAAU,SAAS,UAAU,KAAK,OAAK,SAAS,WAAW,EAAE,UAAU,CAAC;AAC9E,QAAM,QAAQ,SAAS,eAAgB,YAAY,QAAgB,SAAS,CAAC;AAE7E,QAAM,OAAO,MAAM,OAAO,CAAC,MAAW,EAAE,aAAa,OAAO;AAC5D,QAAM,QAAQ,MAAM,OAAO,CAAC,MAAW,EAAE,aAAa,OAAO;AAE7D,QAAM,oBAAgB,wCAAuB;AAE7C,SACI,6CAAC,SAAI,WAAU,iBACX;AAAA,iDAAC,SAAI,WAAU,iBACV;AAAA,OAAC,cAAc,YAAY,4CAAC,cAAAC,SAAA,EAA0B;AAAA,MACvD,4CAAC,YAAAC,SAAA,EAAW;AAAA,MACX,KAAK,IAAI,CAAC,MAAW,MAClB,gDAAC,kBAAAC,SAAA,EAAY,GAAG,MAAM,KAAK,KAAK,CAAC,IAAI,CACxC;AAAA,OACL;AAAA,IACA,6CAAC,SAAI,WAAU,sCACV;AAAA,OAAC,OAAO,iBACL,4CAAC,uBAAAC,SAAA,EAAgB,OAAO,WAAW,UAAU,cAAc;AAAA,MAE9D,MAAM,IAAI,CAAC,MAAW,MACnB,gDAAC,kBAAAD,SAAA,EAAY,GAAG,MAAM,KAAK,KAAK,CAAC,IAAI,CACxC;AAAA,MACD,4CAAC,iBAAAE,SAAA,EAAU;AAAA,OACf;AAAA,KACJ;AAER;",
|
|
6
|
+
"names": ["useDocusaurusContext", "NavbarMobileSidebarToggle", "NavbarLogo", "NavbarItem", "ColorModeToggle", "SearchBar"]
|
|
7
|
+
}
|
|
@@ -1,40 +1,89 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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
|
+
default: () => NavbarLogo
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(Logo_exports);
|
|
34
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
35
|
+
var import_Link = __toESM(require("@docusaurus/Link"));
|
|
36
|
+
var import_useDocusaurusContext = __toESM(require("@docusaurus/useDocusaurusContext"));
|
|
37
|
+
var import_router = require("@docusaurus/router");
|
|
38
|
+
var import_ThemedImage = __toESM(require("@theme/ThemedImage"));
|
|
39
|
+
var import_useBaseUrl = __toESM(require("@docusaurus/useBaseUrl"));
|
|
40
|
+
var import_theme_common = require("@docusaurus/theme-common");
|
|
41
|
+
var import_Logos = require("../../../src/components/Common/Logos");
|
|
42
|
+
function NavbarLogo() {
|
|
43
|
+
const { siteConfig } = (0, import_useDocusaurusContext.default)();
|
|
44
|
+
const { pathname } = (0, import_router.useLocation)();
|
|
45
|
+
const { colorMode } = (0, import_theme_common.useColorMode)();
|
|
46
|
+
const themeConfig = siteConfig.themeConfig;
|
|
47
|
+
const nfConfig = themeConfig.netfoundry ?? {};
|
|
48
|
+
const product = nfConfig.products?.find((p) => pathname.startsWith(p.pathPrefix));
|
|
49
|
+
const LinkComp = import_Link.default;
|
|
50
|
+
const ThemedImageComp = import_ThemedImage.default;
|
|
51
|
+
const renderProductLogo = () => {
|
|
52
|
+
if (!product?.logo) return null;
|
|
53
|
+
const logo = product.logo;
|
|
54
|
+
if (pathname.startsWith("/docs/frontdoor")) {
|
|
55
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(LinkComp, { className: "navbar__brand", to: logo.to || "/docs/", children: [
|
|
56
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Logos.FrontdoorLogo, { className: "navbar__logo" }),
|
|
57
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "navbar__title", children: logo.text || "Frontdoor" })
|
|
58
|
+
] });
|
|
59
|
+
}
|
|
60
|
+
if (logo.logoLight) {
|
|
61
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(LinkComp, { className: "navbar__brand", to: logo.to, children: [
|
|
62
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
63
|
+
ThemedImageComp,
|
|
64
|
+
{
|
|
65
|
+
className: "navbar__logo",
|
|
66
|
+
alt: logo.alt || "Logo",
|
|
67
|
+
sources: {
|
|
68
|
+
light: (0, import_useBaseUrl.default)(logo.logoLight),
|
|
69
|
+
dark: (0, import_useBaseUrl.default)(logo.logoDark || logo.logoLight)
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
),
|
|
73
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "navbar__title", children: logo.text })
|
|
74
|
+
] });
|
|
75
|
+
}
|
|
76
|
+
return null;
|
|
77
|
+
};
|
|
78
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
79
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(LinkComp, { className: "navbar__brand", to: "https://netfoundry.io", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
80
|
+
import_Logos.NetFoundryLogo,
|
|
81
|
+
{
|
|
82
|
+
variant: colorMode === "dark" ? "dark" : "light",
|
|
83
|
+
className: "navbar__logo_nf"
|
|
84
|
+
}
|
|
85
|
+
) }),
|
|
86
|
+
renderProductLogo()
|
|
87
|
+
] });
|
|
39
88
|
}
|
|
40
|
-
//# sourceMappingURL=index.js.map
|
|
89
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../theme/Navbar/Logo/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import React, {JSX} from 'react';\nimport Link from '@docusaurus/Link';\nimport useDocusaurusContext from '@docusaurus/useDocusaurusContext';\nimport {useLocation} from '@docusaurus/router';\nimport ThemedImage from \"@theme/ThemedImage\";\nimport useBaseUrl from \"@docusaurus/useBaseUrl\";\nimport { ThemeConfigWithNetFoundry } from '../../../src/options';\nimport { useColorMode } from '@docusaurus/theme-common';\n\n// Import logos as code\nimport { NetFoundryLogo, FrontdoorLogo } from '../../../src/components/Common/Logos';\n\nexport default function NavbarLogo(): JSX.Element {\n const {siteConfig} = useDocusaurusContext();\n const {pathname} = useLocation();\n const {colorMode} = useColorMode();\n const themeConfig = siteConfig.themeConfig as ThemeConfigWithNetFoundry;\n const nfConfig = themeConfig.netfoundry ?? {};\n\n // Find product override for logo\n const product = nfConfig.products?.find(p => pathname.startsWith(p.pathPrefix));\n \n const LinkComp = Link as any;\n const ThemedImageComp = ThemedImage as any;\n\n // Determine which product logo to show\n const renderProductLogo = () => {\n if (!product?.logo) return null;\n\n const logo = product.logo;\n \n // Handle special known product logos as components\n if (pathname.startsWith('/docs/frontdoor')) {\n return (\n <LinkComp className=\"navbar__brand\" to={logo.to || '/docs/'}>\n <FrontdoorLogo className=\"navbar__logo\" />\n <span className=\"navbar__title\">{logo.text || 'Frontdoor'}</span>\n </LinkComp>\n );\n }\n\n // Fallback to standard image-based logo if provided in config\n if (logo.logoLight) {\n return (\n <LinkComp className=\"navbar__brand\" to={logo.to}>\n <ThemedImageComp\n className=\"navbar__logo\"\n alt={logo.alt || 'Logo'}\n sources={{\n light: useBaseUrl(logo.logoLight),\n dark: useBaseUrl(logo.logoDark || logo.logoLight),\n }}\n />\n <span className=\"navbar__title\">{logo.text}</span>\n </LinkComp>\n );\n }\n\n return null;\n };\n\n return (\n <>\n <LinkComp className=\"navbar__brand\" to=\"https://netfoundry.io\">\n <NetFoundryLogo \n variant={colorMode === 'dark' ? 'dark' : 'light'} \n className=\"navbar__logo_nf\" \n />\n </LinkComp>\n {renderProductLogo()}\n </>\n );\n}"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAkCgB;AAjChB,kBAAiB;AACjB,kCAAiC;AACjC,oBAA0B;AAC1B,yBAAwB;AACxB,wBAAuB;AAEvB,0BAA6B;AAG7B,mBAA8C;AAE/B,SAAR,aAA2C;AAC9C,QAAM,EAAC,WAAU,QAAI,4BAAAA,SAAqB;AAC1C,QAAM,EAAC,SAAQ,QAAI,2BAAY;AAC/B,QAAM,EAAC,UAAS,QAAI,kCAAa;AACjC,QAAM,cAAc,WAAW;AAC/B,QAAM,WAAW,YAAY,cAAc,CAAC;AAG5C,QAAM,UAAU,SAAS,UAAU,KAAK,OAAK,SAAS,WAAW,EAAE,UAAU,CAAC;AAE9E,QAAM,WAAW,YAAAC;AACjB,QAAM,kBAAkB,mBAAAC;AAGxB,QAAM,oBAAoB,MAAM;AAC5B,QAAI,CAAC,SAAS,KAAM,QAAO;AAE3B,UAAM,OAAO,QAAQ;AAGrB,QAAI,SAAS,WAAW,iBAAiB,GAAG;AACxC,aACI,6CAAC,YAAS,WAAU,iBAAgB,IAAI,KAAK,MAAM,UAC/C;AAAA,oDAAC,8BAAc,WAAU,gBAAe;AAAA,QACxC,4CAAC,UAAK,WAAU,iBAAiB,eAAK,QAAQ,aAAY;AAAA,SAC9D;AAAA,IAER;AAGA,QAAI,KAAK,WAAW;AAChB,aACI,6CAAC,YAAS,WAAU,iBAAgB,IAAI,KAAK,IACzC;AAAA;AAAA,UAAC;AAAA;AAAA,YACG,WAAU;AAAA,YACV,KAAK,KAAK,OAAO;AAAA,YACjB,SAAS;AAAA,cACL,WAAO,kBAAAC,SAAW,KAAK,SAAS;AAAA,cAChC,UAAO,kBAAAA,SAAW,KAAK,YAAY,KAAK,SAAS;AAAA,YACrD;AAAA;AAAA,QACJ;AAAA,QACA,4CAAC,UAAK,WAAU,iBAAiB,eAAK,MAAK;AAAA,SAC/C;AAAA,IAER;AAEA,WAAO;AAAA,EACX;AAEA,SACI,4EACA;AAAA,gDAAC,YAAS,WAAU,iBAAgB,IAAG,yBACnC;AAAA,MAAC;AAAA;AAAA,QACG,SAAS,cAAc,SAAS,SAAS;AAAA,QACzC,WAAU;AAAA;AAAA,IACd,GACJ;AAAA,IACC,kBAAkB;AAAA,KACnB;AAER;",
|
|
6
|
+
"names": ["useDocusaurusContext", "Link", "ThemedImage", "useBaseUrl"]
|
|
7
|
+
}
|
|
@@ -1,20 +1,51 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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 OsTabs_exports = {};
|
|
30
|
+
__export(OsTabs_exports, {
|
|
31
|
+
default: () => OsTabs
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(OsTabs_exports);
|
|
34
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
35
|
+
var import_react = require("react");
|
|
36
|
+
var import_Tabs = __toESM(require("@theme/Tabs"));
|
|
37
|
+
var import_react_device_detect = require("react-device-detect");
|
|
38
|
+
function OsTabs(props) {
|
|
39
|
+
const [defaultValue, setDefaultValue] = (0, import_react.useState)(null);
|
|
40
|
+
(0, import_react.useEffect)(() => {
|
|
41
|
+
const tabs = ["iOS", "Android", "Mac OS", "Windows", "Linux"];
|
|
42
|
+
if (tabs.includes(import_react_device_detect.osName)) {
|
|
43
|
+
setDefaultValue(import_react_device_detect.osName);
|
|
44
|
+
} else {
|
|
45
|
+
setDefaultValue("Windows");
|
|
46
|
+
}
|
|
47
|
+
}, []);
|
|
48
|
+
const OriginalTabsComp = import_Tabs.default;
|
|
49
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(OriginalTabsComp, { ...props, defaultValue, children: props.children }) });
|
|
19
50
|
}
|
|
20
|
-
//# sourceMappingURL=index.js.map
|
|
51
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../theme/OsTabs/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import React, { useState, useEffect, type ReactNode } from 'react';\nimport OriginalTabs from '@theme/Tabs';\nimport { osName } from 'react-device-detect';\n\ninterface OsTabsProps {\n children: ReactNode;\n groupId?: string;\n values?: Array<{ value: string; label: string }>;\n [key: string]: any;\n}\n\nexport default function OsTabs(props: OsTabsProps): ReactNode {\n const [defaultValue, setDefaultValue] = useState<string | null>(null);\n\n useEffect(() => {\n // Based on the OS or any other client-side condition, set the default value\n const tabs = ['iOS', 'Android', 'Mac OS', 'Windows', 'Linux']\n if (tabs.includes(osName)) {\n setDefaultValue(osName);\n } else {\n setDefaultValue('Windows');\n }\n }, []); // The empty dependency array ensures this runs once after component mount\n\n const OriginalTabsComp = OriginalTabs as any;\n\n return (\n <>\n <OriginalTabsComp {...props} defaultValue={defaultValue}>\n {props.children}\n </OriginalTabsComp>\n {/* Uncomment the following line to debug the detected and selected values */}\n {/* <h2>detected={osName}, selected={defaultValue}</h2> */}\n </>\n );\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA2BI;AA3BJ,mBAA2D;AAC3D,kBAAyB;AACzB,iCAAuB;AASR,SAAR,OAAwB,OAA+B;AAC5D,QAAM,CAAC,cAAc,eAAe,QAAI,uBAAwB,IAAI;AAEpE,8BAAU,MAAM;AAEd,UAAM,OAAO,CAAC,OAAO,WAAW,UAAU,WAAW,OAAO;AAC5D,QAAI,KAAK,SAAS,iCAAM,GAAG;AACzB,sBAAgB,iCAAM;AAAA,IACxB,OAAO;AACL,sBAAgB,SAAS;AAAA,IAC3B;AAAA,EACF,GAAG,CAAC,CAAC;AAEL,QAAM,mBAAmB,YAAAA;AAEzB,SACE,2EACE,sDAAC,oBAAkB,GAAG,OAAO,cAC1B,gBAAM,UACT,GAGF;AAEJ;",
|
|
6
|
+
"names": ["OriginalTabs"]
|
|
7
|
+
}
|