@docusaurus/theme-classic 0.0.0-5264 → 0.0.0-5265
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/{DocPage → DocRoot}/Layout/Main/index.d.ts +2 -2
- package/lib/theme/{DocPage → DocRoot}/Layout/Main/index.js +1 -1
- package/lib/theme/{DocPage → DocRoot}/Layout/Main/styles.module.css +0 -0
- package/lib/theme/{DocPage → DocRoot}/Layout/Sidebar/ExpandButton/index.d.ts +2 -2
- package/lib/theme/{DocPage → DocRoot}/Layout/Sidebar/ExpandButton/index.js +1 -1
- package/lib/theme/{DocPage → DocRoot}/Layout/Sidebar/ExpandButton/styles.module.css +0 -0
- package/lib/theme/{DocPage → DocRoot}/Layout/Sidebar/index.d.ts +2 -2
- package/lib/theme/{DocPage → DocRoot}/Layout/Sidebar/index.js +2 -2
- package/lib/theme/{DocPage → DocRoot}/Layout/Sidebar/styles.module.css +0 -0
- package/lib/theme/{DocPage → DocRoot}/Layout/index.d.ts +2 -2
- package/lib/theme/{DocPage → DocRoot}/Layout/index.js +9 -10
- package/{src/theme/DocPage → lib/theme/DocRoot}/Layout/styles.module.css +1 -1
- package/lib/theme/{DocPage → DocRoot}/index.d.ts +2 -2
- package/lib/theme/DocRoot/index.js +31 -0
- package/lib/theme/DocTagDocListPage/index.d.ts +1 -1
- package/lib/theme/DocTagDocListPage/index.js +49 -38
- package/lib/theme/DocTagsListPage/index.d.ts +1 -1
- package/lib/theme/DocTagsListPage/index.js +25 -17
- package/lib/theme/DocVersionRoot/index.d.ts +10 -0
- package/lib/theme/DocVersionRoot/index.js +46 -0
- package/lib/theme/DocsRoot/index.d.ts +10 -0
- package/lib/theme/DocsRoot/index.js +18 -0
- package/lib/theme/NotFound/Content/index.d.ts +9 -0
- package/lib/theme/NotFound/Content/index.js +41 -0
- package/lib/theme/{NotFound.d.ts → NotFound/index.d.ts} +1 -1
- package/lib/theme/NotFound/index.js +25 -0
- package/package.json +14 -14
- package/src/theme/{DocPage → DocRoot}/Layout/Main/index.tsx +2 -2
- package/src/theme/{DocPage → DocRoot}/Layout/Main/styles.module.css +0 -0
- package/src/theme/{DocPage → DocRoot}/Layout/Sidebar/ExpandButton/index.tsx +2 -2
- package/src/theme/{DocPage → DocRoot}/Layout/Sidebar/ExpandButton/styles.module.css +0 -0
- package/src/theme/{DocPage → DocRoot}/Layout/Sidebar/index.tsx +3 -3
- package/src/theme/{DocPage → DocRoot}/Layout/Sidebar/styles.module.css +0 -0
- package/src/theme/{DocPage → DocRoot}/Layout/index.tsx +10 -11
- package/{lib/theme/DocPage → src/theme/DocRoot}/Layout/styles.module.css +1 -1
- package/src/theme/DocRoot/index.tsx +34 -0
- package/src/theme/DocTagDocListPage/index.tsx +56 -38
- package/src/theme/DocTagsListPage/index.tsx +32 -17
- package/src/theme/DocVersionRoot/index.tsx +51 -0
- package/src/theme/DocsRoot/index.tsx +22 -0
- package/src/theme/NotFound/Content/index.tsx +44 -0
- package/src/theme/NotFound/index.tsx +27 -0
- package/src/theme-classic.d.ts +16 -8
- package/lib/theme/DocPage/index.js +0 -67
- package/lib/theme/NotFound.js +0 -52
- package/src/theme/DocPage/index.tsx +0 -71
- package/src/theme/NotFound.tsx +0 -54
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
/// <reference types="react" />
|
|
8
|
-
import type { Props } from '@theme/
|
|
9
|
-
export default function
|
|
8
|
+
import type { Props } from '@theme/DocRoot/Layout/Main';
|
|
9
|
+
export default function DocRootLayoutMain({ hiddenSidebarContainer, children, }: Props): JSX.Element;
|
|
@@ -8,7 +8,7 @@ import React from 'react';
|
|
|
8
8
|
import clsx from 'clsx';
|
|
9
9
|
import {useDocsSidebar} from '@docusaurus/theme-common/internal';
|
|
10
10
|
import styles from './styles.module.css';
|
|
11
|
-
export default function
|
|
11
|
+
export default function DocRootLayoutMain({hiddenSidebarContainer, children}) {
|
|
12
12
|
const sidebar = useDocsSidebar();
|
|
13
13
|
return (
|
|
14
14
|
<main
|
|
File without changes
|
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
/// <reference types="react" />
|
|
8
|
-
import type { Props } from '@theme/
|
|
9
|
-
export default function
|
|
8
|
+
import type { Props } from '@theme/DocRoot/Layout/Sidebar/ExpandButton';
|
|
9
|
+
export default function DocRootLayoutSidebarExpandButton({ toggleSidebar, }: Props): JSX.Element;
|
|
@@ -8,7 +8,7 @@ import React from 'react';
|
|
|
8
8
|
import {translate} from '@docusaurus/Translate';
|
|
9
9
|
import IconArrow from '@theme/Icon/Arrow';
|
|
10
10
|
import styles from './styles.module.css';
|
|
11
|
-
export default function
|
|
11
|
+
export default function DocRootLayoutSidebarExpandButton({toggleSidebar}) {
|
|
12
12
|
return (
|
|
13
13
|
<div
|
|
14
14
|
className={styles.expandButton}
|
|
File without changes
|
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
/// <reference types="react" />
|
|
8
|
-
import type { Props } from '@theme/
|
|
9
|
-
export default function
|
|
8
|
+
import type { Props } from '@theme/DocRoot/Layout/Sidebar';
|
|
9
|
+
export default function DocRootLayoutSidebar({ sidebar, hiddenSidebarContainer, setHiddenSidebarContainer, }: Props): JSX.Element;
|
|
@@ -10,7 +10,7 @@ import {ThemeClassNames} from '@docusaurus/theme-common';
|
|
|
10
10
|
import {useDocsSidebar} from '@docusaurus/theme-common/internal';
|
|
11
11
|
import {useLocation} from '@docusaurus/router';
|
|
12
12
|
import DocSidebar from '@theme/DocSidebar';
|
|
13
|
-
import ExpandButton from '@theme/
|
|
13
|
+
import ExpandButton from '@theme/DocRoot/Layout/Sidebar/ExpandButton';
|
|
14
14
|
import styles from './styles.module.css';
|
|
15
15
|
// Reset sidebar state when sidebar changes
|
|
16
16
|
// Use React key to unmount/remount the children
|
|
@@ -23,7 +23,7 @@ function ResetOnSidebarChange({children}) {
|
|
|
23
23
|
</React.Fragment>
|
|
24
24
|
);
|
|
25
25
|
}
|
|
26
|
-
export default function
|
|
26
|
+
export default function DocRootLayoutSidebar({
|
|
27
27
|
sidebar,
|
|
28
28
|
hiddenSidebarContainer,
|
|
29
29
|
setHiddenSidebarContainer,
|
|
File without changes
|
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
/// <reference types="react" />
|
|
8
|
-
import type { Props } from '@theme/
|
|
9
|
-
export default function
|
|
8
|
+
import type { Props } from '@theme/DocRoot/Layout';
|
|
9
|
+
export default function DocRootLayout({ children }: Props): JSX.Element;
|
|
@@ -6,29 +6,28 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React, {useState} from 'react';
|
|
8
8
|
import {useDocsSidebar} from '@docusaurus/theme-common/internal';
|
|
9
|
-
import Layout from '@theme/Layout';
|
|
10
9
|
import BackToTopButton from '@theme/BackToTopButton';
|
|
11
|
-
import
|
|
12
|
-
import
|
|
10
|
+
import DocRootLayoutSidebar from '@theme/DocRoot/Layout/Sidebar';
|
|
11
|
+
import DocRootLayoutMain from '@theme/DocRoot/Layout/Main';
|
|
13
12
|
import styles from './styles.module.css';
|
|
14
|
-
export default function
|
|
13
|
+
export default function DocRootLayout({children}) {
|
|
15
14
|
const sidebar = useDocsSidebar();
|
|
16
15
|
const [hiddenSidebarContainer, setHiddenSidebarContainer] = useState(false);
|
|
17
16
|
return (
|
|
18
|
-
<
|
|
17
|
+
<div className={styles.docsWrapper}>
|
|
19
18
|
<BackToTopButton />
|
|
20
|
-
<div className={styles.
|
|
19
|
+
<div className={styles.docRoot}>
|
|
21
20
|
{sidebar && (
|
|
22
|
-
<
|
|
21
|
+
<DocRootLayoutSidebar
|
|
23
22
|
sidebar={sidebar.items}
|
|
24
23
|
hiddenSidebarContainer={hiddenSidebarContainer}
|
|
25
24
|
setHiddenSidebarContainer={setHiddenSidebarContainer}
|
|
26
25
|
/>
|
|
27
26
|
)}
|
|
28
|
-
<
|
|
27
|
+
<DocRootLayoutMain hiddenSidebarContainer={hiddenSidebarContainer}>
|
|
29
28
|
{children}
|
|
30
|
-
</
|
|
29
|
+
</DocRootLayoutMain>
|
|
31
30
|
</div>
|
|
32
|
-
</
|
|
31
|
+
</div>
|
|
33
32
|
);
|
|
34
33
|
}
|
|
@@ -6,5 +6,5 @@
|
|
|
6
6
|
*/
|
|
7
7
|
/// <reference types="@docusaurus/plugin-content-docs" />
|
|
8
8
|
/// <reference types="react" />
|
|
9
|
-
import type { Props } from '@theme/
|
|
10
|
-
export default function
|
|
9
|
+
import type { Props } from '@theme/DocRoot';
|
|
10
|
+
export default function DocRoot(props: Props): JSX.Element;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import clsx from 'clsx';
|
|
9
|
+
import {HtmlClassNameProvider, ThemeClassNames} from '@docusaurus/theme-common';
|
|
10
|
+
import {
|
|
11
|
+
DocsSidebarProvider,
|
|
12
|
+
useDocRootMetadata,
|
|
13
|
+
} from '@docusaurus/theme-common/internal';
|
|
14
|
+
import DocRootLayout from '@theme/DocRoot/Layout';
|
|
15
|
+
import NotFoundContent from '@theme/NotFound/Content';
|
|
16
|
+
export default function DocRoot(props) {
|
|
17
|
+
const currentDocRouteMetadata = useDocRootMetadata(props);
|
|
18
|
+
if (!currentDocRouteMetadata) {
|
|
19
|
+
// We only render the not found content to avoid a double layout
|
|
20
|
+
// see https://github.com/facebook/docusaurus/pull/7966#pullrequestreview-1077276692
|
|
21
|
+
return <NotFoundContent />;
|
|
22
|
+
}
|
|
23
|
+
const {docElement, sidebarName, sidebarItems} = currentDocRouteMetadata;
|
|
24
|
+
return (
|
|
25
|
+
<HtmlClassNameProvider className={clsx(ThemeClassNames.page.docsDocPage)}>
|
|
26
|
+
<DocsSidebarProvider name={sidebarName} items={sidebarItems}>
|
|
27
|
+
<DocRootLayout>{docElement}</DocRootLayout>
|
|
28
|
+
</DocsSidebarProvider>
|
|
29
|
+
</HtmlClassNameProvider>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
/// <reference types="@docusaurus/plugin-content-docs" />
|
|
8
8
|
/// <reference types="react" />
|
|
9
9
|
import type { Props } from '@theme/DocTagDocListPage';
|
|
10
|
-
export default function DocTagDocListPage(
|
|
10
|
+
export default function DocTagDocListPage(props: Props): JSX.Element;
|
|
@@ -14,7 +14,6 @@ import {
|
|
|
14
14
|
usePluralForm,
|
|
15
15
|
} from '@docusaurus/theme-common';
|
|
16
16
|
import Translate, {translate} from '@docusaurus/Translate';
|
|
17
|
-
import Layout from '@theme/Layout';
|
|
18
17
|
import SearchMetadata from '@theme/SearchMetadata';
|
|
19
18
|
// Very simple pluralization: probably good enough for now
|
|
20
19
|
function useNDocsTaggedPlural() {
|
|
@@ -33,6 +32,17 @@ function useNDocsTaggedPlural() {
|
|
|
33
32
|
),
|
|
34
33
|
);
|
|
35
34
|
}
|
|
35
|
+
function usePageTitle(props) {
|
|
36
|
+
const nDocsTaggedPlural = useNDocsTaggedPlural();
|
|
37
|
+
return translate(
|
|
38
|
+
{
|
|
39
|
+
id: 'theme.docs.tagDocListPageTitle',
|
|
40
|
+
description: 'The title of the page for a docs tag',
|
|
41
|
+
message: '{nDocsTagged} with "{tagName}"',
|
|
42
|
+
},
|
|
43
|
+
{nDocsTagged: nDocsTaggedPlural(props.tag.count), tagName: props.tag.label},
|
|
44
|
+
);
|
|
45
|
+
}
|
|
36
46
|
function DocItem({doc}) {
|
|
37
47
|
return (
|
|
38
48
|
<article className="margin-vert--lg">
|
|
@@ -43,47 +53,48 @@ function DocItem({doc}) {
|
|
|
43
53
|
</article>
|
|
44
54
|
);
|
|
45
55
|
}
|
|
46
|
-
|
|
47
|
-
const nDocsTaggedPlural = useNDocsTaggedPlural();
|
|
48
|
-
const title = translate(
|
|
49
|
-
{
|
|
50
|
-
id: 'theme.docs.tagDocListPageTitle',
|
|
51
|
-
description: 'The title of the page for a docs tag',
|
|
52
|
-
message: '{nDocsTagged} with "{tagName}"',
|
|
53
|
-
},
|
|
54
|
-
{nDocsTagged: nDocsTaggedPlural(tag.count), tagName: tag.label},
|
|
55
|
-
);
|
|
56
|
+
function DocTagDocListPageMetadata({title}) {
|
|
56
57
|
return (
|
|
57
|
-
|
|
58
|
-
className={clsx(
|
|
59
|
-
ThemeClassNames.wrapper.docsPages,
|
|
60
|
-
ThemeClassNames.page.docsTagDocListPage,
|
|
61
|
-
)}>
|
|
58
|
+
<>
|
|
62
59
|
<PageMetadata title={title} />
|
|
63
60
|
<SearchMetadata tag="doc_tag_doc_list" />
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
</
|
|
83
|
-
</
|
|
84
|
-
|
|
61
|
+
</>
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
function DocTagDocListPageContent({tag, title}) {
|
|
65
|
+
return (
|
|
66
|
+
<HtmlClassNameProvider
|
|
67
|
+
className={clsx(ThemeClassNames.page.docsTagDocListPage)}>
|
|
68
|
+
<div className="container margin-vert--lg">
|
|
69
|
+
<div className="row">
|
|
70
|
+
<main className="col col--8 col--offset-2">
|
|
71
|
+
<header className="margin-bottom--xl">
|
|
72
|
+
<h1>{title}</h1>
|
|
73
|
+
<Link href={tag.allTagsPath}>
|
|
74
|
+
<Translate
|
|
75
|
+
id="theme.tags.tagsPageLink"
|
|
76
|
+
description="The label of the link targeting the tag list page">
|
|
77
|
+
View All Tags
|
|
78
|
+
</Translate>
|
|
79
|
+
</Link>
|
|
80
|
+
</header>
|
|
81
|
+
<section className="margin-vert--lg">
|
|
82
|
+
{tag.items.map((doc) => (
|
|
83
|
+
<DocItem key={doc.id} doc={doc} />
|
|
84
|
+
))}
|
|
85
|
+
</section>
|
|
86
|
+
</main>
|
|
85
87
|
</div>
|
|
86
|
-
</
|
|
88
|
+
</div>
|
|
87
89
|
</HtmlClassNameProvider>
|
|
88
90
|
);
|
|
89
91
|
}
|
|
92
|
+
export default function DocTagDocListPage(props) {
|
|
93
|
+
const title = usePageTitle(props);
|
|
94
|
+
return (
|
|
95
|
+
<>
|
|
96
|
+
<DocTagDocListPageMetadata {...props} title={title} />
|
|
97
|
+
<DocTagDocListPageContent {...props} title={title} />
|
|
98
|
+
</>
|
|
99
|
+
);
|
|
100
|
+
}
|
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
/// <reference types="@docusaurus/plugin-content-docs" />
|
|
8
8
|
/// <reference types="react" />
|
|
9
9
|
import type { Props } from '@theme/DocTagsListPage';
|
|
10
|
-
export default function DocTagsListPage(
|
|
10
|
+
export default function DocTagsListPage(props: Props): JSX.Element;
|
|
@@ -12,29 +12,37 @@ import {
|
|
|
12
12
|
ThemeClassNames,
|
|
13
13
|
translateTagsPageTitle,
|
|
14
14
|
} from '@docusaurus/theme-common';
|
|
15
|
-
import Layout from '@theme/Layout';
|
|
16
15
|
import TagsListByLetter from '@theme/TagsListByLetter';
|
|
17
16
|
import SearchMetadata from '@theme/SearchMetadata';
|
|
18
|
-
|
|
19
|
-
const title = translateTagsPageTitle();
|
|
17
|
+
function DocTagsListPageMetadata({title}) {
|
|
20
18
|
return (
|
|
21
|
-
|
|
22
|
-
className={clsx(
|
|
23
|
-
ThemeClassNames.wrapper.docsPages,
|
|
24
|
-
ThemeClassNames.page.docsTagsListPage,
|
|
25
|
-
)}>
|
|
19
|
+
<>
|
|
26
20
|
<PageMetadata title={title} />
|
|
27
21
|
<SearchMetadata tag="doc_tags_list" />
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
22
|
+
</>
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
function DocTagsListPageContent({tags, title}) {
|
|
26
|
+
return (
|
|
27
|
+
<HtmlClassNameProvider
|
|
28
|
+
className={clsx(ThemeClassNames.page.docsTagsListPage)}>
|
|
29
|
+
<div className="container margin-vert--lg">
|
|
30
|
+
<div className="row">
|
|
31
|
+
<main className="col col--8 col--offset-2">
|
|
32
|
+
<h1>{title}</h1>
|
|
33
|
+
<TagsListByLetter tags={tags} />
|
|
34
|
+
</main>
|
|
36
35
|
</div>
|
|
37
|
-
</
|
|
36
|
+
</div>
|
|
38
37
|
</HtmlClassNameProvider>
|
|
39
38
|
);
|
|
40
39
|
}
|
|
40
|
+
export default function DocTagsListPage(props) {
|
|
41
|
+
const title = translateTagsPageTitle();
|
|
42
|
+
return (
|
|
43
|
+
<>
|
|
44
|
+
<DocTagsListPageMetadata {...props} title={title} />
|
|
45
|
+
<DocTagsListPageContent {...props} title={title} />
|
|
46
|
+
</>
|
|
47
|
+
);
|
|
48
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
/// <reference types="@docusaurus/plugin-content-docs" />
|
|
8
|
+
/// <reference types="react" />
|
|
9
|
+
import type { Props } from '@theme/DocVersionRoot';
|
|
10
|
+
export default function DocVersionRoot(props: Props): JSX.Element;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import {HtmlClassNameProvider, PageMetadata} from '@docusaurus/theme-common';
|
|
9
|
+
import {
|
|
10
|
+
docVersionSearchTag,
|
|
11
|
+
DocsVersionProvider,
|
|
12
|
+
} from '@docusaurus/theme-common/internal';
|
|
13
|
+
import renderRoutes from '@docusaurus/renderRoutes';
|
|
14
|
+
import SearchMetadata from '@theme/SearchMetadata';
|
|
15
|
+
function DocVersionRootMetadata(props) {
|
|
16
|
+
const {version} = props;
|
|
17
|
+
return (
|
|
18
|
+
<>
|
|
19
|
+
<SearchMetadata
|
|
20
|
+
version={version.version}
|
|
21
|
+
tag={docVersionSearchTag(version.pluginId, version.version)}
|
|
22
|
+
/>
|
|
23
|
+
<PageMetadata>
|
|
24
|
+
{version.noIndex && <meta name="robots" content="noindex, nofollow" />}
|
|
25
|
+
</PageMetadata>
|
|
26
|
+
</>
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
function DocVersionRootContent(props) {
|
|
30
|
+
const {version, route} = props;
|
|
31
|
+
return (
|
|
32
|
+
<HtmlClassNameProvider className={version.className}>
|
|
33
|
+
<DocsVersionProvider version={version}>
|
|
34
|
+
{renderRoutes(route.routes)}
|
|
35
|
+
</DocsVersionProvider>
|
|
36
|
+
</HtmlClassNameProvider>
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
export default function DocVersionRoot(props) {
|
|
40
|
+
return (
|
|
41
|
+
<>
|
|
42
|
+
<DocVersionRootMetadata {...props} />
|
|
43
|
+
<DocVersionRootContent {...props} />
|
|
44
|
+
</>
|
|
45
|
+
);
|
|
46
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
/// <reference types="@docusaurus/plugin-content-docs" />
|
|
8
|
+
/// <reference types="react" />
|
|
9
|
+
import type { Props } from '@theme/DocVersionRoot';
|
|
10
|
+
export default function DocsRoot(props: Props): JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import clsx from 'clsx';
|
|
9
|
+
import {ThemeClassNames, HtmlClassNameProvider} from '@docusaurus/theme-common';
|
|
10
|
+
import renderRoutes from '@docusaurus/renderRoutes';
|
|
11
|
+
import Layout from '@theme/Layout';
|
|
12
|
+
export default function DocsRoot(props) {
|
|
13
|
+
return (
|
|
14
|
+
<HtmlClassNameProvider className={clsx(ThemeClassNames.wrapper.docsPages)}>
|
|
15
|
+
<Layout>{renderRoutes(props.route.routes)}</Layout>
|
|
16
|
+
</HtmlClassNameProvider>
|
|
17
|
+
);
|
|
18
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
/// <reference types="react" />
|
|
8
|
+
import type { Props } from '@theme/NotFound/Content';
|
|
9
|
+
export default function NotFoundContent({ className }: Props): JSX.Element;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import clsx from 'clsx';
|
|
9
|
+
import Translate from '@docusaurus/Translate';
|
|
10
|
+
export default function NotFoundContent({className}) {
|
|
11
|
+
return (
|
|
12
|
+
<main className={clsx('container margin-vert--xl', className)}>
|
|
13
|
+
<div className="row">
|
|
14
|
+
<div className="col col--6 col--offset-3">
|
|
15
|
+
<h1 className="hero__title">
|
|
16
|
+
<Translate
|
|
17
|
+
id="theme.NotFound.title"
|
|
18
|
+
description="The title of the 404 page">
|
|
19
|
+
Page Not Found
|
|
20
|
+
</Translate>
|
|
21
|
+
</h1>
|
|
22
|
+
<p>
|
|
23
|
+
<Translate
|
|
24
|
+
id="theme.NotFound.p1"
|
|
25
|
+
description="The first paragraph of the 404 page">
|
|
26
|
+
We could not find what you were looking for.
|
|
27
|
+
</Translate>
|
|
28
|
+
</p>
|
|
29
|
+
<p>
|
|
30
|
+
<Translate
|
|
31
|
+
id="theme.NotFound.p2"
|
|
32
|
+
description="The 2nd paragraph of the 404 page">
|
|
33
|
+
Please contact the owner of the site that linked you to the
|
|
34
|
+
original URL and let them know their link is broken.
|
|
35
|
+
</Translate>
|
|
36
|
+
</p>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
</main>
|
|
40
|
+
);
|
|
41
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import {translate} from '@docusaurus/Translate';
|
|
9
|
+
import {PageMetadata} from '@docusaurus/theme-common';
|
|
10
|
+
import Layout from '@theme/Layout';
|
|
11
|
+
import NotFoundContent from '@theme/NotFound/Content';
|
|
12
|
+
export default function Index() {
|
|
13
|
+
const title = translate({
|
|
14
|
+
id: 'theme.NotFound.title',
|
|
15
|
+
message: 'Page Not Found',
|
|
16
|
+
});
|
|
17
|
+
return (
|
|
18
|
+
<>
|
|
19
|
+
<PageMetadata title={title} />
|
|
20
|
+
<Layout>
|
|
21
|
+
<NotFoundContent />
|
|
22
|
+
</Layout>
|
|
23
|
+
</>
|
|
24
|
+
);
|
|
25
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/theme-classic",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-5265",
|
|
4
4
|
"description": "Classic theme for Docusaurus",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "src/theme-classic.d.ts",
|
|
@@ -20,18 +20,18 @@
|
|
|
20
20
|
"copy:watch": "node ../../admin/scripts/copyUntypedFiles.js --watch"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@docusaurus/core": "0.0.0-
|
|
24
|
-
"@docusaurus/mdx-loader": "0.0.0-
|
|
25
|
-
"@docusaurus/module-type-aliases": "0.0.0-
|
|
26
|
-
"@docusaurus/plugin-content-blog": "0.0.0-
|
|
27
|
-
"@docusaurus/plugin-content-docs": "0.0.0-
|
|
28
|
-
"@docusaurus/plugin-content-pages": "0.0.0-
|
|
29
|
-
"@docusaurus/theme-common": "0.0.0-
|
|
30
|
-
"@docusaurus/theme-translations": "0.0.0-
|
|
31
|
-
"@docusaurus/types": "0.0.0-
|
|
32
|
-
"@docusaurus/utils": "0.0.0-
|
|
33
|
-
"@docusaurus/utils-common": "0.0.0-
|
|
34
|
-
"@docusaurus/utils-validation": "0.0.0-
|
|
23
|
+
"@docusaurus/core": "0.0.0-5265",
|
|
24
|
+
"@docusaurus/mdx-loader": "0.0.0-5265",
|
|
25
|
+
"@docusaurus/module-type-aliases": "0.0.0-5265",
|
|
26
|
+
"@docusaurus/plugin-content-blog": "0.0.0-5265",
|
|
27
|
+
"@docusaurus/plugin-content-docs": "0.0.0-5265",
|
|
28
|
+
"@docusaurus/plugin-content-pages": "0.0.0-5265",
|
|
29
|
+
"@docusaurus/theme-common": "0.0.0-5265",
|
|
30
|
+
"@docusaurus/theme-translations": "0.0.0-5265",
|
|
31
|
+
"@docusaurus/types": "0.0.0-5265",
|
|
32
|
+
"@docusaurus/utils": "0.0.0-5265",
|
|
33
|
+
"@docusaurus/utils-common": "0.0.0-5265",
|
|
34
|
+
"@docusaurus/utils-validation": "0.0.0-5265",
|
|
35
35
|
"@mdx-js/react": "^1.6.22",
|
|
36
36
|
"clsx": "^1.2.1",
|
|
37
37
|
"copy-text-to-clipboard": "^3.0.1",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"engines": {
|
|
63
63
|
"node": ">=16.14"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "ac59d7c969c795c2163c8e8843c11d94e210f87f"
|
|
66
66
|
}
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import clsx from 'clsx';
|
|
10
10
|
import {useDocsSidebar} from '@docusaurus/theme-common/internal';
|
|
11
|
-
import type {Props} from '@theme/
|
|
11
|
+
import type {Props} from '@theme/DocRoot/Layout/Main';
|
|
12
12
|
|
|
13
13
|
import styles from './styles.module.css';
|
|
14
14
|
|
|
15
|
-
export default function
|
|
15
|
+
export default function DocRootLayoutMain({
|
|
16
16
|
hiddenSidebarContainer,
|
|
17
17
|
children,
|
|
18
18
|
}: Props): JSX.Element {
|
|
File without changes
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import {translate} from '@docusaurus/Translate';
|
|
10
10
|
import IconArrow from '@theme/Icon/Arrow';
|
|
11
|
-
import type {Props} from '@theme/
|
|
11
|
+
import type {Props} from '@theme/DocRoot/Layout/Sidebar/ExpandButton';
|
|
12
12
|
|
|
13
13
|
import styles from './styles.module.css';
|
|
14
14
|
|
|
15
|
-
export default function
|
|
15
|
+
export default function DocRootLayoutSidebarExpandButton({
|
|
16
16
|
toggleSidebar,
|
|
17
17
|
}: Props): JSX.Element {
|
|
18
18
|
return (
|
|
File without changes
|
|
@@ -11,8 +11,8 @@ import {ThemeClassNames} from '@docusaurus/theme-common';
|
|
|
11
11
|
import {useDocsSidebar} from '@docusaurus/theme-common/internal';
|
|
12
12
|
import {useLocation} from '@docusaurus/router';
|
|
13
13
|
import DocSidebar from '@theme/DocSidebar';
|
|
14
|
-
import ExpandButton from '@theme/
|
|
15
|
-
import type {Props} from '@theme/
|
|
14
|
+
import ExpandButton from '@theme/DocRoot/Layout/Sidebar/ExpandButton';
|
|
15
|
+
import type {Props} from '@theme/DocRoot/Layout/Sidebar';
|
|
16
16
|
|
|
17
17
|
import styles from './styles.module.css';
|
|
18
18
|
|
|
@@ -28,7 +28,7 @@ function ResetOnSidebarChange({children}: {children: ReactNode}) {
|
|
|
28
28
|
);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
export default function
|
|
31
|
+
export default function DocRootLayoutSidebar({
|
|
32
32
|
sidebar,
|
|
33
33
|
hiddenSidebarContainer,
|
|
34
34
|
setHiddenSidebarContainer,
|
|
File without changes
|