@docusaurus/theme-classic 0.0.0-5431 → 0.0.0-5433
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/getSwizzleConfig.js +7 -0
- package/lib/theme/DocBreadcrumbs/Items/Home/index.d.ts +8 -0
- package/lib/theme/DocBreadcrumbs/Items/Home/index.js +29 -0
- package/lib/theme/DocBreadcrumbs/Items/Home/styles.module.css +14 -0
- package/lib/theme/DocBreadcrumbs/index.js +1 -19
- package/lib/theme/DocBreadcrumbs/styles.module.css +0 -8
- package/package.json +14 -14
- package/src/getSwizzleConfig.ts +8 -0
- package/src/theme/DocBreadcrumbs/Items/Home/index.tsx +33 -0
- package/src/theme/DocBreadcrumbs/Items/Home/styles.module.css +14 -0
- package/src/theme/DocBreadcrumbs/index.tsx +1 -20
- package/src/theme/DocBreadcrumbs/styles.module.css +0 -8
- package/src/theme-classic.d.ts +4 -0
package/lib/getSwizzleConfig.js
CHANGED
|
@@ -130,6 +130,13 @@ function getSwizzleConfig() {
|
|
|
130
130
|
},
|
|
131
131
|
description: 'The color mode toggle to switch between light and dark mode.',
|
|
132
132
|
},
|
|
133
|
+
'DocBreadcrumbs/Items': {
|
|
134
|
+
actions: {
|
|
135
|
+
eject: 'unsafe',
|
|
136
|
+
wrap: 'forbidden', // Can't wrap a folder
|
|
137
|
+
},
|
|
138
|
+
description: 'The components responsible for rendering the breadcrumb items',
|
|
139
|
+
},
|
|
133
140
|
DocCardList: {
|
|
134
141
|
actions: {
|
|
135
142
|
eject: 'safe',
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
/// <reference types="react" />
|
|
8
|
+
export default function HomeBreadcrumbItem(): JSX.Element;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import Link from '@docusaurus/Link';
|
|
9
|
+
import useBaseUrl from '@docusaurus/useBaseUrl';
|
|
10
|
+
import {translate} from '@docusaurus/Translate';
|
|
11
|
+
import IconHome from '@theme/Icon/Home';
|
|
12
|
+
import styles from './styles.module.css';
|
|
13
|
+
export default function HomeBreadcrumbItem() {
|
|
14
|
+
const homeHref = useBaseUrl('/');
|
|
15
|
+
return (
|
|
16
|
+
<li className="breadcrumbs__item">
|
|
17
|
+
<Link
|
|
18
|
+
aria-label={translate({
|
|
19
|
+
id: 'theme.docs.breadcrumbs.home',
|
|
20
|
+
message: 'Home page',
|
|
21
|
+
description: 'The ARIA label for the home page in the breadcrumbs',
|
|
22
|
+
})}
|
|
23
|
+
className="breadcrumbs__link"
|
|
24
|
+
href={homeHref}>
|
|
25
|
+
<IconHome className={styles.breadcrumbHomeIcon} />
|
|
26
|
+
</Link>
|
|
27
|
+
</li>
|
|
28
|
+
);
|
|
29
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
.breadcrumbHomeIcon {
|
|
9
|
+
position: relative;
|
|
10
|
+
top: 1px;
|
|
11
|
+
vertical-align: top;
|
|
12
|
+
height: 1.1rem;
|
|
13
|
+
width: 1.1rem;
|
|
14
|
+
}
|
|
@@ -12,9 +12,8 @@ import {
|
|
|
12
12
|
useHomePageRoute,
|
|
13
13
|
} from '@docusaurus/theme-common/internal';
|
|
14
14
|
import Link from '@docusaurus/Link';
|
|
15
|
-
import useBaseUrl from '@docusaurus/useBaseUrl';
|
|
16
15
|
import {translate} from '@docusaurus/Translate';
|
|
17
|
-
import
|
|
16
|
+
import HomeBreadcrumbItem from '@theme/DocBreadcrumbs/Items/Home';
|
|
18
17
|
import styles from './styles.module.css';
|
|
19
18
|
// TODO move to design system folder
|
|
20
19
|
function BreadcrumbsItemLink({children, href, isLast}) {
|
|
@@ -56,23 +55,6 @@ function BreadcrumbsItem({children, active, index, addMicrodata}) {
|
|
|
56
55
|
</li>
|
|
57
56
|
);
|
|
58
57
|
}
|
|
59
|
-
function HomeBreadcrumbItem() {
|
|
60
|
-
const homeHref = useBaseUrl('/');
|
|
61
|
-
return (
|
|
62
|
-
<li className="breadcrumbs__item">
|
|
63
|
-
<Link
|
|
64
|
-
aria-label={translate({
|
|
65
|
-
id: 'theme.docs.breadcrumbs.home',
|
|
66
|
-
message: 'Home page',
|
|
67
|
-
description: 'The ARIA label for the home page in the breadcrumbs',
|
|
68
|
-
})}
|
|
69
|
-
className={clsx('breadcrumbs__link', styles.breadcrumbsItemLink)}
|
|
70
|
-
href={homeHref}>
|
|
71
|
-
<IconHome className={styles.breadcrumbHomeIcon} />
|
|
72
|
-
</Link>
|
|
73
|
-
</li>
|
|
74
|
-
);
|
|
75
|
-
}
|
|
76
58
|
export default function DocBreadcrumbs() {
|
|
77
59
|
const breadcrumbs = useSidebarBreadcrumbs();
|
|
78
60
|
const homePageRoute = useHomePageRoute();
|
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-5433",
|
|
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-5433",
|
|
24
|
+
"@docusaurus/mdx-loader": "0.0.0-5433",
|
|
25
|
+
"@docusaurus/module-type-aliases": "0.0.0-5433",
|
|
26
|
+
"@docusaurus/plugin-content-blog": "0.0.0-5433",
|
|
27
|
+
"@docusaurus/plugin-content-docs": "0.0.0-5433",
|
|
28
|
+
"@docusaurus/plugin-content-pages": "0.0.0-5433",
|
|
29
|
+
"@docusaurus/theme-common": "0.0.0-5433",
|
|
30
|
+
"@docusaurus/theme-translations": "0.0.0-5433",
|
|
31
|
+
"@docusaurus/types": "0.0.0-5433",
|
|
32
|
+
"@docusaurus/utils": "0.0.0-5433",
|
|
33
|
+
"@docusaurus/utils-common": "0.0.0-5433",
|
|
34
|
+
"@docusaurus/utils-validation": "0.0.0-5433",
|
|
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": "66056371d70c78ecc45394aa23f5a5ecb52fe6a0"
|
|
66
66
|
}
|
package/src/getSwizzleConfig.ts
CHANGED
|
@@ -143,6 +143,14 @@ export default function getSwizzleConfig(): SwizzleConfig {
|
|
|
143
143
|
description:
|
|
144
144
|
'The color mode toggle to switch between light and dark mode.',
|
|
145
145
|
},
|
|
146
|
+
'DocBreadcrumbs/Items': {
|
|
147
|
+
actions: {
|
|
148
|
+
eject: 'unsafe',
|
|
149
|
+
wrap: 'forbidden', // Can't wrap a folder
|
|
150
|
+
},
|
|
151
|
+
description:
|
|
152
|
+
'The components responsible for rendering the breadcrumb items',
|
|
153
|
+
},
|
|
146
154
|
DocCardList: {
|
|
147
155
|
actions: {
|
|
148
156
|
eject: 'safe',
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import Link from '@docusaurus/Link';
|
|
10
|
+
import useBaseUrl from '@docusaurus/useBaseUrl';
|
|
11
|
+
import {translate} from '@docusaurus/Translate';
|
|
12
|
+
import IconHome from '@theme/Icon/Home';
|
|
13
|
+
|
|
14
|
+
import styles from './styles.module.css';
|
|
15
|
+
|
|
16
|
+
export default function HomeBreadcrumbItem(): JSX.Element {
|
|
17
|
+
const homeHref = useBaseUrl('/');
|
|
18
|
+
|
|
19
|
+
return (
|
|
20
|
+
<li className="breadcrumbs__item">
|
|
21
|
+
<Link
|
|
22
|
+
aria-label={translate({
|
|
23
|
+
id: 'theme.docs.breadcrumbs.home',
|
|
24
|
+
message: 'Home page',
|
|
25
|
+
description: 'The ARIA label for the home page in the breadcrumbs',
|
|
26
|
+
})}
|
|
27
|
+
className="breadcrumbs__link"
|
|
28
|
+
href={homeHref}>
|
|
29
|
+
<IconHome className={styles.breadcrumbHomeIcon} />
|
|
30
|
+
</Link>
|
|
31
|
+
</li>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
.breadcrumbHomeIcon {
|
|
9
|
+
position: relative;
|
|
10
|
+
top: 1px;
|
|
11
|
+
vertical-align: top;
|
|
12
|
+
height: 1.1rem;
|
|
13
|
+
width: 1.1rem;
|
|
14
|
+
}
|
|
@@ -13,9 +13,8 @@ import {
|
|
|
13
13
|
useHomePageRoute,
|
|
14
14
|
} from '@docusaurus/theme-common/internal';
|
|
15
15
|
import Link from '@docusaurus/Link';
|
|
16
|
-
import useBaseUrl from '@docusaurus/useBaseUrl';
|
|
17
16
|
import {translate} from '@docusaurus/Translate';
|
|
18
|
-
import
|
|
17
|
+
import HomeBreadcrumbItem from '@theme/DocBreadcrumbs/Items/Home';
|
|
19
18
|
|
|
20
19
|
import styles from './styles.module.css';
|
|
21
20
|
|
|
@@ -79,24 +78,6 @@ function BreadcrumbsItem({
|
|
|
79
78
|
);
|
|
80
79
|
}
|
|
81
80
|
|
|
82
|
-
function HomeBreadcrumbItem() {
|
|
83
|
-
const homeHref = useBaseUrl('/');
|
|
84
|
-
return (
|
|
85
|
-
<li className="breadcrumbs__item">
|
|
86
|
-
<Link
|
|
87
|
-
aria-label={translate({
|
|
88
|
-
id: 'theme.docs.breadcrumbs.home',
|
|
89
|
-
message: 'Home page',
|
|
90
|
-
description: 'The ARIA label for the home page in the breadcrumbs',
|
|
91
|
-
})}
|
|
92
|
-
className={clsx('breadcrumbs__link', styles.breadcrumbsItemLink)}
|
|
93
|
-
href={homeHref}>
|
|
94
|
-
<IconHome className={styles.breadcrumbHomeIcon} />
|
|
95
|
-
</Link>
|
|
96
|
-
</li>
|
|
97
|
-
);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
81
|
export default function DocBreadcrumbs(): JSX.Element | null {
|
|
101
82
|
const breadcrumbs = useSidebarBreadcrumbs();
|
|
102
83
|
const homePageRoute = useHomePageRoute();
|
package/src/theme-classic.d.ts
CHANGED