@docusaurus/theme-classic 0.0.0-5010 → 0.0.0-5023

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.
Files changed (135) hide show
  1. package/lib/index.js +2 -2
  2. package/lib-next/theme/BlogArchivePage/index.js +1 -1
  3. package/lib-next/theme/BlogListPage/index.js +4 -4
  4. package/lib-next/theme/BlogPostItem/index.js +2 -2
  5. package/lib-next/theme/BlogPostPage/index.js +4 -4
  6. package/lib-next/theme/BlogSidebar/index.js +1 -1
  7. package/lib-next/theme/BlogTagsListPage/index.js +3 -3
  8. package/lib-next/theme/BlogTagsPostsPage/index.js +5 -4
  9. package/lib-next/theme/CodeBlock/Content/Element.js +1 -1
  10. package/lib-next/theme/CodeBlock/Content/String.js +1 -1
  11. package/lib-next/theme/CodeBlock/index.js +1 -1
  12. package/lib-next/theme/ColorModeToggle/index.js +1 -1
  13. package/lib-next/theme/DocBreadcrumbs/index.js +3 -3
  14. package/lib-next/theme/DocCard/index.js +2 -2
  15. package/lib-next/theme/DocCardList/index.js +1 -1
  16. package/lib-next/theme/DocCategoryGeneratedIndexPage/index.js +1 -1
  17. package/lib-next/theme/DocItem/index.js +7 -7
  18. package/lib-next/theme/DocItemFooter/index.js +1 -1
  19. package/lib-next/theme/DocPage/Layout/Main/index.js +1 -1
  20. package/lib-next/theme/DocPage/Layout/Sidebar/ExpandButton/index.js +1 -1
  21. package/lib-next/theme/DocPage/Layout/Sidebar/index.js +4 -4
  22. package/lib-next/theme/DocPage/Layout/index.js +1 -1
  23. package/lib-next/theme/DocPage/index.js +2 -2
  24. package/lib-next/theme/DocSidebar/Desktop/CollapseButton/index.js +1 -1
  25. package/lib-next/theme/DocSidebarItem/Category/index.js +3 -2
  26. package/lib-next/theme/DocSidebarItems/index.js +1 -1
  27. package/lib-next/theme/DocTagDocListPage/index.js +3 -2
  28. package/lib-next/theme/DocTagsListPage/index.js +2 -2
  29. package/lib-next/theme/DocVersionBadge/index.js +1 -1
  30. package/lib-next/theme/DocVersionBanner/index.js +1 -1
  31. package/lib-next/theme/EditThisPage/index.js +1 -1
  32. package/lib-next/theme/Footer/Logo/index.js +1 -1
  33. package/lib-next/theme/Layout/index.js +5 -5
  34. package/lib-next/theme/Logo/index.js +1 -1
  35. package/lib-next/theme/MDXComponents/Ul.js +2 -2
  36. package/lib-next/theme/MDXPage/index.js +3 -3
  37. package/lib-next/theme/Navbar/ColorModeToggle/index.js +1 -1
  38. package/lib-next/theme/Navbar/Content/index.js +3 -3
  39. package/lib-next/theme/Navbar/Layout/index.js +1 -1
  40. package/lib-next/theme/Navbar/MobileSidebar/Header/index.js +1 -1
  41. package/lib-next/theme/Navbar/MobileSidebar/PrimaryMenu/index.js +1 -1
  42. package/lib-next/theme/Navbar/MobileSidebar/Toggle/index.js +1 -1
  43. package/lib-next/theme/Navbar/MobileSidebar/index.js +2 -2
  44. package/lib-next/theme/NavbarItem/DocNavbarItem.js +3 -3
  45. package/lib-next/theme/NavbarItem/DocSidebarNavbarItem.js +3 -3
  46. package/lib-next/theme/NavbarItem/DocsVersionDropdownNavbarItem.js +2 -2
  47. package/lib-next/theme/NavbarItem/DocsVersionNavbarItem.js +1 -1
  48. package/lib-next/theme/NavbarItem/LocaleDropdownNavbarItem/index.js +2 -2
  49. package/lib-next/theme/NavbarItem/NavbarNavLink.js +1 -1
  50. package/lib-next/theme/NotFound.js +1 -1
  51. package/lib-next/theme/SiteMetadata/index.js +2 -2
  52. package/lib-next/theme/TOCInline/index.js +1 -1
  53. package/lib-next/theme/TOCItems/index.js +1 -1
  54. package/lib-next/theme/Tabs/__tests__/index.test.js +2 -2
  55. package/lib-next/theme/Tabs/index.js +1 -1
  56. package/lib-next/theme/TagsListByLetter/index.js +1 -1
  57. package/package.json +16 -16
  58. package/src/index.ts +4 -4
  59. package/src/theme/BlogArchivePage/index.tsx +2 -2
  60. package/src/theme/BlogListPage/index.tsx +5 -5
  61. package/src/theme/BlogPostAuthors/index.tsx +1 -1
  62. package/src/theme/BlogPostItem/index.tsx +2 -2
  63. package/src/theme/BlogPostPage/index.tsx +5 -5
  64. package/src/theme/BlogSidebar/Desktop/index.tsx +1 -1
  65. package/src/theme/BlogSidebar/index.tsx +1 -1
  66. package/src/theme/BlogTagsListPage/index.tsx +4 -5
  67. package/src/theme/BlogTagsPostsPage/index.tsx +5 -6
  68. package/src/theme/CodeBlock/Content/Element.tsx +1 -1
  69. package/src/theme/CodeBlock/Content/String.tsx +1 -1
  70. package/src/theme/CodeBlock/Line/index.tsx +1 -0
  71. package/src/theme/CodeBlock/index.tsx +1 -1
  72. package/src/theme/ColorModeToggle/index.tsx +2 -2
  73. package/src/theme/Details/index.tsx +1 -0
  74. package/src/theme/DocBreadcrumbs/index.tsx +3 -2
  75. package/src/theme/DocCard/index.tsx +7 -6
  76. package/src/theme/DocCardList/index.tsx +2 -3
  77. package/src/theme/DocCategoryGeneratedIndexPage/index.tsx +2 -2
  78. package/src/theme/DocItem/index.tsx +9 -8
  79. package/src/theme/DocItemFooter/index.tsx +2 -3
  80. package/src/theme/DocPage/Layout/Main/index.tsx +2 -3
  81. package/src/theme/DocPage/Layout/Sidebar/ExpandButton/index.tsx +1 -1
  82. package/src/theme/DocPage/Layout/Sidebar/index.tsx +4 -5
  83. package/src/theme/DocPage/Layout/index.tsx +2 -2
  84. package/src/theme/DocPage/index.tsx +3 -5
  85. package/src/theme/DocSidebar/Desktop/CollapseButton/index.tsx +1 -1
  86. package/src/theme/DocSidebar/index.tsx +1 -1
  87. package/src/theme/DocSidebarItem/Category/index.tsx +1 -3
  88. package/src/theme/DocSidebarItem/Link/index.tsx +0 -1
  89. package/src/theme/DocSidebarItems/index.tsx +1 -1
  90. package/src/theme/DocTagDocListPage/index.tsx +3 -4
  91. package/src/theme/DocTagsListPage/index.tsx +3 -4
  92. package/src/theme/DocVersionBadge/index.tsx +1 -1
  93. package/src/theme/DocVersionBanner/index.tsx +1 -1
  94. package/src/theme/EditThisPage/index.tsx +2 -3
  95. package/src/theme/Footer/Links/MultiColumn/index.tsx +1 -1
  96. package/src/theme/Footer/Links/Simple/index.tsx +1 -1
  97. package/src/theme/Footer/Links/index.tsx +1 -1
  98. package/src/theme/Footer/Logo/index.tsx +2 -2
  99. package/src/theme/Heading/index.tsx +1 -1
  100. package/src/theme/IconEdit/index.tsx +0 -1
  101. package/src/theme/LastUpdated/index.tsx +1 -1
  102. package/src/theme/Layout/index.tsx +6 -6
  103. package/src/theme/Logo/index.tsx +2 -3
  104. package/src/theme/MDXComponents/Img/index.tsx +1 -1
  105. package/src/theme/MDXComponents/Ul.tsx +2 -2
  106. package/src/theme/MDXPage/index.tsx +4 -4
  107. package/src/theme/Navbar/ColorModeToggle/index.tsx +1 -1
  108. package/src/theme/Navbar/Content/index.tsx +5 -4
  109. package/src/theme/Navbar/Layout/index.tsx +2 -2
  110. package/src/theme/Navbar/MobileSidebar/Header/index.tsx +1 -1
  111. package/src/theme/Navbar/MobileSidebar/Layout/index.tsx +1 -1
  112. package/src/theme/Navbar/MobileSidebar/PrimaryMenu/index.tsx +1 -1
  113. package/src/theme/Navbar/MobileSidebar/Toggle/index.tsx +1 -1
  114. package/src/theme/Navbar/MobileSidebar/index.tsx +2 -2
  115. package/src/theme/NavbarItem/DefaultNavbarItem.tsx +1 -4
  116. package/src/theme/NavbarItem/DocNavbarItem.tsx +3 -3
  117. package/src/theme/NavbarItem/DocSidebarNavbarItem.tsx +3 -4
  118. package/src/theme/NavbarItem/DocsVersionDropdownNavbarItem.tsx +3 -3
  119. package/src/theme/NavbarItem/DocsVersionNavbarItem.tsx +2 -2
  120. package/src/theme/NavbarItem/DropdownNavbarItem.tsx +2 -3
  121. package/src/theme/NavbarItem/LocaleDropdownNavbarItem/index.tsx +3 -3
  122. package/src/theme/NavbarItem/NavbarNavLink.tsx +2 -2
  123. package/src/theme/NavbarItem/SearchNavbarItem.tsx +1 -1
  124. package/src/theme/NavbarItem/index.tsx +1 -2
  125. package/src/theme/NotFound.tsx +1 -1
  126. package/src/theme/SiteMetadata/index.tsx +1 -1
  127. package/src/theme/TOC/index.tsx +2 -1
  128. package/src/theme/TOCCollapsible/index.tsx +1 -1
  129. package/src/theme/TOCInline/index.tsx +2 -1
  130. package/src/theme/TOCItems/index.tsx +2 -2
  131. package/src/theme/TabItem/index.tsx +1 -1
  132. package/src/theme/Tabs/index.tsx +1 -2
  133. package/src/theme/TagsListByLetter/index.tsx +1 -1
  134. package/src/theme/ThemedImage/index.tsx +0 -1
  135. 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'; // Very simple pluralization: probably good enough for now
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 BlogLayout from '@theme/BlogLayout';
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 BlogLayout from '@theme/BlogLayout';
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 Link from '@docusaurus/Link';
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'; // TODO move to design system folder
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 DocSidebar from '@theme/DocSidebar';
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 clsx from 'clsx';
12
- import styles from './styles.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
 
