@docusaurus/theme-classic 0.0.0-5008 → 0.0.0-5012
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/index.js +2 -2
- package/lib-next/theme/BlogArchivePage/index.js +1 -1
- package/lib-next/theme/BlogListPage/index.js +4 -4
- package/lib-next/theme/BlogPostItem/index.js +2 -2
- package/lib-next/theme/BlogPostPage/index.js +4 -4
- package/lib-next/theme/BlogSidebar/index.js +1 -1
- package/lib-next/theme/BlogTagsListPage/index.js +3 -3
- package/lib-next/theme/BlogTagsPostsPage/index.js +5 -4
- package/lib-next/theme/CodeBlock/Content/Element.js +1 -1
- package/lib-next/theme/CodeBlock/Content/String.js +1 -1
- package/lib-next/theme/CodeBlock/index.js +1 -1
- package/lib-next/theme/ColorModeToggle/index.js +1 -1
- package/lib-next/theme/DocBreadcrumbs/index.js +3 -3
- package/lib-next/theme/DocCard/index.js +2 -2
- package/lib-next/theme/DocCardList/index.js +1 -1
- package/lib-next/theme/DocCategoryGeneratedIndexPage/index.js +1 -1
- package/lib-next/theme/DocItem/index.js +7 -7
- package/lib-next/theme/DocItemFooter/index.js +1 -1
- package/lib-next/theme/DocPage/Layout/Main/index.js +1 -1
- package/lib-next/theme/DocPage/Layout/Sidebar/ExpandButton/index.js +1 -1
- package/lib-next/theme/DocPage/Layout/Sidebar/index.js +4 -4
- package/lib-next/theme/DocPage/Layout/Sidebar/{index.module.css → styles.module.css} +0 -0
- package/lib-next/theme/DocPage/Layout/index.js +2 -2
- package/lib-next/theme/DocPage/Layout/{index.module.css → styles.module.css} +0 -0
- package/lib-next/theme/DocPage/index.js +2 -2
- package/lib-next/theme/DocSidebar/Desktop/CollapseButton/index.js +1 -1
- package/lib-next/theme/DocSidebarItem/{Category.js → Category/index.js} +19 -18
- package/lib-next/theme/DocSidebarItem/{Html.js → Html/index.js} +1 -1
- package/lib-next/theme/DocSidebarItem/{Html.module.css → Html/styles.module.css} +0 -0
- package/lib-next/theme/DocSidebarItem/{Link.js → Link/index.js} +1 -1
- package/lib-next/theme/DocSidebarItem/{Link.module.css → Link/styles.module.css} +0 -0
- package/lib-next/theme/DocSidebarItems/index.js +1 -1
- package/lib-next/theme/DocTagDocListPage/index.js +3 -2
- package/lib-next/theme/DocTagsListPage/index.js +2 -2
- package/lib-next/theme/DocVersionBadge/index.js +1 -1
- package/lib-next/theme/DocVersionBanner/index.js +1 -1
- package/lib-next/theme/EditThisPage/index.js +1 -1
- package/lib-next/theme/Footer/Logo/index.js +1 -1
- package/lib-next/theme/Layout/index.js +5 -5
- package/lib-next/theme/Logo/index.js +1 -1
- package/lib-next/theme/MDXComponents/{Img.js → Img/index.js} +1 -1
- package/lib-next/theme/MDXComponents/{Img.module.css → Img/styles.module.css} +0 -0
- package/lib-next/theme/MDXComponents/Ul.js +2 -2
- package/lib-next/theme/MDXPage/index.js +3 -3
- package/lib-next/theme/Navbar/ColorModeToggle/index.js +1 -1
- package/lib-next/theme/Navbar/Content/index.js +3 -3
- package/lib-next/theme/Navbar/Layout/index.js +1 -1
- package/lib-next/theme/Navbar/MobileSidebar/Header/index.js +1 -1
- package/lib-next/theme/Navbar/MobileSidebar/PrimaryMenu/index.js +1 -1
- package/lib-next/theme/Navbar/MobileSidebar/Toggle/index.js +1 -1
- package/lib-next/theme/Navbar/MobileSidebar/index.js +2 -2
- package/lib-next/theme/NavbarItem/DocNavbarItem.js +3 -3
- package/lib-next/theme/NavbarItem/DocSidebarNavbarItem.js +3 -3
- package/lib-next/theme/NavbarItem/DocsVersionDropdownNavbarItem.js +2 -2
- package/lib-next/theme/NavbarItem/DocsVersionNavbarItem.js +1 -1
- package/lib-next/theme/NavbarItem/LocaleDropdownNavbarItem/index.js +2 -2
- package/lib-next/theme/NavbarItem/NavbarNavLink.js +1 -1
- package/lib-next/theme/NotFound.js +1 -1
- package/lib-next/theme/SiteMetadata/index.js +2 -2
- package/lib-next/theme/TOCCollapsible/{CollapseButton.js → CollapseButton/index.js} +1 -1
- package/lib-next/theme/TOCCollapsible/{CollapseButton.module.css → CollapseButton/styles.module.css} +0 -0
- package/lib-next/theme/TOCCollapsible/index.js +1 -1
- package/lib-next/theme/TOCCollapsible/{index.module.css → styles.module.css} +0 -0
- package/lib-next/theme/TOCInline/index.js +1 -1
- package/lib-next/theme/TOCItems/index.js +1 -1
- package/lib-next/theme/Tabs/__tests__/index.test.js +2 -2
- package/lib-next/theme/Tabs/index.js +1 -1
- package/lib-next/theme/TagsListByLetter/index.js +1 -1
- package/package.json +13 -13
- package/src/index.ts +4 -4
- package/src/theme/BlogArchivePage/index.tsx +2 -2
- package/src/theme/BlogListPage/index.tsx +5 -5
- package/src/theme/BlogPostAuthors/index.tsx +1 -1
- package/src/theme/BlogPostItem/index.tsx +2 -2
- package/src/theme/BlogPostPage/index.tsx +5 -5
- package/src/theme/BlogSidebar/Desktop/index.tsx +1 -1
- package/src/theme/BlogSidebar/index.tsx +1 -1
- package/src/theme/BlogTagsListPage/index.tsx +4 -5
- package/src/theme/BlogTagsPostsPage/index.tsx +5 -6
- package/src/theme/CodeBlock/Content/Element.tsx +1 -1
- package/src/theme/CodeBlock/Content/String.tsx +1 -1
- package/src/theme/CodeBlock/Line/index.tsx +1 -0
- package/src/theme/CodeBlock/index.tsx +1 -1
- package/src/theme/ColorModeToggle/index.tsx +2 -2
- package/src/theme/Details/index.tsx +1 -0
- package/src/theme/DocBreadcrumbs/index.tsx +3 -2
- package/src/theme/DocCard/index.tsx +7 -6
- package/src/theme/DocCardList/index.tsx +2 -3
- package/src/theme/DocCategoryGeneratedIndexPage/index.tsx +2 -2
- package/src/theme/DocItem/index.tsx +9 -8
- package/src/theme/DocItemFooter/index.tsx +2 -3
- package/src/theme/DocPage/Layout/Main/index.tsx +2 -3
- package/src/theme/DocPage/Layout/Sidebar/ExpandButton/index.tsx +1 -1
- package/src/theme/DocPage/Layout/Sidebar/index.tsx +5 -6
- package/src/theme/DocPage/Layout/Sidebar/{index.module.css → styles.module.css} +0 -0
- package/src/theme/DocPage/Layout/index.tsx +3 -4
- package/src/theme/DocPage/Layout/{index.module.css → styles.module.css} +0 -0
- package/src/theme/DocPage/index.tsx +3 -5
- package/src/theme/DocSidebar/Desktop/CollapseButton/index.tsx +1 -1
- package/src/theme/DocSidebar/index.tsx +1 -1
- package/src/theme/DocSidebarItem/{Category.tsx → Category/index.tsx} +14 -15
- package/src/theme/DocSidebarItem/{Html.tsx → Html/index.tsx} +1 -1
- package/src/theme/DocSidebarItem/{Html.module.css → Html/styles.module.css} +0 -0
- package/src/theme/DocSidebarItem/{Link.tsx → Link/index.tsx} +1 -2
- package/src/theme/DocSidebarItem/{Link.module.css → Link/styles.module.css} +0 -0
- package/src/theme/DocSidebarItems/index.tsx +1 -1
- package/src/theme/DocTagDocListPage/index.tsx +3 -4
- package/src/theme/DocTagsListPage/index.tsx +3 -4
- package/src/theme/DocVersionBadge/index.tsx +1 -1
- package/src/theme/DocVersionBanner/index.tsx +1 -1
- package/src/theme/EditThisPage/index.tsx +2 -3
- package/src/theme/Footer/Links/MultiColumn/index.tsx +1 -1
- package/src/theme/Footer/Links/Simple/index.tsx +1 -1
- package/src/theme/Footer/Links/index.tsx +1 -1
- package/src/theme/Footer/Logo/index.tsx +2 -2
- package/src/theme/Heading/index.tsx +1 -1
- package/src/theme/IconEdit/index.tsx +0 -1
- package/src/theme/LastUpdated/index.tsx +1 -1
- package/src/theme/Layout/index.tsx +6 -6
- package/src/theme/Logo/index.tsx +2 -3
- package/src/theme/MDXComponents/{Img.tsx → Img/index.tsx} +3 -2
- package/src/theme/MDXComponents/{Img.module.css → Img/styles.module.css} +0 -0
- package/src/theme/MDXComponents/Ul.tsx +2 -2
- package/src/theme/MDXPage/index.tsx +4 -4
- package/src/theme/Navbar/ColorModeToggle/index.tsx +1 -1
- package/src/theme/Navbar/Content/index.tsx +5 -4
- package/src/theme/Navbar/Layout/index.tsx +2 -2
- package/src/theme/Navbar/MobileSidebar/Header/index.tsx +1 -1
- package/src/theme/Navbar/MobileSidebar/Layout/index.tsx +1 -1
- package/src/theme/Navbar/MobileSidebar/PrimaryMenu/index.tsx +1 -1
- package/src/theme/Navbar/MobileSidebar/Toggle/index.tsx +1 -1
- package/src/theme/Navbar/MobileSidebar/index.tsx +2 -2
- package/src/theme/NavbarItem/DefaultNavbarItem.tsx +1 -4
- package/src/theme/NavbarItem/DocNavbarItem.tsx +3 -3
- package/src/theme/NavbarItem/DocSidebarNavbarItem.tsx +3 -4
- package/src/theme/NavbarItem/DocsVersionDropdownNavbarItem.tsx +3 -3
- package/src/theme/NavbarItem/DocsVersionNavbarItem.tsx +2 -2
- package/src/theme/NavbarItem/DropdownNavbarItem.tsx +2 -3
- package/src/theme/NavbarItem/LocaleDropdownNavbarItem/index.tsx +3 -3
- package/src/theme/NavbarItem/NavbarNavLink.tsx +2 -2
- package/src/theme/NavbarItem/SearchNavbarItem.tsx +1 -1
- package/src/theme/NavbarItem/index.tsx +1 -2
- package/src/theme/NotFound.tsx +1 -1
- package/src/theme/SiteMetadata/index.tsx +1 -1
- package/src/theme/TOC/index.tsx +2 -1
- package/src/theme/TOCCollapsible/{CollapseButton.tsx → CollapseButton/index.tsx} +2 -1
- package/src/theme/TOCCollapsible/{CollapseButton.module.css → CollapseButton/styles.module.css} +0 -0
- package/src/theme/TOCCollapsible/index.tsx +3 -2
- package/src/theme/TOCCollapsible/{index.module.css → styles.module.css} +0 -0
- package/src/theme/TOCInline/index.tsx +2 -1
- package/src/theme/TOCItems/index.tsx +2 -2
- package/src/theme/TabItem/index.tsx +1 -1
- package/src/theme/Tabs/index.tsx +1 -2
- package/src/theme/TagsListByLetter/index.tsx +1 -1
- package/src/theme/ThemedImage/index.tsx +0 -1
- package/src/translations.ts +2 -3
package/lib/index.js
CHANGED
|
@@ -20,14 +20,14 @@ Object.defineProperty(exports, "validateThemeConfig", {
|
|
|
20
20
|
|
|
21
21
|
var _path = _interopRequireDefault(require("path"));
|
|
22
22
|
|
|
23
|
-
var _translations = require("./translations");
|
|
24
|
-
|
|
25
23
|
var _module = require("module");
|
|
26
24
|
|
|
27
25
|
var _rtlcss = _interopRequireDefault(require("rtlcss"));
|
|
28
26
|
|
|
29
27
|
var _themeTranslations = require("@docusaurus/theme-translations");
|
|
30
28
|
|
|
29
|
+
var _translations = require("./translations");
|
|
30
|
+
|
|
31
31
|
var _getSwizzleConfig = _interopRequireDefault(require("./getSwizzleConfig"));
|
|
32
32
|
|
|
33
33
|
var _validateThemeConfig = require("./validateThemeConfig");
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
|
-
import Layout from '@theme/Layout';
|
|
9
8
|
import Link from '@docusaurus/Link';
|
|
10
9
|
import {translate} from '@docusaurus/Translate';
|
|
11
10
|
import {PageMetadata} from '@docusaurus/theme-common';
|
|
11
|
+
import Layout from '@theme/Layout';
|
|
12
12
|
|
|
13
13
|
function Year({year, posts}) {
|
|
14
14
|
return (
|
|
@@ -5,17 +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 useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
|
9
|
-
import BlogLayout from '@theme/BlogLayout';
|
|
10
|
-
import BlogPostItem from '@theme/BlogPostItem';
|
|
11
|
-
import BlogListPaginator from '@theme/BlogListPaginator';
|
|
12
10
|
import {
|
|
13
11
|
PageMetadata,
|
|
14
12
|
HtmlClassNameProvider,
|
|
15
13
|
ThemeClassNames,
|
|
16
14
|
} from '@docusaurus/theme-common';
|
|
15
|
+
import BlogLayout from '@theme/BlogLayout';
|
|
16
|
+
import BlogPostItem from '@theme/BlogPostItem';
|
|
17
|
+
import BlogListPaginator from '@theme/BlogListPaginator';
|
|
17
18
|
import SearchMetadata from '@theme/SearchMetadata';
|
|
18
|
-
import clsx from 'clsx';
|
|
19
19
|
|
|
20
20
|
function BlogListPageMetadata(props) {
|
|
21
21
|
const {metadata} = props;
|
|
@@ -13,9 +13,9 @@ import {usePluralForm} from '@docusaurus/theme-common';
|
|
|
13
13
|
import {blogPostContainerID} from '@docusaurus/utils-common';
|
|
14
14
|
import MDXContent from '@theme/MDXContent';
|
|
15
15
|
import EditThisPage from '@theme/EditThisPage';
|
|
16
|
-
import styles from './styles.module.css';
|
|
17
16
|
import TagsListInline from '@theme/TagsListInline';
|
|
18
|
-
import BlogPostAuthors from '@theme/BlogPostAuthors';
|
|
17
|
+
import BlogPostAuthors from '@theme/BlogPostAuthors';
|
|
18
|
+
import styles from './styles.module.css'; // Very simple pluralization: probably good enough for now
|
|
19
19
|
|
|
20
20
|
function useReadingTimePlural() {
|
|
21
21
|
const {selectMessage} = usePluralForm();
|
|
@@ -5,16 +5,16 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
|
-
import
|
|
9
|
-
import BlogPostItem from '@theme/BlogPostItem';
|
|
10
|
-
import BlogPostPaginator from '@theme/BlogPostPaginator';
|
|
8
|
+
import clsx from 'clsx';
|
|
11
9
|
import {
|
|
12
10
|
PageMetadata,
|
|
13
11
|
HtmlClassNameProvider,
|
|
14
12
|
ThemeClassNames,
|
|
15
13
|
} from '@docusaurus/theme-common';
|
|
14
|
+
import BlogLayout from '@theme/BlogLayout';
|
|
15
|
+
import BlogPostItem from '@theme/BlogPostItem';
|
|
16
|
+
import BlogPostPaginator from '@theme/BlogPostPaginator';
|
|
16
17
|
import TOC from '@theme/TOC';
|
|
17
|
-
import clsx from 'clsx';
|
|
18
18
|
|
|
19
19
|
function BlogPostPageMetadata(props) {
|
|
20
20
|
const {content: BlogPostContents} = 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 {useWindowSize} from '@docusaurus/theme-common';
|
|
8
9
|
import BlogSidebarDesktop from '@theme/BlogSidebar/Desktop';
|
|
9
10
|
import BlogSidebarMobile from '@theme/BlogSidebar/Mobile';
|
|
10
|
-
import {useWindowSize} from '@docusaurus/theme-common';
|
|
11
11
|
export default function BlogSidebar({sidebar}) {
|
|
12
12
|
const windowSize = useWindowSize();
|
|
13
13
|
|
|
@@ -5,16 +5,16 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
|
-
import
|
|
9
|
-
import TagsListByLetter from '@theme/TagsListByLetter';
|
|
8
|
+
import clsx from 'clsx';
|
|
10
9
|
import {
|
|
11
10
|
PageMetadata,
|
|
12
11
|
HtmlClassNameProvider,
|
|
13
12
|
ThemeClassNames,
|
|
14
13
|
translateTagsPageTitle,
|
|
15
14
|
} from '@docusaurus/theme-common';
|
|
15
|
+
import BlogLayout from '@theme/BlogLayout';
|
|
16
|
+
import TagsListByLetter from '@theme/TagsListByLetter';
|
|
16
17
|
import SearchMetadata from '../SearchMetadata';
|
|
17
|
-
import clsx from 'clsx';
|
|
18
18
|
export default function BlogTagsListPage({tags, sidebar}) {
|
|
19
19
|
const title = translateTagsPageTitle();
|
|
20
20
|
return (
|
|
@@ -5,9 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
|
-
import
|
|
9
|
-
import BlogLayout from '@theme/BlogLayout';
|
|
10
|
-
import BlogPostItem from '@theme/BlogPostItem';
|
|
8
|
+
import clsx from 'clsx';
|
|
11
9
|
import Translate, {translate} from '@docusaurus/Translate';
|
|
12
10
|
import {
|
|
13
11
|
PageMetadata,
|
|
@@ -15,10 +13,13 @@ import {
|
|
|
15
13
|
ThemeClassNames,
|
|
16
14
|
usePluralForm,
|
|
17
15
|
} from '@docusaurus/theme-common';
|
|
16
|
+
import Link from '@docusaurus/Link';
|
|
17
|
+
import BlogLayout from '@theme/BlogLayout';
|
|
18
|
+
import BlogPostItem from '@theme/BlogPostItem';
|
|
18
19
|
import BlogListPaginator from '@theme/BlogListPaginator';
|
|
19
20
|
import SearchMetadata from '@theme/SearchMetadata';
|
|
20
|
-
import clsx from 'clsx'; // Very simple pluralization: probably good enough for now
|
|
21
21
|
|
|
22
|
+
// Very simple pluralization: probably good enough for now
|
|
22
23
|
function useBlogPostsPlural() {
|
|
23
24
|
const {selectMessage} = usePluralForm();
|
|
24
25
|
return (count) =>
|
|
@@ -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 Container from '@theme/CodeBlock/Container';
|
|
9
8
|
import clsx from 'clsx';
|
|
9
|
+
import Container from '@theme/CodeBlock/Container';
|
|
10
10
|
import styles from './styles.module.css'; // <pre> tags in markdown map to CodeBlocks. They may contain JSX children. When
|
|
11
11
|
// the children is not a simple string, we just return a styled block without
|
|
12
12
|
// actually highlighting.
|
|
@@ -5,6 +5,7 @@
|
|
|
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 {
|
|
9
10
|
useThemeConfig,
|
|
10
11
|
parseCodeBlockTitle,
|
|
@@ -14,7 +15,6 @@ import {
|
|
|
14
15
|
usePrismTheme,
|
|
15
16
|
useCodeWordWrap,
|
|
16
17
|
} from '@docusaurus/theme-common';
|
|
17
|
-
import clsx from 'clsx';
|
|
18
18
|
import Highlight, {defaultProps} from 'prism-react-renderer';
|
|
19
19
|
import Line from '@theme/CodeBlock/Line';
|
|
20
20
|
import CopyButton from '@theme/CodeBlock/CopyButton';
|
|
@@ -8,13 +8,13 @@ import React, {isValidElement} from 'react';
|
|
|
8
8
|
import useIsBrowser from '@docusaurus/useIsBrowser';
|
|
9
9
|
import ElementContent from '@theme/CodeBlock/Content/Element';
|
|
10
10
|
import StringContent from '@theme/CodeBlock/Content/String';
|
|
11
|
+
|
|
11
12
|
/**
|
|
12
13
|
* Best attempt to make the children a plain string so it is copyable. If there
|
|
13
14
|
* are react elements, we will not be able to copy the content, and it will
|
|
14
15
|
* return `children` as-is; otherwise, it concatenates the string children
|
|
15
16
|
* together.
|
|
16
17
|
*/
|
|
17
|
-
|
|
18
18
|
function maybeStringifyChildren(children) {
|
|
19
19
|
if (React.Children.toArray(children).some((el) => isValidElement(el))) {
|
|
20
20
|
return children;
|
|
@@ -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 clsx from 'clsx';
|
|
8
9
|
import useIsBrowser from '@docusaurus/useIsBrowser';
|
|
9
10
|
import {translate} from '@docusaurus/Translate';
|
|
10
11
|
import IconLightMode from '@theme/IconLightMode';
|
|
11
12
|
import IconDarkMode from '@theme/IconDarkMode';
|
|
12
|
-
import clsx from 'clsx';
|
|
13
13
|
import styles from './styles.module.css';
|
|
14
14
|
|
|
15
15
|
function ColorModeToggle({className, value, onChange}) {
|
|
@@ -5,17 +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 {
|
|
9
10
|
ThemeClassNames,
|
|
10
11
|
useSidebarBreadcrumbs,
|
|
11
12
|
useHomePageRoute,
|
|
12
13
|
} from '@docusaurus/theme-common';
|
|
13
|
-
import styles from './styles.module.css';
|
|
14
|
-
import clsx from 'clsx';
|
|
15
14
|
import Link from '@docusaurus/Link';
|
|
16
15
|
import useBaseUrl from '@docusaurus/useBaseUrl';
|
|
17
16
|
import {translate} from '@docusaurus/Translate';
|
|
18
|
-
import IconHome from '@theme/IconHome';
|
|
17
|
+
import IconHome from '@theme/IconHome';
|
|
18
|
+
import styles from './styles.module.css'; // TODO move to design system folder
|
|
19
19
|
|
|
20
20
|
function BreadcrumbsItemLink({children, href, isLast}) {
|
|
21
21
|
const className = 'breadcrumbs__link';
|
|
@@ -5,12 +5,12 @@
|
|
|
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
|
import {findFirstCategoryLink, useDocById} from '@docusaurus/theme-common';
|
|
10
|
-
import clsx from 'clsx';
|
|
11
|
-
import styles from './styles.module.css';
|
|
12
11
|
import isInternalUrl from '@docusaurus/isInternalUrl';
|
|
13
12
|
import {translate} from '@docusaurus/Translate';
|
|
13
|
+
import styles from './styles.module.css';
|
|
14
14
|
|
|
15
15
|
function CardContainer({href, children}) {
|
|
16
16
|
return (
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import clsx from 'clsx';
|
|
9
|
-
import DocCard from '@theme/DocCard';
|
|
10
9
|
import {findFirstCategoryLink} from '@docusaurus/theme-common';
|
|
10
|
+
import DocCard from '@theme/DocCard';
|
|
11
11
|
|
|
12
12
|
// Filter categories that don't have a link.
|
|
13
13
|
function filterItems(items) {
|
|
@@ -9,13 +9,13 @@ import {
|
|
|
9
9
|
PageMetadata,
|
|
10
10
|
useCurrentSidebarCategory,
|
|
11
11
|
} from '@docusaurus/theme-common';
|
|
12
|
+
import useBaseUrl from '@docusaurus/useBaseUrl';
|
|
12
13
|
import DocCardList from '@theme/DocCardList';
|
|
13
14
|
import DocPaginator from '@theme/DocPaginator';
|
|
14
15
|
import DocVersionBanner from '@theme/DocVersionBanner';
|
|
15
16
|
import DocVersionBadge from '@theme/DocVersionBadge';
|
|
16
17
|
import DocBreadcrumbs from '@theme/DocBreadcrumbs';
|
|
17
18
|
import Heading from '@theme/Heading';
|
|
18
|
-
import useBaseUrl from '@docusaurus/useBaseUrl';
|
|
19
19
|
import styles from './styles.module.css';
|
|
20
20
|
|
|
21
21
|
function DocCategoryGeneratedIndexPageMetadata({categoryGeneratedIndex}) {
|
|
@@ -6,6 +6,12 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import clsx from 'clsx';
|
|
9
|
+
import {
|
|
10
|
+
PageMetadata,
|
|
11
|
+
HtmlClassNameProvider,
|
|
12
|
+
ThemeClassNames,
|
|
13
|
+
useWindowSize,
|
|
14
|
+
} from '@docusaurus/theme-common';
|
|
9
15
|
import DocPaginator from '@theme/DocPaginator';
|
|
10
16
|
import DocVersionBanner from '@theme/DocVersionBanner';
|
|
11
17
|
import DocVersionBadge from '@theme/DocVersionBadge';
|
|
@@ -13,15 +19,9 @@ import DocItemFooter from '@theme/DocItemFooter';
|
|
|
13
19
|
import TOC from '@theme/TOC';
|
|
14
20
|
import TOCCollapsible from '@theme/TOCCollapsible';
|
|
15
21
|
import Heading from '@theme/Heading';
|
|
16
|
-
import styles from './styles.module.css';
|
|
17
|
-
import {
|
|
18
|
-
PageMetadata,
|
|
19
|
-
HtmlClassNameProvider,
|
|
20
|
-
ThemeClassNames,
|
|
21
|
-
useWindowSize,
|
|
22
|
-
} from '@docusaurus/theme-common';
|
|
23
22
|
import DocBreadcrumbs from '@theme/DocBreadcrumbs';
|
|
24
23
|
import MDXContent from '@theme/MDXContent';
|
|
24
|
+
import styles from './styles.module.css';
|
|
25
25
|
|
|
26
26
|
function DocItemMetadata(props) {
|
|
27
27
|
const {content: DocContent} = props;
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import clsx from 'clsx';
|
|
9
|
+
import {ThemeClassNames} from '@docusaurus/theme-common';
|
|
9
10
|
import LastUpdated from '@theme/LastUpdated';
|
|
10
11
|
import EditThisPage from '@theme/EditThisPage';
|
|
11
12
|
import TagsListInline from '@theme/TagsListInline';
|
|
12
13
|
import styles from './styles.module.css';
|
|
13
|
-
import {ThemeClassNames} from '@docusaurus/theme-common';
|
|
14
14
|
|
|
15
15
|
function TagsRow(props) {
|
|
16
16
|
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 {useDocsSidebar} from '@docusaurus/theme-common';
|
|
9
8
|
import clsx from 'clsx';
|
|
9
|
+
import {useDocsSidebar} from '@docusaurus/theme-common';
|
|
10
10
|
import styles from './styles.module.css';
|
|
11
11
|
export default function DocPageLayoutMain({hiddenSidebarContainer, children}) {
|
|
12
12
|
const sidebar = useDocsSidebar();
|
|
@@ -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 IconArrow from '@theme/IconArrow';
|
|
9
8
|
import {translate} from '@docusaurus/Translate';
|
|
9
|
+
import IconArrow from '@theme/IconArrow';
|
|
10
10
|
import styles from './styles.module.css';
|
|
11
11
|
export default function DocPageLayoutSidebarExpandButton({toggleSidebar}) {
|
|
12
12
|
return (
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
import React, {useState, useCallback} from 'react';
|
|
8
|
-
import
|
|
8
|
+
import clsx from 'clsx';
|
|
9
|
+
import {ThemeClassNames, useDocsSidebar} from '@docusaurus/theme-common';
|
|
9
10
|
import {useLocation} from '@docusaurus/router';
|
|
11
|
+
import DocSidebar from '@theme/DocSidebar';
|
|
10
12
|
import ExpandButton from '@theme/DocPage/Layout/Sidebar/ExpandButton';
|
|
11
|
-
import
|
|
12
|
-
import styles from './index.module.css';
|
|
13
|
-
import {ThemeClassNames, useDocsSidebar} from '@docusaurus/theme-common'; // Reset sidebar state when sidebar changes
|
|
13
|
+
import styles from './styles.module.css'; // Reset sidebar state when sidebar changes
|
|
14
14
|
// Use React key to unmount/remount the children
|
|
15
15
|
// See https://github.com/facebook/docusaurus/issues/3414
|
|
16
16
|
|
|
File without changes
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
import React, {useState} from 'react';
|
|
8
|
+
import {useDocsSidebar} from '@docusaurus/theme-common';
|
|
8
9
|
import Layout from '@theme/Layout';
|
|
9
10
|
import BackToTopButton from '@theme/BackToTopButton';
|
|
10
11
|
import DocPageLayoutSidebar from '@theme/DocPage/Layout/Sidebar';
|
|
11
12
|
import DocPageLayoutMain from '@theme/DocPage/Layout/Main';
|
|
12
|
-
import styles from './
|
|
13
|
-
import {useDocsSidebar} from '@docusaurus/theme-common';
|
|
13
|
+
import styles from './styles.module.css';
|
|
14
14
|
export default function DocPageLayout({children}) {
|
|
15
15
|
const sidebar = useDocsSidebar();
|
|
16
16
|
const [hiddenSidebarContainer, setHiddenSidebarContainer] = useState(false);
|
|
File without changes
|
|
@@ -5,8 +5,6 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
|
-
import NotFound from '@theme/NotFound';
|
|
9
|
-
import DocPageLayout from '@theme/DocPage/Layout';
|
|
10
8
|
import clsx from 'clsx';
|
|
11
9
|
import {
|
|
12
10
|
HtmlClassNameProvider,
|
|
@@ -16,6 +14,8 @@ import {
|
|
|
16
14
|
DocsVersionProvider,
|
|
17
15
|
useDocRouteMetadata,
|
|
18
16
|
} from '@docusaurus/theme-common';
|
|
17
|
+
import DocPageLayout from '@theme/DocPage/Layout';
|
|
18
|
+
import NotFound from '@theme/NotFound';
|
|
19
19
|
import SearchMetadata from '@theme/SearchMetadata';
|
|
20
20
|
export default function DocPage(props) {
|
|
21
21
|
const {versionMetadata} = props;
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import clsx from 'clsx';
|
|
9
|
-
import IconArrow from '@theme/IconArrow';
|
|
10
9
|
import {translate} from '@docusaurus/Translate';
|
|
10
|
+
import IconArrow from '@theme/IconArrow';
|
|
11
11
|
import styles from './styles.module.css';
|
|
12
12
|
export default function CollapseButton({onClick}) {
|
|
13
13
|
return (
|
|
@@ -19,19 +19,20 @@ import {
|
|
|
19
19
|
} from '@docusaurus/theme-common';
|
|
20
20
|
import Link from '@docusaurus/Link';
|
|
21
21
|
import {translate} from '@docusaurus/Translate';
|
|
22
|
+
import useIsBrowser from '@docusaurus/useIsBrowser';
|
|
22
23
|
import DocSidebarItems from '@theme/DocSidebarItems';
|
|
23
|
-
import useIsBrowser from '@docusaurus/useIsBrowser'; // If we navigate to a category and it becomes active, it should automatically
|
|
24
|
-
// expand itself
|
|
25
24
|
|
|
26
|
-
|
|
25
|
+
// If we navigate to a category and it becomes active, it should automatically
|
|
26
|
+
// expand itself
|
|
27
|
+
function useAutoExpandActiveCategory({isActive, collapsed, updateCollapsed}) {
|
|
27
28
|
const wasActive = usePrevious(isActive);
|
|
28
29
|
useEffect(() => {
|
|
29
30
|
const justBecameActive = isActive && !wasActive;
|
|
30
31
|
|
|
31
32
|
if (justBecameActive && collapsed) {
|
|
32
|
-
|
|
33
|
+
updateCollapsed(false);
|
|
33
34
|
}
|
|
34
|
-
}, [isActive, wasActive, collapsed,
|
|
35
|
+
}, [isActive, wasActive, collapsed, updateCollapsed]);
|
|
35
36
|
}
|
|
36
37
|
/**
|
|
37
38
|
* When a collapsible category has no link, we still link it to its first child
|
|
@@ -88,6 +89,11 @@ export default function DocSidebarItemCategory({
|
|
|
88
89
|
...props
|
|
89
90
|
}) {
|
|
90
91
|
const {items, label, collapsible, className, href} = item;
|
|
92
|
+
const {
|
|
93
|
+
docs: {
|
|
94
|
+
sidebar: {autoCollapseCategories},
|
|
95
|
+
},
|
|
96
|
+
} = useThemeConfig();
|
|
91
97
|
const hrefWithSSRFallback = useCategoryHrefWithSSRFallback(item);
|
|
92
98
|
const isActive = isActiveSidebarItem(item, activePath);
|
|
93
99
|
const isCurrentPage = isSamePath(href, activePath);
|
|
@@ -102,23 +108,18 @@ export default function DocSidebarItemCategory({
|
|
|
102
108
|
return isActive ? false : item.collapsed;
|
|
103
109
|
},
|
|
104
110
|
});
|
|
105
|
-
|
|
106
|
-
isActive,
|
|
107
|
-
collapsed,
|
|
108
|
-
setCollapsed,
|
|
109
|
-
});
|
|
110
|
-
const {expandedItem, setExpandedItem} = useDocSidebarItemsExpandedState();
|
|
111
|
+
const {expandedItem, setExpandedItem} = useDocSidebarItemsExpandedState(); // Use this instead of `setCollapsed`, because it is also reactive
|
|
111
112
|
|
|
112
|
-
|
|
113
|
+
const updateCollapsed = (toCollapsed = !collapsed) => {
|
|
113
114
|
setExpandedItem(toCollapsed ? null : index);
|
|
114
115
|
setCollapsed(toCollapsed);
|
|
115
|
-
}
|
|
116
|
+
};
|
|
116
117
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
}
|
|
118
|
+
useAutoExpandActiveCategory({
|
|
119
|
+
isActive,
|
|
120
|
+
collapsed,
|
|
121
|
+
updateCollapsed,
|
|
122
|
+
});
|
|
122
123
|
useEffect(() => {
|
|
123
124
|
if (
|
|
124
125
|
collapsible &&
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import clsx from 'clsx';
|
|
9
9
|
import {ThemeClassNames} from '@docusaurus/theme-common';
|
|
10
|
-
import styles from './
|
|
10
|
+
import styles from './styles.module.css';
|
|
11
11
|
export default function DocSidebarItemHtml({item, level, index}) {
|
|
12
12
|
const {value, defaultStyle, className} = item;
|
|
13
13
|
return (
|
|
File without changes
|
|
@@ -10,7 +10,7 @@ import {isActiveSidebarItem, ThemeClassNames} from '@docusaurus/theme-common';
|
|
|
10
10
|
import Link from '@docusaurus/Link';
|
|
11
11
|
import isInternalUrl from '@docusaurus/isInternalUrl';
|
|
12
12
|
import IconExternalLink from '@theme/IconExternalLink';
|
|
13
|
-
import styles from './
|
|
13
|
+
import styles from './styles.module.css';
|
|
14
14
|
export default function DocSidebarItemLink({
|
|
15
15
|
item,
|
|
16
16
|
onItemClick,
|
|
File without changes
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
import React, {memo} from 'react';
|
|
8
|
-
import DocSidebarItem from '@theme/DocSidebarItem';
|
|
9
8
|
import {DocSidebarItemsExpandedStateProvider} from '@docusaurus/theme-common';
|
|
9
|
+
import DocSidebarItem from '@theme/DocSidebarItem';
|
|
10
10
|
|
|
11
11
|
// TODO this item should probably not receive the "activePath" props
|
|
12
12
|
// TODO this triggers whole sidebar re-renders on navigation
|
|
@@ -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
|
|
8
|
+
import clsx from 'clsx';
|
|
9
9
|
import Link from '@docusaurus/Link';
|
|
10
10
|
import {
|
|
11
11
|
PageMetadata,
|
|
@@ -14,9 +14,10 @@ import {
|
|
|
14
14
|
usePluralForm,
|
|
15
15
|
} from '@docusaurus/theme-common';
|
|
16
16
|
import Translate, {translate} from '@docusaurus/Translate';
|
|
17
|
+
import Layout from '@theme/Layout';
|
|
17
18
|
import SearchMetadata from '@theme/SearchMetadata';
|
|
18
|
-
import clsx from 'clsx'; // Very simple pluralization: probably good enough for now
|
|
19
19
|
|
|
20
|
+
// Very simple pluralization: probably good enough for now
|
|
20
21
|
function useNDocsTaggedPlural() {
|
|
21
22
|
const {selectMessage} = usePluralForm();
|
|
22
23
|
return (count) =>
|
|
@@ -5,16 +5,16 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
|
-
import
|
|
8
|
+
import clsx from 'clsx';
|
|
9
9
|
import {
|
|
10
10
|
PageMetadata,
|
|
11
11
|
HtmlClassNameProvider,
|
|
12
12
|
ThemeClassNames,
|
|
13
13
|
translateTagsPageTitle,
|
|
14
14
|
} from '@docusaurus/theme-common';
|
|
15
|
+
import Layout from '@theme/Layout';
|
|
15
16
|
import TagsListByLetter from '@theme/TagsListByLetter';
|
|
16
17
|
import SearchMetadata from '@theme/SearchMetadata';
|
|
17
|
-
import clsx from 'clsx';
|
|
18
18
|
export default function DocTagsListPage({tags}) {
|
|
19
19
|
const title = translateTagsPageTitle();
|
|
20
20
|
return (
|
|
@@ -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 clsx from 'clsx';
|
|
8
9
|
import Translate from '@docusaurus/Translate';
|
|
9
10
|
import {ThemeClassNames, useDocsVersion} from '@docusaurus/theme-common';
|
|
10
|
-
import clsx from 'clsx';
|
|
11
11
|
export default function DocVersionBadge({className}) {
|
|
12
12
|
const versionMetadata = useDocsVersion();
|
|
13
13
|
|
|
@@ -5,6 +5,7 @@
|
|
|
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 useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
|
9
10
|
import Link from '@docusaurus/Link';
|
|
10
11
|
import Translate from '@docusaurus/Translate';
|
|
@@ -17,7 +18,6 @@ import {
|
|
|
17
18
|
useDocsPreferredVersion,
|
|
18
19
|
useDocsVersion,
|
|
19
20
|
} from '@docusaurus/theme-common';
|
|
20
|
-
import clsx from 'clsx';
|
|
21
21
|
|
|
22
22
|
function UnreleasedVersionLabel({siteTitle, versionMetadata}) {
|
|
23
23
|
return (
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import Translate from '@docusaurus/Translate';
|
|
9
|
-
import IconEdit from '@theme/IconEdit';
|
|
10
9
|
import {ThemeClassNames} from '@docusaurus/theme-common';
|
|
10
|
+
import IconEdit from '@theme/IconEdit';
|
|
11
11
|
export default function EditThisPage({editUrl}) {
|
|
12
12
|
return (
|
|
13
13
|
<a
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import Link from '@docusaurus/Link';
|
|
9
9
|
import {useBaseUrlUtils} from '@docusaurus/useBaseUrl';
|
|
10
|
-
import styles from './styles.module.css';
|
|
11
10
|
import ThemedImage from '@theme/ThemedImage';
|
|
11
|
+
import styles from './styles.module.css';
|
|
12
12
|
|
|
13
13
|
function LogoImage({logo}) {
|
|
14
14
|
const {withBaseUrl} = useBaseUrlUtils();
|
|
@@ -7,16 +7,16 @@
|
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import clsx from 'clsx';
|
|
9
9
|
import ErrorBoundary from '@docusaurus/ErrorBoundary';
|
|
10
|
-
import SkipToContent from '@theme/SkipToContent';
|
|
11
|
-
import AnnouncementBar from '@theme/AnnouncementBar';
|
|
12
|
-
import Navbar from '@theme/Navbar';
|
|
13
|
-
import Footer from '@theme/Footer';
|
|
14
|
-
import LayoutProviders from '@theme/LayoutProviders';
|
|
15
10
|
import {
|
|
16
11
|
PageMetadata,
|
|
17
12
|
ThemeClassNames,
|
|
18
13
|
useKeyboardNavigation,
|
|
19
14
|
} from '@docusaurus/theme-common';
|
|
15
|
+
import SkipToContent from '@theme/SkipToContent';
|
|
16
|
+
import AnnouncementBar from '@theme/AnnouncementBar';
|
|
17
|
+
import Navbar from '@theme/Navbar';
|
|
18
|
+
import Footer from '@theme/Footer';
|
|
19
|
+
import LayoutProviders from '@theme/LayoutProviders';
|
|
20
20
|
import ErrorPageContent from '@theme/ErrorPageContent';
|
|
21
21
|
import './styles.css';
|
|
22
22
|
export default function Layout(props) {
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import Link from '@docusaurus/Link';
|
|
9
|
-
import ThemedImage from '@theme/ThemedImage';
|
|
10
9
|
import useBaseUrl from '@docusaurus/useBaseUrl';
|
|
11
10
|
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
|
12
11
|
import {useThemeConfig} from '@docusaurus/theme-common';
|
|
12
|
+
import ThemedImage from '@theme/ThemedImage';
|
|
13
13
|
export default function Logo(props) {
|
|
14
14
|
const {
|
|
15
15
|
siteConfig: {title},
|