@docusaurus/theme-classic 0.0.0-5151 → 0.0.0-5152
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/{LayoutProviders → Layout/Provider}/index.d.ts +2 -2
- package/lib/theme/Layout/Provider/index.js +29 -0
- package/lib/theme/Layout/index.js +3 -3
- package/package.json +14 -14
- package/src/theme/Layout/Provider/index.tsx +33 -0
- package/src/theme/Layout/index.tsx +3 -3
- package/src/theme-classic.d.ts +2 -2
- package/lib/theme/LayoutProviders/index.js +0 -33
- package/src/theme/LayoutProviders/index.tsx +0 -36
|
@@ -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/Layout/Provider';
|
|
9
|
+
export default function LayoutProvider({ children }: Props): JSX.Element;
|
|
@@ -0,0 +1,29 @@
|
|
|
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 {composeProviders} from '@docusaurus/theme-common';
|
|
9
|
+
import {
|
|
10
|
+
ColorModeProvider,
|
|
11
|
+
TabGroupChoiceProvider,
|
|
12
|
+
AnnouncementBarProvider,
|
|
13
|
+
DocsPreferredVersionContextProvider,
|
|
14
|
+
ScrollControllerProvider,
|
|
15
|
+
NavbarProvider,
|
|
16
|
+
PluginHtmlClassNameProvider,
|
|
17
|
+
} from '@docusaurus/theme-common/internal';
|
|
18
|
+
const Provider = composeProviders([
|
|
19
|
+
ColorModeProvider,
|
|
20
|
+
AnnouncementBarProvider,
|
|
21
|
+
TabGroupChoiceProvider,
|
|
22
|
+
ScrollControllerProvider,
|
|
23
|
+
DocsPreferredVersionContextProvider,
|
|
24
|
+
PluginHtmlClassNameProvider,
|
|
25
|
+
NavbarProvider,
|
|
26
|
+
]);
|
|
27
|
+
export default function LayoutProvider({children}) {
|
|
28
|
+
return <Provider>{children}</Provider>;
|
|
29
|
+
}
|
|
@@ -13,7 +13,7 @@ import SkipToContent from '@theme/SkipToContent';
|
|
|
13
13
|
import AnnouncementBar from '@theme/AnnouncementBar';
|
|
14
14
|
import Navbar from '@theme/Navbar';
|
|
15
15
|
import Footer from '@theme/Footer';
|
|
16
|
-
import
|
|
16
|
+
import LayoutProvider from '@theme/Layout/Provider';
|
|
17
17
|
import ErrorPageContent from '@theme/ErrorPageContent';
|
|
18
18
|
import styles from './styles.module.css';
|
|
19
19
|
export default function Layout(props) {
|
|
@@ -27,7 +27,7 @@ export default function Layout(props) {
|
|
|
27
27
|
} = props;
|
|
28
28
|
useKeyboardNavigation();
|
|
29
29
|
return (
|
|
30
|
-
<
|
|
30
|
+
<LayoutProvider>
|
|
31
31
|
<PageMetadata title={title} description={description} />
|
|
32
32
|
|
|
33
33
|
<SkipToContent />
|
|
@@ -48,6 +48,6 @@ export default function Layout(props) {
|
|
|
48
48
|
</div>
|
|
49
49
|
|
|
50
50
|
{!noFooter && <Footer />}
|
|
51
|
-
</
|
|
51
|
+
</LayoutProvider>
|
|
52
52
|
);
|
|
53
53
|
}
|
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-5152",
|
|
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-5152",
|
|
24
|
+
"@docusaurus/mdx-loader": "0.0.0-5152",
|
|
25
|
+
"@docusaurus/module-type-aliases": "0.0.0-5152",
|
|
26
|
+
"@docusaurus/plugin-content-blog": "0.0.0-5152",
|
|
27
|
+
"@docusaurus/plugin-content-docs": "0.0.0-5152",
|
|
28
|
+
"@docusaurus/plugin-content-pages": "0.0.0-5152",
|
|
29
|
+
"@docusaurus/theme-common": "0.0.0-5152",
|
|
30
|
+
"@docusaurus/theme-translations": "0.0.0-5152",
|
|
31
|
+
"@docusaurus/types": "0.0.0-5152",
|
|
32
|
+
"@docusaurus/utils": "0.0.0-5152",
|
|
33
|
+
"@docusaurus/utils-common": "0.0.0-5152",
|
|
34
|
+
"@docusaurus/utils-validation": "0.0.0-5152",
|
|
35
35
|
"@mdx-js/react": "^1.6.22",
|
|
36
36
|
"clsx": "^1.1.1",
|
|
37
37
|
"copy-text-to-clipboard": "^3.0.1",
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"engines": {
|
|
65
65
|
"node": ">=16.14"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "fd0c41d54568099b4081dcc377a30a1cb2e8e185"
|
|
68
68
|
}
|
|
@@ -0,0 +1,33 @@
|
|
|
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
|
+
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import {composeProviders} from '@docusaurus/theme-common';
|
|
10
|
+
import {
|
|
11
|
+
ColorModeProvider,
|
|
12
|
+
TabGroupChoiceProvider,
|
|
13
|
+
AnnouncementBarProvider,
|
|
14
|
+
DocsPreferredVersionContextProvider,
|
|
15
|
+
ScrollControllerProvider,
|
|
16
|
+
NavbarProvider,
|
|
17
|
+
PluginHtmlClassNameProvider,
|
|
18
|
+
} from '@docusaurus/theme-common/internal';
|
|
19
|
+
import type {Props} from '@theme/Layout/Provider';
|
|
20
|
+
|
|
21
|
+
const Provider = composeProviders([
|
|
22
|
+
ColorModeProvider,
|
|
23
|
+
AnnouncementBarProvider,
|
|
24
|
+
TabGroupChoiceProvider,
|
|
25
|
+
ScrollControllerProvider,
|
|
26
|
+
DocsPreferredVersionContextProvider,
|
|
27
|
+
PluginHtmlClassNameProvider,
|
|
28
|
+
NavbarProvider,
|
|
29
|
+
]);
|
|
30
|
+
|
|
31
|
+
export default function LayoutProvider({children}: Props): JSX.Element {
|
|
32
|
+
return <Provider>{children}</Provider>;
|
|
33
|
+
}
|
|
@@ -14,7 +14,7 @@ import SkipToContent from '@theme/SkipToContent';
|
|
|
14
14
|
import AnnouncementBar from '@theme/AnnouncementBar';
|
|
15
15
|
import Navbar from '@theme/Navbar';
|
|
16
16
|
import Footer from '@theme/Footer';
|
|
17
|
-
import
|
|
17
|
+
import LayoutProvider from '@theme/Layout/Provider';
|
|
18
18
|
import ErrorPageContent from '@theme/ErrorPageContent';
|
|
19
19
|
import type {Props} from '@theme/Layout';
|
|
20
20
|
import styles from './styles.module.css';
|
|
@@ -32,7 +32,7 @@ export default function Layout(props: Props): JSX.Element {
|
|
|
32
32
|
useKeyboardNavigation();
|
|
33
33
|
|
|
34
34
|
return (
|
|
35
|
-
<
|
|
35
|
+
<LayoutProvider>
|
|
36
36
|
<PageMetadata title={title} description={description} />
|
|
37
37
|
|
|
38
38
|
<SkipToContent />
|
|
@@ -53,6 +53,6 @@ export default function Layout(props: Props): JSX.Element {
|
|
|
53
53
|
</div>
|
|
54
54
|
|
|
55
55
|
{!noFooter && <Footer />}
|
|
56
|
-
</
|
|
56
|
+
</LayoutProvider>
|
|
57
57
|
);
|
|
58
58
|
}
|
package/src/theme-classic.d.ts
CHANGED
|
@@ -596,14 +596,14 @@ declare module '@theme/Layout' {
|
|
|
596
596
|
export default function Layout(props: Props): JSX.Element;
|
|
597
597
|
}
|
|
598
598
|
|
|
599
|
-
declare module '@theme/
|
|
599
|
+
declare module '@theme/Layout/Provider' {
|
|
600
600
|
import type {ReactNode} from 'react';
|
|
601
601
|
|
|
602
602
|
export interface Props {
|
|
603
603
|
readonly children: ReactNode;
|
|
604
604
|
}
|
|
605
605
|
|
|
606
|
-
export default function
|
|
606
|
+
export default function LayoutProvider(props: Props): JSX.Element;
|
|
607
607
|
}
|
|
608
608
|
|
|
609
609
|
declare module '@theme/SearchMetadata' {
|
|
@@ -1,33 +0,0 @@
|
|
|
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 {
|
|
9
|
-
ColorModeProvider,
|
|
10
|
-
TabGroupChoiceProvider,
|
|
11
|
-
AnnouncementBarProvider,
|
|
12
|
-
DocsPreferredVersionContextProvider,
|
|
13
|
-
ScrollControllerProvider,
|
|
14
|
-
NavbarProvider,
|
|
15
|
-
PluginHtmlClassNameProvider,
|
|
16
|
-
} from '@docusaurus/theme-common/internal';
|
|
17
|
-
export default function LayoutProviders({children}) {
|
|
18
|
-
return (
|
|
19
|
-
<ColorModeProvider>
|
|
20
|
-
<AnnouncementBarProvider>
|
|
21
|
-
<TabGroupChoiceProvider>
|
|
22
|
-
<ScrollControllerProvider>
|
|
23
|
-
<DocsPreferredVersionContextProvider>
|
|
24
|
-
<PluginHtmlClassNameProvider>
|
|
25
|
-
<NavbarProvider>{children}</NavbarProvider>
|
|
26
|
-
</PluginHtmlClassNameProvider>
|
|
27
|
-
</DocsPreferredVersionContextProvider>
|
|
28
|
-
</ScrollControllerProvider>
|
|
29
|
-
</TabGroupChoiceProvider>
|
|
30
|
-
</AnnouncementBarProvider>
|
|
31
|
-
</ColorModeProvider>
|
|
32
|
-
);
|
|
33
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
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
|
-
|
|
8
|
-
import React from 'react';
|
|
9
|
-
import {
|
|
10
|
-
ColorModeProvider,
|
|
11
|
-
TabGroupChoiceProvider,
|
|
12
|
-
AnnouncementBarProvider,
|
|
13
|
-
DocsPreferredVersionContextProvider,
|
|
14
|
-
ScrollControllerProvider,
|
|
15
|
-
NavbarProvider,
|
|
16
|
-
PluginHtmlClassNameProvider,
|
|
17
|
-
} from '@docusaurus/theme-common/internal';
|
|
18
|
-
import type {Props} from '@theme/LayoutProviders';
|
|
19
|
-
|
|
20
|
-
export default function LayoutProviders({children}: Props): JSX.Element {
|
|
21
|
-
return (
|
|
22
|
-
<ColorModeProvider>
|
|
23
|
-
<AnnouncementBarProvider>
|
|
24
|
-
<TabGroupChoiceProvider>
|
|
25
|
-
<ScrollControllerProvider>
|
|
26
|
-
<DocsPreferredVersionContextProvider>
|
|
27
|
-
<PluginHtmlClassNameProvider>
|
|
28
|
-
<NavbarProvider>{children}</NavbarProvider>
|
|
29
|
-
</PluginHtmlClassNameProvider>
|
|
30
|
-
</DocsPreferredVersionContextProvider>
|
|
31
|
-
</ScrollControllerProvider>
|
|
32
|
-
</TabGroupChoiceProvider>
|
|
33
|
-
</AnnouncementBarProvider>
|
|
34
|
-
</ColorModeProvider>
|
|
35
|
-
);
|
|
36
|
-
}
|