@netfoundry/docusaurus-theme 0.10.12 → 0.10.13
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/theme/NavbarItem/ComponentTypes.d.ts +2 -0
- package/dist/theme/NavbarItem/ComponentTypes.d.ts.map +1 -1
- package/dist/theme/NavbarItem/ComponentTypes.js +2 -0
- package/dist/theme/NavbarItem/ComponentTypes.js.map +1 -1
- package/dist/theme/NavbarItem/types/VersionDropdown/index.d.ts +8 -0
- package/dist/theme/NavbarItem/types/VersionDropdown/index.d.ts.map +1 -0
- package/dist/theme/NavbarItem/types/VersionDropdown/index.js +11 -0
- package/dist/theme/NavbarItem/types/VersionDropdown/index.js.map +1 -0
- package/package.json +1 -1
- package/theme/NavbarItem/ComponentTypes.tsx +2 -0
- package/theme/NavbarItem/types/VersionDropdown/index.tsx +17 -0
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import ProductPicker from './types/ProductPicker';
|
|
2
2
|
import ResourcesPicker from './types/ResourcesPicker';
|
|
3
3
|
import IconLinks from './types/IconLinks';
|
|
4
|
+
import VersionDropdown from './types/VersionDropdown';
|
|
4
5
|
declare const _default: {
|
|
5
6
|
'custom-productPicker': typeof ProductPicker;
|
|
6
7
|
'custom-resourcesPicker': typeof ResourcesPicker;
|
|
7
8
|
'custom-iconLinks': typeof IconLinks;
|
|
9
|
+
'custom-versionDropdown': typeof VersionDropdown;
|
|
8
10
|
};
|
|
9
11
|
export default _default;
|
|
10
12
|
//# sourceMappingURL=ComponentTypes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComponentTypes.d.ts","sourceRoot":"","sources":["../../../theme/NavbarItem/ComponentTypes.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,uBAAuB,CAAC;AAClD,OAAO,eAAe,MAAM,yBAAyB,CAAC;AACtD,OAAO,SAAS,MAAM,mBAAmB,CAAC
|
|
1
|
+
{"version":3,"file":"ComponentTypes.d.ts","sourceRoot":"","sources":["../../../theme/NavbarItem/ComponentTypes.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,uBAAuB,CAAC;AAClD,OAAO,eAAe,MAAM,yBAAyB,CAAC;AACtD,OAAO,SAAS,MAAM,mBAAmB,CAAC;AAC1C,OAAO,eAAe,MAAM,yBAAyB,CAAC;;;;;;;AAUtD,wBAME"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import ProductPicker from './types/ProductPicker';
|
|
2
2
|
import ResourcesPicker from './types/ResourcesPicker';
|
|
3
3
|
import IconLinks from './types/IconLinks';
|
|
4
|
+
import VersionDropdown from './types/VersionDropdown';
|
|
4
5
|
// @theme-original resolves to OUR OWN file in a plugin theme (Docusaurus sets
|
|
5
6
|
// both @theme and @theme-original to the plugin file). @theme-init resolves to
|
|
6
7
|
// the version from the upstream theme (theme-classic) — which is what we want.
|
|
@@ -13,5 +14,6 @@ export default {
|
|
|
13
14
|
'custom-productPicker': ProductPicker,
|
|
14
15
|
'custom-resourcesPicker': ResourcesPicker,
|
|
15
16
|
'custom-iconLinks': IconLinks,
|
|
17
|
+
'custom-versionDropdown': VersionDropdown,
|
|
16
18
|
};
|
|
17
19
|
//# sourceMappingURL=ComponentTypes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComponentTypes.js","sourceRoot":"","sources":["../../../theme/NavbarItem/ComponentTypes.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,uBAAuB,CAAC;AAClD,OAAO,eAAe,MAAM,yBAAyB,CAAC;AACtD,OAAO,SAAS,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"ComponentTypes.js","sourceRoot":"","sources":["../../../theme/NavbarItem/ComponentTypes.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,uBAAuB,CAAC;AAClD,OAAO,eAAe,MAAM,yBAAyB,CAAC;AACtD,OAAO,SAAS,MAAM,mBAAmB,CAAC;AAC1C,OAAO,eAAe,MAAM,yBAAyB,CAAC;AAEtD,8EAA8E;AAC9E,+EAA+E;AAC/E,+EAA+E;AAC/E,+EAA+E;AAC/E,+EAA+E;AAC/E,8DAA8D;AAC9D,MAAM,kBAAkB,GAAG,OAAO,CAAC,uCAAuC,CAAC,CAAC,OAA8B,CAAC;AAE3G,eAAe;IACb,GAAG,kBAAkB;IACrB,sBAAsB,EAAE,aAAa;IACrC,wBAAwB,EAAE,eAAe;IACzC,kBAAkB,EAAE,SAAS;IAC7B,wBAAwB,EAAE,eAAe;CAC1C,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
type Props = {
|
|
2
|
+
pathPrefix: string;
|
|
3
|
+
docsPluginId: string;
|
|
4
|
+
position?: 'left' | 'right';
|
|
5
|
+
};
|
|
6
|
+
export default function VersionDropdown({ pathPrefix, docsPluginId, position }: Props): import("react/jsx-runtime").JSX.Element | null;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../theme/NavbarItem/types/VersionDropdown/index.tsx"],"names":[],"mappings":"AAMA,KAAK,KAAK,GAAG;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CAC7B,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EAAC,UAAU,EAAE,YAAY,EAAE,QAAQ,EAAC,EAAE,KAAK,kDAIlF"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useLocation } from 'react-router-dom';
|
|
3
|
+
import NavbarItemOrig from '@theme/NavbarItem';
|
|
4
|
+
const NavbarItem = NavbarItemOrig;
|
|
5
|
+
export default function VersionDropdown({ pathPrefix, docsPluginId, position }) {
|
|
6
|
+
const { pathname } = useLocation();
|
|
7
|
+
if (!pathname.startsWith(pathPrefix))
|
|
8
|
+
return null;
|
|
9
|
+
return _jsx(NavbarItem, { type: "docsVersionDropdown", docsPluginId: docsPluginId, position: position });
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../theme/NavbarItem/types/VersionDropdown/index.tsx"],"names":[],"mappings":";AACA,OAAO,EAAC,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAC7C,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAE/C,MAAM,UAAU,GAAG,cAA0C,CAAC;AAQ9D,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EAAC,UAAU,EAAE,YAAY,EAAE,QAAQ,EAAQ;IACjF,MAAM,EAAC,QAAQ,EAAC,GAAG,WAAW,EAAE,CAAC;IACjC,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,UAAU,CAAC;QAAE,OAAO,IAAI,CAAC;IAClD,OAAO,KAAC,UAAU,IAAC,IAAI,EAAC,qBAAqB,EAAC,YAAY,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,GAAI,CAAC;AACnG,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import ProductPicker from './types/ProductPicker';
|
|
2
2
|
import ResourcesPicker from './types/ResourcesPicker';
|
|
3
3
|
import IconLinks from './types/IconLinks';
|
|
4
|
+
import VersionDropdown from './types/VersionDropdown';
|
|
4
5
|
|
|
5
6
|
// @theme-original resolves to OUR OWN file in a plugin theme (Docusaurus sets
|
|
6
7
|
// both @theme and @theme-original to the plugin file). @theme-init resolves to
|
|
@@ -15,4 +16,5 @@ export default {
|
|
|
15
16
|
'custom-productPicker': ProductPicker,
|
|
16
17
|
'custom-resourcesPicker': ResourcesPicker,
|
|
17
18
|
'custom-iconLinks': IconLinks,
|
|
19
|
+
'custom-versionDropdown': VersionDropdown,
|
|
18
20
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {useLocation} from 'react-router-dom';
|
|
3
|
+
import NavbarItemOrig from '@theme/NavbarItem';
|
|
4
|
+
|
|
5
|
+
const NavbarItem = NavbarItemOrig as React.ComponentType<any>;
|
|
6
|
+
|
|
7
|
+
type Props = {
|
|
8
|
+
pathPrefix: string;
|
|
9
|
+
docsPluginId: string;
|
|
10
|
+
position?: 'left' | 'right';
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export default function VersionDropdown({pathPrefix, docsPluginId, position}: Props) {
|
|
14
|
+
const {pathname} = useLocation();
|
|
15
|
+
if (!pathname.startsWith(pathPrefix)) return null;
|
|
16
|
+
return <NavbarItem type="docsVersionDropdown" docsPluginId={docsPluginId} position={position} />;
|
|
17
|
+
}
|