@docusaurus/theme-classic 2.0.0-beta.15 → 2.0.0-beta.16
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/getSwizzleConfig.js +102 -0
- package/lib/index.js +14 -11
- package/lib/theme-classic.d.ts +123 -97
- package/lib/translations.js +29 -32
- package/lib/validateThemeConfig.js +7 -4
- package/lib-next/theme/AnnouncementBar/index.js +1 -4
- package/lib-next/theme/BackToTopButton/index.js +6 -6
- package/lib-next/theme/BackToTopButton/styles.module.css +3 -1
- package/lib-next/theme/BlogLayout/index.js +1 -4
- package/lib-next/theme/BlogListPage/index.js +1 -4
- package/lib-next/theme/BlogListPaginator/index.js +1 -4
- package/lib-next/theme/BlogPostAuthor/index.js +18 -24
- package/lib-next/theme/BlogPostItem/index.js +12 -4
- package/lib-next/theme/BlogPostPage/index.js +4 -6
- package/lib-next/theme/BlogPostPaginator/index.js +1 -4
- package/lib-next/theme/BlogTagsListPage/index.js +1 -4
- package/lib-next/theme/BlogTagsPostsPage/index.js +4 -2
- package/lib-next/theme/CodeBlock/index.js +2 -1
- package/lib-next/theme/Details/index.js +2 -1
- package/lib-next/theme/DocBreadcrumbs/index.js +76 -0
- package/lib-next/theme/DocBreadcrumbs/styles.module.css +26 -0
- package/lib-next/theme/DocCard/index.js +12 -1
- package/lib-next/theme/DocCard/styles.module.css +1 -1
- package/lib-next/theme/DocCategoryGeneratedIndexPage/index.js +2 -0
- package/lib-next/theme/DocItem/index.js +8 -5
- package/lib-next/theme/DocPage/index.js +2 -4
- package/lib-next/theme/DocPage/styles.module.css +3 -3
- package/lib-next/theme/DocPaginator/index.js +1 -4
- package/lib-next/theme/DocSidebar/styles.module.css +4 -4
- package/lib-next/theme/DocSidebarItem/index.js +39 -14
- package/lib-next/theme/DocSidebarItem/styles.module.css +3 -10
- package/lib-next/theme/DocTagsListPage/index.js +1 -4
- package/lib-next/theme/DocVersionBadge/index.js +8 -1
- package/lib-next/theme/Footer/index.js +8 -4
- package/lib-next/theme/Heading/index.js +0 -1
- package/lib-next/theme/Heading/styles.module.css +16 -0
- package/lib-next/theme/IconArrow/index.js +1 -4
- package/lib-next/theme/IconEdit/index.js +1 -4
- package/lib-next/theme/IconExternalLink/index.js +1 -4
- package/lib-next/theme/IconLanguage/index.js +1 -4
- package/lib-next/theme/IconMenu/index.js +6 -4
- package/lib-next/theme/Layout/index.js +1 -4
- package/lib-next/theme/LayoutHead/index.js +4 -0
- package/lib-next/theme/Logo/index.js +1 -4
- package/lib-next/theme/MDXComponents/index.js +4 -3
- package/lib-next/theme/MDXPage/index.js +1 -4
- package/lib-next/theme/Navbar/index.js +1 -3
- package/lib-next/theme/NavbarItem/DefaultNavbarItem.js +1 -3
- package/lib-next/theme/NavbarItem/DocsVersionDropdownNavbarItem.js +2 -2
- package/lib-next/theme/NavbarItem/DropdownNavbarItem.js +1 -3
- package/lib-next/theme/NavbarItem/LocaleDropdownNavbarItem/index.js +8 -1
- package/lib-next/theme/NavbarItem/index.js +2 -2
- package/lib-next/theme/NotFound.js +1 -4
- package/lib-next/theme/PaginatorNavLink/index.js +1 -4
- package/lib-next/theme/SearchBar.js +1 -1
- package/lib-next/theme/SearchMetadata/index.js +11 -6
- package/lib-next/theme/SkipToContent/index.js +1 -3
- package/lib-next/theme/TOC/index.js +2 -5
- package/lib-next/theme/TOCInline/index.js +1 -4
- package/lib-next/theme/TOCItems/index.js +3 -3
- package/lib-next/theme/TabItem/index.js +1 -4
- package/lib-next/theme/Tabs/__tests__/index.test.js +3 -1
- package/lib-next/theme/Tabs/index.js +1 -1
- package/lib-next/theme/Tag/index.js +1 -4
- package/lib-next/theme/TagsListByLetter/index.js +1 -3
- package/lib-next/theme/ThemedImage/index.js +1 -4
- package/lib-next/theme/ThemedImage/styles.module.css +2 -2
- package/lib-next/theme/Toggle/index.js +25 -2
- package/lib-next/theme/prism-include-languages.js +17 -23
- package/package.json +21 -22
- package/src/getSwizzleConfig.ts +101 -0
- package/src/index.ts +7 -21
- package/src/theme/AnnouncementBar/index.tsx +1 -3
- package/src/theme/BackToTopButton/index.tsx +8 -7
- package/src/theme/BackToTopButton/styles.module.css +3 -1
- package/src/theme/BlogLayout/index.tsx +1 -3
- package/src/theme/BlogListPage/index.tsx +1 -3
- package/src/theme/BlogListPaginator/index.tsx +1 -3
- package/src/theme/BlogPostAuthor/index.tsx +18 -23
- package/src/theme/BlogPostItem/index.tsx +10 -4
- package/src/theme/BlogPostPage/index.tsx +4 -5
- package/src/theme/BlogPostPaginator/index.tsx +1 -3
- package/src/theme/BlogTagsListPage/index.tsx +1 -3
- package/src/theme/BlogTagsPostsPage/index.tsx +3 -1
- package/src/theme/CodeBlock/index.tsx +2 -1
- package/src/theme/Details/index.tsx +2 -1
- package/src/theme/DocBreadcrumbs/index.tsx +91 -0
- package/src/theme/DocBreadcrumbs/styles.module.css +26 -0
- package/src/theme/DocCard/index.tsx +10 -1
- package/src/theme/DocCard/styles.module.css +1 -1
- package/src/theme/DocCategoryGeneratedIndexPage/index.tsx +2 -0
- package/src/theme/DocItem/index.tsx +7 -4
- package/src/theme/DocPage/index.tsx +2 -4
- package/src/theme/DocPage/styles.module.css +3 -3
- package/src/theme/DocPaginator/index.tsx +1 -3
- package/src/theme/DocSidebar/styles.module.css +4 -4
- package/src/theme/DocSidebarItem/index.tsx +43 -13
- package/src/theme/DocSidebarItem/styles.module.css +3 -10
- package/src/theme/DocTagsListPage/index.tsx +1 -3
- package/src/theme/DocVersionBadge/index.tsx +6 -1
- package/src/theme/Footer/index.tsx +8 -4
- package/src/theme/Heading/index.tsx +0 -1
- package/src/theme/Heading/styles.module.css +16 -0
- package/src/theme/IconArrow/index.tsx +1 -3
- package/src/theme/IconEdit/index.tsx +4 -3
- package/src/theme/IconExternalLink/index.tsx +4 -3
- package/src/theme/IconLanguage/index.tsx +5 -3
- package/src/theme/IconMenu/index.tsx +1 -3
- package/src/theme/Layout/index.tsx +1 -3
- package/src/theme/LayoutHead/index.tsx +4 -0
- package/src/theme/Logo/index.tsx +1 -3
- package/src/theme/MDXComponents/index.tsx +4 -3
- package/src/theme/MDXPage/index.tsx +1 -3
- package/src/theme/Navbar/index.tsx +1 -3
- package/src/theme/NavbarItem/DefaultNavbarItem.tsx +1 -3
- package/src/theme/NavbarItem/DocsVersionDropdownNavbarItem.tsx +2 -2
- package/src/theme/NavbarItem/DropdownNavbarItem.tsx +4 -3
- package/src/theme/NavbarItem/LocaleDropdownNavbarItem/index.tsx +8 -1
- package/src/theme/NavbarItem/index.tsx +2 -2
- package/src/theme/NotFound.tsx +1 -3
- package/src/theme/PaginatorNavLink/index.tsx +1 -3
- package/src/theme/SearchBar.tsx +2 -1
- package/src/theme/SearchMetadata/index.tsx +12 -6
- package/src/theme/SkipToContent/index.tsx +1 -3
- package/src/theme/TOC/index.tsx +3 -5
- package/src/theme/TOCCollapsible/index.tsx +2 -2
- package/src/theme/TOCInline/index.tsx +3 -5
- package/src/theme/TOCItems/index.tsx +11 -7
- package/src/theme/TabItem/index.tsx +5 -3
- package/src/theme/Tabs/index.tsx +1 -1
- package/src/theme/Tag/index.tsx +1 -3
- package/src/theme/TagsListByLetter/index.tsx +1 -3
- package/src/theme/ThemedImage/index.tsx +1 -3
- package/src/theme/ThemedImage/styles.module.css +2 -2
- package/src/theme/Toggle/index.tsx +26 -2
- package/src/theme/prism-include-languages.ts +20 -23
- package/src/theme-classic.d.ts +123 -97
- package/src/translations.ts +41 -39
- package/src/validateThemeConfig.ts +10 -8
- package/lib-next/theme/DocSidebarItems/styles.module.css +0 -20
- package/lib-next/theme/Heading/styles.css +0 -22
- package/src/theme/DocSidebarItems/styles.module.css +0 -20
- package/src/theme/Heading/styles.css +0 -22
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = getSwizzleConfig;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
10
|
+
*
|
|
11
|
+
* This source code is licensed under the MIT license found in the
|
|
12
|
+
* LICENSE file in the root directory of this source tree.
|
|
13
|
+
*/
|
|
14
|
+
function getSwizzleConfig() {
|
|
15
|
+
return {
|
|
16
|
+
components: {
|
|
17
|
+
CodeBlock: {
|
|
18
|
+
actions: {
|
|
19
|
+
wrap: 'safe',
|
|
20
|
+
eject: 'safe'
|
|
21
|
+
},
|
|
22
|
+
description: 'The component used to render multi-line code blocks, generally used in Markdown files.'
|
|
23
|
+
},
|
|
24
|
+
DocSidebar: {
|
|
25
|
+
actions: {
|
|
26
|
+
wrap: 'safe',
|
|
27
|
+
eject: 'unsafe' // too much technical code in sidebar, not very safe atm
|
|
28
|
+
|
|
29
|
+
},
|
|
30
|
+
description: 'The sidebar component on docs pages'
|
|
31
|
+
},
|
|
32
|
+
Footer: {
|
|
33
|
+
actions: {
|
|
34
|
+
wrap: 'safe',
|
|
35
|
+
eject: 'unsafe' // TODO split footer into smaller parts
|
|
36
|
+
|
|
37
|
+
},
|
|
38
|
+
description: "The footer component of you site's layout"
|
|
39
|
+
},
|
|
40
|
+
NotFound: {
|
|
41
|
+
actions: {
|
|
42
|
+
wrap: 'safe',
|
|
43
|
+
eject: 'safe'
|
|
44
|
+
},
|
|
45
|
+
description: 'The global 404 page of your site, meant to be ejected and customized'
|
|
46
|
+
},
|
|
47
|
+
SearchBar: {
|
|
48
|
+
actions: {
|
|
49
|
+
wrap: 'safe',
|
|
50
|
+
eject: 'safe'
|
|
51
|
+
},
|
|
52
|
+
// TODO how to describe this one properly?
|
|
53
|
+
// By default it's an empty placeholder for the user to fill
|
|
54
|
+
description: 'The search bar component of your site, appearing in the navbar.'
|
|
55
|
+
},
|
|
56
|
+
IconArrow: {
|
|
57
|
+
actions: {
|
|
58
|
+
wrap: 'safe',
|
|
59
|
+
eject: 'safe'
|
|
60
|
+
},
|
|
61
|
+
description: 'The arrow icon component'
|
|
62
|
+
},
|
|
63
|
+
IconEdit: {
|
|
64
|
+
actions: {
|
|
65
|
+
wrap: 'safe',
|
|
66
|
+
eject: 'safe'
|
|
67
|
+
},
|
|
68
|
+
description: 'The edit icon component'
|
|
69
|
+
},
|
|
70
|
+
IconMenu: {
|
|
71
|
+
actions: {
|
|
72
|
+
wrap: 'safe',
|
|
73
|
+
eject: 'safe'
|
|
74
|
+
},
|
|
75
|
+
description: 'The menu icon component'
|
|
76
|
+
},
|
|
77
|
+
'prism-include-languages': {
|
|
78
|
+
actions: {
|
|
79
|
+
wrap: 'forbidden',
|
|
80
|
+
// not a component!
|
|
81
|
+
eject: 'safe'
|
|
82
|
+
},
|
|
83
|
+
description: 'The Prism languages to include for code block syntax highlighting. Meant to be ejected.'
|
|
84
|
+
},
|
|
85
|
+
MDXComponents: {
|
|
86
|
+
actions: {
|
|
87
|
+
wrap: 'forbidden',
|
|
88
|
+
/// TODO allow wrapping objects???
|
|
89
|
+
eject: 'safe'
|
|
90
|
+
},
|
|
91
|
+
description: 'The MDX components to use for rendering MDX files. Meant to be ejected.'
|
|
92
|
+
},
|
|
93
|
+
// TODO should probably not even appear here
|
|
94
|
+
'NavbarItem/utils': {
|
|
95
|
+
actions: {
|
|
96
|
+
wrap: 'forbidden',
|
|
97
|
+
eject: 'forbidden'
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
}
|
package/lib/index.js
CHANGED
|
@@ -5,7 +5,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.AnnouncementBarDismissStorageKey = void 0;
|
|
7
7
|
exports.default = docusaurusThemeClassic;
|
|
8
|
-
exports
|
|
8
|
+
Object.defineProperty(exports, "getSwizzleConfig", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () {
|
|
11
|
+
return _getSwizzleConfig.default;
|
|
12
|
+
}
|
|
13
|
+
});
|
|
9
14
|
Object.defineProperty(exports, "validateThemeConfig", {
|
|
10
15
|
enumerable: true,
|
|
11
16
|
get: function () {
|
|
@@ -23,6 +28,8 @@ var _rtlcss = _interopRequireDefault(require("rtlcss"));
|
|
|
23
28
|
|
|
24
29
|
var _themeTranslations = require("@docusaurus/theme-translations");
|
|
25
30
|
|
|
31
|
+
var _getSwizzleConfig = _interopRequireDefault(require("./getSwizzleConfig"));
|
|
32
|
+
|
|
26
33
|
var _validateThemeConfig = require("./validateThemeConfig");
|
|
27
34
|
|
|
28
35
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -35,7 +42,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
35
42
|
*/
|
|
36
43
|
const requireFromDocusaurusCore = (0, _module.createRequire)(require.resolve('@docusaurus/core/package.json'));
|
|
37
44
|
const ContextReplacementPlugin = requireFromDocusaurusCore('webpack/lib/ContextReplacementPlugin'); // Need to be inlined to prevent dark mode FOUC
|
|
38
|
-
// Make sure
|
|
45
|
+
// Make sure the key is the same as the one in `/theme/hooks/useTheme.js`
|
|
39
46
|
|
|
40
47
|
const ThemeStorageKey = 'theme';
|
|
41
48
|
|
|
@@ -76,15 +83,17 @@ const noFlashColorMode = ({
|
|
|
76
83
|
setDataThemeAttribute(defaultMode === 'dark' ? 'dark' : 'light');
|
|
77
84
|
}
|
|
78
85
|
}
|
|
79
|
-
})();`; // Duplicated constant. Unfortunately we can't import it from theme-common, as
|
|
86
|
+
})();`; // Duplicated constant. Unfortunately we can't import it from theme-common, as
|
|
87
|
+
// we need to support older nodejs versions without ESM support
|
|
80
88
|
// TODO: import from theme-common once we only support Node.js with ESM support
|
|
81
89
|
// + move all those announcementBar stuff there too
|
|
82
90
|
|
|
83
91
|
|
|
84
92
|
const AnnouncementBarDismissStorageKey = 'docusaurus.announcement.dismiss';
|
|
85
93
|
exports.AnnouncementBarDismissStorageKey = AnnouncementBarDismissStorageKey;
|
|
86
|
-
const AnnouncementBarDismissDataAttribute = 'data-announcement-bar-initially-dismissed'; // We always render the announcement bar html on the server, to prevent layout
|
|
87
|
-
// The theme can use CSS + the data attribute to hide
|
|
94
|
+
const AnnouncementBarDismissDataAttribute = 'data-announcement-bar-initially-dismissed'; // We always render the announcement bar html on the server, to prevent layout
|
|
95
|
+
// shifts on React hydration. The theme can use CSS + the data attribute to hide
|
|
96
|
+
// the announcement bar asap (before React hydration)
|
|
88
97
|
|
|
89
98
|
const AnnouncementBarInlineJavaScript = `
|
|
90
99
|
(function() {
|
|
@@ -212,10 +221,4 @@ ${announcementBar ? AnnouncementBarInlineJavaScript : ''}
|
|
|
212
221
|
}
|
|
213
222
|
|
|
214
223
|
};
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
const swizzleAllowedComponents = ['CodeBlock', 'DocSidebar', 'Footer', 'NotFound', 'SearchBar', 'IconArrow', 'IconEdit', 'IconMenu', 'hooks/useTheme', 'prism-include-languages'];
|
|
218
|
-
|
|
219
|
-
function getSwizzleComponentList() {
|
|
220
|
-
return swizzleAllowedComponents;
|
|
221
224
|
}
|
package/lib/theme-classic.d.ts
CHANGED
|
@@ -24,8 +24,7 @@ declare module '@theme/Admonition' {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
declare module '@theme/AnnouncementBar' {
|
|
27
|
-
|
|
28
|
-
export default AnnouncementBar;
|
|
27
|
+
export default function AnnouncementBar(): JSX.Element | null;
|
|
29
28
|
}
|
|
30
29
|
|
|
31
30
|
declare module '@theme/BackToTopButton' {
|
|
@@ -38,9 +37,21 @@ declare module '@theme/BlogListPaginator' {
|
|
|
38
37
|
export interface Props {
|
|
39
38
|
readonly metadata: Metadata;
|
|
40
39
|
}
|
|
40
|
+
export default function BlogListPaginator(props: Props): JSX.Element;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
declare module '@theme/BlogSidebar' {
|
|
44
|
+
export type BlogSidebarItem = {title: string; permalink: string};
|
|
45
|
+
export type BlogSidebar = {
|
|
46
|
+
title: string;
|
|
47
|
+
items: BlogSidebarItem[];
|
|
48
|
+
};
|
|
41
49
|
|
|
42
|
-
|
|
43
|
-
|
|
50
|
+
export interface Props {
|
|
51
|
+
readonly sidebar: BlogSidebar;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export default function BlogSidebar(props: Props): JSX.Element;
|
|
44
55
|
}
|
|
45
56
|
|
|
46
57
|
declare module '@theme/BlogPostItem' {
|
|
@@ -56,8 +67,7 @@ declare module '@theme/BlogPostItem' {
|
|
|
56
67
|
readonly children: JSX.Element;
|
|
57
68
|
}
|
|
58
69
|
|
|
59
|
-
|
|
60
|
-
export default BlogPostItem;
|
|
70
|
+
export default function BlogPostItem(props: Props): JSX.Element;
|
|
61
71
|
}
|
|
62
72
|
|
|
63
73
|
declare module '@theme/BlogPostAuthor' {
|
|
@@ -90,8 +100,7 @@ declare module '@theme/BlogPostPaginator' {
|
|
|
90
100
|
readonly prevItem?: Item;
|
|
91
101
|
}
|
|
92
102
|
|
|
93
|
-
|
|
94
|
-
export default BlogPostPaginator;
|
|
103
|
+
export default function BlogPostPaginator(props: Props): JSX.Element;
|
|
95
104
|
}
|
|
96
105
|
|
|
97
106
|
declare module '@theme/BlogLayout' {
|
|
@@ -104,8 +113,7 @@ declare module '@theme/BlogLayout' {
|
|
|
104
113
|
readonly toc?: ReactNode;
|
|
105
114
|
}
|
|
106
115
|
|
|
107
|
-
|
|
108
|
-
export default BlogLayout;
|
|
116
|
+
export default function BlogLayout(props: Props): JSX.Element;
|
|
109
117
|
}
|
|
110
118
|
|
|
111
119
|
declare module '@theme/CodeBlock' {
|
|
@@ -119,8 +127,33 @@ declare module '@theme/CodeBlock' {
|
|
|
119
127
|
readonly language?: string;
|
|
120
128
|
}
|
|
121
129
|
|
|
122
|
-
|
|
123
|
-
|
|
130
|
+
export default function CodeBlock(props: Props): JSX.Element;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
declare module '@theme/DocCard' {
|
|
134
|
+
import type {PropSidebarItem} from '@docusaurus/plugin-content-docs';
|
|
135
|
+
|
|
136
|
+
export interface Props {
|
|
137
|
+
readonly item: PropSidebarItem;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export default function DocCard(props: Props): JSX.Element;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
declare module '@theme/DocCardList' {
|
|
144
|
+
import type {PropSidebarItem} from '@docusaurus/plugin-content-docs';
|
|
145
|
+
|
|
146
|
+
export interface Props {
|
|
147
|
+
readonly items: PropSidebarItem[];
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export default function DocCardList(props: Props): JSX.Element;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
declare module '@theme/DocItemFooter' {
|
|
154
|
+
import type {Props} from '@theme/DocItem';
|
|
155
|
+
|
|
156
|
+
export default function DocItemFooter(props: Props): JSX.Element;
|
|
124
157
|
}
|
|
125
158
|
|
|
126
159
|
declare module '@theme/DocPaginator' {
|
|
@@ -144,8 +177,7 @@ declare module '@theme/DocSidebar' {
|
|
|
144
177
|
readonly [key: string]: unknown;
|
|
145
178
|
}
|
|
146
179
|
|
|
147
|
-
|
|
148
|
-
export default DocSidebar;
|
|
180
|
+
export default function DocSidebar(props: Props): JSX.Element;
|
|
149
181
|
}
|
|
150
182
|
|
|
151
183
|
declare module '@theme/DocSidebarItem' {
|
|
@@ -167,24 +199,38 @@ declare module '@theme/DocSidebarItems' {
|
|
|
167
199
|
import type {Props as DocSidebarItemProps} from '@theme/DocSidebarItem';
|
|
168
200
|
import type {PropSidebarItem} from '@docusaurus/plugin-content-docs';
|
|
169
201
|
|
|
170
|
-
export
|
|
202
|
+
export interface Props extends Omit<DocSidebarItemProps, 'item' | 'index'> {
|
|
171
203
|
readonly items: readonly PropSidebarItem[];
|
|
172
|
-
}
|
|
204
|
+
}
|
|
173
205
|
|
|
174
206
|
export default function DocSidebarItems(props: Props): JSX.Element;
|
|
175
207
|
}
|
|
176
208
|
|
|
209
|
+
declare module '@theme/DocVersionBanner' {
|
|
210
|
+
export interface Props {
|
|
211
|
+
readonly className?: string;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export default function DocVersionBanner(props: Props): JSX.Element;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
declare module '@theme/DocVersionBadge' {
|
|
218
|
+
export interface Props {
|
|
219
|
+
readonly className?: string;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
export default function DocVersionBadge(props: Props): JSX.Element;
|
|
223
|
+
}
|
|
224
|
+
|
|
177
225
|
declare module '@theme/DocVersionSuggestions' {
|
|
178
|
-
|
|
179
|
-
export default DocVersionSuggestions;
|
|
226
|
+
export default function DocVersionSuggestions(): JSX.Element;
|
|
180
227
|
}
|
|
181
228
|
|
|
182
229
|
declare module '@theme/EditThisPage' {
|
|
183
230
|
export interface Props {
|
|
184
231
|
readonly editUrl: string;
|
|
185
232
|
}
|
|
186
|
-
|
|
187
|
-
export default EditThisPage;
|
|
233
|
+
export default function EditThisPage(props: Props): JSX.Element;
|
|
188
234
|
}
|
|
189
235
|
|
|
190
236
|
declare module '@theme/ErrorPageContent' {
|
|
@@ -195,8 +241,7 @@ declare module '@theme/ErrorPageContent' {
|
|
|
195
241
|
}
|
|
196
242
|
|
|
197
243
|
declare module '@theme/Footer' {
|
|
198
|
-
|
|
199
|
-
export default Footer;
|
|
244
|
+
export default function Footer(): JSX.Element | null;
|
|
200
245
|
}
|
|
201
246
|
|
|
202
247
|
declare module '@theme/Heading' {
|
|
@@ -258,8 +303,7 @@ declare module '@theme/SearchMetadata' {
|
|
|
258
303
|
readonly tag?: string;
|
|
259
304
|
}
|
|
260
305
|
|
|
261
|
-
|
|
262
|
-
export default SearchMetadata;
|
|
306
|
+
export default function SearchMetadata(props: Props): JSX.Element;
|
|
263
307
|
}
|
|
264
308
|
|
|
265
309
|
declare module '@theme/LastUpdated' {
|
|
@@ -269,13 +313,11 @@ declare module '@theme/LastUpdated' {
|
|
|
269
313
|
readonly lastUpdatedBy?: string;
|
|
270
314
|
}
|
|
271
315
|
|
|
272
|
-
|
|
273
|
-
export default LastUpdated;
|
|
316
|
+
export default function LastUpdated(props: Props): JSX.Element;
|
|
274
317
|
}
|
|
275
318
|
|
|
276
319
|
declare module '@theme/SkipToContent' {
|
|
277
|
-
|
|
278
|
-
export default SkipToContent;
|
|
320
|
+
export default function SkipToContent(): JSX.Element;
|
|
279
321
|
}
|
|
280
322
|
|
|
281
323
|
declare module '@theme/MDXComponents' {
|
|
@@ -302,8 +344,7 @@ declare module '@theme/MDXComponents' {
|
|
|
302
344
|
}
|
|
303
345
|
|
|
304
346
|
declare module '@theme/Navbar' {
|
|
305
|
-
|
|
306
|
-
export default Navbar;
|
|
347
|
+
export default function Navbar(): JSX.Element;
|
|
307
348
|
}
|
|
308
349
|
|
|
309
350
|
declare module '@theme/NavbarItem/DefaultNavbarItem' {
|
|
@@ -324,15 +365,15 @@ declare module '@theme/NavbarItem/DefaultNavbarItem' {
|
|
|
324
365
|
|
|
325
366
|
declare module '@theme/NavbarItem/NavbarNavLink' {
|
|
326
367
|
import type {ReactNode} from 'react';
|
|
327
|
-
import type {LinkProps} from '@docusaurus/Link';
|
|
368
|
+
import type {Props as LinkProps} from '@docusaurus/Link';
|
|
328
369
|
|
|
329
|
-
export
|
|
370
|
+
export interface Props extends LinkProps {
|
|
330
371
|
readonly activeBasePath?: string;
|
|
331
372
|
readonly activeBaseRegex?: string;
|
|
332
373
|
readonly exact?: boolean;
|
|
333
374
|
readonly label?: ReactNode;
|
|
334
375
|
readonly prependBaseUrlToHref?: string;
|
|
335
|
-
}
|
|
376
|
+
}
|
|
336
377
|
|
|
337
378
|
export default function NavbarNavLink(props: Props): JSX.Element;
|
|
338
379
|
}
|
|
@@ -352,8 +393,7 @@ declare module '@theme/NavbarItem/DropdownNavbarItem' {
|
|
|
352
393
|
readonly mobile?: boolean;
|
|
353
394
|
}
|
|
354
395
|
|
|
355
|
-
|
|
356
|
-
export default DropdownNavbarItem;
|
|
396
|
+
export default function DropdownNavbarItem(props: Props): JSX.Element;
|
|
357
397
|
}
|
|
358
398
|
|
|
359
399
|
declare module '@theme/NavbarItem/SearchNavbarItem' {
|
|
@@ -361,8 +401,7 @@ declare module '@theme/NavbarItem/SearchNavbarItem' {
|
|
|
361
401
|
readonly mobile?: boolean;
|
|
362
402
|
}
|
|
363
403
|
|
|
364
|
-
|
|
365
|
-
export default SearchNavbarItem;
|
|
404
|
+
export default function SearchNavbarItem(props: Props): JSX.Element;
|
|
366
405
|
}
|
|
367
406
|
|
|
368
407
|
declare module '@theme/NavbarItem/LocaleDropdownNavbarItem' {
|
|
@@ -374,8 +413,7 @@ declare module '@theme/NavbarItem/LocaleDropdownNavbarItem' {
|
|
|
374
413
|
readonly dropdownItemsAfter: LinkLikeNavbarItemProps[];
|
|
375
414
|
}
|
|
376
415
|
|
|
377
|
-
|
|
378
|
-
export default LocaleDropdownNavbarItem;
|
|
416
|
+
export default function LocaleDropdownNavbarItem(props: Props): JSX.Element;
|
|
379
417
|
}
|
|
380
418
|
|
|
381
419
|
declare module '@theme/NavbarItem/DocsVersionDropdownNavbarItem' {
|
|
@@ -389,8 +427,9 @@ declare module '@theme/NavbarItem/DocsVersionDropdownNavbarItem' {
|
|
|
389
427
|
readonly dropdownItemsAfter: LinkLikeNavbarItemProps[];
|
|
390
428
|
}
|
|
391
429
|
|
|
392
|
-
|
|
393
|
-
|
|
430
|
+
export default function DocsVersionDropdownNavbarItem(
|
|
431
|
+
props: Props,
|
|
432
|
+
): JSX.Element;
|
|
394
433
|
}
|
|
395
434
|
|
|
396
435
|
declare module '@theme/NavbarItem/DocsVersionNavbarItem' {
|
|
@@ -400,8 +439,7 @@ declare module '@theme/NavbarItem/DocsVersionNavbarItem' {
|
|
|
400
439
|
readonly docsPluginId?: string;
|
|
401
440
|
}
|
|
402
441
|
|
|
403
|
-
|
|
404
|
-
export default DocsVersionNavbarItem;
|
|
442
|
+
export default function DocsVersionNavbarItem(props: Props): JSX.Element;
|
|
405
443
|
}
|
|
406
444
|
|
|
407
445
|
declare module '@theme/NavbarItem/DocNavbarItem' {
|
|
@@ -412,8 +450,7 @@ declare module '@theme/NavbarItem/DocNavbarItem' {
|
|
|
412
450
|
readonly docsPluginId?: string;
|
|
413
451
|
}
|
|
414
452
|
|
|
415
|
-
|
|
416
|
-
export default DocsSidebarNavbarItem;
|
|
453
|
+
export default function DocsSidebarNavbarItem(props: Props): JSX.Element;
|
|
417
454
|
}
|
|
418
455
|
|
|
419
456
|
declare module '@theme/NavbarItem/DocSidebarNavbarItem' {
|
|
@@ -424,8 +461,7 @@ declare module '@theme/NavbarItem/DocSidebarNavbarItem' {
|
|
|
424
461
|
readonly docsPluginId?: string;
|
|
425
462
|
}
|
|
426
463
|
|
|
427
|
-
|
|
428
|
-
export default DocSidebarNavbarItem;
|
|
464
|
+
export default function DocSidebarNavbarItem(props: Props): JSX.Element;
|
|
429
465
|
}
|
|
430
466
|
|
|
431
467
|
declare module '@theme/NavbarItem' {
|
|
@@ -461,8 +497,7 @@ declare module '@theme/NavbarItem' {
|
|
|
461
497
|
|
|
462
498
|
export type Types = Props['type'];
|
|
463
499
|
|
|
464
|
-
|
|
465
|
-
export default NavbarItem;
|
|
500
|
+
export default function NavbarItem(props: Props): JSX.Element;
|
|
466
501
|
}
|
|
467
502
|
|
|
468
503
|
declare module '@theme/NavbarItem/utils' {
|
|
@@ -498,8 +533,7 @@ declare module '@theme/TabItem' {
|
|
|
498
533
|
readonly attributes?: Record<string, unknown>;
|
|
499
534
|
}
|
|
500
535
|
|
|
501
|
-
|
|
502
|
-
export default TabItem;
|
|
536
|
+
export default function TabItem(props: Props): JSX.Element;
|
|
503
537
|
}
|
|
504
538
|
|
|
505
539
|
declare module '@theme/Tabs' {
|
|
@@ -520,8 +554,7 @@ declare module '@theme/Tabs' {
|
|
|
520
554
|
readonly className?: string;
|
|
521
555
|
}
|
|
522
556
|
|
|
523
|
-
|
|
524
|
-
export default Tabs;
|
|
557
|
+
export default function Tabs(props: Props): JSX.Element;
|
|
525
558
|
}
|
|
526
559
|
|
|
527
560
|
declare module '@theme/ThemedImage' {
|
|
@@ -534,8 +567,7 @@ declare module '@theme/ThemedImage' {
|
|
|
534
567
|
};
|
|
535
568
|
}
|
|
536
569
|
|
|
537
|
-
|
|
538
|
-
export default ThemedImage;
|
|
570
|
+
export default function ThemedImage(props: Props): JSX.Element;
|
|
539
571
|
}
|
|
540
572
|
|
|
541
573
|
declare module '@theme/Details' {
|
|
@@ -548,68 +580,56 @@ declare module '@theme/Details' {
|
|
|
548
580
|
declare module '@theme/TOCItems' {
|
|
549
581
|
import type {TOCItem} from '@docusaurus/types';
|
|
550
582
|
|
|
551
|
-
export
|
|
583
|
+
export interface Props {
|
|
552
584
|
readonly toc: readonly TOCItem[];
|
|
553
585
|
readonly minHeadingLevel?: number;
|
|
554
586
|
readonly maxHeadingLevel?: number;
|
|
555
587
|
readonly className?: string;
|
|
556
588
|
readonly linkClassName?: string | null;
|
|
557
589
|
readonly linkActiveClassName?: string;
|
|
558
|
-
}
|
|
590
|
+
}
|
|
559
591
|
|
|
560
|
-
export default function TOCItems(props:
|
|
592
|
+
export default function TOCItems(props: Props): JSX.Element;
|
|
561
593
|
}
|
|
562
594
|
|
|
563
595
|
declare module '@theme/TOC' {
|
|
564
596
|
import type {TOCItem} from '@docusaurus/types';
|
|
565
597
|
|
|
566
|
-
// minHeadingLevel only exists as a per-doc option,
|
|
567
|
-
//
|
|
568
|
-
|
|
569
|
-
export type TOCProps = {
|
|
598
|
+
// minHeadingLevel only exists as a per-doc option, and won't have a default
|
|
599
|
+
// set by Joi. See TOC, TOCInline, TOCCollapsible for examples
|
|
600
|
+
export interface Props {
|
|
570
601
|
readonly toc: readonly TOCItem[];
|
|
571
602
|
readonly minHeadingLevel?: number;
|
|
572
603
|
readonly maxHeadingLevel?: number;
|
|
573
604
|
readonly className?: string;
|
|
574
|
-
}
|
|
575
|
-
|
|
576
|
-
export type TOCHeadingsProps = {
|
|
577
|
-
readonly toc: readonly TOCItem[];
|
|
578
|
-
readonly minHeadingLevel?: number;
|
|
579
|
-
readonly maxHeadingLevel?: number;
|
|
580
|
-
};
|
|
581
|
-
|
|
582
|
-
export const TOCHeadings: (props: TOCHeadingsProps) => JSX.Element;
|
|
605
|
+
}
|
|
583
606
|
|
|
584
|
-
|
|
585
|
-
export default TOC;
|
|
607
|
+
export default function TOC(props: Props): JSX.Element;
|
|
586
608
|
}
|
|
587
609
|
|
|
588
610
|
declare module '@theme/TOCInline' {
|
|
589
611
|
import type {TOCItem} from '@docusaurus/types';
|
|
590
612
|
|
|
591
|
-
export
|
|
613
|
+
export interface Props {
|
|
592
614
|
readonly toc: readonly TOCItem[];
|
|
593
615
|
readonly minHeadingLevel?: number;
|
|
594
616
|
readonly maxHeadingLevel?: number;
|
|
595
|
-
}
|
|
617
|
+
}
|
|
596
618
|
|
|
597
|
-
|
|
598
|
-
export default TOCInline;
|
|
619
|
+
export default function TOCInline(props: Props): JSX.Element;
|
|
599
620
|
}
|
|
600
621
|
|
|
601
622
|
declare module '@theme/TOCCollapsible' {
|
|
602
623
|
import type {TOCItem} from '@docusaurus/types';
|
|
603
624
|
|
|
604
|
-
export
|
|
625
|
+
export interface Props {
|
|
605
626
|
readonly className?: string;
|
|
606
627
|
readonly minHeadingLevel?: number;
|
|
607
628
|
readonly maxHeadingLevel?: number;
|
|
608
629
|
readonly toc: readonly TOCItem[];
|
|
609
|
-
}
|
|
630
|
+
}
|
|
610
631
|
|
|
611
|
-
|
|
612
|
-
export default TOCCollapsible;
|
|
632
|
+
export default function TOCCollapsible(props: Props): JSX.Element;
|
|
613
633
|
}
|
|
614
634
|
|
|
615
635
|
declare module '@theme/Toggle' {
|
|
@@ -621,8 +641,7 @@ declare module '@theme/Toggle' {
|
|
|
621
641
|
readonly onChange: (e: SyntheticEvent) => void;
|
|
622
642
|
}
|
|
623
643
|
|
|
624
|
-
|
|
625
|
-
export default Toggle;
|
|
644
|
+
export default function Toggle(props: Props): JSX.Element;
|
|
626
645
|
}
|
|
627
646
|
|
|
628
647
|
declare module '@theme/Logo' {
|
|
@@ -633,8 +652,7 @@ declare module '@theme/Logo' {
|
|
|
633
652
|
readonly titleClassName?: string;
|
|
634
653
|
}
|
|
635
654
|
|
|
636
|
-
|
|
637
|
-
export default Logo;
|
|
655
|
+
export default function Logo(props: Props): JSX.Element;
|
|
638
656
|
}
|
|
639
657
|
|
|
640
658
|
declare module '@theme/IconArrow' {
|
|
@@ -642,8 +660,7 @@ declare module '@theme/IconArrow' {
|
|
|
642
660
|
|
|
643
661
|
export interface Props extends ComponentProps<'svg'> {}
|
|
644
662
|
|
|
645
|
-
|
|
646
|
-
export default IconArrow;
|
|
663
|
+
export default function IconArrow(props: Props): JSX.Element;
|
|
647
664
|
}
|
|
648
665
|
|
|
649
666
|
declare module '@theme/IconEdit' {
|
|
@@ -651,8 +668,7 @@ declare module '@theme/IconEdit' {
|
|
|
651
668
|
|
|
652
669
|
export interface Props extends ComponentProps<'svg'> {}
|
|
653
670
|
|
|
654
|
-
|
|
655
|
-
export default IconEdit;
|
|
671
|
+
export default function IconEdit(props: Props): JSX.Element;
|
|
656
672
|
}
|
|
657
673
|
|
|
658
674
|
declare module '@theme/IconMenu' {
|
|
@@ -660,8 +676,7 @@ declare module '@theme/IconMenu' {
|
|
|
660
676
|
|
|
661
677
|
export interface Props extends ComponentProps<'svg'> {}
|
|
662
678
|
|
|
663
|
-
|
|
664
|
-
export default IconMenu;
|
|
679
|
+
export default function IconMenu(props: Props): JSX.Element;
|
|
665
680
|
}
|
|
666
681
|
|
|
667
682
|
declare module '@theme/IconClose' {
|
|
@@ -669,8 +684,7 @@ declare module '@theme/IconClose' {
|
|
|
669
684
|
|
|
670
685
|
export interface Props extends ComponentProps<'svg'> {}
|
|
671
686
|
|
|
672
|
-
|
|
673
|
-
export default IconClose;
|
|
687
|
+
export default function IconClose(props: Props): JSX.Element;
|
|
674
688
|
}
|
|
675
689
|
|
|
676
690
|
declare module '@theme/IconLanguage' {
|
|
@@ -678,8 +692,7 @@ declare module '@theme/IconLanguage' {
|
|
|
678
692
|
|
|
679
693
|
export interface Props extends ComponentProps<'svg'> {}
|
|
680
694
|
|
|
681
|
-
|
|
682
|
-
export default IconLanguage;
|
|
695
|
+
export default function IconLanguage(props: Props): JSX.Element;
|
|
683
696
|
}
|
|
684
697
|
|
|
685
698
|
declare module '@theme/IconExternalLink' {
|
|
@@ -687,8 +700,7 @@ declare module '@theme/IconExternalLink' {
|
|
|
687
700
|
|
|
688
701
|
export interface Props extends ComponentProps<'svg'> {}
|
|
689
702
|
|
|
690
|
-
|
|
691
|
-
export default IconExternalLink;
|
|
703
|
+
export default function IconExternalLink(props: Props): JSX.Element;
|
|
692
704
|
}
|
|
693
705
|
|
|
694
706
|
declare module '@theme/TagsListByLetter' {
|
|
@@ -727,3 +739,17 @@ declare module '@theme/prism-include-languages' {
|
|
|
727
739
|
PrismObject: typeof PrismNamespace,
|
|
728
740
|
): void;
|
|
729
741
|
}
|
|
742
|
+
|
|
743
|
+
declare module '@theme/Seo' {
|
|
744
|
+
import type {ReactNode} from 'react';
|
|
745
|
+
|
|
746
|
+
export interface Props {
|
|
747
|
+
readonly title?: string;
|
|
748
|
+
readonly description?: string;
|
|
749
|
+
readonly keywords?: readonly string[] | string;
|
|
750
|
+
readonly image?: string;
|
|
751
|
+
readonly children?: ReactNode;
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
export default function Seo(props: Props): JSX.Element;
|
|
755
|
+
}
|