@docusaurus/theme-classic 0.0.0-4730 → 0.0.0-4733
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/theme-classic.d.ts +3 -6
- package/lib-next/theme/DocBreadcrumbs/index.js +3 -2
- package/lib-next/theme/DocBreadcrumbs/styles.module.css +2 -17
- package/lib-next/theme/NavbarItem/DefaultNavbarItem.js +2 -6
- package/lib-next/theme/NavbarItem/DropdownNavbarItem.js +1 -1
- package/package.json +13 -13
- package/src/theme/DocBreadcrumbs/index.tsx +3 -2
- package/src/theme/DocBreadcrumbs/styles.module.css +2 -17
- package/src/theme/DocSidebarItem/index.tsx +1 -3
- package/src/theme/Footer/Copyright/index.tsx +1 -3
- package/src/theme/Footer/Links/MultiColumn/index.tsx +1 -3
- package/src/theme/Footer/Links/Simple/index.tsx +1 -3
- package/src/theme/NavbarItem/DefaultNavbarItem.tsx +2 -2
- package/src/theme/NavbarItem/DropdownNavbarItem.tsx +1 -1
- package/src/theme-classic.d.ts +3 -6
package/lib/theme-classic.d.ts
CHANGED
|
@@ -833,11 +833,8 @@ declare module '@theme/IconExternalLink' {
|
|
|
833
833
|
}
|
|
834
834
|
|
|
835
835
|
declare module '@theme/TagsListByLetter' {
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
permalink: string;
|
|
839
|
-
count: number;
|
|
840
|
-
}>;
|
|
836
|
+
import type {TagsListItem} from '@docusaurus/theme-common';
|
|
837
|
+
|
|
841
838
|
export interface Props {
|
|
842
839
|
readonly tags: readonly TagsListItem[];
|
|
843
840
|
}
|
|
@@ -853,7 +850,7 @@ declare module '@theme/TagsListInline' {
|
|
|
853
850
|
}
|
|
854
851
|
|
|
855
852
|
declare module '@theme/Tag' {
|
|
856
|
-
import type {TagsListItem} from '@theme
|
|
853
|
+
import type {TagsListItem} from '@docusaurus/theme-common';
|
|
857
854
|
import type {Optional} from 'utility-types';
|
|
858
855
|
|
|
859
856
|
export interface Props extends Optional<TagsListItem, 'count'> {}
|
|
@@ -16,7 +16,7 @@ import Link from '@docusaurus/Link';
|
|
|
16
16
|
import useBaseUrl from '@docusaurus/useBaseUrl'; // TODO move to design system folder
|
|
17
17
|
|
|
18
18
|
function BreadcrumbsItemLink({children, href}) {
|
|
19
|
-
const className =
|
|
19
|
+
const className = 'breadcrumbs__link';
|
|
20
20
|
return href ? (
|
|
21
21
|
<Link className={className} href={href} itemProp="item">
|
|
22
22
|
<span itemProp="name">{children}</span>
|
|
@@ -81,7 +81,8 @@ export default function DocBreadcrumbs() {
|
|
|
81
81
|
key={idx}
|
|
82
82
|
active={idx === breadcrumbs.length - 1}
|
|
83
83
|
index={idx}>
|
|
84
|
-
<BreadcrumbsItemLink
|
|
84
|
+
<BreadcrumbsItemLink
|
|
85
|
+
href={idx < breadcrumbs.length - 1 ? item.href : undefined}>
|
|
85
86
|
{item.label}
|
|
86
87
|
</BreadcrumbsItemLink>
|
|
87
88
|
</BreadcrumbsItem>
|
|
@@ -6,21 +6,6 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
.breadcrumbsContainer {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
.breadcrumbsItemLink {
|
|
13
|
-
--ifm-breadcrumb-size-multiplier: 0.7 !important;
|
|
14
|
-
margin-bottom: 0.4rem;
|
|
15
|
-
background: var(--ifm-color-gray-100);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
html[data-theme='dark'] .breadcrumbsItemLink {
|
|
19
|
-
background-color: var(--ifm-color-gray-900);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
@media (min-width: 997px) {
|
|
23
|
-
.breadcrumbsItemLink {
|
|
24
|
-
--ifm-breadcrumb-size-multiplier: 0.8;
|
|
25
|
-
}
|
|
9
|
+
--ifm-breadcrumb-size-multiplier: 0.8;
|
|
10
|
+
margin-bottom: 0.8rem;
|
|
26
11
|
}
|
|
@@ -31,11 +31,7 @@ function DefaultNavbarItemDesktop({
|
|
|
31
31
|
return element;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
function DefaultNavbarItemMobile({
|
|
35
|
-
className,
|
|
36
|
-
isDropdownItem: _isDropdownItem,
|
|
37
|
-
...props
|
|
38
|
-
}) {
|
|
34
|
+
function DefaultNavbarItemMobile({className, isDropdownItem, ...props}) {
|
|
39
35
|
return (
|
|
40
36
|
<li className="menu__list-item">
|
|
41
37
|
<NavbarNavLink className={clsx('menu__link', className)} {...props} />
|
|
@@ -45,7 +41,7 @@ function DefaultNavbarItemMobile({
|
|
|
45
41
|
|
|
46
42
|
export default function DefaultNavbarItem({
|
|
47
43
|
mobile = false,
|
|
48
|
-
position
|
|
44
|
+
position,
|
|
49
45
|
// Need to destructure position from props so that it doesn't get passed on.
|
|
50
46
|
...props
|
|
51
47
|
}) {
|
|
@@ -104,7 +104,7 @@ function DropdownNavbarItemDesktop({items, position, className, ...props}) {
|
|
|
104
104
|
function DropdownNavbarItemMobile({
|
|
105
105
|
items,
|
|
106
106
|
className,
|
|
107
|
-
position
|
|
107
|
+
position,
|
|
108
108
|
// Need to destructure position from props so that it doesn't get passed on.
|
|
109
109
|
...props
|
|
110
110
|
}) {
|
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-4733",
|
|
4
4
|
"description": "Classic theme for Docusaurus",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "src/theme-classic.d.ts",
|
|
@@ -21,15 +21,15 @@
|
|
|
21
21
|
"format:lib-next": "prettier --config ../../.prettierrc --write \"lib-next/**/*.{js,ts,jsx,tsc}\""
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@docusaurus/core": "0.0.0-
|
|
25
|
-
"@docusaurus/plugin-content-blog": "0.0.0-
|
|
26
|
-
"@docusaurus/plugin-content-docs": "0.0.0-
|
|
27
|
-
"@docusaurus/plugin-content-pages": "0.0.0-
|
|
28
|
-
"@docusaurus/theme-common": "0.0.0-
|
|
29
|
-
"@docusaurus/theme-translations": "0.0.0-
|
|
30
|
-
"@docusaurus/utils": "0.0.0-
|
|
31
|
-
"@docusaurus/utils-common": "0.0.0-
|
|
32
|
-
"@docusaurus/utils-validation": "0.0.0-
|
|
24
|
+
"@docusaurus/core": "0.0.0-4733",
|
|
25
|
+
"@docusaurus/plugin-content-blog": "0.0.0-4733",
|
|
26
|
+
"@docusaurus/plugin-content-docs": "0.0.0-4733",
|
|
27
|
+
"@docusaurus/plugin-content-pages": "0.0.0-4733",
|
|
28
|
+
"@docusaurus/theme-common": "0.0.0-4733",
|
|
29
|
+
"@docusaurus/theme-translations": "0.0.0-4733",
|
|
30
|
+
"@docusaurus/utils": "0.0.0-4733",
|
|
31
|
+
"@docusaurus/utils-common": "0.0.0-4733",
|
|
32
|
+
"@docusaurus/utils-validation": "0.0.0-4733",
|
|
33
33
|
"@mdx-js/react": "^1.6.22",
|
|
34
34
|
"clsx": "^1.1.1",
|
|
35
35
|
"copy-text-to-clipboard": "^3.0.1",
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"rtlcss": "^3.5.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@docusaurus/module-type-aliases": "0.0.0-
|
|
46
|
-
"@docusaurus/types": "0.0.0-
|
|
45
|
+
"@docusaurus/module-type-aliases": "0.0.0-4733",
|
|
46
|
+
"@docusaurus/types": "0.0.0-4733",
|
|
47
47
|
"@types/mdx-js__react": "^1.5.5",
|
|
48
48
|
"@types/prismjs": "^1.26.0",
|
|
49
49
|
"@types/rtlcss": "^3.1.2",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"engines": {
|
|
60
60
|
"node": ">=14"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "b3f9b5a5da00e86eaaba2220c340d4ed81c3baea"
|
|
63
63
|
}
|
|
@@ -24,7 +24,7 @@ function BreadcrumbsItemLink({
|
|
|
24
24
|
children: ReactNode;
|
|
25
25
|
href?: string;
|
|
26
26
|
}): JSX.Element {
|
|
27
|
-
const className =
|
|
27
|
+
const className = 'breadcrumbs__link';
|
|
28
28
|
return href ? (
|
|
29
29
|
<Link className={className} href={href} itemProp="item">
|
|
30
30
|
<span itemProp="name">{children}</span>
|
|
@@ -98,7 +98,8 @@ export default function DocBreadcrumbs(): JSX.Element | null {
|
|
|
98
98
|
key={idx}
|
|
99
99
|
active={idx === breadcrumbs.length - 1}
|
|
100
100
|
index={idx}>
|
|
101
|
-
<BreadcrumbsItemLink
|
|
101
|
+
<BreadcrumbsItemLink
|
|
102
|
+
href={idx < breadcrumbs.length - 1 ? item.href : undefined}>
|
|
102
103
|
{item.label}
|
|
103
104
|
</BreadcrumbsItemLink>
|
|
104
105
|
</BreadcrumbsItem>
|
|
@@ -6,21 +6,6 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
.breadcrumbsContainer {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
.breadcrumbsItemLink {
|
|
13
|
-
--ifm-breadcrumb-size-multiplier: 0.7 !important;
|
|
14
|
-
margin-bottom: 0.4rem;
|
|
15
|
-
background: var(--ifm-color-gray-100);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
html[data-theme='dark'] .breadcrumbsItemLink {
|
|
19
|
-
background-color: var(--ifm-color-gray-900);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
@media (min-width: 997px) {
|
|
23
|
-
.breadcrumbsItemLink {
|
|
24
|
-
--ifm-breadcrumb-size-multiplier: 0.8;
|
|
25
|
-
}
|
|
9
|
+
--ifm-breadcrumb-size-multiplier: 0.8;
|
|
10
|
+
margin-bottom: 0.8rem;
|
|
26
11
|
}
|
|
@@ -14,9 +14,7 @@ export default function FooterCopyright({copyright}: Props): JSX.Element {
|
|
|
14
14
|
className="footer__copyright"
|
|
15
15
|
// Developer provided the HTML, so assume it's safe.
|
|
16
16
|
// eslint-disable-next-line react/no-danger
|
|
17
|
-
dangerouslySetInnerHTML={{
|
|
18
|
-
__html: copyright,
|
|
19
|
-
}}
|
|
17
|
+
dangerouslySetInnerHTML={{__html: copyright}}
|
|
20
18
|
/>
|
|
21
19
|
);
|
|
22
20
|
}
|
|
@@ -18,9 +18,7 @@ function ColumnLinkItem({item}: {item: ColumnItemType}) {
|
|
|
18
18
|
className="footer__item"
|
|
19
19
|
// Developer provided the HTML, so assume it's safe.
|
|
20
20
|
// eslint-disable-next-line react/no-danger
|
|
21
|
-
dangerouslySetInnerHTML={{
|
|
22
|
-
__html: item.html,
|
|
23
|
-
}}
|
|
21
|
+
dangerouslySetInnerHTML={{__html: item.html}}
|
|
24
22
|
/>
|
|
25
23
|
) : (
|
|
26
24
|
<li key={item.href || item.to} className="footer__item">
|
|
@@ -19,9 +19,7 @@ function SimpleLinkItem({item}: {item: Props['links'][number]}) {
|
|
|
19
19
|
className="footer__link-item"
|
|
20
20
|
// Developer provided the HTML, so assume it's safe.
|
|
21
21
|
// eslint-disable-next-line react/no-danger
|
|
22
|
-
dangerouslySetInnerHTML={{
|
|
23
|
-
__html: item.html,
|
|
24
|
-
}}
|
|
22
|
+
dangerouslySetInnerHTML={{__html: item.html}}
|
|
25
23
|
/>
|
|
26
24
|
) : (
|
|
27
25
|
<LinkItem item={item} />
|
|
@@ -41,7 +41,7 @@ function DefaultNavbarItemDesktop({
|
|
|
41
41
|
|
|
42
42
|
function DefaultNavbarItemMobile({
|
|
43
43
|
className,
|
|
44
|
-
isDropdownItem
|
|
44
|
+
isDropdownItem,
|
|
45
45
|
...props
|
|
46
46
|
}: DesktopOrMobileNavBarItemProps) {
|
|
47
47
|
return (
|
|
@@ -53,7 +53,7 @@ function DefaultNavbarItemMobile({
|
|
|
53
53
|
|
|
54
54
|
export default function DefaultNavbarItem({
|
|
55
55
|
mobile = false,
|
|
56
|
-
position
|
|
56
|
+
position, // Need to destructure position from props so that it doesn't get passed on.
|
|
57
57
|
...props
|
|
58
58
|
}: Props): JSX.Element {
|
|
59
59
|
const Comp = mobile ? DefaultNavbarItemMobile : DefaultNavbarItemDesktop;
|
|
@@ -124,7 +124,7 @@ function DropdownNavbarItemDesktop({
|
|
|
124
124
|
function DropdownNavbarItemMobile({
|
|
125
125
|
items,
|
|
126
126
|
className,
|
|
127
|
-
position
|
|
127
|
+
position, // Need to destructure position from props so that it doesn't get passed on.
|
|
128
128
|
...props
|
|
129
129
|
}: DesktopOrMobileNavBarItemProps) {
|
|
130
130
|
const localPathname = useLocalPathname();
|
package/src/theme-classic.d.ts
CHANGED
|
@@ -833,11 +833,8 @@ declare module '@theme/IconExternalLink' {
|
|
|
833
833
|
}
|
|
834
834
|
|
|
835
835
|
declare module '@theme/TagsListByLetter' {
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
permalink: string;
|
|
839
|
-
count: number;
|
|
840
|
-
}>;
|
|
836
|
+
import type {TagsListItem} from '@docusaurus/theme-common';
|
|
837
|
+
|
|
841
838
|
export interface Props {
|
|
842
839
|
readonly tags: readonly TagsListItem[];
|
|
843
840
|
}
|
|
@@ -853,7 +850,7 @@ declare module '@theme/TagsListInline' {
|
|
|
853
850
|
}
|
|
854
851
|
|
|
855
852
|
declare module '@theme/Tag' {
|
|
856
|
-
import type {TagsListItem} from '@theme
|
|
853
|
+
import type {TagsListItem} from '@docusaurus/theme-common';
|
|
857
854
|
import type {Optional} from 'utility-types';
|
|
858
855
|
|
|
859
856
|
export interface Props extends Optional<TagsListItem, 'count'> {}
|