@@ -5,11 +5,11 @@
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 {useDocsSidebar} from '@docusaurus/theme-common';
13
13
  import styles from './styles.module.css';
14
14
  export default function DocPageLayout({children}) {
15
15
  const sidebar = useDocsSidebar();
@@ -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,10 +19,11 @@ 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
 
25
+ // If we navigate to a category and it becomes active, it should automatically
26
+ // expand itself
26
27
  function useAutoExpandActiveCategory({isActive, collapsed, updateCollapsed}) {
27
28
  const wasActive = usePrevious(isActive);
28
29
  useEffect(() => {
@@ -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 Layout from '@theme/Layout';
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 Layout from '@theme/Layout';
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},
@@ -9,8 +9,8 @@ import clsx from 'clsx';
9
9
 
10
10
  function transformUlClassName(className) {
11
11
  return clsx(
12
- className, // This class is set globally by GitHub/MDX
13
- // We keep the global class, but add Infima class to get list without styling
12
+ className, // This class is set globally by GitHub/MDX. We keep the global class, and
13
+ // add another Infima class to get list without styling
14
14
  // See https://github.com/syntax-tree/mdast-util-to-hast/issues/28
15
15
  className?.includes('contains-task-list') && 'clean-list',
16
16
  );
@@ -6,14 +6,14 @@
6
6
  */
7
7
  import React from 'react';
8
8
  import clsx from 'clsx';
9
- import Layout from '@theme/Layout';
10
- import MDXContent from '@theme/MDXContent';
11
- import TOC from '@theme/TOC';
12
9
  import {
13
10
  PageMetadata,
14
11
  HtmlClassNameProvider,
15
12
  ThemeClassNames,
16
13
  } from '@docusaurus/theme-common';
14
+ import Layout from '@theme/Layout';
15
+ import MDXContent from '@theme/MDXContent';
16
+ import TOC from '@theme/TOC';
17
17
  import styles from './styles.module.css';
18
18
  export default function MDXPage(props) {
19
19
  const {content: MDXPageContent} = props;
@@ -4,9 +4,9 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
+ import React from 'react';
7
8
  import {useColorMode, useThemeConfig} from '@docusaurus/theme-common';
8
9
  import ColorModeToggle from '@theme/ColorModeToggle';
9
- import React from 'react';
10
10
  export default function NavbarColorModeToggle({className}) {
11
11
  const disabled = useThemeConfig().colorMode.disableSwitch;
12
12
  const {colorMode, setColorMode} = useColorMode();
@@ -5,14 +5,14 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  import React from 'react';
8
- import NavbarItem from '@theme/NavbarItem';
9
- import NavbarColorModeToggle from '@theme/Navbar/ColorModeToggle';
10
- import SearchBar from '@theme/SearchBar';
11
8
  import {
12
9
  splitNavbarItems,
13
10
  useNavbarMobileSidebar,
14
11
  useThemeConfig,
15
12
  } from '@docusaurus/theme-common';
13
+ import NavbarItem from '@theme/NavbarItem';
14
+ import NavbarColorModeToggle from '@theme/Navbar/ColorModeToggle';
15
+ import SearchBar from '@theme/SearchBar';
16
16
  import NavbarMobileSidebarToggle from '@theme/Navbar/MobileSidebar/Toggle';
17
17
  import NavbarLogo from '@theme/Navbar/Logo';
18
18
  import NavbarSearch from '@theme/Navbar/Search';
@@ -6,12 +6,12 @@
6
6
  */
7
7
  import React from 'react';
8
8
  import clsx from 'clsx';
9
- import NavbarMobileSidebar from '@theme/Navbar/MobileSidebar';
10
9
  import {
11
10
  useThemeConfig,
12
11
  useHideableNavbar,
13
12
  useNavbarMobileSidebar,
14
13
  } from '@docusaurus/theme-common';
14
+ import NavbarMobileSidebar from '@theme/Navbar/MobileSidebar';
15
15
  import styles from './styles.module.css';
16
16
 
17
17
  function NavbarBackdrop(props) {
@@ -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 {useNavbarMobileSidebar} from '@docusaurus/theme-common';
8
9
  import NavbarColorModeToggle from '@theme/Navbar/ColorModeToggle';
9
10
  import IconClose from '@theme/IconClose';
10
11
  import NavbarLogo from '@theme/Navbar/Logo';
11
- import {useNavbarMobileSidebar} from '@docusaurus/theme-common';
12
12
 
13
13
  function CloseButton() {
14
14
  const mobileSidebar = useNavbarMobileSidebar();