@docusaurus/theme-classic 0.0.0-5146 → 0.0.0-5151
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/theme/AnnouncementBar/index.js +2 -1
- package/lib/theme/BackToTopButton/index.js +2 -1
- package/lib/theme/BlogTagsListPage/index.js +1 -1
- package/lib/theme/CodeBlock/Container/index.js +2 -5
- package/lib/theme/CodeBlock/Content/String.js +2 -3
- package/lib/theme/DocBreadcrumbs/index.js +2 -2
- package/lib/theme/DocCard/index.js +4 -1
- package/lib/theme/DocCardList/index.js +1 -1
- package/lib/theme/DocItem/Content/index.js +2 -1
- package/lib/theme/DocItem/Footer/index.js +2 -1
- package/lib/theme/DocItem/Layout/index.js +2 -1
- package/lib/theme/DocItem/Metadata/index.js +2 -1
- package/lib/theme/DocItem/Paginator/index.js +1 -1
- package/lib/theme/DocItem/TOC/Desktop/index.js +2 -1
- package/lib/theme/DocItem/TOC/Mobile/index.js +2 -1
- package/lib/theme/DocItem/index.js +2 -1
- package/lib/theme/DocPage/Layout/Main/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/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 +2 -1
- 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/Layout/index.d.ts +0 -1
- package/lib/theme/Layout/index.js +9 -7
- package/lib/theme/Layout/{styles.css → styles.module.css} +10 -12
- package/lib/theme/LayoutProviders/index.js +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- package/lib/theme/NavbarItem/DocsVersionNavbarItem.js +1 -1
- package/lib/theme/NavbarItem/DropdownNavbarItem.js +2 -3
- package/lib/theme/NavbarItem/LocaleDropdownNavbarItem/index.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/package.json +14 -14
- package/src/theme/AnnouncementBar/index.tsx +2 -1
- package/src/theme/BackToTopButton/index.tsx +2 -1
- package/src/theme/BlogTagsListPage/index.tsx +1 -1
- package/src/theme/CodeBlock/Container/index.tsx +2 -5
- package/src/theme/CodeBlock/Content/String.tsx +2 -3
- package/src/theme/DocBreadcrumbs/index.tsx +2 -2
- package/src/theme/DocCard/index.tsx +4 -1
- package/src/theme/DocCardList/index.tsx +1 -1
- package/src/theme/DocItem/Content/index.tsx +2 -1
- package/src/theme/DocItem/Footer/index.tsx +2 -5
- package/src/theme/DocItem/Layout/index.tsx +2 -1
- package/src/theme/DocItem/Metadata/index.tsx +2 -1
- package/src/theme/DocItem/Paginator/index.tsx +1 -1
- package/src/theme/DocItem/TOC/Desktop/index.tsx +2 -1
- package/src/theme/DocItem/TOC/Mobile/index.tsx +3 -1
- package/src/theme/DocItem/index.tsx +2 -1
- package/src/theme/DocPage/Layout/Main/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/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 +2 -1
- 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/Layout/index.tsx +9 -7
- package/src/theme/Layout/{styles.css → styles.module.css} +10 -12
- package/src/theme/LayoutProviders/index.tsx +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- package/src/theme/NavbarItem/DocsVersionNavbarItem.tsx +1 -1
- package/src/theme/NavbarItem/DropdownNavbarItem.tsx +2 -3
- package/src/theme/NavbarItem/LocaleDropdownNavbarItem/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 +1 -1
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import clsx from 'clsx';
|
|
9
|
-
import {useThemeConfig
|
|
9
|
+
import {useThemeConfig} from '@docusaurus/theme-common';
|
|
10
|
+
import {useAnnouncementBar} from '@docusaurus/theme-common/internal';
|
|
10
11
|
import {translate} from '@docusaurus/Translate';
|
|
11
12
|
import IconClose from '@theme/IconClose';
|
|
12
13
|
import styles from './styles.module.css';
|
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import clsx from 'clsx';
|
|
9
9
|
import {translate} from '@docusaurus/Translate';
|
|
10
|
-
import {ThemeClassNames
|
|
10
|
+
import {ThemeClassNames} from '@docusaurus/theme-common';
|
|
11
|
+
import {useBackToTopButton} from '@docusaurus/theme-common/internal';
|
|
11
12
|
import styles from './styles.module.css';
|
|
12
13
|
export default function BackToTopButton() {
|
|
13
14
|
const {shown, scrollToTop} = useBackToTopButton({threshold: 300});
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
} from '@docusaurus/theme-common';
|
|
15
15
|
import BlogLayout from '@theme/BlogLayout';
|
|
16
16
|
import TagsListByLetter from '@theme/TagsListByLetter';
|
|
17
|
-
import SearchMetadata from '
|
|
17
|
+
import SearchMetadata from '@theme/SearchMetadata';
|
|
18
18
|
export default function BlogTagsListPage({tags, sidebar}) {
|
|
19
19
|
const title = translateTagsPageTitle();
|
|
20
20
|
return (
|
|
@@ -6,11 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import clsx from 'clsx';
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
getPrismCssVariables,
|
|
12
|
-
ThemeClassNames,
|
|
13
|
-
} from '@docusaurus/theme-common';
|
|
9
|
+
import {ThemeClassNames, usePrismTheme} from '@docusaurus/theme-common';
|
|
10
|
+
import {getPrismCssVariables} from '@docusaurus/theme-common/internal';
|
|
14
11
|
import styles from './styles.module.css';
|
|
15
12
|
export default function CodeBlockContainer({as: As, ...props}) {
|
|
16
13
|
const prismTheme = usePrismTheme();
|
|
@@ -6,15 +6,14 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import clsx from 'clsx';
|
|
9
|
+
import {useThemeConfig, usePrismTheme} from '@docusaurus/theme-common';
|
|
9
10
|
import {
|
|
10
|
-
useThemeConfig,
|
|
11
11
|
parseCodeBlockTitle,
|
|
12
12
|
parseLanguage,
|
|
13
13
|
parseLines,
|
|
14
14
|
containsLineNumbers,
|
|
15
|
-
usePrismTheme,
|
|
16
15
|
useCodeWordWrap,
|
|
17
|
-
} from '@docusaurus/theme-common';
|
|
16
|
+
} from '@docusaurus/theme-common/internal';
|
|
18
17
|
import Highlight, {defaultProps} from 'prism-react-renderer';
|
|
19
18
|
import Line from '@theme/CodeBlock/Line';
|
|
20
19
|
import CopyButton from '@theme/CodeBlock/CopyButton';
|
|
@@ -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 {
|
|
10
|
-
ThemeClassNames,
|
|
11
11
|
useSidebarBreadcrumbs,
|
|
12
12
|
useHomePageRoute,
|
|
13
|
-
} from '@docusaurus/theme-common';
|
|
13
|
+
} from '@docusaurus/theme-common/internal';
|
|
14
14
|
import Link from '@docusaurus/Link';
|
|
15
15
|
import useBaseUrl from '@docusaurus/useBaseUrl';
|
|
16
16
|
import {translate} from '@docusaurus/Translate';
|
|
@@ -7,7 +7,10 @@
|
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import clsx from 'clsx';
|
|
9
9
|
import Link from '@docusaurus/Link';
|
|
10
|
-
import {
|
|
10
|
+
import {
|
|
11
|
+
findFirstCategoryLink,
|
|
12
|
+
useDocById,
|
|
13
|
+
} from '@docusaurus/theme-common/internal';
|
|
11
14
|
import isInternalUrl from '@docusaurus/isInternalUrl';
|
|
12
15
|
import {translate} from '@docusaurus/Translate';
|
|
13
16
|
import styles from './styles.module.css';
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import clsx from 'clsx';
|
|
9
|
-
import {findFirstCategoryLink} from '@docusaurus/theme-common';
|
|
9
|
+
import {findFirstCategoryLink} from '@docusaurus/theme-common/internal';
|
|
10
10
|
import DocCard from '@theme/DocCard';
|
|
11
11
|
// Filter categories that don't have a link.
|
|
12
12
|
function filterItems(items) {
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import clsx from 'clsx';
|
|
9
|
-
import {ThemeClassNames
|
|
9
|
+
import {ThemeClassNames} from '@docusaurus/theme-common';
|
|
10
|
+
import {useDoc} from '@docusaurus/theme-common/internal';
|
|
10
11
|
import Heading from '@theme/Heading';
|
|
11
12
|
import MDXContent from '@theme/MDXContent';
|
|
12
13
|
/**
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import clsx from 'clsx';
|
|
9
|
-
import {ThemeClassNames
|
|
9
|
+
import {ThemeClassNames} from '@docusaurus/theme-common';
|
|
10
|
+
import {useDoc} from '@docusaurus/theme-common/internal';
|
|
10
11
|
import LastUpdated from '@theme/LastUpdated';
|
|
11
12
|
import EditThisPage from '@theme/EditThisPage';
|
|
12
13
|
import TagsListInline from '@theme/TagsListInline';
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import clsx from 'clsx';
|
|
9
|
-
import {useWindowSize
|
|
9
|
+
import {useWindowSize} from '@docusaurus/theme-common';
|
|
10
|
+
import {useDoc} from '@docusaurus/theme-common/internal';
|
|
10
11
|
import DocItemPaginator from '@theme/DocItem/Paginator';
|
|
11
12
|
import DocVersionBanner from '@theme/DocVersionBanner';
|
|
12
13
|
import DocVersionBadge from '@theme/DocVersionBadge';
|
|
@@ -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 {PageMetadata
|
|
8
|
+
import {PageMetadata} from '@docusaurus/theme-common';
|
|
9
|
+
import {useDoc} from '@docusaurus/theme-common/internal';
|
|
9
10
|
export default function DocItemMetadata() {
|
|
10
11
|
const {metadata, frontMatter, assets} = useDoc();
|
|
11
12
|
return (
|
|
@@ -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 {useDoc} from '@docusaurus/theme-common';
|
|
8
|
+
import {useDoc} from '@docusaurus/theme-common/internal';
|
|
9
9
|
import DocPaginator from '@theme/DocPaginator';
|
|
10
10
|
/**
|
|
11
11
|
* This extra component is needed, because <DocPaginator> should remain generic.
|
|
@@ -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 {ThemeClassNames
|
|
8
|
+
import {ThemeClassNames} from '@docusaurus/theme-common';
|
|
9
|
+
import {useDoc} from '@docusaurus/theme-common/internal';
|
|
9
10
|
import TOC from '@theme/TOC';
|
|
10
11
|
export default function DocItemTOCDesktop() {
|
|
11
12
|
const {toc, frontMatter} = useDoc();
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import clsx from 'clsx';
|
|
9
|
-
import {ThemeClassNames
|
|
9
|
+
import {ThemeClassNames} from '@docusaurus/theme-common';
|
|
10
|
+
import {useDoc} from '@docusaurus/theme-common/internal';
|
|
10
11
|
import TOCCollapsible from '@theme/TOCCollapsible';
|
|
11
12
|
import styles from './styles.module.css';
|
|
12
13
|
export default function DocItemTOCMobile() {
|
|
@@ -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 {HtmlClassNameProvider
|
|
8
|
+
import {HtmlClassNameProvider} from '@docusaurus/theme-common';
|
|
9
|
+
import {DocProvider} from '@docusaurus/theme-common/internal';
|
|
9
10
|
import DocItemMetadata from '@theme/DocItem/Metadata';
|
|
10
11
|
import DocItemLayout from '@theme/DocItem/Layout';
|
|
11
12
|
export default function DocItem(props) {
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import clsx from 'clsx';
|
|
9
|
-
import {useDocsSidebar} from '@docusaurus/theme-common';
|
|
9
|
+
import {useDocsSidebar} from '@docusaurus/theme-common/internal';
|
|
10
10
|
import styles from './styles.module.css';
|
|
11
11
|
export default function DocPageLayoutMain({hiddenSidebarContainer, children}) {
|
|
12
12
|
const sidebar = useDocsSidebar();
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React, {useState, useCallback} from 'react';
|
|
8
8
|
import clsx from 'clsx';
|
|
9
|
-
import {ThemeClassNames
|
|
9
|
+
import {ThemeClassNames} from '@docusaurus/theme-common';
|
|
10
|
+
import {useDocsSidebar} from '@docusaurus/theme-common/internal';
|
|
10
11
|
import {useLocation} from '@docusaurus/router';
|
|
11
12
|
import DocSidebar from '@theme/DocSidebar';
|
|
12
13
|
import ExpandButton from '@theme/DocPage/Layout/Sidebar/ExpandButton';
|
|
@@ -5,7 +5,7 @@
|
|
|
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
|
+
import {useDocsSidebar} from '@docusaurus/theme-common/internal';
|
|
9
9
|
import Layout from '@theme/Layout';
|
|
10
10
|
import BackToTopButton from '@theme/BackToTopButton';
|
|
11
11
|
import DocPageLayoutSidebar from '@theme/DocPage/Layout/Sidebar';
|
|
@@ -6,14 +6,13 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import clsx from 'clsx';
|
|
9
|
+
import {HtmlClassNameProvider, ThemeClassNames} from '@docusaurus/theme-common';
|
|
9
10
|
import {
|
|
10
|
-
HtmlClassNameProvider,
|
|
11
|
-
ThemeClassNames,
|
|
12
11
|
docVersionSearchTag,
|
|
13
12
|
DocsSidebarProvider,
|
|
14
13
|
DocsVersionProvider,
|
|
15
14
|
useDocRouteMetadata,
|
|
16
|
-
} from '@docusaurus/theme-common';
|
|
15
|
+
} from '@docusaurus/theme-common/internal';
|
|
17
16
|
import DocPageLayout from '@theme/DocPage/Layout';
|
|
18
17
|
import NotFound from '@theme/NotFound';
|
|
19
18
|
import SearchMetadata from '@theme/SearchMetadata';
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React, {useState} from 'react';
|
|
8
8
|
import clsx from 'clsx';
|
|
9
|
+
import {ThemeClassNames} from '@docusaurus/theme-common';
|
|
9
10
|
import {
|
|
10
|
-
ThemeClassNames,
|
|
11
11
|
useAnnouncementBar,
|
|
12
12
|
useScrollPosition,
|
|
13
|
-
} from '@docusaurus/theme-common';
|
|
13
|
+
} from '@docusaurus/theme-common/internal';
|
|
14
14
|
import DocSidebarItems from '@theme/DocSidebarItems';
|
|
15
15
|
import styles from './styles.module.css';
|
|
16
16
|
function useShowAnnouncementBar() {
|
|
@@ -9,8 +9,8 @@ import clsx from 'clsx';
|
|
|
9
9
|
import {
|
|
10
10
|
NavbarSecondaryMenuFiller,
|
|
11
11
|
ThemeClassNames,
|
|
12
|
-
useNavbarMobileSidebar,
|
|
13
12
|
} from '@docusaurus/theme-common';
|
|
13
|
+
import {useNavbarMobileSidebar} from '@docusaurus/theme-common/internal';
|
|
14
14
|
import DocSidebarItems from '@theme/DocSidebarItems';
|
|
15
15
|
// eslint-disable-next-line react/function-component-definition
|
|
16
16
|
const DocSidebarMobileSecondaryMenu = ({sidebar, path}) => {
|
|
@@ -7,16 +7,18 @@
|
|
|
7
7
|
import React, {useEffect, useMemo} from 'react';
|
|
8
8
|
import clsx from 'clsx';
|
|
9
9
|
import {
|
|
10
|
-
|
|
10
|
+
ThemeClassNames,
|
|
11
|
+
useThemeConfig,
|
|
11
12
|
usePrevious,
|
|
12
13
|
Collapsible,
|
|
13
14
|
useCollapsible,
|
|
15
|
+
} from '@docusaurus/theme-common';
|
|
16
|
+
import {
|
|
17
|
+
isActiveSidebarItem,
|
|
14
18
|
findFirstCategoryLink,
|
|
15
|
-
ThemeClassNames,
|
|
16
|
-
useThemeConfig,
|
|
17
19
|
useDocSidebarItemsExpandedState,
|
|
18
20
|
isSamePath,
|
|
19
|
-
} from '@docusaurus/theme-common';
|
|
21
|
+
} from '@docusaurus/theme-common/internal';
|
|
20
22
|
import Link from '@docusaurus/Link';
|
|
21
23
|
import {translate} from '@docusaurus/Translate';
|
|
22
24
|
import useIsBrowser from '@docusaurus/useIsBrowser';
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import clsx from 'clsx';
|
|
9
|
-
import {
|
|
9
|
+
import {ThemeClassNames} from '@docusaurus/theme-common';
|
|
10
|
+
import {isActiveSidebarItem} from '@docusaurus/theme-common/internal';
|
|
10
11
|
import Link from '@docusaurus/Link';
|
|
11
12
|
import isInternalUrl from '@docusaurus/isInternalUrl';
|
|
12
13
|
import IconExternalLink from '@theme/IconExternalLink';
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
import React, {memo} from 'react';
|
|
8
|
-
import {DocSidebarItemsExpandedStateProvider} from '@docusaurus/theme-common';
|
|
8
|
+
import {DocSidebarItemsExpandedStateProvider} from '@docusaurus/theme-common/internal';
|
|
9
9
|
import DocSidebarItem from '@theme/DocSidebarItem';
|
|
10
10
|
// TODO this item should probably not receive the "activePath" props
|
|
11
11
|
// TODO this triggers whole sidebar re-renders on navigation
|
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import clsx from 'clsx';
|
|
9
9
|
import Translate from '@docusaurus/Translate';
|
|
10
|
-
import {ThemeClassNames
|
|
10
|
+
import {ThemeClassNames} from '@docusaurus/theme-common';
|
|
11
|
+
import {useDocsVersion} from '@docusaurus/theme-common/internal';
|
|
11
12
|
export default function DocVersionBadge({className}) {
|
|
12
13
|
const versionMetadata = useDocsVersion();
|
|
13
14
|
if (versionMetadata.badge) {
|
|
@@ -13,11 +13,11 @@ import {
|
|
|
13
13
|
useActivePlugin,
|
|
14
14
|
useDocVersionSuggestions,
|
|
15
15
|
} from '@docusaurus/plugin-content-docs/client';
|
|
16
|
+
import {ThemeClassNames} from '@docusaurus/theme-common';
|
|
16
17
|
import {
|
|
17
|
-
ThemeClassNames,
|
|
18
18
|
useDocsPreferredVersion,
|
|
19
19
|
useDocsVersion,
|
|
20
|
-
} from '@docusaurus/theme-common';
|
|
20
|
+
} from '@docusaurus/theme-common/internal';
|
|
21
21
|
function UnreleasedVersionLabel({siteTitle, versionMetadata}) {
|
|
22
22
|
return (
|
|
23
23
|
<Translate
|
|
@@ -7,18 +7,15 @@
|
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import clsx from 'clsx';
|
|
9
9
|
import ErrorBoundary from '@docusaurus/ErrorBoundary';
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
ThemeClassNames,
|
|
13
|
-
useKeyboardNavigation,
|
|
14
|
-
} from '@docusaurus/theme-common';
|
|
10
|
+
import {PageMetadata, ThemeClassNames} from '@docusaurus/theme-common';
|
|
11
|
+
import {useKeyboardNavigation} from '@docusaurus/theme-common/internal';
|
|
15
12
|
import SkipToContent from '@theme/SkipToContent';
|
|
16
13
|
import AnnouncementBar from '@theme/AnnouncementBar';
|
|
17
14
|
import Navbar from '@theme/Navbar';
|
|
18
15
|
import Footer from '@theme/Footer';
|
|
19
16
|
import LayoutProviders from '@theme/LayoutProviders';
|
|
20
17
|
import ErrorPageContent from '@theme/ErrorPageContent';
|
|
21
|
-
import './styles.css';
|
|
18
|
+
import styles from './styles.module.css';
|
|
22
19
|
export default function Layout(props) {
|
|
23
20
|
const {
|
|
24
21
|
children,
|
|
@@ -39,7 +36,12 @@ export default function Layout(props) {
|
|
|
39
36
|
|
|
40
37
|
<Navbar />
|
|
41
38
|
|
|
42
|
-
<div
|
|
39
|
+
<div
|
|
40
|
+
className={clsx(
|
|
41
|
+
ThemeClassNames.wrapper.main,
|
|
42
|
+
styles.mainWrapper,
|
|
43
|
+
wrapperClassName,
|
|
44
|
+
)}>
|
|
43
45
|
<ErrorBoundary fallback={(params) => <ErrorPageContent {...params} />}>
|
|
44
46
|
{children}
|
|
45
47
|
</ErrorBoundary>
|
|
@@ -5,23 +5,21 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
html,
|
|
9
|
-
body {
|
|
8
|
+
:global(html, body) {
|
|
10
9
|
height: 100%;
|
|
11
10
|
}
|
|
12
11
|
|
|
13
|
-
|
|
14
|
-
min-height: 100%;
|
|
15
|
-
display: flex;
|
|
16
|
-
flex-direction: column;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.main-wrapper {
|
|
12
|
+
.mainWrapper {
|
|
20
13
|
flex: 1 0 auto;
|
|
21
14
|
}
|
|
22
15
|
|
|
23
|
-
/* Docusaurus-specific utility
|
|
24
|
-
|
|
25
|
-
.docusaurus-mt-lg {
|
|
16
|
+
/* Docusaurus-specific utility class */
|
|
17
|
+
:global(.docusaurus-mt-lg) {
|
|
26
18
|
margin-top: 3rem;
|
|
27
19
|
}
|
|
20
|
+
|
|
21
|
+
:global(#__docusaurus) {
|
|
22
|
+
min-height: 100%;
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
}
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
ScrollControllerProvider,
|
|
14
14
|
NavbarProvider,
|
|
15
15
|
PluginHtmlClassNameProvider,
|
|
16
|
-
} from '@docusaurus/theme-common';
|
|
16
|
+
} from '@docusaurus/theme-common/internal';
|
|
17
17
|
export default function LayoutProviders({children}) {
|
|
18
18
|
return (
|
|
19
19
|
<ColorModeProvider>
|
|
@@ -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,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 {useNavbarMobileSidebar} from '@docusaurus/theme-common';
|
|
8
|
+
import {useNavbarMobileSidebar} from '@docusaurus/theme-common/internal';
|
|
9
9
|
import NavbarColorModeToggle from '@theme/Navbar/ColorModeToggle';
|
|
10
10
|
import IconClose from '@theme/IconClose';
|
|
11
11
|
import NavbarLogo from '@theme/Navbar/Logo';
|
|
@@ -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,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 {useNavbarMobileSidebar} from '@docusaurus/theme-common';
|
|
8
|
+
import {useNavbarMobileSidebar} from '@docusaurus/theme-common/internal';
|
|
9
9
|
import IconMenu from '@theme/IconMenu';
|
|
10
10
|
export default function MobileSidebarToggle() {
|
|
11
11
|
const mobileSidebar = useNavbarMobileSidebar();
|
|
@@ -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,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
import {
|
|
13
13
|
useDocsPreferredVersion,
|
|
14
14
|
useDocsVersionCandidates,
|
|
15
|
-
} from '@docusaurus/theme-common';
|
|
15
|
+
} from '@docusaurus/theme-common/internal';
|
|
16
16
|
import {translate} from '@docusaurus/Translate';
|
|
17
17
|
import DefaultNavbarItem from '@theme/NavbarItem/DefaultNavbarItem';
|
|
18
18
|
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,7 +6,7 @@
|
|
|
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
12
|
import IconLanguage from '@theme/IconLanguage';
|
|
@@ -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,
|