@docusaurus/theme-classic 0.0.0-4770 → 0.0.0-4773
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 -3
- package/lib-next/theme/DocCard/index.js +17 -15
- package/lib-next/theme/DocCard/styles.module.css +8 -17
- package/lib-next/theme/DocCardList/index.js +15 -3
- package/lib-next/theme/DocSidebarItem/index.js +10 -5
- package/lib-next/theme/DocSidebarItem/styles.module.css +4 -0
- package/lib-next/theme/IconExternalLink/styles.module.css +0 -2
- package/package.json +13 -13
- package/src/theme/DocCard/index.tsx +24 -17
- package/src/theme/DocCard/styles.module.css +8 -17
- package/src/theme/DocCardList/index.tsx +14 -3
- package/src/theme/DocSidebarItem/index.tsx +10 -5
- package/src/theme/DocSidebarItem/styles.module.css +4 -0
- package/src/theme/DocVersionBanner/index.tsx +3 -4
- package/src/theme/IconExternalLink/styles.module.css +0 -2
- package/src/theme/MDXComponents/Pre.tsx +2 -1
- package/src/theme/NavbarItem/index.tsx +3 -4
- package/src/theme-classic.d.ts +3 -3
- package/src/translations.ts +1 -1
package/lib/theme-classic.d.ts
CHANGED
|
@@ -507,7 +507,7 @@ declare module '@theme/MDXComponents' {
|
|
|
507
507
|
readonly h4: (props: ComponentProps<'h4'>) => JSX.Element;
|
|
508
508
|
readonly h5: (props: ComponentProps<'h5'>) => JSX.Element;
|
|
509
509
|
readonly h6: (props: ComponentProps<'h6'>) => JSX.Element;
|
|
510
|
-
} &
|
|
510
|
+
} & {[tagName: string]: ComponentType<unknown>};
|
|
511
511
|
|
|
512
512
|
const MDXComponents: MDXComponentsObject;
|
|
513
513
|
export default MDXComponents;
|
|
@@ -768,7 +768,7 @@ declare module '@theme/TabItem' {
|
|
|
768
768
|
readonly label?: string;
|
|
769
769
|
readonly hidden?: boolean;
|
|
770
770
|
readonly className?: string;
|
|
771
|
-
readonly attributes?:
|
|
771
|
+
readonly attributes?: {[key: string]: unknown};
|
|
772
772
|
}
|
|
773
773
|
|
|
774
774
|
export default function TabItem(props: Props): JSX.Element;
|
|
@@ -786,7 +786,7 @@ declare module '@theme/Tabs' {
|
|
|
786
786
|
readonly values?: readonly {
|
|
787
787
|
value: string;
|
|
788
788
|
label?: string;
|
|
789
|
-
attributes?:
|
|
789
|
+
attributes?: {[key: string]: unknown};
|
|
790
790
|
}[];
|
|
791
791
|
readonly groupId?: string;
|
|
792
792
|
readonly className?: string;
|
|
@@ -13,17 +13,12 @@ import isInternalUrl from '@docusaurus/isInternalUrl';
|
|
|
13
13
|
import {translate} from '@docusaurus/Translate';
|
|
14
14
|
|
|
15
15
|
function CardContainer({href, children}) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
);
|
|
21
|
-
return href ? (
|
|
22
|
-
<Link href={href} className={className}>
|
|
16
|
+
return (
|
|
17
|
+
<Link
|
|
18
|
+
href={href}
|
|
19
|
+
className={clsx('card padding--lg', styles.cardContainer)}>
|
|
23
20
|
{children}
|
|
24
21
|
</Link>
|
|
25
|
-
) : (
|
|
26
|
-
<div className={className}>{children}</div>
|
|
27
22
|
);
|
|
28
23
|
}
|
|
29
24
|
|
|
@@ -33,17 +28,24 @@ function CardLayout({href, icon, title, description}) {
|
|
|
33
28
|
<h2 className={clsx('text--truncate', styles.cardTitle)} title={title}>
|
|
34
29
|
{icon} {title}
|
|
35
30
|
</h2>
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
31
|
+
{description && (
|
|
32
|
+
<p
|
|
33
|
+
className={clsx('text--truncate', styles.cardDescription)}
|
|
34
|
+
title={description}>
|
|
35
|
+
{description}
|
|
36
|
+
</p>
|
|
37
|
+
)}
|
|
41
38
|
</CardContainer>
|
|
42
39
|
);
|
|
43
40
|
}
|
|
44
41
|
|
|
45
42
|
function CardCategory({item}) {
|
|
46
|
-
const href = findFirstCategoryLink(item);
|
|
43
|
+
const href = findFirstCategoryLink(item); // Unexpected: categories that don't have a link have been filtered upfront
|
|
44
|
+
|
|
45
|
+
if (!href) {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
|
|
47
49
|
return (
|
|
48
50
|
<CardLayout
|
|
49
51
|
href={href}
|
|
@@ -6,38 +6,29 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
.cardContainer {
|
|
9
|
-
height: 8rem;
|
|
10
|
-
color: var(--ifm-color-emphasis-800);
|
|
11
9
|
--ifm-link-color: var(--ifm-color-emphasis-800);
|
|
12
|
-
--ifm-link-hover-color: var(--ifm-color-emphasis-
|
|
10
|
+
--ifm-link-hover-color: var(--ifm-color-emphasis-700);
|
|
13
11
|
--ifm-link-hover-decoration: none;
|
|
14
12
|
|
|
15
|
-
/* box-shadow: var(--ifm-global-shadow-lw); */
|
|
16
13
|
box-shadow: 0 1.5px 3px 0 rgb(0 0 0 / 15%);
|
|
17
14
|
border: 1px solid var(--ifm-color-emphasis-200);
|
|
18
|
-
transition:
|
|
19
|
-
|
|
15
|
+
transition: all var(--ifm-transition-fast) ease;
|
|
16
|
+
transition-property: border, box-shadow;
|
|
20
17
|
}
|
|
21
18
|
|
|
22
|
-
.cardContainer
|
|
23
|
-
|
|
24
|
-
box-shadow: 0
|
|
19
|
+
.cardContainer:hover {
|
|
20
|
+
border-color: var(--ifm-color-primary);
|
|
21
|
+
box-shadow: 0 3px 6px 0 rgb(0 0 0 / 20%);
|
|
25
22
|
}
|
|
26
23
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.cardContainer:not(.cardContainerLink) {
|
|
32
|
-
cursor: not-allowed;
|
|
24
|
+
.cardContainer *:last-child {
|
|
25
|
+
margin-bottom: 0;
|
|
33
26
|
}
|
|
34
27
|
|
|
35
28
|
.cardTitle {
|
|
36
29
|
font-size: 1.2rem;
|
|
37
|
-
min-height: 1.2rem;
|
|
38
30
|
}
|
|
39
31
|
|
|
40
32
|
.cardDescription {
|
|
41
33
|
font-size: 0.8rem;
|
|
42
|
-
min-height: 0.8rem;
|
|
43
34
|
}
|
|
@@ -6,12 +6,24 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import DocCard from '@theme/DocCard';
|
|
9
|
+
import {findFirstCategoryLink} from '@docusaurus/theme-common'; // Filter categories that don't have a link.
|
|
10
|
+
|
|
11
|
+
function filterItems(items) {
|
|
12
|
+
return items.filter((item) => {
|
|
13
|
+
if (item.type === 'category') {
|
|
14
|
+
return !!findFirstCategoryLink(item);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
return true;
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
|
|
9
21
|
export default function DocCardList({items}) {
|
|
10
22
|
return (
|
|
11
23
|
<div className="row">
|
|
12
|
-
{items.map((item, index) => (
|
|
13
|
-
<article key={index} className="col col--6">
|
|
14
|
-
<DocCard item={item} />
|
|
24
|
+
{filterItems(items).map((item, index) => (
|
|
25
|
+
<article key={index} className="col col--6 margin-bottom--lg">
|
|
26
|
+
<DocCard key={index} item={item} />
|
|
15
27
|
</article>
|
|
16
28
|
))}
|
|
17
29
|
</div>
|
|
@@ -233,6 +233,7 @@ function DocSidebarItemLink({
|
|
|
233
233
|
}) {
|
|
234
234
|
const {href, label, className} = item;
|
|
235
235
|
const isActive = isActiveSidebarItem(item, activePath);
|
|
236
|
+
const isInternalLink = isInternalUrl(href);
|
|
236
237
|
return (
|
|
237
238
|
<li
|
|
238
239
|
className={clsx(
|
|
@@ -243,17 +244,21 @@ function DocSidebarItemLink({
|
|
|
243
244
|
)}
|
|
244
245
|
key={label}>
|
|
245
246
|
<Link
|
|
246
|
-
className={clsx(
|
|
247
|
-
'menu__link
|
|
248
|
-
|
|
247
|
+
className={clsx(
|
|
248
|
+
'menu__link',
|
|
249
|
+
!isInternalLink && styles.menuExternalLink,
|
|
250
|
+
{
|
|
251
|
+
'menu__link--active': isActive,
|
|
252
|
+
},
|
|
253
|
+
)}
|
|
249
254
|
aria-current={isActive ? 'page' : undefined}
|
|
250
255
|
to={href}
|
|
251
|
-
{...(
|
|
256
|
+
{...(isInternalLink && {
|
|
252
257
|
onClick: onItemClick ? () => onItemClick(item) : undefined,
|
|
253
258
|
})}
|
|
254
259
|
{...props}>
|
|
255
260
|
{label}
|
|
256
|
-
{!
|
|
261
|
+
{!isInternalLink && <IconExternalLink />}
|
|
257
262
|
</Link>
|
|
258
263
|
</li>
|
|
259
264
|
);
|
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-4773",
|
|
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-4773",
|
|
25
|
+
"@docusaurus/plugin-content-blog": "0.0.0-4773",
|
|
26
|
+
"@docusaurus/plugin-content-docs": "0.0.0-4773",
|
|
27
|
+
"@docusaurus/plugin-content-pages": "0.0.0-4773",
|
|
28
|
+
"@docusaurus/theme-common": "0.0.0-4773",
|
|
29
|
+
"@docusaurus/theme-translations": "0.0.0-4773",
|
|
30
|
+
"@docusaurus/utils": "0.0.0-4773",
|
|
31
|
+
"@docusaurus/utils-common": "0.0.0-4773",
|
|
32
|
+
"@docusaurus/utils-validation": "0.0.0-4773",
|
|
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-4773",
|
|
46
|
+
"@docusaurus/types": "0.0.0-4773",
|
|
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": "0b9141a33f0bd97301891a63eb74bfce75db76d5"
|
|
63
63
|
}
|
|
@@ -22,20 +22,15 @@ function CardContainer({
|
|
|
22
22
|
href,
|
|
23
23
|
children,
|
|
24
24
|
}: {
|
|
25
|
-
href
|
|
25
|
+
href: string;
|
|
26
26
|
children: ReactNode;
|
|
27
27
|
}): JSX.Element {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
);
|
|
33
|
-
return href ? (
|
|
34
|
-
<Link href={href} className={className}>
|
|
28
|
+
return (
|
|
29
|
+
<Link
|
|
30
|
+
href={href}
|
|
31
|
+
className={clsx('card padding--lg', styles.cardContainer)}>
|
|
35
32
|
{children}
|
|
36
33
|
</Link>
|
|
37
|
-
) : (
|
|
38
|
-
<div className={className}>{children}</div>
|
|
39
34
|
);
|
|
40
35
|
}
|
|
41
36
|
|
|
@@ -45,7 +40,7 @@ function CardLayout({
|
|
|
45
40
|
title,
|
|
46
41
|
description,
|
|
47
42
|
}: {
|
|
48
|
-
href
|
|
43
|
+
href: string;
|
|
49
44
|
icon: ReactNode;
|
|
50
45
|
title: string;
|
|
51
46
|
description?: string;
|
|
@@ -55,17 +50,29 @@ function CardLayout({
|
|
|
55
50
|
<h2 className={clsx('text--truncate', styles.cardTitle)} title={title}>
|
|
56
51
|
{icon} {title}
|
|
57
52
|
</h2>
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
53
|
+
{description && (
|
|
54
|
+
<p
|
|
55
|
+
className={clsx('text--truncate', styles.cardDescription)}
|
|
56
|
+
title={description}>
|
|
57
|
+
{description}
|
|
58
|
+
</p>
|
|
59
|
+
)}
|
|
63
60
|
</CardContainer>
|
|
64
61
|
);
|
|
65
62
|
}
|
|
66
63
|
|
|
67
|
-
function CardCategory({
|
|
64
|
+
function CardCategory({
|
|
65
|
+
item,
|
|
66
|
+
}: {
|
|
67
|
+
item: PropSidebarItemCategory;
|
|
68
|
+
}): JSX.Element | null {
|
|
68
69
|
const href = findFirstCategoryLink(item);
|
|
70
|
+
|
|
71
|
+
// Unexpected: categories that don't have a link have been filtered upfront
|
|
72
|
+
if (!href) {
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
75
|
+
|
|
69
76
|
return (
|
|
70
77
|
<CardLayout
|
|
71
78
|
href={href}
|
|
@@ -6,38 +6,29 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
.cardContainer {
|
|
9
|
-
height: 8rem;
|
|
10
|
-
color: var(--ifm-color-emphasis-800);
|
|
11
9
|
--ifm-link-color: var(--ifm-color-emphasis-800);
|
|
12
|
-
--ifm-link-hover-color: var(--ifm-color-emphasis-
|
|
10
|
+
--ifm-link-hover-color: var(--ifm-color-emphasis-700);
|
|
13
11
|
--ifm-link-hover-decoration: none;
|
|
14
12
|
|
|
15
|
-
/* box-shadow: var(--ifm-global-shadow-lw); */
|
|
16
13
|
box-shadow: 0 1.5px 3px 0 rgb(0 0 0 / 15%);
|
|
17
14
|
border: 1px solid var(--ifm-color-emphasis-200);
|
|
18
|
-
transition:
|
|
19
|
-
|
|
15
|
+
transition: all var(--ifm-transition-fast) ease;
|
|
16
|
+
transition-property: border, box-shadow;
|
|
20
17
|
}
|
|
21
18
|
|
|
22
|
-
.cardContainer
|
|
23
|
-
|
|
24
|
-
box-shadow: 0
|
|
19
|
+
.cardContainer:hover {
|
|
20
|
+
border-color: var(--ifm-color-primary);
|
|
21
|
+
box-shadow: 0 3px 6px 0 rgb(0 0 0 / 20%);
|
|
25
22
|
}
|
|
26
23
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.cardContainer:not(.cardContainerLink) {
|
|
32
|
-
cursor: not-allowed;
|
|
24
|
+
.cardContainer *:last-child {
|
|
25
|
+
margin-bottom: 0;
|
|
33
26
|
}
|
|
34
27
|
|
|
35
28
|
.cardTitle {
|
|
36
29
|
font-size: 1.2rem;
|
|
37
|
-
min-height: 1.2rem;
|
|
38
30
|
}
|
|
39
31
|
|
|
40
32
|
.cardDescription {
|
|
41
33
|
font-size: 0.8rem;
|
|
42
|
-
min-height: 0.8rem;
|
|
43
34
|
}
|
|
@@ -9,6 +9,17 @@ import React from 'react';
|
|
|
9
9
|
|
|
10
10
|
import DocCard from '@theme/DocCard';
|
|
11
11
|
import type {PropSidebarItem} from '@docusaurus/plugin-content-docs';
|
|
12
|
+
import {findFirstCategoryLink} from '@docusaurus/theme-common';
|
|
13
|
+
|
|
14
|
+
// Filter categories that don't have a link.
|
|
15
|
+
function filterItems(items: PropSidebarItem[]): PropSidebarItem[] {
|
|
16
|
+
return items.filter((item) => {
|
|
17
|
+
if (item.type === 'category') {
|
|
18
|
+
return !!findFirstCategoryLink(item);
|
|
19
|
+
}
|
|
20
|
+
return true;
|
|
21
|
+
});
|
|
22
|
+
}
|
|
12
23
|
|
|
13
24
|
export default function DocCardList({
|
|
14
25
|
items,
|
|
@@ -17,9 +28,9 @@ export default function DocCardList({
|
|
|
17
28
|
}): JSX.Element {
|
|
18
29
|
return (
|
|
19
30
|
<div className="row">
|
|
20
|
-
{items.map((item, index) => (
|
|
21
|
-
<article key={index} className="col col--6">
|
|
22
|
-
<DocCard item={item} />
|
|
31
|
+
{filterItems(items).map((item, index) => (
|
|
32
|
+
<article key={index} className="col col--6 margin-bottom--lg">
|
|
33
|
+
<DocCard key={index} item={item} />
|
|
23
34
|
</article>
|
|
24
35
|
))}
|
|
25
36
|
</div>
|
|
@@ -250,6 +250,7 @@ function DocSidebarItemLink({
|
|
|
250
250
|
}: Props & {item: PropSidebarItemLink}) {
|
|
251
251
|
const {href, label, className} = item;
|
|
252
252
|
const isActive = isActiveSidebarItem(item, activePath);
|
|
253
|
+
const isInternalLink = isInternalUrl(href);
|
|
253
254
|
return (
|
|
254
255
|
<li
|
|
255
256
|
className={clsx(
|
|
@@ -260,17 +261,21 @@ function DocSidebarItemLink({
|
|
|
260
261
|
)}
|
|
261
262
|
key={label}>
|
|
262
263
|
<Link
|
|
263
|
-
className={clsx(
|
|
264
|
-
'menu__link
|
|
265
|
-
|
|
264
|
+
className={clsx(
|
|
265
|
+
'menu__link',
|
|
266
|
+
!isInternalLink && styles.menuExternalLink,
|
|
267
|
+
{
|
|
268
|
+
'menu__link--active': isActive,
|
|
269
|
+
},
|
|
270
|
+
)}
|
|
266
271
|
aria-current={isActive ? 'page' : undefined}
|
|
267
272
|
to={href}
|
|
268
|
-
{...(
|
|
273
|
+
{...(isInternalLink && {
|
|
269
274
|
onClick: onItemClick ? () => onItemClick(item) : undefined,
|
|
270
275
|
})}
|
|
271
276
|
{...props}>
|
|
272
277
|
{label}
|
|
273
|
-
{!
|
|
278
|
+
{!isInternalLink && <IconExternalLink />}
|
|
274
279
|
</Link>
|
|
275
280
|
</li>
|
|
276
281
|
);
|
|
@@ -70,10 +70,9 @@ function UnmaintainedVersionLabel({
|
|
|
70
70
|
);
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
const BannerLabelComponents:
|
|
74
|
-
VersionBanner
|
|
75
|
-
|
|
76
|
-
> = {
|
|
73
|
+
const BannerLabelComponents: {
|
|
74
|
+
[banner in VersionBanner]: ComponentType<BannerLabelComponentProps>;
|
|
75
|
+
} = {
|
|
77
76
|
unreleased: UnreleasedVersionLabel,
|
|
78
77
|
unmaintained: UnmaintainedVersionLabel,
|
|
79
78
|
};
|
|
@@ -7,8 +7,9 @@
|
|
|
7
7
|
|
|
8
8
|
import React, {isValidElement} from 'react';
|
|
9
9
|
import CodeBlock from '@theme/CodeBlock';
|
|
10
|
+
import type {Props} from '@theme/MDXComponents/Pre';
|
|
10
11
|
|
|
11
|
-
export default function MDXPre(props:
|
|
12
|
+
export default function MDXPre(props: Props): JSX.Element {
|
|
12
13
|
return (
|
|
13
14
|
<CodeBlock
|
|
14
15
|
// If this pre is created by a ``` fenced codeblock, unwrap the children
|
|
@@ -14,12 +14,11 @@ import LocaleDropdownNavbarItem from '@theme/NavbarItem/LocaleDropdownNavbarItem
|
|
|
14
14
|
import SearchNavbarItem from '@theme/NavbarItem/SearchNavbarItem';
|
|
15
15
|
import type {Types, Props} from '@theme/NavbarItem';
|
|
16
16
|
|
|
17
|
-
const NavbarItemComponents:
|
|
18
|
-
Exclude<Types, undefined>,
|
|
17
|
+
const NavbarItemComponents: {
|
|
19
18
|
// Not really worth typing, as we pass all props down immediately
|
|
20
19
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
21
|
-
() => (props: any) => JSX.Element
|
|
22
|
-
|
|
20
|
+
[type in Exclude<Types, undefined>]: () => (props: any) => JSX.Element;
|
|
21
|
+
} = {
|
|
23
22
|
default: () => DefaultNavbarItem,
|
|
24
23
|
localeDropdown: () => LocaleDropdownNavbarItem,
|
|
25
24
|
search: () => SearchNavbarItem,
|
package/src/theme-classic.d.ts
CHANGED
|
@@ -507,7 +507,7 @@ declare module '@theme/MDXComponents' {
|
|
|
507
507
|
readonly h4: (props: ComponentProps<'h4'>) => JSX.Element;
|
|
508
508
|
readonly h5: (props: ComponentProps<'h5'>) => JSX.Element;
|
|
509
509
|
readonly h6: (props: ComponentProps<'h6'>) => JSX.Element;
|
|
510
|
-
} &
|
|
510
|
+
} & {[tagName: string]: ComponentType<unknown>};
|
|
511
511
|
|
|
512
512
|
const MDXComponents: MDXComponentsObject;
|
|
513
513
|
export default MDXComponents;
|
|
@@ -768,7 +768,7 @@ declare module '@theme/TabItem' {
|
|
|
768
768
|
readonly label?: string;
|
|
769
769
|
readonly hidden?: boolean;
|
|
770
770
|
readonly className?: string;
|
|
771
|
-
readonly attributes?:
|
|
771
|
+
readonly attributes?: {[key: string]: unknown};
|
|
772
772
|
}
|
|
773
773
|
|
|
774
774
|
export default function TabItem(props: Props): JSX.Element;
|
|
@@ -786,7 +786,7 @@ declare module '@theme/Tabs' {
|
|
|
786
786
|
readonly values?: readonly {
|
|
787
787
|
value: string;
|
|
788
788
|
label?: string;
|
|
789
|
-
attributes?:
|
|
789
|
+
attributes?: {[key: string]: unknown};
|
|
790
790
|
}[];
|
|
791
791
|
readonly groupId?: string;
|
|
792
792
|
readonly className?: string;
|
package/src/translations.ts
CHANGED
|
@@ -184,7 +184,7 @@ export function translateThemeConfig({
|
|
|
184
184
|
themeConfig: ThemeConfig;
|
|
185
185
|
translationFiles: TranslationFile[];
|
|
186
186
|
}): ThemeConfig {
|
|
187
|
-
const translationFilesMap:
|
|
187
|
+
const translationFilesMap: {[fileName: string]: TranslationFile} = _.keyBy(
|
|
188
188
|
translationFiles,
|
|
189
189
|
(f) => f.path,
|
|
190
190
|
);
|