@docusaurus/theme-classic 0.0.0-4953 → 0.0.0-4962
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 +2 -1
- package/lib/validateThemeConfig.js +18 -2
- package/lib-next/theme/BlogListPaginator/index.js +25 -28
- package/lib-next/theme/BlogPostAuthor/index.js +3 -6
- package/lib-next/theme/BlogPostPaginator/index.js +25 -28
- package/lib-next/theme/BlogSidebar/Desktop/index.js +1 -1
- package/lib-next/theme/BlogSidebar/Desktop/styles.module.css +0 -2
- package/lib-next/theme/CodeBlock/Content/String.js +7 -3
- package/lib-next/theme/CodeBlock/Line/index.js +2 -13
- package/lib-next/theme/CodeBlock/Line/styles.module.css +7 -7
- package/lib-next/theme/DocPage/Layout/Sidebar/ExpandButton/styles.module.css +2 -6
- package/lib-next/theme/DocPaginator/index.js +25 -28
- package/lib-next/theme/DocSidebar/Desktop/CollapseButton/styles.module.css +11 -9
- package/lib-next/theme/Footer/Links/MultiColumn/index.js +1 -1
- package/lib-next/theme/MDXComponents/Ul.js +2 -4
- package/lib-next/theme/Navbar/Logo/index.js +1 -1
- package/lib-next/theme/NavbarItem/LocaleDropdownNavbarItem/index.js +2 -2
- package/lib-next/theme/PaginatorNavLink/index.js +8 -2
- package/package.json +14 -14
- package/src/theme/BlogListPaginator/index.tsx +25 -28
- package/src/theme/BlogPostAuthor/index.tsx +3 -7
- package/src/theme/BlogPostPaginator/index.tsx +25 -28
- package/src/theme/BlogSidebar/Desktop/index.tsx +1 -1
- package/src/theme/BlogSidebar/Desktop/styles.module.css +0 -2
- package/src/theme/CodeBlock/Content/String.tsx +7 -3
- package/src/theme/CodeBlock/Line/index.tsx +2 -10
- package/src/theme/CodeBlock/Line/styles.module.css +7 -7
- package/src/theme/DocPage/Layout/Sidebar/ExpandButton/styles.module.css +2 -6
- package/src/theme/DocPaginator/index.tsx +25 -28
- package/src/theme/DocSidebar/Desktop/CollapseButton/styles.module.css +11 -9
- package/src/theme/Footer/Links/MultiColumn/index.tsx +1 -1
- package/src/theme/MDXComponents/Ul.tsx +2 -6
- package/src/theme/Navbar/Logo/index.tsx +1 -1
- package/src/theme/NavbarItem/LocaleDropdownNavbarItem/index.tsx +2 -2
- package/src/theme/PaginatorNavLink/index.tsx +8 -2
- package/src/theme-classic.d.ts +2 -1
- package/src/validateThemeConfig.ts +19 -0
- package/lib-next/theme/BlogPostAuthor/styles.module.css +0 -12
- package/lib-next/theme/MDXComponents/Ul.module.css +0 -11
- package/src/theme/BlogPostAuthor/styles.module.css +0 -12
- package/src/theme/MDXComponents/Ul.module.css +0 -11
package/lib/theme-classic.d.ts
CHANGED
|
@@ -219,7 +219,7 @@ declare module '@theme/CodeBlock/Line' {
|
|
|
219
219
|
|
|
220
220
|
export interface Props {
|
|
221
221
|
readonly line: Token[];
|
|
222
|
-
readonly
|
|
222
|
+
readonly classNames: string[] | undefined;
|
|
223
223
|
readonly showLineNumbers: boolean;
|
|
224
224
|
readonly getLineProps: GetLineProps;
|
|
225
225
|
readonly getTokenProps: GetTokenProps;
|
|
@@ -997,6 +997,7 @@ declare module '@theme/PaginatorNavLink' {
|
|
|
997
997
|
export interface Props extends Omit<PropNavigationLink, 'title'> {
|
|
998
998
|
readonly title: ReactNode;
|
|
999
999
|
readonly subLabel?: JSX.Element;
|
|
1000
|
+
readonly isNext?: boolean;
|
|
1000
1001
|
}
|
|
1001
1002
|
|
|
1002
1003
|
export default function PaginatorNavLink(props: Props): JSX.Element;
|
|
@@ -45,7 +45,15 @@ const DEFAULT_CONFIG = {
|
|
|
45
45
|
metadata: [],
|
|
46
46
|
prism: {
|
|
47
47
|
additionalLanguages: [],
|
|
48
|
-
theme: _palenight.default
|
|
48
|
+
theme: _palenight.default,
|
|
49
|
+
magicComments: [{
|
|
50
|
+
className: 'theme-code-block-highlighted-line',
|
|
51
|
+
line: 'highlight-next-line',
|
|
52
|
+
block: {
|
|
53
|
+
start: 'highlight-start',
|
|
54
|
+
end: 'highlight-end'
|
|
55
|
+
}
|
|
56
|
+
}]
|
|
49
57
|
},
|
|
50
58
|
navbar: {
|
|
51
59
|
hideOnScroll: false,
|
|
@@ -320,7 +328,15 @@ const ThemeConfigSchema = _utilsValidation.Joi.object({
|
|
|
320
328
|
styles: _utilsValidation.Joi.alternatives().try(_utilsValidation.Joi.array(), _utilsValidation.Joi.object()).required()
|
|
321
329
|
}),
|
|
322
330
|
defaultLanguage: _utilsValidation.Joi.string(),
|
|
323
|
-
additionalLanguages: _utilsValidation.Joi.array().items(_utilsValidation.Joi.string()).default(DEFAULT_CONFIG.prism.additionalLanguages)
|
|
331
|
+
additionalLanguages: _utilsValidation.Joi.array().items(_utilsValidation.Joi.string()).default(DEFAULT_CONFIG.prism.additionalLanguages),
|
|
332
|
+
magicComments: _utilsValidation.Joi.array().items(_utilsValidation.Joi.object({
|
|
333
|
+
className: _utilsValidation.Joi.string().required(),
|
|
334
|
+
line: _utilsValidation.Joi.string(),
|
|
335
|
+
block: _utilsValidation.Joi.object({
|
|
336
|
+
start: _utilsValidation.Joi.string().required(),
|
|
337
|
+
end: _utilsValidation.Joi.string().required()
|
|
338
|
+
})
|
|
339
|
+
}).or('line', 'block')).default(DEFAULT_CONFIG.prism.magicComments)
|
|
324
340
|
}).default(DEFAULT_CONFIG.prism).unknown(),
|
|
325
341
|
hideableSidebar: _utilsValidation.Joi.forbidden().messages({
|
|
326
342
|
'any.unknown': 'themeConfig.hideableSidebar has been moved to themeConfig.docs.sidebar.hideable.'
|
|
@@ -18,34 +18,31 @@ export default function BlogListPaginator(props) {
|
|
|
18
18
|
message: 'Blog list page navigation',
|
|
19
19
|
description: 'The ARIA label for the blog pagination',
|
|
20
20
|
})}>
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
/>
|
|
47
|
-
)}
|
|
48
|
-
</div>
|
|
21
|
+
{previousPage && (
|
|
22
|
+
<PaginatorNavLink
|
|
23
|
+
permalink={previousPage}
|
|
24
|
+
title={
|
|
25
|
+
<Translate
|
|
26
|
+
id="theme.blog.paginator.newerEntries"
|
|
27
|
+
description="The label used to navigate to the newer blog posts page (previous page)">
|
|
28
|
+
Newer Entries
|
|
29
|
+
</Translate>
|
|
30
|
+
}
|
|
31
|
+
/>
|
|
32
|
+
)}
|
|
33
|
+
{nextPage && (
|
|
34
|
+
<PaginatorNavLink
|
|
35
|
+
permalink={nextPage}
|
|
36
|
+
title={
|
|
37
|
+
<Translate
|
|
38
|
+
id="theme.blog.paginator.olderEntries"
|
|
39
|
+
description="The label used to navigate to the older blog posts page (next page)">
|
|
40
|
+
Older Entries
|
|
41
|
+
</Translate>
|
|
42
|
+
}
|
|
43
|
+
isNext
|
|
44
|
+
/>
|
|
45
|
+
)}
|
|
49
46
|
</nav>
|
|
50
47
|
);
|
|
51
48
|
}
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import Link from '@docusaurus/Link';
|
|
9
|
-
import styles from './styles.module.css';
|
|
10
9
|
|
|
11
10
|
function MaybeLink(props) {
|
|
12
11
|
if (props.href) {
|
|
@@ -22,11 +21,9 @@ export default function BlogPostAuthor({author}) {
|
|
|
22
21
|
return (
|
|
23
22
|
<div className="avatar margin-bottom--sm">
|
|
24
23
|
{imageURL && (
|
|
25
|
-
<
|
|
26
|
-
<
|
|
27
|
-
|
|
28
|
-
</MaybeLink>
|
|
29
|
-
</span>
|
|
24
|
+
<MaybeLink href={link} className="avatar__photo-link">
|
|
25
|
+
<img className="avatar__photo" src={imageURL} alt={name} />
|
|
26
|
+
</MaybeLink>
|
|
30
27
|
)}
|
|
31
28
|
|
|
32
29
|
{name && (
|
|
@@ -17,34 +17,31 @@ export default function BlogPostPaginator(props) {
|
|
|
17
17
|
message: 'Blog post page navigation',
|
|
18
18
|
description: 'The ARIA label for the blog posts pagination',
|
|
19
19
|
})}>
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
/>
|
|
46
|
-
)}
|
|
47
|
-
</div>
|
|
20
|
+
{prevItem && (
|
|
21
|
+
<PaginatorNavLink
|
|
22
|
+
{...prevItem}
|
|
23
|
+
subLabel={
|
|
24
|
+
<Translate
|
|
25
|
+
id="theme.blog.post.paginator.newerPost"
|
|
26
|
+
description="The blog post button label to navigate to the newer/previous post">
|
|
27
|
+
Newer Post
|
|
28
|
+
</Translate>
|
|
29
|
+
}
|
|
30
|
+
/>
|
|
31
|
+
)}
|
|
32
|
+
{nextItem && (
|
|
33
|
+
<PaginatorNavLink
|
|
34
|
+
{...nextItem}
|
|
35
|
+
subLabel={
|
|
36
|
+
<Translate
|
|
37
|
+
id="theme.blog.post.paginator.olderPost"
|
|
38
|
+
description="The blog post button label to navigate to the older/next post">
|
|
39
|
+
Older Post
|
|
40
|
+
</Translate>
|
|
41
|
+
}
|
|
42
|
+
isNext
|
|
43
|
+
/>
|
|
44
|
+
)}
|
|
48
45
|
</nav>
|
|
49
46
|
);
|
|
50
47
|
}
|
|
@@ -22,7 +22,7 @@ export default function BlogSidebarDesktop({sidebar}) {
|
|
|
22
22
|
<div className={clsx(styles.sidebarItemTitle, 'margin-bottom--md')}>
|
|
23
23
|
{sidebar.title}
|
|
24
24
|
</div>
|
|
25
|
-
<ul className={styles.sidebarItemList}>
|
|
25
|
+
<ul className={clsx(styles.sidebarItemList, 'clean-list')}>
|
|
26
26
|
{sidebar.items.map((item) => (
|
|
27
27
|
<li key={item.permalink} className={styles.sidebarItem}>
|
|
28
28
|
<Link
|
|
@@ -30,7 +30,7 @@ export default function CodeBlockString({
|
|
|
30
30
|
language: languageProp,
|
|
31
31
|
}) {
|
|
32
32
|
const {
|
|
33
|
-
prism: {defaultLanguage},
|
|
33
|
+
prism: {defaultLanguage, magicComments},
|
|
34
34
|
} = useThemeConfig();
|
|
35
35
|
const language =
|
|
36
36
|
languageProp ?? parseLanguage(blockClassName) ?? defaultLanguage;
|
|
@@ -40,7 +40,11 @@ export default function CodeBlockString({
|
|
|
40
40
|
// "title=\"xyz\"" => title: "\"xyz\""
|
|
41
41
|
|
|
42
42
|
const title = parseCodeBlockTitle(metastring) || titleProp;
|
|
43
|
-
const {
|
|
43
|
+
const {lineClassNames, code} = parseLines(children, {
|
|
44
|
+
metastring,
|
|
45
|
+
language,
|
|
46
|
+
magicComments,
|
|
47
|
+
});
|
|
44
48
|
const showLineNumbers =
|
|
45
49
|
showLineNumbersProp || containsLineNumbers(metastring);
|
|
46
50
|
return (
|
|
@@ -76,7 +80,7 @@ export default function CodeBlockString({
|
|
|
76
80
|
line={line}
|
|
77
81
|
getLineProps={getLineProps}
|
|
78
82
|
getTokenProps={getTokenProps}
|
|
79
|
-
|
|
83
|
+
classNames={lineClassNames[i]}
|
|
80
84
|
showLineNumbers={showLineNumbers}
|
|
81
85
|
/>
|
|
82
86
|
))}
|
|
@@ -9,7 +9,7 @@ import clsx from 'clsx';
|
|
|
9
9
|
import styles from './styles.module.css';
|
|
10
10
|
export default function CodeBlockLine({
|
|
11
11
|
line,
|
|
12
|
-
|
|
12
|
+
classNames,
|
|
13
13
|
showLineNumbers,
|
|
14
14
|
getLineProps,
|
|
15
15
|
getTokenProps,
|
|
@@ -20,19 +20,8 @@ export default function CodeBlockLine({
|
|
|
20
20
|
|
|
21
21
|
const lineProps = getLineProps({
|
|
22
22
|
line,
|
|
23
|
-
|
|
24
|
-
className: styles.codeLine,
|
|
25
|
-
}),
|
|
23
|
+
className: clsx(classNames, showLineNumbers && styles.codeLine),
|
|
26
24
|
});
|
|
27
|
-
|
|
28
|
-
if (highlight) {
|
|
29
|
-
lineProps.className = clsx(
|
|
30
|
-
lineProps.className,
|
|
31
|
-
styles.highlightedCodeLine,
|
|
32
|
-
'theme-code-block-highlighted-line',
|
|
33
|
-
);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
25
|
const lineTokens = line.map((token, key) => (
|
|
37
26
|
<span
|
|
38
27
|
key={key}
|
|
@@ -5,6 +5,13 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
:global(.theme-code-block-highlighted-line) {
|
|
9
|
+
background-color: var(--docusaurus-highlighted-code-line-bg);
|
|
10
|
+
display: block;
|
|
11
|
+
margin: 0 calc(-1 * var(--ifm-pre-padding));
|
|
12
|
+
padding: 0 var(--ifm-pre-padding);
|
|
13
|
+
}
|
|
14
|
+
|
|
8
15
|
/* Intentionally has zero specificity, so that to be able to override
|
|
9
16
|
the background in custom CSS file due bug https://github.com/facebook/docusaurus/issues/3678 */
|
|
10
17
|
:where(:root) {
|
|
@@ -15,13 +22,6 @@ the background in custom CSS file due bug https://github.com/facebook/docusaurus
|
|
|
15
22
|
--docusaurus-highlighted-code-line-bg: rgb(100 100 100);
|
|
16
23
|
}
|
|
17
24
|
|
|
18
|
-
.highlightedCodeLine {
|
|
19
|
-
background-color: var(--docusaurus-highlighted-code-line-bg);
|
|
20
|
-
display: block;
|
|
21
|
-
margin: 0 calc(-1 * var(--ifm-pre-padding));
|
|
22
|
-
padding: 0 var(--ifm-pre-padding);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
25
|
.codeLine {
|
|
26
26
|
display: table-row;
|
|
27
27
|
counter-increment: line-count;
|
|
@@ -15,11 +15,12 @@
|
|
|
15
15
|
align-items: center;
|
|
16
16
|
justify-content: center;
|
|
17
17
|
transition: background-color var(--ifm-transition-fast) ease;
|
|
18
|
+
background-color: var(--docusaurus-collapse-button-bg);
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
.expandButton:hover,
|
|
21
22
|
.expandButton:focus {
|
|
22
|
-
background-color: var(--
|
|
23
|
+
background-color: var(--docusaurus-collapse-button-bg-hover);
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
.expandButtonIcon {
|
|
@@ -29,9 +30,4 @@
|
|
|
29
30
|
[dir='rtl'] .expandButtonIcon {
|
|
30
31
|
transform: rotate(180deg);
|
|
31
32
|
}
|
|
32
|
-
|
|
33
|
-
[data-theme='dark'] .expandButton:hover,
|
|
34
|
-
[data-theme='dark'] .expandButton:focus {
|
|
35
|
-
background-color: var(--collapse-button-bg-color-dark);
|
|
36
|
-
}
|
|
37
33
|
}
|
|
@@ -17,34 +17,31 @@ export default function DocPaginator(props) {
|
|
|
17
17
|
message: 'Docs pages navigation',
|
|
18
18
|
description: 'The ARIA label for the docs pagination',
|
|
19
19
|
})}>
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
/>
|
|
46
|
-
)}
|
|
47
|
-
</div>
|
|
20
|
+
{previous && (
|
|
21
|
+
<PaginatorNavLink
|
|
22
|
+
{...previous}
|
|
23
|
+
subLabel={
|
|
24
|
+
<Translate
|
|
25
|
+
id="theme.docs.paginator.previous"
|
|
26
|
+
description="The label used to navigate to the previous doc">
|
|
27
|
+
Previous
|
|
28
|
+
</Translate>
|
|
29
|
+
}
|
|
30
|
+
/>
|
|
31
|
+
)}
|
|
32
|
+
{next && (
|
|
33
|
+
<PaginatorNavLink
|
|
34
|
+
{...next}
|
|
35
|
+
subLabel={
|
|
36
|
+
<Translate
|
|
37
|
+
id="theme.docs.paginator.next"
|
|
38
|
+
description="The label used to navigate to the next doc">
|
|
39
|
+
Next
|
|
40
|
+
</Translate>
|
|
41
|
+
}
|
|
42
|
+
isNext
|
|
43
|
+
/>
|
|
44
|
+
)}
|
|
48
45
|
</nav>
|
|
49
46
|
);
|
|
50
47
|
}
|
|
@@ -6,13 +6,19 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
:root {
|
|
9
|
-
--collapse-button-bg
|
|
9
|
+
--docusaurus-collapse-button-bg: transparent;
|
|
10
|
+
--docusaurus-collapse-button-bg-hover: rgb(0 0 0 / 10%);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
[data-theme='dark']:root {
|
|
14
|
+
--docusaurus-collapse-button-bg: rgb(255 255 255 / 5%);
|
|
15
|
+
--docusaurus-collapse-button-bg-hover: rgb(255 255 255 / 10%);
|
|
10
16
|
}
|
|
11
17
|
|
|
12
18
|
@media (min-width: 997px) {
|
|
13
19
|
.collapseSidebarButton {
|
|
14
20
|
display: block !important;
|
|
15
|
-
background-color: var(--
|
|
21
|
+
background-color: var(--docusaurus-collapse-button-bg);
|
|
16
22
|
height: 40px;
|
|
17
23
|
position: sticky;
|
|
18
24
|
bottom: 0;
|
|
@@ -29,13 +35,9 @@
|
|
|
29
35
|
transform: rotate(0);
|
|
30
36
|
}
|
|
31
37
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
[data-theme='dark'] .collapseSidebarButton:hover,
|
|
37
|
-
[data-theme='dark'] .collapseSidebarButton:focus {
|
|
38
|
-
background-color: var(--ifm-color-emphasis-200);
|
|
38
|
+
.collapseSidebarButton:hover,
|
|
39
|
+
.collapseSidebarButton:focus {
|
|
40
|
+
background-color: var(--docusaurus-collapse-button-bg-hover);
|
|
39
41
|
}
|
|
40
42
|
}
|
|
41
43
|
|
|
@@ -27,7 +27,7 @@ function Column({column}) {
|
|
|
27
27
|
return (
|
|
28
28
|
<div className="col footer__col">
|
|
29
29
|
<div className="footer__title">{column.title}</div>
|
|
30
|
-
<ul className="footer__items">
|
|
30
|
+
<ul className="footer__items clean-list">
|
|
31
31
|
{column.items.map((item, i) => (
|
|
32
32
|
<ColumnLinkItem key={i} item={item} />
|
|
33
33
|
))}
|
|
@@ -6,15 +6,13 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import clsx from 'clsx';
|
|
9
|
-
import styles from './Ul.module.css';
|
|
10
|
-
const containsClassListLocalClass = styles['contains-task-list'];
|
|
11
9
|
|
|
12
10
|
function transformUlClassName(className) {
|
|
13
11
|
return clsx(
|
|
14
12
|
className, // This class is set globally by GitHub/MDX
|
|
15
|
-
// We keep the global class, but
|
|
13
|
+
// We keep the global class, but add Infima class to get list without styling
|
|
16
14
|
// See https://github.com/syntax-tree/mdast-util-to-hast/issues/28
|
|
17
|
-
className?.includes('contains-task-list') &&
|
|
15
|
+
className?.includes('contains-task-list') && 'clean-list',
|
|
18
16
|
);
|
|
19
17
|
}
|
|
20
18
|
|
|
@@ -5,11 +5,17 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
|
+
import clsx from 'clsx';
|
|
8
9
|
import Link from '@docusaurus/Link';
|
|
9
10
|
export default function PaginatorNavLink(props) {
|
|
10
|
-
const {permalink, title, subLabel} = props;
|
|
11
|
+
const {permalink, title, subLabel, isNext} = props;
|
|
11
12
|
return (
|
|
12
|
-
<Link
|
|
13
|
+
<Link
|
|
14
|
+
className={clsx(
|
|
15
|
+
'pagination-nav__link',
|
|
16
|
+
isNext ? 'pagination-nav__link--next' : 'pagination-nav__link--prev',
|
|
17
|
+
)}
|
|
18
|
+
to={permalink}>
|
|
13
19
|
{subLabel && <div className="pagination-nav__sublabel">{subLabel}</div>}
|
|
14
20
|
<div className="pagination-nav__label">{title}</div>
|
|
15
21
|
</Link>
|
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-4962",
|
|
4
4
|
"description": "Classic theme for Docusaurus",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "src/theme-classic.d.ts",
|
|
@@ -21,19 +21,19 @@
|
|
|
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-4962",
|
|
25
|
+
"@docusaurus/plugin-content-blog": "0.0.0-4962",
|
|
26
|
+
"@docusaurus/plugin-content-docs": "0.0.0-4962",
|
|
27
|
+
"@docusaurus/plugin-content-pages": "0.0.0-4962",
|
|
28
|
+
"@docusaurus/theme-common": "0.0.0-4962",
|
|
29
|
+
"@docusaurus/theme-translations": "0.0.0-4962",
|
|
30
|
+
"@docusaurus/utils": "0.0.0-4962",
|
|
31
|
+
"@docusaurus/utils-common": "0.0.0-4962",
|
|
32
|
+
"@docusaurus/utils-validation": "0.0.0-4962",
|
|
33
33
|
"@mdx-js/react": "^1.6.22",
|
|
34
34
|
"clsx": "^1.1.1",
|
|
35
35
|
"copy-text-to-clipboard": "^3.0.1",
|
|
36
|
-
"infima": "0.2.0-alpha.
|
|
36
|
+
"infima": "0.2.0-alpha.39",
|
|
37
37
|
"lodash": "^4.17.21",
|
|
38
38
|
"nprogress": "^0.2.0",
|
|
39
39
|
"postcss": "^8.4.13",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"@babel/cli": "^7.17.10",
|
|
47
47
|
"@babel/core": "^7.17.10",
|
|
48
48
|
"@babel/preset-typescript": "^7.16.7",
|
|
49
|
-
"@docusaurus/module-type-aliases": "0.0.0-
|
|
50
|
-
"@docusaurus/types": "0.0.0-
|
|
49
|
+
"@docusaurus/module-type-aliases": "0.0.0-4962",
|
|
50
|
+
"@docusaurus/types": "0.0.0-4962",
|
|
51
51
|
"@types/mdx-js__react": "^1.5.5",
|
|
52
52
|
"@types/nprogress": "^0.2.0",
|
|
53
53
|
"@types/prismjs": "^1.26.0",
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"engines": {
|
|
65
65
|
"node": ">=14"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "09d93ecee8d2d83cd27166af3c6bf4fb12abf2e7"
|
|
68
68
|
}
|
|
@@ -22,34 +22,31 @@ export default function BlogListPaginator(props: Props): JSX.Element {
|
|
|
22
22
|
message: 'Blog list page navigation',
|
|
23
23
|
description: 'The ARIA label for the blog pagination',
|
|
24
24
|
})}>
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
/>
|
|
51
|
-
)}
|
|
52
|
-
</div>
|
|
25
|
+
{previousPage && (
|
|
26
|
+
<PaginatorNavLink
|
|
27
|
+
permalink={previousPage}
|
|
28
|
+
title={
|
|
29
|
+
<Translate
|
|
30
|
+
id="theme.blog.paginator.newerEntries"
|
|
31
|
+
description="The label used to navigate to the newer blog posts page (previous page)">
|
|
32
|
+
Newer Entries
|
|
33
|
+
</Translate>
|
|
34
|
+
}
|
|
35
|
+
/>
|
|
36
|
+
)}
|
|
37
|
+
{nextPage && (
|
|
38
|
+
<PaginatorNavLink
|
|
39
|
+
permalink={nextPage}
|
|
40
|
+
title={
|
|
41
|
+
<Translate
|
|
42
|
+
id="theme.blog.paginator.olderEntries"
|
|
43
|
+
description="The label used to navigate to the older blog posts page (next page)">
|
|
44
|
+
Older Entries
|
|
45
|
+
</Translate>
|
|
46
|
+
}
|
|
47
|
+
isNext
|
|
48
|
+
/>
|
|
49
|
+
)}
|
|
53
50
|
</nav>
|
|
54
51
|
);
|
|
55
52
|
}
|
|
@@ -9,8 +9,6 @@ import React from 'react';
|
|
|
9
9
|
import Link, {type Props as LinkProps} from '@docusaurus/Link';
|
|
10
10
|
import type {Props} from '@theme/BlogPostAuthor';
|
|
11
11
|
|
|
12
|
-
import styles from './styles.module.css';
|
|
13
|
-
|
|
14
12
|
function MaybeLink(props: LinkProps): JSX.Element {
|
|
15
13
|
if (props.href) {
|
|
16
14
|
return <Link {...props} />;
|
|
@@ -24,11 +22,9 @@ export default function BlogPostAuthor({author}: Props): JSX.Element {
|
|
|
24
22
|
return (
|
|
25
23
|
<div className="avatar margin-bottom--sm">
|
|
26
24
|
{imageURL && (
|
|
27
|
-
<
|
|
28
|
-
<
|
|
29
|
-
|
|
30
|
-
</MaybeLink>
|
|
31
|
-
</span>
|
|
25
|
+
<MaybeLink href={link} className="avatar__photo-link">
|
|
26
|
+
<img className="avatar__photo" src={imageURL} alt={name} />
|
|
27
|
+
</MaybeLink>
|
|
32
28
|
)}
|
|
33
29
|
|
|
34
30
|
{name && (
|
|
@@ -21,34 +21,31 @@ export default function BlogPostPaginator(props: Props): JSX.Element {
|
|
|
21
21
|
message: 'Blog post page navigation',
|
|
22
22
|
description: 'The ARIA label for the blog posts pagination',
|
|
23
23
|
})}>
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
/>
|
|
50
|
-
)}
|
|
51
|
-
</div>
|
|
24
|
+
{prevItem && (
|
|
25
|
+
<PaginatorNavLink
|
|
26
|
+
{...prevItem}
|
|
27
|
+
subLabel={
|
|
28
|
+
<Translate
|
|
29
|
+
id="theme.blog.post.paginator.newerPost"
|
|
30
|
+
description="The blog post button label to navigate to the newer/previous post">
|
|
31
|
+
Newer Post
|
|
32
|
+
</Translate>
|
|
33
|
+
}
|
|
34
|
+
/>
|
|
35
|
+
)}
|
|
36
|
+
{nextItem && (
|
|
37
|
+
<PaginatorNavLink
|
|
38
|
+
{...nextItem}
|
|
39
|
+
subLabel={
|
|
40
|
+
<Translate
|
|
41
|
+
id="theme.blog.post.paginator.olderPost"
|
|
42
|
+
description="The blog post button label to navigate to the older/next post">
|
|
43
|
+
Older Post
|
|
44
|
+
</Translate>
|
|
45
|
+
}
|
|
46
|
+
isNext
|
|
47
|
+
/>
|
|
48
|
+
)}
|
|
52
49
|
</nav>
|
|
53
50
|
);
|
|
54
51
|
}
|
|
@@ -26,7 +26,7 @@ export default function BlogSidebarDesktop({sidebar}: Props): JSX.Element {
|
|
|
26
26
|
<div className={clsx(styles.sidebarItemTitle, 'margin-bottom--md')}>
|
|
27
27
|
{sidebar.title}
|
|
28
28
|
</div>
|
|
29
|
-
<ul className={styles.sidebarItemList}>
|
|
29
|
+
<ul className={clsx(styles.sidebarItemList, 'clean-list')}>
|
|
30
30
|
{sidebar.items.map((item) => (
|
|
31
31
|
<li key={item.permalink} className={styles.sidebarItem}>
|
|
32
32
|
<Link
|
|
@@ -34,7 +34,7 @@ export default function CodeBlockString({
|
|
|
34
34
|
language: languageProp,
|
|
35
35
|
}: Props): JSX.Element {
|
|
36
36
|
const {
|
|
37
|
-
prism: {defaultLanguage},
|
|
37
|
+
prism: {defaultLanguage, magicComments},
|
|
38
38
|
} = useThemeConfig();
|
|
39
39
|
const language =
|
|
40
40
|
languageProp ?? parseLanguage(blockClassName) ?? defaultLanguage;
|
|
@@ -46,7 +46,11 @@ export default function CodeBlockString({
|
|
|
46
46
|
// "title=\"xyz\"" => title: "\"xyz\""
|
|
47
47
|
const title = parseCodeBlockTitle(metastring) || titleProp;
|
|
48
48
|
|
|
49
|
-
const {
|
|
49
|
+
const {lineClassNames, code} = parseLines(children, {
|
|
50
|
+
metastring,
|
|
51
|
+
language,
|
|
52
|
+
magicComments,
|
|
53
|
+
});
|
|
50
54
|
const showLineNumbers =
|
|
51
55
|
showLineNumbersProp || containsLineNumbers(metastring);
|
|
52
56
|
|
|
@@ -83,7 +87,7 @@ export default function CodeBlockString({
|
|
|
83
87
|
line={line}
|
|
84
88
|
getLineProps={getLineProps}
|
|
85
89
|
getTokenProps={getTokenProps}
|
|
86
|
-
|
|
90
|
+
classNames={lineClassNames[i]}
|
|
87
91
|
showLineNumbers={showLineNumbers}
|
|
88
92
|
/>
|
|
89
93
|
))}
|
|
@@ -12,7 +12,7 @@ import styles from './styles.module.css';
|
|
|
12
12
|
|
|
13
13
|
export default function CodeBlockLine({
|
|
14
14
|
line,
|
|
15
|
-
|
|
15
|
+
classNames,
|
|
16
16
|
showLineNumbers,
|
|
17
17
|
getLineProps,
|
|
18
18
|
getTokenProps,
|
|
@@ -23,17 +23,9 @@ export default function CodeBlockLine({
|
|
|
23
23
|
|
|
24
24
|
const lineProps = getLineProps({
|
|
25
25
|
line,
|
|
26
|
-
|
|
26
|
+
className: clsx(classNames, showLineNumbers && styles.codeLine),
|
|
27
27
|
});
|
|
28
28
|
|
|
29
|
-
if (highlight) {
|
|
30
|
-
lineProps.className = clsx(
|
|
31
|
-
lineProps.className,
|
|
32
|
-
styles.highlightedCodeLine,
|
|
33
|
-
'theme-code-block-highlighted-line',
|
|
34
|
-
);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
29
|
const lineTokens = line.map((token, key) => (
|
|
38
30
|
<span key={key} {...getTokenProps({token, key})} />
|
|
39
31
|
));
|
|
@@ -5,6 +5,13 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
:global(.theme-code-block-highlighted-line) {
|
|
9
|
+
background-color: var(--docusaurus-highlighted-code-line-bg);
|
|
10
|
+
display: block;
|
|
11
|
+
margin: 0 calc(-1 * var(--ifm-pre-padding));
|
|
12
|
+
padding: 0 var(--ifm-pre-padding);
|
|
13
|
+
}
|
|
14
|
+
|
|
8
15
|
/* Intentionally has zero specificity, so that to be able to override
|
|
9
16
|
the background in custom CSS file due bug https://github.com/facebook/docusaurus/issues/3678 */
|
|
10
17
|
:where(:root) {
|
|
@@ -15,13 +22,6 @@ the background in custom CSS file due bug https://github.com/facebook/docusaurus
|
|
|
15
22
|
--docusaurus-highlighted-code-line-bg: rgb(100 100 100);
|
|
16
23
|
}
|
|
17
24
|
|
|
18
|
-
.highlightedCodeLine {
|
|
19
|
-
background-color: var(--docusaurus-highlighted-code-line-bg);
|
|
20
|
-
display: block;
|
|
21
|
-
margin: 0 calc(-1 * var(--ifm-pre-padding));
|
|
22
|
-
padding: 0 var(--ifm-pre-padding);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
25
|
.codeLine {
|
|
26
26
|
display: table-row;
|
|
27
27
|
counter-increment: line-count;
|
|
@@ -15,11 +15,12 @@
|
|
|
15
15
|
align-items: center;
|
|
16
16
|
justify-content: center;
|
|
17
17
|
transition: background-color var(--ifm-transition-fast) ease;
|
|
18
|
+
background-color: var(--docusaurus-collapse-button-bg);
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
.expandButton:hover,
|
|
21
22
|
.expandButton:focus {
|
|
22
|
-
background-color: var(--
|
|
23
|
+
background-color: var(--docusaurus-collapse-button-bg-hover);
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
.expandButtonIcon {
|
|
@@ -29,9 +30,4 @@
|
|
|
29
30
|
[dir='rtl'] .expandButtonIcon {
|
|
30
31
|
transform: rotate(180deg);
|
|
31
32
|
}
|
|
32
|
-
|
|
33
|
-
[data-theme='dark'] .expandButton:hover,
|
|
34
|
-
[data-theme='dark'] .expandButton:focus {
|
|
35
|
-
background-color: var(--collapse-button-bg-color-dark);
|
|
36
|
-
}
|
|
37
33
|
}
|
|
@@ -21,34 +21,31 @@ export default function DocPaginator(props: Props): JSX.Element {
|
|
|
21
21
|
message: 'Docs pages navigation',
|
|
22
22
|
description: 'The ARIA label for the docs pagination',
|
|
23
23
|
})}>
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
/>
|
|
50
|
-
)}
|
|
51
|
-
</div>
|
|
24
|
+
{previous && (
|
|
25
|
+
<PaginatorNavLink
|
|
26
|
+
{...previous}
|
|
27
|
+
subLabel={
|
|
28
|
+
<Translate
|
|
29
|
+
id="theme.docs.paginator.previous"
|
|
30
|
+
description="The label used to navigate to the previous doc">
|
|
31
|
+
Previous
|
|
32
|
+
</Translate>
|
|
33
|
+
}
|
|
34
|
+
/>
|
|
35
|
+
)}
|
|
36
|
+
{next && (
|
|
37
|
+
<PaginatorNavLink
|
|
38
|
+
{...next}
|
|
39
|
+
subLabel={
|
|
40
|
+
<Translate
|
|
41
|
+
id="theme.docs.paginator.next"
|
|
42
|
+
description="The label used to navigate to the next doc">
|
|
43
|
+
Next
|
|
44
|
+
</Translate>
|
|
45
|
+
}
|
|
46
|
+
isNext
|
|
47
|
+
/>
|
|
48
|
+
)}
|
|
52
49
|
</nav>
|
|
53
50
|
);
|
|
54
51
|
}
|
|
@@ -6,13 +6,19 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
:root {
|
|
9
|
-
--collapse-button-bg
|
|
9
|
+
--docusaurus-collapse-button-bg: transparent;
|
|
10
|
+
--docusaurus-collapse-button-bg-hover: rgb(0 0 0 / 10%);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
[data-theme='dark']:root {
|
|
14
|
+
--docusaurus-collapse-button-bg: rgb(255 255 255 / 5%);
|
|
15
|
+
--docusaurus-collapse-button-bg-hover: rgb(255 255 255 / 10%);
|
|
10
16
|
}
|
|
11
17
|
|
|
12
18
|
@media (min-width: 997px) {
|
|
13
19
|
.collapseSidebarButton {
|
|
14
20
|
display: block !important;
|
|
15
|
-
background-color: var(--
|
|
21
|
+
background-color: var(--docusaurus-collapse-button-bg);
|
|
16
22
|
height: 40px;
|
|
17
23
|
position: sticky;
|
|
18
24
|
bottom: 0;
|
|
@@ -29,13 +35,9 @@
|
|
|
29
35
|
transform: rotate(0);
|
|
30
36
|
}
|
|
31
37
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
[data-theme='dark'] .collapseSidebarButton:hover,
|
|
37
|
-
[data-theme='dark'] .collapseSidebarButton:focus {
|
|
38
|
-
background-color: var(--ifm-color-emphasis-200);
|
|
38
|
+
.collapseSidebarButton:hover,
|
|
39
|
+
.collapseSidebarButton:focus {
|
|
40
|
+
background-color: var(--docusaurus-collapse-button-bg-hover);
|
|
39
41
|
}
|
|
40
42
|
}
|
|
41
43
|
|
|
@@ -31,7 +31,7 @@ function Column({column}: {column: ColumnType}) {
|
|
|
31
31
|
return (
|
|
32
32
|
<div className="col footer__col">
|
|
33
33
|
<div className="footer__title">{column.title}</div>
|
|
34
|
-
<ul className="footer__items">
|
|
34
|
+
<ul className="footer__items clean-list">
|
|
35
35
|
{column.items.map((item, i) => (
|
|
36
36
|
<ColumnLinkItem key={i} item={item} />
|
|
37
37
|
))}
|
|
@@ -9,17 +9,13 @@ import React from 'react';
|
|
|
9
9
|
import clsx from 'clsx';
|
|
10
10
|
import type {Props} from '@theme/MDXComponents/Ul';
|
|
11
11
|
|
|
12
|
-
import styles from './Ul.module.css';
|
|
13
|
-
|
|
14
|
-
const containsClassListLocalClass = styles['contains-task-list'];
|
|
15
|
-
|
|
16
12
|
function transformUlClassName(className?: string): string {
|
|
17
13
|
return clsx(
|
|
18
14
|
className,
|
|
19
15
|
// This class is set globally by GitHub/MDX
|
|
20
|
-
// We keep the global class, but
|
|
16
|
+
// We keep the global class, but add Infima class to get list without styling
|
|
21
17
|
// See https://github.com/syntax-tree/mdast-util-to-hast/issues/28
|
|
22
|
-
className?.includes('contains-task-list') &&
|
|
18
|
+
className?.includes('contains-task-list') && 'clean-list',
|
|
23
19
|
);
|
|
24
20
|
}
|
|
25
21
|
|
|
@@ -6,13 +6,19 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
|
+
import clsx from 'clsx';
|
|
9
10
|
import Link from '@docusaurus/Link';
|
|
10
11
|
import type {Props} from '@theme/PaginatorNavLink';
|
|
11
12
|
|
|
12
13
|
export default function PaginatorNavLink(props: Props): JSX.Element {
|
|
13
|
-
const {permalink, title, subLabel} = props;
|
|
14
|
+
const {permalink, title, subLabel, isNext} = props;
|
|
14
15
|
return (
|
|
15
|
-
<Link
|
|
16
|
+
<Link
|
|
17
|
+
className={clsx(
|
|
18
|
+
'pagination-nav__link',
|
|
19
|
+
isNext ? 'pagination-nav__link--next' : 'pagination-nav__link--prev',
|
|
20
|
+
)}
|
|
21
|
+
to={permalink}>
|
|
16
22
|
{subLabel && <div className="pagination-nav__sublabel">{subLabel}</div>}
|
|
17
23
|
<div className="pagination-nav__label">{title}</div>
|
|
18
24
|
</Link>
|
package/src/theme-classic.d.ts
CHANGED
|
@@ -219,7 +219,7 @@ declare module '@theme/CodeBlock/Line' {
|
|
|
219
219
|
|
|
220
220
|
export interface Props {
|
|
221
221
|
readonly line: Token[];
|
|
222
|
-
readonly
|
|
222
|
+
readonly classNames: string[] | undefined;
|
|
223
223
|
readonly showLineNumbers: boolean;
|
|
224
224
|
readonly getLineProps: GetLineProps;
|
|
225
225
|
readonly getTokenProps: GetTokenProps;
|
|
@@ -997,6 +997,7 @@ declare module '@theme/PaginatorNavLink' {
|
|
|
997
997
|
export interface Props extends Omit<PropNavigationLink, 'title'> {
|
|
998
998
|
readonly title: ReactNode;
|
|
999
999
|
readonly subLabel?: JSX.Element;
|
|
1000
|
+
readonly isNext?: boolean;
|
|
1000
1001
|
}
|
|
1001
1002
|
|
|
1002
1003
|
export default function PaginatorNavLink(props: Props): JSX.Element;
|
|
@@ -44,6 +44,13 @@ export const DEFAULT_CONFIG = {
|
|
|
44
44
|
prism: {
|
|
45
45
|
additionalLanguages: [],
|
|
46
46
|
theme: defaultPrismTheme,
|
|
47
|
+
magicComments: [
|
|
48
|
+
{
|
|
49
|
+
className: 'theme-code-block-highlighted-line',
|
|
50
|
+
line: 'highlight-next-line',
|
|
51
|
+
block: {start: 'highlight-start', end: 'highlight-end'},
|
|
52
|
+
},
|
|
53
|
+
],
|
|
47
54
|
},
|
|
48
55
|
navbar: {
|
|
49
56
|
hideOnScroll: false,
|
|
@@ -386,6 +393,18 @@ export const ThemeConfigSchema = Joi.object({
|
|
|
386
393
|
additionalLanguages: Joi.array()
|
|
387
394
|
.items(Joi.string())
|
|
388
395
|
.default(DEFAULT_CONFIG.prism.additionalLanguages),
|
|
396
|
+
magicComments: Joi.array()
|
|
397
|
+
.items(
|
|
398
|
+
Joi.object({
|
|
399
|
+
className: Joi.string().required(),
|
|
400
|
+
line: Joi.string(),
|
|
401
|
+
block: Joi.object({
|
|
402
|
+
start: Joi.string().required(),
|
|
403
|
+
end: Joi.string().required(),
|
|
404
|
+
}),
|
|
405
|
+
}).or('line', 'block'),
|
|
406
|
+
)
|
|
407
|
+
.default(DEFAULT_CONFIG.prism.magicComments),
|
|
389
408
|
})
|
|
390
409
|
.default(DEFAULT_CONFIG.prism)
|
|
391
410
|
.unknown(),
|
|
@@ -1,12 +0,0 @@
|
|
|
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
|
-
.image {
|
|
9
|
-
width: 100%;
|
|
10
|
-
height: 100%;
|
|
11
|
-
object-fit: cover;
|
|
12
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
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
|
-
.contains-task-list {
|
|
9
|
-
padding-left: 0;
|
|
10
|
-
list-style: none;
|
|
11
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
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
|
-
.image {
|
|
9
|
-
width: 100%;
|
|
10
|
-
height: 100%;
|
|
11
|
-
object-fit: cover;
|
|
12
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
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
|
-
.contains-task-list {
|
|
9
|
-
padding-left: 0;
|
|
10
|
-
list-style: none;
|
|
11
|
-
}
|