@docusaurus/theme-classic 2.0.0-beta.21 → 2.0.0-beta.22
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 +5 -5
- package/lib/index.js +4 -2
- package/lib/theme/Admonition/index.d.ts +1 -1
- package/lib/theme/Admonition/index.js +139 -57
- package/lib/{admonitions.css → theme/Admonition/styles.module.css} +14 -15
- package/lib/theme/AnnouncementBar/index.js +3 -2
- package/lib/theme/BackToTopButton/index.js +2 -1
- package/lib/theme/BlogListPage/index.js +2 -11
- package/lib/theme/BlogPostItem/Container/index.d.ts +9 -0
- package/lib/theme/BlogPostItem/Container/index.js +26 -0
- package/lib/theme/BlogPostItem/Content/index.d.ts +9 -0
- package/lib/theme/BlogPostItem/Content/index.js +23 -0
- package/lib/theme/BlogPostItem/Footer/ReadMoreLink/index.d.ts +9 -0
- package/lib/theme/BlogPostItem/Footer/ReadMoreLink/index.js +38 -0
- package/lib/theme/BlogPostItem/Footer/index.d.ts +8 -0
- package/lib/theme/BlogPostItem/Footer/index.js +52 -0
- package/lib/theme/BlogPostItem/Footer/styles.module.css +10 -0
- package/lib/theme/BlogPostItem/Header/Author/index.d.ts +9 -0
- package/lib/theme/{BlogPostAuthor → BlogPostItem/Header/Author}/index.js +3 -2
- package/lib/theme/BlogPostItem/Header/Authors/index.d.ts +9 -0
- package/{src/theme/BlogPostAuthors/index.tsx → lib/theme/BlogPostItem/Header/Authors/index.js} +9 -10
- package/lib/theme/{BlogPostAuthors → BlogPostItem/Header/Authors}/styles.module.css +0 -0
- package/lib/theme/{BlogPostAuthors → BlogPostItem/Header/Info}/index.d.ts +2 -2
- package/lib/theme/BlogPostItem/Header/Info/index.js +60 -0
- package/lib/theme/BlogPostItem/Header/Info/styles.module.css +10 -0
- package/lib/theme/BlogPostItem/Header/Title/index.d.ts +9 -0
- package/lib/theme/BlogPostItem/Header/Title/index.js +27 -0
- package/{src/theme/BlogPostItem → lib/theme/BlogPostItem/Header/Title}/styles.module.css +2 -10
- package/lib/theme/BlogPostItem/Header/index.d.ts +8 -0
- package/lib/theme/BlogPostItem/Header/index.js +19 -0
- package/lib/theme/BlogPostItem/index.d.ts +1 -1
- package/lib/theme/BlogPostItem/index.js +16 -142
- package/lib/theme/BlogPostItems/index.d.ts +9 -0
- package/lib/theme/BlogPostItems/index.js +27 -0
- package/lib/theme/BlogPostPage/Metadata/index.d.ts +8 -0
- package/lib/theme/BlogPostPage/Metadata/index.js +41 -0
- package/lib/theme/BlogPostPage/index.js +21 -60
- package/lib/theme/BlogTagsListPage/index.js +1 -1
- package/lib/theme/BlogTagsPostsPage/index.d.ts +1 -1
- package/lib/theme/BlogTagsPostsPage/index.js +36 -30
- package/lib/theme/CodeBlock/Container/index.js +2 -5
- package/lib/theme/CodeBlock/Content/String.js +2 -3
- package/lib/theme/CodeBlock/CopyButton/index.js +1 -0
- package/lib/theme/CodeBlock/Line/styles.module.css +7 -7
- package/lib/theme/ColorModeToggle/index.js +2 -2
- package/lib/theme/DocBreadcrumbs/index.js +3 -3
- package/lib/theme/DocCard/index.js +4 -1
- package/lib/theme/DocCardList/index.js +2 -2
- package/lib/theme/DocItem/Content/index.d.ts +9 -0
- package/lib/theme/DocItem/Content/index.js +44 -0
- package/lib/theme/DocItem/Footer/index.d.ts +8 -0
- package/lib/theme/{DocItemFooter → DocItem/Footer}/index.js +3 -3
- package/lib/theme/{DocItemFooter → DocItem/Footer}/styles.module.css +0 -0
- package/lib/theme/{BlogPostAuthor → DocItem/Layout}/index.d.ts +2 -2
- package/lib/theme/DocItem/Layout/index.js +59 -0
- package/lib/theme/DocItem/Layout/styles.module.css +17 -0
- package/lib/theme/DocItem/Metadata/index.d.ts +8 -0
- package/lib/theme/DocItem/Metadata/index.js +20 -0
- package/lib/theme/{DocItemFooter → DocItem/Paginator}/index.d.ts +5 -3
- package/lib/theme/DocItem/Paginator/index.js +17 -0
- package/lib/theme/DocItem/TOC/Desktop/index.d.ts +8 -0
- package/lib/theme/DocItem/TOC/Desktop/index.js +21 -0
- package/lib/theme/DocItem/TOC/Mobile/index.d.ts +8 -0
- package/lib/theme/DocItem/TOC/Mobile/index.js +23 -0
- package/lib/theme/DocItem/{styles.module.css → TOC/Mobile/styles.module.css} +0 -9
- package/lib/theme/DocItem/index.js +13 -106
- package/lib/theme/DocPage/Layout/Main/index.js +1 -1
- package/lib/theme/DocPage/Layout/Sidebar/ExpandButton/index.js +1 -1
- package/lib/theme/DocPage/Layout/Sidebar/index.js +2 -1
- package/lib/theme/DocPage/Layout/index.js +1 -1
- package/lib/theme/DocPage/index.js +2 -3
- package/lib/theme/DocSidebar/Desktop/CollapseButton/index.js +1 -1
- package/lib/theme/DocSidebar/Desktop/Content/index.js +2 -2
- package/lib/theme/DocSidebar/Mobile/index.js +1 -1
- package/lib/theme/DocSidebarItem/Category/index.js +6 -4
- package/lib/theme/DocSidebarItem/Link/index.js +3 -2
- package/lib/theme/DocSidebarItems/index.js +1 -1
- package/lib/theme/DocVersionBadge/index.js +2 -1
- package/lib/theme/DocVersionBanner/index.js +2 -2
- package/lib/theme/EditThisPage/index.js +1 -1
- package/lib/theme/Footer/LinkItem/index.js +1 -1
- package/lib/theme/Footer/Logo/index.js +7 -2
- package/lib/theme/{IconArrow → Icon/Arrow}/index.d.ts +1 -1
- package/lib/theme/{IconArrow → Icon/Arrow}/index.js +0 -0
- package/lib/theme/{IconClose → Icon/Close}/index.d.ts +1 -1
- package/lib/theme/{IconClose → Icon/Close}/index.js +0 -0
- package/lib/theme/{IconDarkMode → Icon/DarkMode}/index.d.ts +1 -1
- package/lib/theme/{IconDarkMode → Icon/DarkMode}/index.js +0 -0
- package/lib/theme/{IconEdit → Icon/Edit}/index.d.ts +1 -1
- package/lib/theme/{IconEdit → Icon/Edit}/index.js +0 -0
- package/lib/theme/{IconEdit → Icon/Edit}/styles.module.css +0 -0
- package/lib/theme/{IconExternalLink → Icon/ExternalLink}/index.d.ts +1 -1
- package/lib/theme/{IconExternalLink → Icon/ExternalLink}/index.js +0 -0
- package/lib/theme/{IconExternalLink → Icon/ExternalLink}/styles.module.css +0 -0
- package/lib/theme/{IconHome → Icon/Home}/index.d.ts +1 -1
- package/lib/theme/{IconHome → Icon/Home}/index.js +0 -0
- package/lib/theme/{IconLanguage → Icon/Language}/index.d.ts +1 -1
- package/lib/theme/{IconLanguage → Icon/Language}/index.js +0 -0
- package/lib/theme/{IconLightMode → Icon/LightMode}/index.d.ts +1 -1
- package/lib/theme/{IconLightMode → Icon/LightMode}/index.js +0 -0
- package/lib/theme/{IconMenu → Icon/Menu}/index.d.ts +1 -1
- package/lib/theme/{IconMenu → Icon/Menu}/index.js +0 -0
- package/lib/theme/Layout/Provider/index.d.ts +9 -0
- package/lib/theme/Layout/Provider/index.js +29 -0
- package/lib/theme/Layout/index.d.ts +0 -1
- package/lib/theme/Layout/index.js +12 -10
- package/{src/theme/Layout/styles.css → lib/theme/Layout/styles.module.css} +10 -12
- package/lib/theme/Logo/index.js +35 -17
- package/lib/theme/MDXComponents/Code.js +1 -1
- package/lib/theme/MDXComponents/index.js +2 -0
- package/lib/theme/MDXPage/index.js +6 -4
- package/lib/theme/Navbar/Content/index.js +2 -2
- package/lib/theme/Navbar/Layout/index.js +2 -2
- package/lib/theme/Navbar/MobileSidebar/Header/index.js +2 -2
- package/lib/theme/Navbar/MobileSidebar/Layout/index.js +1 -1
- package/lib/theme/Navbar/MobileSidebar/PrimaryMenu/index.js +2 -1
- package/lib/theme/Navbar/MobileSidebar/SecondaryMenu/index.js +2 -1
- package/lib/theme/Navbar/MobileSidebar/Toggle/index.js +2 -2
- package/lib/theme/Navbar/MobileSidebar/index.js +1 -1
- package/lib/theme/NavbarItem/DocNavbarItem.js +1 -1
- package/lib/theme/NavbarItem/DocSidebarNavbarItem.js +1 -1
- package/lib/theme/NavbarItem/DocsVersionDropdownNavbarItem.js +2 -4
- package/lib/theme/NavbarItem/DocsVersionNavbarItem.js +1 -1
- package/lib/theme/NavbarItem/DropdownNavbarItem.js +2 -3
- package/lib/theme/NavbarItem/LocaleDropdownNavbarItem/index.js +2 -2
- package/lib/theme/NavbarItem/NavbarNavLink.js +1 -1
- package/lib/theme/SiteMetadata/index.js +2 -3
- package/lib/theme/SkipToContent/index.js +1 -1
- package/lib/theme/TOCItems/index.js +2 -2
- package/lib/theme/Tabs/index.js +2 -2
- package/lib/validateThemeConfig.js +13 -18
- package/package.json +19 -15
- package/src/getSwizzleConfig.ts +5 -5
- package/src/index.ts +4 -2
- package/src/theme/Admonition/index.tsx +161 -58
- package/src/{admonitions.css → theme/Admonition/styles.module.css} +14 -15
- package/src/theme/AnnouncementBar/index.tsx +3 -2
- package/src/theme/BackToTopButton/index.tsx +2 -1
- package/src/theme/BlogListPage/index.tsx +2 -11
- package/src/theme/BlogPostItem/Container/index.tsx +32 -0
- package/src/theme/BlogPostItem/Content/index.tsx +29 -0
- package/src/theme/BlogPostItem/Footer/ReadMoreLink/index.tsx +44 -0
- package/src/theme/BlogPostItem/Footer/index.tsx +60 -0
- package/src/theme/BlogPostItem/Footer/styles.module.css +10 -0
- package/src/theme/{BlogPostAuthor → BlogPostItem/Header/Author}/index.tsx +8 -3
- package/{lib/theme/BlogPostAuthors/index.js → src/theme/BlogPostItem/Header/Authors/index.tsx} +14 -3
- package/src/theme/{BlogPostAuthors → BlogPostItem/Header/Authors}/styles.module.css +0 -0
- package/src/theme/BlogPostItem/Header/Info/index.tsx +71 -0
- package/src/theme/BlogPostItem/Header/Info/styles.module.css +10 -0
- package/src/theme/BlogPostItem/Header/Title/index.tsx +33 -0
- package/{lib/theme/BlogPostItem → src/theme/BlogPostItem/Header/Title}/styles.module.css +2 -10
- package/src/theme/BlogPostItem/Header/index.tsx +21 -0
- package/src/theme/BlogPostItem/index.tsx +19 -145
- package/src/theme/BlogPostItems/index.tsx +30 -0
- package/src/theme/BlogPostPage/Metadata/index.tsx +44 -0
- package/src/theme/BlogPostPage/index.tsx +29 -62
- package/src/theme/BlogTagsListPage/index.tsx +1 -1
- package/src/theme/BlogTagsPostsPage/index.tsx +42 -35
- package/src/theme/CodeBlock/Container/index.tsx +3 -6
- package/src/theme/CodeBlock/Content/String.tsx +2 -3
- package/src/theme/CodeBlock/CopyButton/index.tsx +1 -0
- package/src/theme/CodeBlock/Line/styles.module.css +7 -7
- package/src/theme/ColorModeToggle/index.tsx +2 -2
- package/src/theme/DocBreadcrumbs/index.tsx +3 -3
- package/src/theme/DocCard/index.tsx +4 -1
- package/src/theme/DocCardList/index.tsx +2 -2
- package/src/theme/DocItem/Content/index.tsx +48 -0
- package/src/theme/{DocItemFooter → DocItem/Footer}/index.tsx +4 -5
- package/src/theme/{DocItemFooter → DocItem/Footer}/styles.module.css +0 -0
- package/src/theme/DocItem/Layout/index.tsx +68 -0
- package/src/theme/DocItem/Layout/styles.module.css +17 -0
- package/src/theme/DocItem/Metadata/index.tsx +22 -0
- package/src/theme/DocItem/Paginator/index.tsx +19 -0
- package/src/theme/DocItem/TOC/Desktop/index.tsx +24 -0
- package/src/theme/DocItem/TOC/Mobile/index.tsx +27 -0
- package/src/theme/DocItem/{styles.module.css → TOC/Mobile/styles.module.css} +0 -9
- package/src/theme/DocItem/index.tsx +13 -115
- package/src/theme/DocPage/Layout/Main/index.tsx +1 -1
- package/src/theme/DocPage/Layout/Sidebar/ExpandButton/index.tsx +1 -1
- package/src/theme/DocPage/Layout/Sidebar/index.tsx +2 -1
- package/src/theme/DocPage/Layout/index.tsx +1 -1
- package/src/theme/DocPage/index.tsx +2 -3
- package/src/theme/DocPaginator/index.tsx +0 -1
- package/src/theme/DocSidebar/Desktop/CollapseButton/index.tsx +1 -1
- package/src/theme/DocSidebar/Desktop/Content/index.tsx +2 -2
- package/src/theme/DocSidebar/Mobile/index.tsx +1 -1
- package/src/theme/DocSidebarItem/Category/index.tsx +6 -4
- package/src/theme/DocSidebarItem/Link/index.tsx +3 -2
- package/src/theme/DocSidebarItems/index.tsx +1 -1
- package/src/theme/DocVersionBadge/index.tsx +2 -1
- package/src/theme/DocVersionBanner/index.tsx +2 -3
- package/src/theme/EditThisPage/index.tsx +1 -1
- package/src/theme/Footer/LinkItem/index.tsx +1 -1
- package/src/theme/Footer/Logo/index.tsx +7 -2
- package/src/theme/{IconArrow → Icon/Arrow}/index.tsx +1 -1
- package/src/theme/{IconClose → Icon/Close}/index.tsx +1 -1
- package/src/theme/{IconDarkMode → Icon/DarkMode}/index.tsx +1 -1
- package/src/theme/{IconEdit → Icon/Edit}/index.tsx +1 -1
- package/src/theme/{IconEdit → Icon/Edit}/styles.module.css +0 -0
- package/src/theme/{IconExternalLink → Icon/ExternalLink}/index.tsx +1 -1
- package/src/theme/{IconExternalLink → Icon/ExternalLink}/styles.module.css +0 -0
- package/src/theme/{IconHome → Icon/Home}/index.tsx +1 -1
- package/src/theme/{IconLanguage → Icon/Language}/index.tsx +1 -1
- package/src/theme/{IconLightMode → Icon/LightMode}/index.tsx +1 -1
- package/src/theme/{IconMenu → Icon/Menu}/index.tsx +1 -1
- package/src/theme/Layout/Provider/index.tsx +33 -0
- package/src/theme/Layout/index.tsx +12 -10
- package/{lib/theme/Layout/styles.css → src/theme/Layout/styles.module.css} +10 -12
- package/src/theme/Logo/index.tsx +49 -19
- package/src/theme/MDXComponents/Code.tsx +5 -2
- package/src/theme/MDXComponents/Details.tsx +2 -1
- package/src/theme/MDXComponents/Head.tsx +3 -5
- package/src/theme/MDXComponents/Pre.tsx +2 -1
- package/src/theme/MDXComponents/index.tsx +2 -0
- package/src/theme/MDXPage/index.tsx +6 -4
- package/src/theme/Navbar/Content/index.tsx +2 -2
- package/src/theme/Navbar/Layout/index.tsx +2 -2
- package/src/theme/Navbar/MobileSidebar/Header/index.tsx +2 -2
- package/src/theme/Navbar/MobileSidebar/Layout/index.tsx +1 -1
- package/src/theme/Navbar/MobileSidebar/PrimaryMenu/index.tsx +2 -1
- package/src/theme/Navbar/MobileSidebar/SecondaryMenu/index.tsx +2 -1
- package/src/theme/Navbar/MobileSidebar/Toggle/index.tsx +2 -2
- package/src/theme/Navbar/MobileSidebar/index.tsx +1 -1
- package/src/theme/NavbarItem/DocNavbarItem.tsx +1 -1
- package/src/theme/NavbarItem/DocSidebarNavbarItem.tsx +1 -1
- package/src/theme/NavbarItem/DocsVersionDropdownNavbarItem.tsx +2 -4
- package/src/theme/NavbarItem/DocsVersionNavbarItem.tsx +1 -1
- package/src/theme/NavbarItem/DropdownNavbarItem.tsx +2 -3
- package/src/theme/NavbarItem/LocaleDropdownNavbarItem/index.tsx +2 -2
- package/src/theme/NavbarItem/NavbarNavLink.tsx +1 -1
- package/src/theme/NavbarItem/index.tsx +1 -1
- package/src/theme/SiteMetadata/index.tsx +2 -3
- package/src/theme/SkipToContent/index.tsx +1 -1
- package/src/theme/TOCItems/index.tsx +3 -3
- package/src/theme/Tabs/index.tsx +2 -2
- package/src/theme-classic.d.ts +128 -36
- package/src/validateThemeConfig.ts +14 -18
- package/lib/theme/LayoutProviders/index.d.ts +0 -9
- package/lib/theme/LayoutProviders/index.js +0 -33
- package/src/theme/LayoutProviders/index.tsx +0 -36
package/lib/theme/Logo/index.js
CHANGED
|
@@ -10,38 +10,56 @@ import useBaseUrl from '@docusaurus/useBaseUrl';
|
|
|
10
10
|
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
|
11
11
|
import {useThemeConfig} from '@docusaurus/theme-common';
|
|
12
12
|
import ThemedImage from '@theme/ThemedImage';
|
|
13
|
-
|
|
14
|
-
const {
|
|
15
|
-
siteConfig: {title},
|
|
16
|
-
} = useDocusaurusContext();
|
|
17
|
-
const {
|
|
18
|
-
navbar: {title: navbarTitle, logo = {src: ''}},
|
|
19
|
-
} = useThemeConfig();
|
|
20
|
-
const {imageClassName, titleClassName, ...propsRest} = props;
|
|
21
|
-
const logoLink = useBaseUrl(logo.href || '/');
|
|
13
|
+
function LogoThemedImage({logo, alt, imageClassName}) {
|
|
22
14
|
const sources = {
|
|
23
15
|
light: useBaseUrl(logo.src),
|
|
24
16
|
dark: useBaseUrl(logo.srcDark || logo.src),
|
|
25
17
|
};
|
|
26
18
|
const themedImage = (
|
|
27
19
|
<ThemedImage
|
|
20
|
+
className={logo.className}
|
|
28
21
|
sources={sources}
|
|
29
22
|
height={logo.height}
|
|
30
23
|
width={logo.width}
|
|
31
|
-
alt={
|
|
24
|
+
alt={alt}
|
|
25
|
+
style={logo.style}
|
|
32
26
|
/>
|
|
33
27
|
);
|
|
28
|
+
// Is this extra div really necessary?
|
|
29
|
+
// introduced in https://github.com/facebook/docusaurus/pull/5666
|
|
30
|
+
return imageClassName ? (
|
|
31
|
+
<div className={imageClassName}>{themedImage}</div>
|
|
32
|
+
) : (
|
|
33
|
+
themedImage
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
export default function Logo(props) {
|
|
37
|
+
const {
|
|
38
|
+
siteConfig: {title},
|
|
39
|
+
} = useDocusaurusContext();
|
|
40
|
+
const {
|
|
41
|
+
navbar: {title: navbarTitle, logo},
|
|
42
|
+
} = useThemeConfig();
|
|
43
|
+
const {imageClassName, titleClassName, ...propsRest} = props;
|
|
44
|
+
const logoLink = useBaseUrl(logo?.href || '/');
|
|
45
|
+
// If visible title is shown, fallback alt text should be
|
|
46
|
+
// an empty string to mark the logo as decorative.
|
|
47
|
+
const fallbackAlt = navbarTitle ? '' : title;
|
|
48
|
+
// Use logo alt text if provided (including empty string),
|
|
49
|
+
// and provide a sensible fallback otherwise.
|
|
50
|
+
const alt = logo?.alt ?? fallbackAlt;
|
|
34
51
|
return (
|
|
35
52
|
<Link
|
|
36
53
|
to={logoLink}
|
|
37
54
|
{...propsRest}
|
|
38
|
-
{...(logo
|
|
39
|
-
{logo
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
55
|
+
{...(logo?.target && {target: logo.target})}>
|
|
56
|
+
{logo && (
|
|
57
|
+
<LogoThemedImage
|
|
58
|
+
logo={logo}
|
|
59
|
+
alt={alt}
|
|
60
|
+
imageClassName={imageClassName}
|
|
61
|
+
/>
|
|
62
|
+
)}
|
|
45
63
|
{navbarTitle != null && <b className={titleClassName}>{navbarTitle}</b>}
|
|
46
64
|
</Link>
|
|
47
65
|
);
|
|
@@ -22,7 +22,7 @@ export default function MDXCode(props) {
|
|
|
22
22
|
const shouldBeInline = React.Children.toArray(props.children).every(
|
|
23
23
|
(el) =>
|
|
24
24
|
(typeof el === 'string' && !el.includes('\n')) ||
|
|
25
|
-
(isValidElement(el) && inlineElements.includes(el.props
|
|
25
|
+
(isValidElement(el) && inlineElements.includes(el.props?.mdxType)),
|
|
26
26
|
);
|
|
27
27
|
return shouldBeInline ? <code {...props} /> : <CodeBlock {...props} />;
|
|
28
28
|
}
|
|
@@ -13,6 +13,7 @@ import MDXDetails from '@theme/MDXComponents/Details';
|
|
|
13
13
|
import MDXHeading from '@theme/MDXComponents/Heading';
|
|
14
14
|
import MDXUl from '@theme/MDXComponents/Ul';
|
|
15
15
|
import MDXImg from '@theme/MDXComponents/Img';
|
|
16
|
+
import Admonition from '@theme/Admonition';
|
|
16
17
|
const MDXComponents = {
|
|
17
18
|
head: MDXHead,
|
|
18
19
|
code: MDXCode,
|
|
@@ -27,5 +28,6 @@ const MDXComponents = {
|
|
|
27
28
|
h4: (props) => <MDXHeading as="h4" {...props} />,
|
|
28
29
|
h5: (props) => <MDXHeading as="h5" {...props} />,
|
|
29
30
|
h6: (props) => <MDXHeading as="h6" {...props} />,
|
|
31
|
+
admonition: Admonition,
|
|
30
32
|
};
|
|
31
33
|
export default MDXComponents;
|
|
@@ -33,11 +33,13 @@ export default function MDXPage(props) {
|
|
|
33
33
|
<main className="container container--fluid margin-vert--lg">
|
|
34
34
|
<div className={clsx('row', styles.mdxPageWrapper)}>
|
|
35
35
|
<div className={clsx('col', !hideTableOfContents && 'col--8')}>
|
|
36
|
-
<
|
|
37
|
-
<
|
|
38
|
-
|
|
36
|
+
<article>
|
|
37
|
+
<MDXContent>
|
|
38
|
+
<MDXPageContent />
|
|
39
|
+
</MDXContent>
|
|
40
|
+
</article>
|
|
39
41
|
</div>
|
|
40
|
-
{!hideTableOfContents && MDXPageContent.toc && (
|
|
42
|
+
{!hideTableOfContents && MDXPageContent.toc.length > 0 && (
|
|
41
43
|
<div className="col col--2">
|
|
42
44
|
<TOC
|
|
43
45
|
toc={MDXPageContent.toc}
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
|
+
import {useThemeConfig} from '@docusaurus/theme-common';
|
|
8
9
|
import {
|
|
9
10
|
splitNavbarItems,
|
|
10
11
|
useNavbarMobileSidebar,
|
|
11
|
-
|
|
12
|
-
} from '@docusaurus/theme-common';
|
|
12
|
+
} from '@docusaurus/theme-common/internal';
|
|
13
13
|
import NavbarItem from '@theme/NavbarItem';
|
|
14
14
|
import NavbarColorModeToggle from '@theme/Navbar/ColorModeToggle';
|
|
15
15
|
import SearchBar from '@theme/SearchBar';
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import clsx from 'clsx';
|
|
9
|
+
import {useThemeConfig} from '@docusaurus/theme-common';
|
|
9
10
|
import {
|
|
10
|
-
useThemeConfig,
|
|
11
11
|
useHideableNavbar,
|
|
12
12
|
useNavbarMobileSidebar,
|
|
13
|
-
} from '@docusaurus/theme-common';
|
|
13
|
+
} from '@docusaurus/theme-common/internal';
|
|
14
14
|
import NavbarMobileSidebar from '@theme/Navbar/MobileSidebar';
|
|
15
15
|
import styles from './styles.module.css';
|
|
16
16
|
function NavbarBackdrop(props) {
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
|
-
import {useNavbarMobileSidebar} from '@docusaurus/theme-common';
|
|
8
|
+
import {useNavbarMobileSidebar} from '@docusaurus/theme-common/internal';
|
|
9
9
|
import NavbarColorModeToggle from '@theme/Navbar/ColorModeToggle';
|
|
10
|
-
import IconClose from '@theme/
|
|
10
|
+
import IconClose from '@theme/Icon/Close';
|
|
11
11
|
import NavbarLogo from '@theme/Navbar/Logo';
|
|
12
12
|
function CloseButton() {
|
|
13
13
|
const mobileSidebar = useNavbarMobileSidebar();
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import clsx from 'clsx';
|
|
9
|
-
import {useNavbarSecondaryMenu} from '@docusaurus/theme-common';
|
|
9
|
+
import {useNavbarSecondaryMenu} from '@docusaurus/theme-common/internal';
|
|
10
10
|
export default function NavbarMobileSidebarLayout({
|
|
11
11
|
header,
|
|
12
12
|
primaryMenu,
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
|
-
import {
|
|
8
|
+
import {useThemeConfig} from '@docusaurus/theme-common';
|
|
9
|
+
import {useNavbarMobileSidebar} from '@docusaurus/theme-common/internal';
|
|
9
10
|
import NavbarItem from '@theme/NavbarItem';
|
|
10
11
|
function useNavbarItems() {
|
|
11
12
|
// TODO temporary casting until ThemeConfig type is improved
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
|
-
import {
|
|
8
|
+
import {useThemeConfig} from '@docusaurus/theme-common';
|
|
9
|
+
import {useNavbarSecondaryMenu} from '@docusaurus/theme-common/internal';
|
|
9
10
|
import Translate from '@docusaurus/Translate';
|
|
10
11
|
function SecondaryMenuBackButton(props) {
|
|
11
12
|
return (
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
|
-
import {useNavbarMobileSidebar} from '@docusaurus/theme-common';
|
|
9
|
-
import IconMenu from '@theme/
|
|
8
|
+
import {useNavbarMobileSidebar} from '@docusaurus/theme-common/internal';
|
|
9
|
+
import IconMenu from '@theme/Icon/Menu';
|
|
10
10
|
export default function MobileSidebarToggle() {
|
|
11
11
|
const mobileSidebar = useNavbarMobileSidebar();
|
|
12
12
|
return (
|
|
@@ -8,7 +8,7 @@ import React from 'react';
|
|
|
8
8
|
import {
|
|
9
9
|
useLockBodyScroll,
|
|
10
10
|
useNavbarMobileSidebar,
|
|
11
|
-
} from '@docusaurus/theme-common';
|
|
11
|
+
} from '@docusaurus/theme-common/internal';
|
|
12
12
|
import NavbarMobileSidebarLayout from '@theme/Navbar/MobileSidebar/Layout';
|
|
13
13
|
import NavbarMobileSidebarHeader from '@theme/Navbar/MobileSidebar/Header';
|
|
14
14
|
import NavbarMobileSidebarPrimaryMenu from '@theme/Navbar/MobileSidebar/PrimaryMenu';
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import {useActiveDocContext} from '@docusaurus/plugin-content-docs/client';
|
|
9
|
-
import {useLayoutDoc} from '@docusaurus/theme-common';
|
|
9
|
+
import {useLayoutDoc} from '@docusaurus/theme-common/internal';
|
|
10
10
|
import DefaultNavbarItem from '@theme/NavbarItem/DefaultNavbarItem';
|
|
11
11
|
export default function DocNavbarItem({
|
|
12
12
|
docId,
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import {useActiveDocContext} from '@docusaurus/plugin-content-docs/client';
|
|
9
|
-
import {useLayoutDocsSidebar} from '@docusaurus/theme-common';
|
|
9
|
+
import {useLayoutDocsSidebar} from '@docusaurus/theme-common/internal';
|
|
10
10
|
import DefaultNavbarItem from '@theme/NavbarItem/DefaultNavbarItem';
|
|
11
11
|
export default function DocSidebarNavbarItem({
|
|
12
12
|
sidebarId,
|
|
@@ -9,10 +9,8 @@ import {
|
|
|
9
9
|
useVersions,
|
|
10
10
|
useActiveDocContext,
|
|
11
11
|
} from '@docusaurus/plugin-content-docs/client';
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
useDocsVersionCandidates,
|
|
15
|
-
} from '@docusaurus/theme-common';
|
|
12
|
+
import {useDocsPreferredVersion} from '@docusaurus/theme-common';
|
|
13
|
+
import {useDocsVersionCandidates} from '@docusaurus/theme-common/internal';
|
|
16
14
|
import {translate} from '@docusaurus/Translate';
|
|
17
15
|
import DefaultNavbarItem from '@theme/NavbarItem/DefaultNavbarItem';
|
|
18
16
|
import DropdownNavbarItem from '@theme/NavbarItem/DropdownNavbarItem';
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
|
-
import {useDocsVersionCandidates} from '@docusaurus/theme-common';
|
|
8
|
+
import {useDocsVersionCandidates} from '@docusaurus/theme-common/internal';
|
|
9
9
|
import DefaultNavbarItem from '@theme/NavbarItem/DefaultNavbarItem';
|
|
10
10
|
const getVersionMainDoc = (version) =>
|
|
11
11
|
version.docs.find((doc) => doc.id === version.mainDocId);
|
|
@@ -7,12 +7,11 @@
|
|
|
7
7
|
import React, {useState, useRef, useEffect} from 'react';
|
|
8
8
|
import clsx from 'clsx';
|
|
9
9
|
import {
|
|
10
|
-
|
|
10
|
+
isRegexpStringMatch,
|
|
11
11
|
useCollapsible,
|
|
12
12
|
Collapsible,
|
|
13
|
-
isRegexpStringMatch,
|
|
14
|
-
useLocalPathname,
|
|
15
13
|
} from '@docusaurus/theme-common';
|
|
14
|
+
import {isSamePath, useLocalPathname} from '@docusaurus/theme-common/internal';
|
|
16
15
|
import NavbarNavLink from '@theme/NavbarItem/NavbarNavLink';
|
|
17
16
|
import NavbarItem from '@theme/NavbarItem';
|
|
18
17
|
function isItemActive(item, localPathname) {
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
|
9
|
-
import {useAlternatePageUtils} from '@docusaurus/theme-common';
|
|
9
|
+
import {useAlternatePageUtils} from '@docusaurus/theme-common/internal';
|
|
10
10
|
import {translate} from '@docusaurus/Translate';
|
|
11
11
|
import DropdownNavbarItem from '@theme/NavbarItem/DropdownNavbarItem';
|
|
12
|
-
import IconLanguage from '@theme/
|
|
12
|
+
import IconLanguage from '@theme/Icon/Language';
|
|
13
13
|
import styles from './styles.module.css';
|
|
14
14
|
export default function LocaleDropdownNavbarItem({
|
|
15
15
|
mobile,
|
|
@@ -9,7 +9,7 @@ import Link from '@docusaurus/Link';
|
|
|
9
9
|
import useBaseUrl from '@docusaurus/useBaseUrl';
|
|
10
10
|
import isInternalUrl from '@docusaurus/isInternalUrl';
|
|
11
11
|
import {isRegexpStringMatch} from '@docusaurus/theme-common';
|
|
12
|
-
import IconExternalLink from '@theme/
|
|
12
|
+
import IconExternalLink from '@theme/Icon/ExternalLink';
|
|
13
13
|
export default function NavbarNavLink({
|
|
14
14
|
activeBasePath,
|
|
15
15
|
activeBaseRegex,
|
|
@@ -8,13 +8,12 @@ import React from 'react';
|
|
|
8
8
|
import Head from '@docusaurus/Head';
|
|
9
9
|
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
|
10
10
|
import useBaseUrl from '@docusaurus/useBaseUrl';
|
|
11
|
+
import {PageMetadata, useThemeConfig} from '@docusaurus/theme-common';
|
|
11
12
|
import {
|
|
12
|
-
PageMetadata,
|
|
13
13
|
DEFAULT_SEARCH_TAG,
|
|
14
14
|
useAlternatePageUtils,
|
|
15
|
-
useThemeConfig,
|
|
16
15
|
keyboardFocusedClassName,
|
|
17
|
-
} from '@docusaurus/theme-common';
|
|
16
|
+
} from '@docusaurus/theme-common/internal';
|
|
18
17
|
import {useLocation} from '@docusaurus/router';
|
|
19
18
|
import SearchMetadata from '@theme/SearchMetadata';
|
|
20
19
|
// TODO move to SiteMetadataDefaults or theme-common ?
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import Translate from '@docusaurus/Translate';
|
|
9
|
-
import {useSkipToContent} from '@docusaurus/theme-common';
|
|
9
|
+
import {useSkipToContent} from '@docusaurus/theme-common/internal';
|
|
10
10
|
import styles from './styles.module.css';
|
|
11
11
|
export default function SkipToContent() {
|
|
12
12
|
const {containerRef, handleSkip} = useSkipToContent();
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
import React, {useMemo} from 'react';
|
|
8
|
+
import {useThemeConfig} from '@docusaurus/theme-common';
|
|
8
9
|
import {
|
|
9
|
-
useThemeConfig,
|
|
10
10
|
useTOCHighlight,
|
|
11
11
|
useFilteredAndTreeifiedTOC,
|
|
12
|
-
} from '@docusaurus/theme-common';
|
|
12
|
+
} from '@docusaurus/theme-common/internal';
|
|
13
13
|
import TOCItemTree from '@theme/TOCItems/Tree';
|
|
14
14
|
export default function TOCItems({
|
|
15
15
|
toc,
|
package/lib/theme/Tabs/index.js
CHANGED
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
import React, {useState, cloneElement, isValidElement} from 'react';
|
|
8
8
|
import clsx from 'clsx';
|
|
9
9
|
import useIsBrowser from '@docusaurus/useIsBrowser';
|
|
10
|
+
import {duplicates} from '@docusaurus/theme-common';
|
|
10
11
|
import {
|
|
11
12
|
useScrollPositionBlocker,
|
|
12
|
-
duplicates,
|
|
13
13
|
useTabGroupChoice,
|
|
14
|
-
} from '@docusaurus/theme-common';
|
|
14
|
+
} from '@docusaurus/theme-common/internal';
|
|
15
15
|
import styles from './styles.module.css';
|
|
16
16
|
// A very rough duck type, but good enough to guard against mistakes while
|
|
17
17
|
// allowing customization
|
|
@@ -268,6 +268,17 @@ const FooterLinkItemSchema = utils_validation_1.Joi.object({
|
|
|
268
268
|
const CustomCssSchema = utils_validation_1.Joi.alternatives()
|
|
269
269
|
.try(utils_validation_1.Joi.array().items(utils_validation_1.Joi.string().required()), utils_validation_1.Joi.string().required())
|
|
270
270
|
.optional();
|
|
271
|
+
const LogoSchema = utils_validation_1.Joi.object({
|
|
272
|
+
alt: utils_validation_1.Joi.string().allow(''),
|
|
273
|
+
src: utils_validation_1.Joi.string().required(),
|
|
274
|
+
srcDark: utils_validation_1.Joi.string(),
|
|
275
|
+
width: utils_validation_1.Joi.alternatives().try(utils_validation_1.Joi.string(), utils_validation_1.Joi.number()),
|
|
276
|
+
height: utils_validation_1.Joi.alternatives().try(utils_validation_1.Joi.string(), utils_validation_1.Joi.number()),
|
|
277
|
+
href: utils_validation_1.Joi.string(),
|
|
278
|
+
target: utils_validation_1.Joi.string(),
|
|
279
|
+
style: utils_validation_1.Joi.object(),
|
|
280
|
+
className: utils_validation_1.Joi.string(),
|
|
281
|
+
});
|
|
271
282
|
exports.ThemeConfigSchema = utils_validation_1.Joi.object({
|
|
272
283
|
// TODO temporary (@alpha-58)
|
|
273
284
|
// @ts-expect-error: forbidden
|
|
@@ -309,27 +320,11 @@ exports.ThemeConfigSchema = utils_validation_1.Joi.object({
|
|
|
309
320
|
.items(NavbarItemSchema)
|
|
310
321
|
.default(exports.DEFAULT_CONFIG.navbar.items),
|
|
311
322
|
title: utils_validation_1.Joi.string().allow('', null),
|
|
312
|
-
logo:
|
|
313
|
-
alt: utils_validation_1.Joi.string().allow(''),
|
|
314
|
-
src: utils_validation_1.Joi.string().required(),
|
|
315
|
-
srcDark: utils_validation_1.Joi.string(),
|
|
316
|
-
width: utils_validation_1.Joi.alternatives().try(utils_validation_1.Joi.string(), utils_validation_1.Joi.number()),
|
|
317
|
-
height: utils_validation_1.Joi.alternatives().try(utils_validation_1.Joi.string(), utils_validation_1.Joi.number()),
|
|
318
|
-
href: utils_validation_1.Joi.string(),
|
|
319
|
-
target: utils_validation_1.Joi.string(),
|
|
320
|
-
}),
|
|
323
|
+
logo: LogoSchema,
|
|
321
324
|
}).default(exports.DEFAULT_CONFIG.navbar),
|
|
322
325
|
footer: utils_validation_1.Joi.object({
|
|
323
326
|
style: utils_validation_1.Joi.string().equal('dark', 'light').default('light'),
|
|
324
|
-
logo:
|
|
325
|
-
alt: utils_validation_1.Joi.string().allow(''),
|
|
326
|
-
src: utils_validation_1.Joi.string().required(),
|
|
327
|
-
srcDark: utils_validation_1.Joi.string(),
|
|
328
|
-
// TODO infer this from reading the image
|
|
329
|
-
width: utils_validation_1.Joi.alternatives().try(utils_validation_1.Joi.string(), utils_validation_1.Joi.number()),
|
|
330
|
-
height: utils_validation_1.Joi.alternatives().try(utils_validation_1.Joi.string(), utils_validation_1.Joi.number()),
|
|
331
|
-
href: utils_validation_1.Joi.string(),
|
|
332
|
-
}),
|
|
327
|
+
logo: LogoSchema,
|
|
333
328
|
copyright: utils_validation_1.Joi.string(),
|
|
334
329
|
links: utils_validation_1.Joi.alternatives(utils_validation_1.Joi.array().items(utils_validation_1.Joi.object({
|
|
335
330
|
title: utils_validation_1.Joi.string().allow(null).default(null),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/theme-classic",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.22",
|
|
4
4
|
"description": "Classic theme for Docusaurus",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "src/theme-classic.d.ts",
|
|
@@ -20,27 +20,31 @@
|
|
|
20
20
|
"copy:watch": "node ../../admin/scripts/copyUntypedFiles.js --watch"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@docusaurus/core": "2.0.0-beta.
|
|
24
|
-
"@docusaurus/
|
|
25
|
-
"@docusaurus/
|
|
26
|
-
"@docusaurus/plugin-content-
|
|
27
|
-
"@docusaurus/
|
|
28
|
-
"@docusaurus/
|
|
29
|
-
"@docusaurus/
|
|
30
|
-
"@docusaurus/
|
|
31
|
-
"@docusaurus/
|
|
23
|
+
"@docusaurus/core": "2.0.0-beta.22",
|
|
24
|
+
"@docusaurus/mdx-loader": "2.0.0-beta.22",
|
|
25
|
+
"@docusaurus/module-type-aliases": "2.0.0-beta.22",
|
|
26
|
+
"@docusaurus/plugin-content-blog": "2.0.0-beta.22",
|
|
27
|
+
"@docusaurus/plugin-content-docs": "2.0.0-beta.22",
|
|
28
|
+
"@docusaurus/plugin-content-pages": "2.0.0-beta.22",
|
|
29
|
+
"@docusaurus/theme-common": "2.0.0-beta.22",
|
|
30
|
+
"@docusaurus/theme-translations": "2.0.0-beta.22",
|
|
31
|
+
"@docusaurus/types": "2.0.0-beta.22",
|
|
32
|
+
"@docusaurus/utils": "2.0.0-beta.22",
|
|
33
|
+
"@docusaurus/utils-common": "2.0.0-beta.22",
|
|
34
|
+
"@docusaurus/utils-validation": "2.0.0-beta.22",
|
|
32
35
|
"@mdx-js/react": "^1.6.22",
|
|
33
|
-
"clsx": "^1.
|
|
36
|
+
"clsx": "^1.2.0",
|
|
34
37
|
"copy-text-to-clipboard": "^3.0.1",
|
|
35
|
-
"infima": "0.2.0-alpha.
|
|
38
|
+
"infima": "0.2.0-alpha.41",
|
|
36
39
|
"lodash": "^4.17.21",
|
|
37
40
|
"nprogress": "^0.2.0",
|
|
38
41
|
"postcss": "^8.4.14",
|
|
39
|
-
"prism-react-renderer": "^1.3.
|
|
42
|
+
"prism-react-renderer": "^1.3.5",
|
|
40
43
|
"prismjs": "^1.28.0",
|
|
41
44
|
"react-router-dom": "^5.3.3",
|
|
42
45
|
"rtlcss": "^3.5.0",
|
|
43
|
-
"tslib": "^2.4.0"
|
|
46
|
+
"tslib": "^2.4.0",
|
|
47
|
+
"utility-types": "^3.10.0"
|
|
44
48
|
},
|
|
45
49
|
"devDependencies": {
|
|
46
50
|
"@docusaurus/module-type-aliases": "2.0.0-beta.21",
|
|
@@ -60,5 +64,5 @@
|
|
|
60
64
|
"engines": {
|
|
61
65
|
"node": ">=16.14"
|
|
62
66
|
},
|
|
63
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "daf9e462c4eebb7ac26a940932311f987e768f87"
|
|
64
68
|
}
|
package/src/getSwizzleConfig.ts
CHANGED
|
@@ -93,35 +93,35 @@ export default function getSwizzleConfig(): SwizzleConfig {
|
|
|
93
93
|
},
|
|
94
94
|
description: 'The footer logo',
|
|
95
95
|
},
|
|
96
|
-
|
|
96
|
+
'Icon/Arrow': {
|
|
97
97
|
actions: {
|
|
98
98
|
eject: 'safe',
|
|
99
99
|
wrap: 'safe',
|
|
100
100
|
},
|
|
101
101
|
description: 'The arrow icon component',
|
|
102
102
|
},
|
|
103
|
-
|
|
103
|
+
'Icon/DarkMode': {
|
|
104
104
|
actions: {
|
|
105
105
|
eject: 'safe',
|
|
106
106
|
wrap: 'safe',
|
|
107
107
|
},
|
|
108
108
|
description: 'The dark mode icon component.',
|
|
109
109
|
},
|
|
110
|
-
|
|
110
|
+
'Icon/Edit': {
|
|
111
111
|
actions: {
|
|
112
112
|
eject: 'safe',
|
|
113
113
|
wrap: 'safe',
|
|
114
114
|
},
|
|
115
115
|
description: 'The edit icon component',
|
|
116
116
|
},
|
|
117
|
-
|
|
117
|
+
'Icon/LightMode': {
|
|
118
118
|
actions: {
|
|
119
119
|
eject: 'safe',
|
|
120
120
|
wrap: 'safe',
|
|
121
121
|
},
|
|
122
122
|
description: 'The light mode icon component.',
|
|
123
123
|
},
|
|
124
|
-
|
|
124
|
+
'Icon/Menu': {
|
|
125
125
|
actions: {
|
|
126
126
|
eject: 'safe',
|
|
127
127
|
wrap: 'safe',
|
package/src/index.ts
CHANGED
|
@@ -29,7 +29,9 @@ const ThemeStorageKey = 'theme';
|
|
|
29
29
|
const noFlashColorMode = ({
|
|
30
30
|
defaultMode,
|
|
31
31
|
respectPrefersColorScheme,
|
|
32
|
-
}: ThemeConfig['colorMode']) =>
|
|
32
|
+
}: ThemeConfig['colorMode']) =>
|
|
33
|
+
/* language=js */
|
|
34
|
+
`(function() {
|
|
33
35
|
var defaultMode = '${defaultMode}';
|
|
34
36
|
var respectPrefersColorScheme = ${respectPrefersColorScheme};
|
|
35
37
|
|
|
@@ -76,6 +78,7 @@ const AnnouncementBarDismissDataAttribute =
|
|
|
76
78
|
// We always render the announcement bar html on the server, to prevent layout
|
|
77
79
|
// shifts on React hydration. The theme can use CSS + the data attribute to hide
|
|
78
80
|
// the announcement bar asap (before React hydration)
|
|
81
|
+
/* language=js */
|
|
79
82
|
const AnnouncementBarInlineJavaScript = `
|
|
80
83
|
(function() {
|
|
81
84
|
function isDismissed() {
|
|
@@ -139,7 +142,6 @@ export default function themeClassic(
|
|
|
139
142
|
const modules = [
|
|
140
143
|
require.resolve(getInfimaCSSFile(direction)),
|
|
141
144
|
'./prism-include-languages',
|
|
142
|
-
'./admonitions.css',
|
|
143
145
|
'./nprogress',
|
|
144
146
|
];
|
|
145
147
|
|