@docusaurus/theme-classic 0.0.0-5552 → 0.0.0-5555
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/lib/options.js +1 -0
- package/lib/theme/NavbarItem/LocaleDropdownNavbarItem/index.d.ts +1 -1
- package/lib/theme/NavbarItem/LocaleDropdownNavbarItem/index.js +2 -1
- package/package.json +14 -14
- package/src/options.ts +1 -0
- package/src/theme/NavbarItem/LocaleDropdownNavbarItem/index.tsx +2 -1
- package/src/theme-classic.d.ts +1 -0
package/lib/options.js
CHANGED
|
@@ -174,6 +174,7 @@ const LocaleDropdownNavbarItemSchema = NavbarItemBaseSchema.append({
|
|
|
174
174
|
type: utils_validation_1.Joi.string().equal('localeDropdown').required(),
|
|
175
175
|
dropdownItemsBefore: utils_validation_1.Joi.array().items(DropdownSubitemSchema).default([]),
|
|
176
176
|
dropdownItemsAfter: utils_validation_1.Joi.array().items(DropdownSubitemSchema).default([]),
|
|
177
|
+
queryString: utils_validation_1.Joi.string(),
|
|
177
178
|
});
|
|
178
179
|
const SearchItemSchema = utils_validation_1.Joi.object({
|
|
179
180
|
type: utils_validation_1.Joi.string().equal('search').required(),
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
*/
|
|
7
7
|
/// <reference types="react" />
|
|
8
8
|
import type { Props } from '@theme/NavbarItem/LocaleDropdownNavbarItem';
|
|
9
|
-
export default function LocaleDropdownNavbarItem({ mobile, dropdownItemsBefore, dropdownItemsAfter, ...props }: Props): JSX.Element;
|
|
9
|
+
export default function LocaleDropdownNavbarItem({ mobile, dropdownItemsBefore, dropdownItemsAfter, queryString, ...props }: Props): JSX.Element;
|
|
@@ -16,6 +16,7 @@ export default function LocaleDropdownNavbarItem({
|
|
|
16
16
|
mobile,
|
|
17
17
|
dropdownItemsBefore,
|
|
18
18
|
dropdownItemsAfter,
|
|
19
|
+
queryString = '',
|
|
19
20
|
...props
|
|
20
21
|
}) {
|
|
21
22
|
const {
|
|
@@ -29,7 +30,7 @@ export default function LocaleDropdownNavbarItem({
|
|
|
29
30
|
fullyQualified: false,
|
|
30
31
|
})}`;
|
|
31
32
|
// preserve ?search#hash suffix on locale switches
|
|
32
|
-
const to = `${baseTo}${search}${hash}`;
|
|
33
|
+
const to = `${baseTo}${search}${hash}${queryString}`;
|
|
33
34
|
return {
|
|
34
35
|
label: localeConfigs[locale].label,
|
|
35
36
|
lang: localeConfigs[locale].htmlLang,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/theme-classic",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-5555",
|
|
4
4
|
"description": "Classic theme for Docusaurus",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "src/theme-classic.d.ts",
|
|
@@ -20,18 +20,18 @@
|
|
|
20
20
|
"copy:watch": "node ../../admin/scripts/copyUntypedFiles.js --watch"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@docusaurus/core": "0.0.0-
|
|
24
|
-
"@docusaurus/mdx-loader": "0.0.0-
|
|
25
|
-
"@docusaurus/module-type-aliases": "0.0.0-
|
|
26
|
-
"@docusaurus/plugin-content-blog": "0.0.0-
|
|
27
|
-
"@docusaurus/plugin-content-docs": "0.0.0-
|
|
28
|
-
"@docusaurus/plugin-content-pages": "0.0.0-
|
|
29
|
-
"@docusaurus/theme-common": "0.0.0-
|
|
30
|
-
"@docusaurus/theme-translations": "0.0.0-
|
|
31
|
-
"@docusaurus/types": "0.0.0-
|
|
32
|
-
"@docusaurus/utils": "0.0.0-
|
|
33
|
-
"@docusaurus/utils-common": "0.0.0-
|
|
34
|
-
"@docusaurus/utils-validation": "0.0.0-
|
|
23
|
+
"@docusaurus/core": "0.0.0-5555",
|
|
24
|
+
"@docusaurus/mdx-loader": "0.0.0-5555",
|
|
25
|
+
"@docusaurus/module-type-aliases": "0.0.0-5555",
|
|
26
|
+
"@docusaurus/plugin-content-blog": "0.0.0-5555",
|
|
27
|
+
"@docusaurus/plugin-content-docs": "0.0.0-5555",
|
|
28
|
+
"@docusaurus/plugin-content-pages": "0.0.0-5555",
|
|
29
|
+
"@docusaurus/theme-common": "0.0.0-5555",
|
|
30
|
+
"@docusaurus/theme-translations": "0.0.0-5555",
|
|
31
|
+
"@docusaurus/types": "0.0.0-5555",
|
|
32
|
+
"@docusaurus/utils": "0.0.0-5555",
|
|
33
|
+
"@docusaurus/utils-common": "0.0.0-5555",
|
|
34
|
+
"@docusaurus/utils-validation": "0.0.0-5555",
|
|
35
35
|
"@mdx-js/react": "^1.6.22",
|
|
36
36
|
"clsx": "^1.2.1",
|
|
37
37
|
"copy-text-to-clipboard": "^3.0.1",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"engines": {
|
|
63
63
|
"node": ">=16.14"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "f665597881e6070ac67a5568470e33d4ee7b1346"
|
|
66
66
|
}
|
package/src/options.ts
CHANGED
|
@@ -200,6 +200,7 @@ const LocaleDropdownNavbarItemSchema = NavbarItemBaseSchema.append({
|
|
|
200
200
|
type: Joi.string().equal('localeDropdown').required(),
|
|
201
201
|
dropdownItemsBefore: Joi.array().items(DropdownSubitemSchema).default([]),
|
|
202
202
|
dropdownItemsAfter: Joi.array().items(DropdownSubitemSchema).default([]),
|
|
203
|
+
queryString: Joi.string(),
|
|
203
204
|
});
|
|
204
205
|
|
|
205
206
|
const SearchItemSchema = Joi.object({
|
|
@@ -21,6 +21,7 @@ export default function LocaleDropdownNavbarItem({
|
|
|
21
21
|
mobile,
|
|
22
22
|
dropdownItemsBefore,
|
|
23
23
|
dropdownItemsAfter,
|
|
24
|
+
queryString = '',
|
|
24
25
|
...props
|
|
25
26
|
}: Props): JSX.Element {
|
|
26
27
|
const {
|
|
@@ -35,7 +36,7 @@ export default function LocaleDropdownNavbarItem({
|
|
|
35
36
|
fullyQualified: false,
|
|
36
37
|
})}`;
|
|
37
38
|
// preserve ?search#hash suffix on locale switches
|
|
38
|
-
const to = `${baseTo}${search}${hash}`;
|
|
39
|
+
const to = `${baseTo}${search}${hash}${queryString}`;
|
|
39
40
|
return {
|
|
40
41
|
label: localeConfigs[locale]!.label,
|
|
41
42
|
lang: localeConfigs[locale]!.htmlLang,
|
package/src/theme-classic.d.ts
CHANGED
|
@@ -1072,6 +1072,7 @@ declare module '@theme/NavbarItem/LocaleDropdownNavbarItem' {
|
|
|
1072
1072
|
export interface Props extends DropdownNavbarItemProps {
|
|
1073
1073
|
readonly dropdownItemsBefore: LinkLikeNavbarItemProps[];
|
|
1074
1074
|
readonly dropdownItemsAfter: LinkLikeNavbarItemProps[];
|
|
1075
|
+
readonly queryString?: string;
|
|
1075
1076
|
}
|
|
1076
1077
|
|
|
1077
1078
|
export default function LocaleDropdownNavbarItem(props: Props): JSX.Element;
|