@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
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
|
-
import
|
|
9
|
+
import clsx from 'clsx';
|
|
10
10
|
import useIsBrowser from '@docusaurus/useIsBrowser';
|
|
11
11
|
import {translate} from '@docusaurus/Translate';
|
|
12
12
|
import IconLightMode from '@theme/IconLightMode';
|
|
13
13
|
import IconDarkMode from '@theme/IconDarkMode';
|
|
14
|
+
import type {Props} from '@theme/ColorModeToggle';
|
|
14
15
|
|
|
15
|
-
import clsx from 'clsx';
|
|
16
16
|
import styles from './styles.module.css';
|
|
17
17
|
|
|
18
18
|
function ColorModeToggle({className, value, onChange}: Props): JSX.Element {
|
|
@@ -9,6 +9,7 @@ import React from 'react';
|
|
|
9
9
|
import clsx from 'clsx';
|
|
10
10
|
import {Details as DetailsGeneric} from '@docusaurus/theme-common/Details';
|
|
11
11
|
import type {Props} from '@theme/Details';
|
|
12
|
+
|
|
12
13
|
import styles from './styles.module.css';
|
|
13
14
|
|
|
14
15
|
// Should we have a custom details/summary comp in Infima instead of reusing
|
|
@@ -6,18 +6,19 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React, {type ReactNode} from 'react';
|
|
9
|
+
import clsx from 'clsx';
|
|
9
10
|
import {
|
|
10
11
|
ThemeClassNames,
|
|
11
12
|
useSidebarBreadcrumbs,
|
|
12
13
|
useHomePageRoute,
|
|
13
14
|
} from '@docusaurus/theme-common';
|
|
14
|
-
import styles from './styles.module.css';
|
|
15
|
-
import clsx from 'clsx';
|
|
16
15
|
import Link from '@docusaurus/Link';
|
|
17
16
|
import useBaseUrl from '@docusaurus/useBaseUrl';
|
|
18
17
|
import {translate} from '@docusaurus/Translate';
|
|
19
18
|
import IconHome from '@theme/IconHome';
|
|
20
19
|
|
|
20
|
+
import styles from './styles.module.css';
|
|
21
|
+
|
|
21
22
|
// TODO move to design system folder
|
|
22
23
|
function BreadcrumbsItemLink({
|
|
23
24
|
children,
|
|
@@ -6,17 +6,18 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React, {type ReactNode} from 'react';
|
|
9
|
+
import clsx from 'clsx';
|
|
9
10
|
import Link from '@docusaurus/Link';
|
|
11
|
+
import {findFirstCategoryLink, useDocById} from '@docusaurus/theme-common';
|
|
12
|
+
import isInternalUrl from '@docusaurus/isInternalUrl';
|
|
13
|
+
import {translate} from '@docusaurus/Translate';
|
|
14
|
+
import type {Props} from '@theme/DocCard';
|
|
15
|
+
|
|
16
|
+
import styles from './styles.module.css';
|
|
10
17
|
import type {
|
|
11
18
|
PropSidebarItemCategory,
|
|
12
19
|
PropSidebarItemLink,
|
|
13
20
|
} from '@docusaurus/plugin-content-docs';
|
|
14
|
-
import type {Props} from '@theme/DocCard';
|
|
15
|
-
import {findFirstCategoryLink, useDocById} from '@docusaurus/theme-common';
|
|
16
|
-
import clsx from 'clsx';
|
|
17
|
-
import styles from './styles.module.css';
|
|
18
|
-
import isInternalUrl from '@docusaurus/isInternalUrl';
|
|
19
|
-
import {translate} from '@docusaurus/Translate';
|
|
20
21
|
|
|
21
22
|
function CardContainer({
|
|
22
23
|
href,
|
|
@@ -7,11 +7,10 @@
|
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import clsx from 'clsx';
|
|
10
|
-
|
|
11
|
-
import DocCard from '@theme/DocCard';
|
|
12
|
-
import type {PropSidebarItem} from '@docusaurus/plugin-content-docs';
|
|
13
10
|
import {findFirstCategoryLink} from '@docusaurus/theme-common';
|
|
11
|
+
import DocCard from '@theme/DocCard';
|
|
14
12
|
import type {Props} from '@theme/DocCardList';
|
|
13
|
+
import type {PropSidebarItem} from '@docusaurus/plugin-content-docs';
|
|
15
14
|
|
|
16
15
|
// Filter categories that don't have a link.
|
|
17
16
|
function filterItems(items: PropSidebarItem[]): PropSidebarItem[] {
|
|
@@ -10,14 +10,14 @@ import {
|
|
|
10
10
|
PageMetadata,
|
|
11
11
|
useCurrentSidebarCategory,
|
|
12
12
|
} from '@docusaurus/theme-common';
|
|
13
|
-
import
|
|
13
|
+
import useBaseUrl from '@docusaurus/useBaseUrl';
|
|
14
14
|
import DocCardList from '@theme/DocCardList';
|
|
15
15
|
import DocPaginator from '@theme/DocPaginator';
|
|
16
16
|
import DocVersionBanner from '@theme/DocVersionBanner';
|
|
17
17
|
import DocVersionBadge from '@theme/DocVersionBadge';
|
|
18
18
|
import DocBreadcrumbs from '@theme/DocBreadcrumbs';
|
|
19
19
|
import Heading from '@theme/Heading';
|
|
20
|
-
import
|
|
20
|
+
import type {Props} from '@theme/DocCategoryGeneratedIndexPage';
|
|
21
21
|
|
|
22
22
|
import styles from './styles.module.css';
|
|
23
23
|
|
|
@@ -7,23 +7,24 @@
|
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import clsx from 'clsx';
|
|
10
|
+
import {
|
|
11
|
+
PageMetadata,
|
|
12
|
+
HtmlClassNameProvider,
|
|
13
|
+
ThemeClassNames,
|
|
14
|
+
useWindowSize,
|
|
15
|
+
} from '@docusaurus/theme-common';
|
|
10
16
|
import DocPaginator from '@theme/DocPaginator';
|
|
11
17
|
import DocVersionBanner from '@theme/DocVersionBanner';
|
|
12
18
|
import DocVersionBadge from '@theme/DocVersionBadge';
|
|
13
|
-
import type {Props} from '@theme/DocItem';
|
|
14
19
|
import DocItemFooter from '@theme/DocItemFooter';
|
|
15
20
|
import TOC from '@theme/TOC';
|
|
16
21
|
import TOCCollapsible from '@theme/TOCCollapsible';
|
|
17
22
|
import Heading from '@theme/Heading';
|
|
18
|
-
import styles from './styles.module.css';
|
|
19
|
-
import {
|
|
20
|
-
PageMetadata,
|
|
21
|
-
HtmlClassNameProvider,
|
|
22
|
-
ThemeClassNames,
|
|
23
|
-
useWindowSize,
|
|
24
|
-
} from '@docusaurus/theme-common';
|
|
25
23
|
import DocBreadcrumbs from '@theme/DocBreadcrumbs';
|
|
26
24
|
import MDXContent from '@theme/MDXContent';
|
|
25
|
+
import type {Props} from '@theme/DocItem';
|
|
26
|
+
|
|
27
|
+
import styles from './styles.module.css';
|
|
27
28
|
|
|
28
29
|
function DocItemMetadata(props: Props): JSX.Element {
|
|
29
30
|
const {content: DocContent} = props;
|
|
@@ -7,16 +7,15 @@
|
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import clsx from 'clsx';
|
|
10
|
-
|
|
10
|
+
import {ThemeClassNames} from '@docusaurus/theme-common';
|
|
11
11
|
import LastUpdated from '@theme/LastUpdated';
|
|
12
|
-
import type {Props} from '@theme/DocItem';
|
|
13
12
|
import EditThisPage from '@theme/EditThisPage';
|
|
14
13
|
import TagsListInline, {
|
|
15
14
|
type Props as TagsListInlineProps,
|
|
16
15
|
} from '@theme/TagsListInline';
|
|
16
|
+
import type {Props} from '@theme/DocItem';
|
|
17
17
|
|
|
18
18
|
import styles from './styles.module.css';
|
|
19
|
-
import {ThemeClassNames} from '@docusaurus/theme-common';
|
|
20
19
|
|
|
21
20
|
function TagsRow(props: TagsListInlineProps) {
|
|
22
21
|
return (
|
|
@@ -6,12 +6,11 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
|
-
|
|
9
|
+
import clsx from 'clsx';
|
|
10
10
|
import {useDocsSidebar} from '@docusaurus/theme-common';
|
|
11
|
+
import type {Props} from '@theme/DocPage/Layout/Main';
|
|
11
12
|
|
|
12
|
-
import clsx from 'clsx';
|
|
13
13
|
import styles from './styles.module.css';
|
|
14
|
-
import type {Props} from '@theme/DocPage/Layout/Main';
|
|
15
14
|
|
|
16
15
|
export default function DocPageLayoutMain({
|
|
17
16
|
hiddenSidebarContainer,
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
|
-
import IconArrow from '@theme/IconArrow';
|
|
10
9
|
import {translate} from '@docusaurus/Translate';
|
|
10
|
+
import IconArrow from '@theme/IconArrow';
|
|
11
11
|
import type {Props} from '@theme/DocPage/Layout/Sidebar/ExpandButton';
|
|
12
12
|
|
|
13
13
|
import styles from './styles.module.css';
|
|
@@ -6,15 +6,14 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React, {type ReactNode, useState, useCallback} from 'react';
|
|
9
|
-
import
|
|
9
|
+
import clsx from 'clsx';
|
|
10
|
+
import {ThemeClassNames, useDocsSidebar} from '@docusaurus/theme-common';
|
|
10
11
|
import {useLocation} from '@docusaurus/router';
|
|
11
|
-
import
|
|
12
|
+
import DocSidebar from '@theme/DocSidebar';
|
|
12
13
|
import ExpandButton from '@theme/DocPage/Layout/Sidebar/ExpandButton';
|
|
14
|
+
import type {Props} from '@theme/DocPage/Layout/Sidebar';
|
|
13
15
|
|
|
14
|
-
import
|
|
15
|
-
import styles from './index.module.css';
|
|
16
|
-
|
|
17
|
-
import {ThemeClassNames, useDocsSidebar} from '@docusaurus/theme-common';
|
|
16
|
+
import styles from './styles.module.css';
|
|
18
17
|
|
|
19
18
|
// Reset sidebar state when sidebar changes
|
|
20
19
|
// Use React key to unmount/remount the children
|
|
File without changes
|
|
@@ -6,15 +6,14 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React, {useState} from 'react';
|
|
9
|
+
import {useDocsSidebar} from '@docusaurus/theme-common';
|
|
9
10
|
import Layout from '@theme/Layout';
|
|
10
11
|
import BackToTopButton from '@theme/BackToTopButton';
|
|
11
|
-
import type {Props} from '@theme/DocPage/Layout';
|
|
12
12
|
import DocPageLayoutSidebar from '@theme/DocPage/Layout/Sidebar';
|
|
13
13
|
import DocPageLayoutMain from '@theme/DocPage/Layout/Main';
|
|
14
|
+
import type {Props} from '@theme/DocPage/Layout';
|
|
14
15
|
|
|
15
|
-
import styles from './
|
|
16
|
-
|
|
17
|
-
import {useDocsSidebar} from '@docusaurus/theme-common';
|
|
16
|
+
import styles from './styles.module.css';
|
|
18
17
|
|
|
19
18
|
export default function DocPageLayout({children}: Props): JSX.Element {
|
|
20
19
|
const sidebar = useDocsSidebar();
|
|
File without changes
|
|
@@ -6,12 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
|
-
import NotFound from '@theme/NotFound';
|
|
10
|
-
import type {Props} from '@theme/DocPage';
|
|
11
|
-
import DocPageLayout from '@theme/DocPage/Layout';
|
|
12
|
-
|
|
13
9
|
import clsx from 'clsx';
|
|
14
|
-
|
|
15
10
|
import {
|
|
16
11
|
HtmlClassNameProvider,
|
|
17
12
|
ThemeClassNames,
|
|
@@ -20,7 +15,10 @@ import {
|
|
|
20
15
|
DocsVersionProvider,
|
|
21
16
|
useDocRouteMetadata,
|
|
22
17
|
} from '@docusaurus/theme-common';
|
|
18
|
+
import DocPageLayout from '@theme/DocPage/Layout';
|
|
19
|
+
import NotFound from '@theme/NotFound';
|
|
23
20
|
import SearchMetadata from '@theme/SearchMetadata';
|
|
21
|
+
import type {Props} from '@theme/DocPage';
|
|
24
22
|
|
|
25
23
|
export default function DocPage(props: Props): JSX.Element {
|
|
26
24
|
const {versionMetadata} = props;
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import clsx from 'clsx';
|
|
10
|
-
import IconArrow from '@theme/IconArrow';
|
|
11
10
|
import {translate} from '@docusaurus/Translate';
|
|
11
|
+
import IconArrow from '@theme/IconArrow';
|
|
12
12
|
import type {Props} from '@theme/DocSidebar/Desktop/CollapseButton';
|
|
13
13
|
|
|
14
14
|
import styles from './styles.module.css';
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import {useWindowSize} from '@docusaurus/theme-common';
|
|
10
|
-
import type {Props} from '@theme/DocSidebar';
|
|
11
10
|
import DocSidebarDesktop from '@theme/DocSidebar/Desktop';
|
|
12
11
|
import DocSidebarMobile from '@theme/DocSidebar/Mobile';
|
|
12
|
+
import type {Props} from '@theme/DocSidebar';
|
|
13
13
|
|
|
14
14
|
export default function DocSidebar(props: Props): JSX.Element {
|
|
15
15
|
const windowSize = useWindowSize();
|
|
@@ -20,30 +20,28 @@ import {
|
|
|
20
20
|
} from '@docusaurus/theme-common';
|
|
21
21
|
import Link from '@docusaurus/Link';
|
|
22
22
|
import {translate} from '@docusaurus/Translate';
|
|
23
|
-
|
|
23
|
+
import useIsBrowser from '@docusaurus/useIsBrowser';
|
|
24
24
|
import DocSidebarItems from '@theme/DocSidebarItems';
|
|
25
25
|
import type {Props} from '@theme/DocSidebarItem/Category';
|
|
26
26
|
|
|
27
|
-
import useIsBrowser from '@docusaurus/useIsBrowser';
|
|
28
|
-
|
|
29
27
|
// If we navigate to a category and it becomes active, it should automatically
|
|
30
28
|
// expand itself
|
|
31
29
|
function useAutoExpandActiveCategory({
|
|
32
30
|
isActive,
|
|
33
31
|
collapsed,
|
|
34
|
-
|
|
32
|
+
updateCollapsed,
|
|
35
33
|
}: {
|
|
36
34
|
isActive: boolean;
|
|
37
35
|
collapsed: boolean;
|
|
38
|
-
|
|
36
|
+
updateCollapsed: (b: boolean) => void;
|
|
39
37
|
}) {
|
|
40
38
|
const wasActive = usePrevious(isActive);
|
|
41
39
|
useEffect(() => {
|
|
42
40
|
const justBecameActive = isActive && !wasActive;
|
|
43
41
|
if (justBecameActive && collapsed) {
|
|
44
|
-
|
|
42
|
+
updateCollapsed(false);
|
|
45
43
|
}
|
|
46
|
-
}, [isActive, wasActive, collapsed,
|
|
44
|
+
}, [isActive, wasActive, collapsed, updateCollapsed]);
|
|
47
45
|
}
|
|
48
46
|
|
|
49
47
|
/**
|
|
@@ -105,6 +103,11 @@ export default function DocSidebarItemCategory({
|
|
|
105
103
|
...props
|
|
106
104
|
}: Props): JSX.Element {
|
|
107
105
|
const {items, label, collapsible, className, href} = item;
|
|
106
|
+
const {
|
|
107
|
+
docs: {
|
|
108
|
+
sidebar: {autoCollapseCategories},
|
|
109
|
+
},
|
|
110
|
+
} = useThemeConfig();
|
|
108
111
|
const hrefWithSSRFallback = useCategoryHrefWithSSRFallback(item);
|
|
109
112
|
|
|
110
113
|
const isActive = isActiveSidebarItem(item, activePath);
|
|
@@ -121,17 +124,13 @@ export default function DocSidebarItemCategory({
|
|
|
121
124
|
},
|
|
122
125
|
});
|
|
123
126
|
|
|
124
|
-
useAutoExpandActiveCategory({isActive, collapsed, setCollapsed});
|
|
125
127
|
const {expandedItem, setExpandedItem} = useDocSidebarItemsExpandedState();
|
|
126
|
-
|
|
128
|
+
// Use this instead of `setCollapsed`, because it is also reactive
|
|
129
|
+
const updateCollapsed = (toCollapsed: boolean = !collapsed) => {
|
|
127
130
|
setExpandedItem(toCollapsed ? null : index);
|
|
128
131
|
setCollapsed(toCollapsed);
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
docs: {
|
|
132
|
-
sidebar: {autoCollapseCategories},
|
|
133
|
-
},
|
|
134
|
-
} = useThemeConfig();
|
|
132
|
+
};
|
|
133
|
+
useAutoExpandActiveCategory({isActive, collapsed, updateCollapsed});
|
|
135
134
|
useEffect(() => {
|
|
136
135
|
if (
|
|
137
136
|
collapsible &&
|
|
@@ -10,7 +10,7 @@ import clsx from 'clsx';
|
|
|
10
10
|
import {ThemeClassNames} from '@docusaurus/theme-common';
|
|
11
11
|
import type {Props} from '@theme/DocSidebarItem/Html';
|
|
12
12
|
|
|
13
|
-
import styles from './
|
|
13
|
+
import styles from './styles.module.css';
|
|
14
14
|
|
|
15
15
|
export default function DocSidebarItemHtml({
|
|
16
16
|
item,
|
|
File without changes
|
|
@@ -11,10 +11,9 @@ import {isActiveSidebarItem, ThemeClassNames} from '@docusaurus/theme-common';
|
|
|
11
11
|
import Link from '@docusaurus/Link';
|
|
12
12
|
import isInternalUrl from '@docusaurus/isInternalUrl';
|
|
13
13
|
import IconExternalLink from '@theme/IconExternalLink';
|
|
14
|
-
|
|
15
14
|
import type {Props} from '@theme/DocSidebarItem/Link';
|
|
16
15
|
|
|
17
|
-
import styles from './
|
|
16
|
+
import styles from './styles.module.css';
|
|
18
17
|
|
|
19
18
|
export default function DocSidebarItemLink({
|
|
20
19
|
item,
|
|
File without changes
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React, {memo} from 'react';
|
|
9
|
-
import DocSidebarItem from '@theme/DocSidebarItem';
|
|
10
9
|
import {DocSidebarItemsExpandedStateProvider} from '@docusaurus/theme-common';
|
|
10
|
+
import DocSidebarItem from '@theme/DocSidebarItem';
|
|
11
11
|
|
|
12
12
|
import type {Props} from '@theme/DocSidebarItems';
|
|
13
13
|
|
|
@@ -6,8 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
|
-
|
|
10
|
-
import Layout from '@theme/Layout';
|
|
9
|
+
import clsx from 'clsx';
|
|
11
10
|
import Link from '@docusaurus/Link';
|
|
12
11
|
import {
|
|
13
12
|
PageMetadata,
|
|
@@ -16,9 +15,9 @@ import {
|
|
|
16
15
|
usePluralForm,
|
|
17
16
|
} from '@docusaurus/theme-common';
|
|
18
17
|
import Translate, {translate} from '@docusaurus/Translate';
|
|
19
|
-
import
|
|
18
|
+
import Layout from '@theme/Layout';
|
|
20
19
|
import SearchMetadata from '@theme/SearchMetadata';
|
|
21
|
-
import
|
|
20
|
+
import type {Props} from '@theme/DocTagDocListPage';
|
|
22
21
|
|
|
23
22
|
// Very simple pluralization: probably good enough for now
|
|
24
23
|
function useNDocsTaggedPlural() {
|
|
@@ -6,18 +6,17 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
|
-
|
|
10
|
-
import Layout from '@theme/Layout';
|
|
9
|
+
import clsx from 'clsx';
|
|
11
10
|
import {
|
|
12
11
|
PageMetadata,
|
|
13
12
|
HtmlClassNameProvider,
|
|
14
13
|
ThemeClassNames,
|
|
15
14
|
translateTagsPageTitle,
|
|
16
15
|
} from '@docusaurus/theme-common';
|
|
16
|
+
import Layout from '@theme/Layout';
|
|
17
17
|
import TagsListByLetter from '@theme/TagsListByLetter';
|
|
18
|
-
import type {Props} from '@theme/DocTagsListPage';
|
|
19
18
|
import SearchMetadata from '@theme/SearchMetadata';
|
|
20
|
-
import
|
|
19
|
+
import type {Props} from '@theme/DocTagsListPage';
|
|
21
20
|
|
|
22
21
|
export default function DocTagsListPage({tags}: Props): JSX.Element {
|
|
23
22
|
const title = translateTagsPageTitle();
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
|
+
import clsx from 'clsx';
|
|
9
10
|
import Translate from '@docusaurus/Translate';
|
|
10
11
|
import {ThemeClassNames, useDocsVersion} from '@docusaurus/theme-common';
|
|
11
|
-
import clsx from 'clsx';
|
|
12
12
|
import type {Props} from '@theme/DocVersionBadge';
|
|
13
13
|
|
|
14
14
|
export default function DocVersionBadge({
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React, {type ComponentType} from 'react';
|
|
9
|
+
import clsx from 'clsx';
|
|
9
10
|
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
|
10
11
|
import Link from '@docusaurus/Link';
|
|
11
12
|
import Translate from '@docusaurus/Translate';
|
|
@@ -21,7 +22,6 @@ import {
|
|
|
21
22
|
} from '@docusaurus/theme-common';
|
|
22
23
|
|
|
23
24
|
import type {Props} from '@theme/DocVersionBanner';
|
|
24
|
-
import clsx from 'clsx';
|
|
25
25
|
import type {
|
|
26
26
|
VersionBanner,
|
|
27
27
|
PropVersionMetadata,
|
|
@@ -7,10 +7,9 @@
|
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import Translate from '@docusaurus/Translate';
|
|
10
|
-
|
|
11
|
-
import type {Props} from '@theme/EditThisPage';
|
|
12
|
-
import IconEdit from '@theme/IconEdit';
|
|
13
10
|
import {ThemeClassNames} from '@docusaurus/theme-common';
|
|
11
|
+
import IconEdit from '@theme/IconEdit';
|
|
12
|
+
import type {Props} from '@theme/EditThisPage';
|
|
14
13
|
|
|
15
14
|
export default function EditThisPage({editUrl}: Props): JSX.Element {
|
|
16
15
|
return (
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
|
-
import type {Props} from '@theme/Footer/Links/MultiColumn';
|
|
10
9
|
import LinkItem from '@theme/Footer/LinkItem';
|
|
10
|
+
import type {Props} from '@theme/Footer/Links/MultiColumn';
|
|
11
11
|
|
|
12
12
|
type ColumnType = Props['columns'][number];
|
|
13
13
|
type ColumnItemType = ColumnType['items'][number];
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
|
-
import type {Props} from '@theme/Footer/Links/Simple';
|
|
10
9
|
import LinkItem from '@theme/Footer/LinkItem';
|
|
10
|
+
import type {Props} from '@theme/Footer/Links/Simple';
|
|
11
11
|
|
|
12
12
|
function Separator() {
|
|
13
13
|
return <span className="footer__link-separator">·</span>;
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
|
|
10
10
|
import {isMultiColumnFooterLinks} from '@docusaurus/theme-common';
|
|
11
|
-
import type {Props} from '@theme/Footer/Links';
|
|
12
11
|
import FooterLinksMultiColumn from '@theme/Footer/Links/MultiColumn';
|
|
13
12
|
import FooterLinksSimple from '@theme/Footer/Links/Simple';
|
|
13
|
+
import type {Props} from '@theme/Footer/Links';
|
|
14
14
|
|
|
15
15
|
export default function FooterLinks({links}: Props): JSX.Element {
|
|
16
16
|
return isMultiColumnFooterLinks(links) ? (
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
|
-
|
|
10
9
|
import Link from '@docusaurus/Link';
|
|
11
10
|
import {useBaseUrlUtils} from '@docusaurus/useBaseUrl';
|
|
12
|
-
import styles from './styles.module.css';
|
|
13
11
|
import ThemedImage from '@theme/ThemedImage';
|
|
14
12
|
import type {Props} from '@theme/Footer/Logo';
|
|
15
13
|
|
|
14
|
+
import styles from './styles.module.css';
|
|
15
|
+
|
|
16
16
|
function LogoImage({logo}: Props) {
|
|
17
17
|
const {withBaseUrl} = useBaseUrlUtils();
|
|
18
18
|
const sources = {
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import clsx from 'clsx';
|
|
10
|
-
import type {Props} from '@theme/Heading';
|
|
11
10
|
import {translate} from '@docusaurus/Translate';
|
|
12
11
|
import {useThemeConfig} from '@docusaurus/theme-common';
|
|
12
|
+
import type {Props} from '@theme/Heading';
|
|
13
13
|
|
|
14
14
|
import styles from './styles.module.css';
|
|
15
15
|
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import Translate from '@docusaurus/Translate';
|
|
10
|
-
import type {Props} from '@theme/LastUpdated';
|
|
11
10
|
import {ThemeClassNames} from '@docusaurus/theme-common';
|
|
11
|
+
import type {Props} from '@theme/LastUpdated';
|
|
12
12
|
|
|
13
13
|
function LastUpdatedAtDate({
|
|
14
14
|
lastUpdatedAt,
|
|
@@ -8,19 +8,19 @@
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import clsx from 'clsx';
|
|
10
10
|
import ErrorBoundary from '@docusaurus/ErrorBoundary';
|
|
11
|
-
import SkipToContent from '@theme/SkipToContent';
|
|
12
|
-
import AnnouncementBar from '@theme/AnnouncementBar';
|
|
13
|
-
import Navbar from '@theme/Navbar';
|
|
14
|
-
import Footer from '@theme/Footer';
|
|
15
|
-
import LayoutProviders from '@theme/LayoutProviders';
|
|
16
|
-
import type {Props} from '@theme/Layout';
|
|
17
11
|
import {
|
|
18
12
|
PageMetadata,
|
|
19
13
|
ThemeClassNames,
|
|
20
14
|
useKeyboardNavigation,
|
|
21
15
|
} from '@docusaurus/theme-common';
|
|
16
|
+
import SkipToContent from '@theme/SkipToContent';
|
|
17
|
+
import AnnouncementBar from '@theme/AnnouncementBar';
|
|
18
|
+
import Navbar from '@theme/Navbar';
|
|
19
|
+
import Footer from '@theme/Footer';
|
|
20
|
+
import LayoutProviders from '@theme/LayoutProviders';
|
|
22
21
|
import ErrorPageContent from '@theme/ErrorPageContent';
|
|
23
22
|
import './styles.css';
|
|
23
|
+
import type {Props} from '@theme/Layout';
|
|
24
24
|
|
|
25
25
|
export default function Layout(props: Props): JSX.Element {
|
|
26
26
|
const {
|
package/src/theme/Logo/index.tsx
CHANGED
|
@@ -6,13 +6,12 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
|
-
import type {Props} from '@theme/Logo';
|
|
10
|
-
|
|
11
9
|
import Link from '@docusaurus/Link';
|
|
12
|
-
import ThemedImage from '@theme/ThemedImage';
|
|
13
10
|
import useBaseUrl from '@docusaurus/useBaseUrl';
|
|
14
11
|
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
|
15
12
|
import {useThemeConfig} from '@docusaurus/theme-common';
|
|
13
|
+
import ThemedImage from '@theme/ThemedImage';
|
|
14
|
+
import type {Props} from '@theme/Logo';
|
|
16
15
|
|
|
17
16
|
export default function Logo(props: Props): JSX.Element {
|
|
18
17
|
const {
|
|
@@ -6,9 +6,10 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
|
-
import type {Props} from '@theme/MDXComponents/Img';
|
|
10
|
-
import styles from './Img.module.css';
|
|
11
9
|
import clsx from 'clsx';
|
|
10
|
+
import type {Props} from '@theme/MDXComponents/Img';
|
|
11
|
+
|
|
12
|
+
import styles from './styles.module.css';
|
|
12
13
|
|
|
13
14
|
function transformImgClassName(className?: string): string {
|
|
14
15
|
return clsx(className, styles.img);
|
|
File without changes
|
|
@@ -12,8 +12,8 @@ import type {Props} from '@theme/MDXComponents/Ul';
|
|
|
12
12
|
function transformUlClassName(className?: string): string {
|
|
13
13
|
return clsx(
|
|
14
14
|
className,
|
|
15
|
-
// This class is set globally by GitHub/MDX
|
|
16
|
-
//
|
|
15
|
+
// This class is set globally by GitHub/MDX. We keep the global class, and
|
|
16
|
+
// add another Infima class to get list without styling
|
|
17
17
|
// See https://github.com/syntax-tree/mdast-util-to-hast/issues/28
|
|
18
18
|
className?.includes('contains-task-list') && 'clean-list',
|
|
19
19
|
);
|