@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.
Files changed (143) hide show
  1. package/lib/getSwizzleConfig.js +102 -0
  2. package/lib/index.js +14 -11
  3. package/lib/theme-classic.d.ts +123 -97
  4. package/lib/translations.js +29 -32
  5. package/lib/validateThemeConfig.js +7 -4
  6. package/lib-next/theme/AnnouncementBar/index.js +1 -4
  7. package/lib-next/theme/BackToTopButton/index.js +6 -6
  8. package/lib-next/theme/BackToTopButton/styles.module.css +3 -1
  9. package/lib-next/theme/BlogLayout/index.js +1 -4
  10. package/lib-next/theme/BlogListPage/index.js +1 -4
  11. package/lib-next/theme/BlogListPaginator/index.js +1 -4
  12. package/lib-next/theme/BlogPostAuthor/index.js +18 -24
  13. package/lib-next/theme/BlogPostItem/index.js +12 -4
  14. package/lib-next/theme/BlogPostPage/index.js +4 -6
  15. package/lib-next/theme/BlogPostPaginator/index.js +1 -4
  16. package/lib-next/theme/BlogTagsListPage/index.js +1 -4
  17. package/lib-next/theme/BlogTagsPostsPage/index.js +4 -2
  18. package/lib-next/theme/CodeBlock/index.js +2 -1
  19. package/lib-next/theme/Details/index.js +2 -1
  20. package/lib-next/theme/DocBreadcrumbs/index.js +76 -0
  21. package/lib-next/theme/DocBreadcrumbs/styles.module.css +26 -0
  22. package/lib-next/theme/DocCard/index.js +12 -1
  23. package/lib-next/theme/DocCard/styles.module.css +1 -1
  24. package/lib-next/theme/DocCategoryGeneratedIndexPage/index.js +2 -0
  25. package/lib-next/theme/DocItem/index.js +8 -5
  26. package/lib-next/theme/DocPage/index.js +2 -4
  27. package/lib-next/theme/DocPage/styles.module.css +3 -3
  28. package/lib-next/theme/DocPaginator/index.js +1 -4
  29. package/lib-next/theme/DocSidebar/styles.module.css +4 -4
  30. package/lib-next/theme/DocSidebarItem/index.js +39 -14
  31. package/lib-next/theme/DocSidebarItem/styles.module.css +3 -10
  32. package/lib-next/theme/DocTagsListPage/index.js +1 -4
  33. package/lib-next/theme/DocVersionBadge/index.js +8 -1
  34. package/lib-next/theme/Footer/index.js +8 -4
  35. package/lib-next/theme/Heading/index.js +0 -1
  36. package/lib-next/theme/Heading/styles.module.css +16 -0
  37. package/lib-next/theme/IconArrow/index.js +1 -4
  38. package/lib-next/theme/IconEdit/index.js +1 -4
  39. package/lib-next/theme/IconExternalLink/index.js +1 -4
  40. package/lib-next/theme/IconLanguage/index.js +1 -4
  41. package/lib-next/theme/IconMenu/index.js +6 -4
  42. package/lib-next/theme/Layout/index.js +1 -4
  43. package/lib-next/theme/LayoutHead/index.js +4 -0
  44. package/lib-next/theme/Logo/index.js +1 -4
  45. package/lib-next/theme/MDXComponents/index.js +4 -3
  46. package/lib-next/theme/MDXPage/index.js +1 -4
  47. package/lib-next/theme/Navbar/index.js +1 -3
  48. package/lib-next/theme/NavbarItem/DefaultNavbarItem.js +1 -3
  49. package/lib-next/theme/NavbarItem/DocsVersionDropdownNavbarItem.js +2 -2
  50. package/lib-next/theme/NavbarItem/DropdownNavbarItem.js +1 -3
  51. package/lib-next/theme/NavbarItem/LocaleDropdownNavbarItem/index.js +8 -1
  52. package/lib-next/theme/NavbarItem/index.js +2 -2
  53. package/lib-next/theme/NotFound.js +1 -4
  54. package/lib-next/theme/PaginatorNavLink/index.js +1 -4
  55. package/lib-next/theme/SearchBar.js +1 -1
  56. package/lib-next/theme/SearchMetadata/index.js +11 -6
  57. package/lib-next/theme/SkipToContent/index.js +1 -3
  58. package/lib-next/theme/TOC/index.js +2 -5
  59. package/lib-next/theme/TOCInline/index.js +1 -4
  60. package/lib-next/theme/TOCItems/index.js +3 -3
  61. package/lib-next/theme/TabItem/index.js +1 -4
  62. package/lib-next/theme/Tabs/__tests__/index.test.js +3 -1
  63. package/lib-next/theme/Tabs/index.js +1 -1
  64. package/lib-next/theme/Tag/index.js +1 -4
  65. package/lib-next/theme/TagsListByLetter/index.js +1 -3
  66. package/lib-next/theme/ThemedImage/index.js +1 -4
  67. package/lib-next/theme/ThemedImage/styles.module.css +2 -2
  68. package/lib-next/theme/Toggle/index.js +25 -2
  69. package/lib-next/theme/prism-include-languages.js +17 -23
  70. package/package.json +21 -22
  71. package/src/getSwizzleConfig.ts +101 -0
  72. package/src/index.ts +7 -21
  73. package/src/theme/AnnouncementBar/index.tsx +1 -3
  74. package/src/theme/BackToTopButton/index.tsx +8 -7
  75. package/src/theme/BackToTopButton/styles.module.css +3 -1
  76. package/src/theme/BlogLayout/index.tsx +1 -3
  77. package/src/theme/BlogListPage/index.tsx +1 -3
  78. package/src/theme/BlogListPaginator/index.tsx +1 -3
  79. package/src/theme/BlogPostAuthor/index.tsx +18 -23
  80. package/src/theme/BlogPostItem/index.tsx +10 -4
  81. package/src/theme/BlogPostPage/index.tsx +4 -5
  82. package/src/theme/BlogPostPaginator/index.tsx +1 -3
  83. package/src/theme/BlogTagsListPage/index.tsx +1 -3
  84. package/src/theme/BlogTagsPostsPage/index.tsx +3 -1
  85. package/src/theme/CodeBlock/index.tsx +2 -1
  86. package/src/theme/Details/index.tsx +2 -1
  87. package/src/theme/DocBreadcrumbs/index.tsx +91 -0
  88. package/src/theme/DocBreadcrumbs/styles.module.css +26 -0
  89. package/src/theme/DocCard/index.tsx +10 -1
  90. package/src/theme/DocCard/styles.module.css +1 -1
  91. package/src/theme/DocCategoryGeneratedIndexPage/index.tsx +2 -0
  92. package/src/theme/DocItem/index.tsx +7 -4
  93. package/src/theme/DocPage/index.tsx +2 -4
  94. package/src/theme/DocPage/styles.module.css +3 -3
  95. package/src/theme/DocPaginator/index.tsx +1 -3
  96. package/src/theme/DocSidebar/styles.module.css +4 -4
  97. package/src/theme/DocSidebarItem/index.tsx +43 -13
  98. package/src/theme/DocSidebarItem/styles.module.css +3 -10
  99. package/src/theme/DocTagsListPage/index.tsx +1 -3
  100. package/src/theme/DocVersionBadge/index.tsx +6 -1
  101. package/src/theme/Footer/index.tsx +8 -4
  102. package/src/theme/Heading/index.tsx +0 -1
  103. package/src/theme/Heading/styles.module.css +16 -0
  104. package/src/theme/IconArrow/index.tsx +1 -3
  105. package/src/theme/IconEdit/index.tsx +4 -3
  106. package/src/theme/IconExternalLink/index.tsx +4 -3
  107. package/src/theme/IconLanguage/index.tsx +5 -3
  108. package/src/theme/IconMenu/index.tsx +1 -3
  109. package/src/theme/Layout/index.tsx +1 -3
  110. package/src/theme/LayoutHead/index.tsx +4 -0
  111. package/src/theme/Logo/index.tsx +1 -3
  112. package/src/theme/MDXComponents/index.tsx +4 -3
  113. package/src/theme/MDXPage/index.tsx +1 -3
  114. package/src/theme/Navbar/index.tsx +1 -3
  115. package/src/theme/NavbarItem/DefaultNavbarItem.tsx +1 -3
  116. package/src/theme/NavbarItem/DocsVersionDropdownNavbarItem.tsx +2 -2
  117. package/src/theme/NavbarItem/DropdownNavbarItem.tsx +4 -3
  118. package/src/theme/NavbarItem/LocaleDropdownNavbarItem/index.tsx +8 -1
  119. package/src/theme/NavbarItem/index.tsx +2 -2
  120. package/src/theme/NotFound.tsx +1 -3
  121. package/src/theme/PaginatorNavLink/index.tsx +1 -3
  122. package/src/theme/SearchBar.tsx +2 -1
  123. package/src/theme/SearchMetadata/index.tsx +12 -6
  124. package/src/theme/SkipToContent/index.tsx +1 -3
  125. package/src/theme/TOC/index.tsx +3 -5
  126. package/src/theme/TOCCollapsible/index.tsx +2 -2
  127. package/src/theme/TOCInline/index.tsx +3 -5
  128. package/src/theme/TOCItems/index.tsx +11 -7
  129. package/src/theme/TabItem/index.tsx +5 -3
  130. package/src/theme/Tabs/index.tsx +1 -1
  131. package/src/theme/Tag/index.tsx +1 -3
  132. package/src/theme/TagsListByLetter/index.tsx +1 -3
  133. package/src/theme/ThemedImage/index.tsx +1 -3
  134. package/src/theme/ThemedImage/styles.module.css +2 -2
  135. package/src/theme/Toggle/index.tsx +26 -2
  136. package/src/theme/prism-include-languages.ts +20 -23
  137. package/src/theme-classic.d.ts +123 -97
  138. package/src/translations.ts +41 -39
  139. package/src/validateThemeConfig.ts +10 -8
  140. package/lib-next/theme/DocSidebarItems/styles.module.css +0 -20
  141. package/lib-next/theme/Heading/styles.css +0 -22
  142. package/src/theme/DocSidebarItems/styles.module.css +0 -20
  143. package/src/theme/Heading/styles.css +0 -22
@@ -9,10 +9,10 @@
9
9
  display: none;
10
10
  }
11
11
 
12
- html[data-theme='light'] .themedImage--light {
12
+ [data-theme='light'] .themedImage--light {
13
13
  display: initial;
14
14
  }
15
15
 
16
- html[data-theme='dark'] .themedImage--dark {
16
+ [data-theme='dark'] .themedImage--dark {
17
17
  display: initial;
18
18
  }
@@ -5,10 +5,11 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- import React, {useState, useRef, memo} from 'react';
8
+ import React, {useState, useRef, useEffect, memo} from 'react';
9
9
  import type {Props} from '@theme/Toggle';
10
10
  import {useThemeConfig, type ColorModeConfig} from '@docusaurus/theme-common';
11
11
  import useIsBrowser from '@docusaurus/useIsBrowser';
12
+ import {translate} from '@docusaurus/Translate';
12
13
 
13
14
  import clsx from 'clsx';
14
15
  import styles from './styles.module.css';
@@ -30,6 +31,10 @@ const ToggleComponent = memo(
30
31
  const [focused, setFocused] = useState(false);
31
32
  const inputRef = useRef<HTMLInputElement>(null);
32
33
 
34
+ useEffect(() => {
35
+ setChecked(defaultChecked);
36
+ }, [defaultChecked]);
37
+
33
38
  return (
34
39
  <div
35
40
  className={clsx(styles.toggle, className, {
@@ -61,7 +66,26 @@ const ToggleComponent = memo(
61
66
  checked={checked}
62
67
  type="checkbox"
63
68
  className={styles.toggleScreenReader}
64
- aria-label="Switch between dark and light mode"
69
+ aria-label={translate(
70
+ {
71
+ message: 'Switch between dark and light mode (currently {mode})',
72
+ id: 'theme.colorToggle.ariaLabel',
73
+ description: 'The ARIA label for the navbar color mode toggle',
74
+ },
75
+ {
76
+ mode: checked
77
+ ? translate({
78
+ message: 'dark mode',
79
+ id: 'theme.colorToggle.ariaLabel.mode.dark',
80
+ description: 'The name for the dark color mode',
81
+ })
82
+ : translate({
83
+ message: 'light mode',
84
+ id: 'theme.colorToggle.ariaLabel.mode.light',
85
+ description: 'The name for the light color mode',
86
+ }),
87
+ },
88
+ )}
65
89
  onChange={onChange}
66
90
  onClick={() => setChecked(!checked)}
67
91
  onFocus={() => setFocused(true)}
@@ -5,32 +5,29 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- import ExecutionEnvironment from '@docusaurus/ExecutionEnvironment';
9
8
  import siteConfig from '@generated/docusaurus.config';
10
9
  import type * as PrismNamespace from 'prismjs';
11
10
 
12
- const prismIncludeLanguages = (PrismObject: typeof PrismNamespace): void => {
13
- if (ExecutionEnvironment.canUseDOM) {
14
- const {
15
- themeConfig: {prism},
16
- } = siteConfig;
17
- const {additionalLanguages} = prism as {additionalLanguages: string[]};
11
+ export default function prismIncludeLanguages(
12
+ PrismObject: typeof PrismNamespace,
13
+ ): void {
14
+ const {
15
+ themeConfig: {prism},
16
+ } = siteConfig;
17
+ const {additionalLanguages} = prism as {additionalLanguages: string[]};
18
18
 
19
- // Prism components work on the Prism instance on the window, while
20
- // prism-react-renderer uses its own Prism instance. We temporarily mount
21
- // the instance onto window, import components to enhance it, then remove it
22
- // to avoid polluting global namespace.
23
- // You can mutate this object: registering plugins, deleting languages... As
24
- // long as you don't re-assign it
25
- window.Prism = PrismObject;
19
+ // Prism components work on the Prism instance on the window, while prism-
20
+ // react-renderer uses its own Prism instance. We temporarily mount the
21
+ // instance onto window, import components to enhance it, then remove it to
22
+ // avoid polluting global namespace.
23
+ // You can mutate PrismObject: registering plugins, deleting languages... As
24
+ // long as you don't re-assign it
25
+ globalThis.Prism = PrismObject;
26
26
 
27
- additionalLanguages.forEach((lang) => {
28
- // eslint-disable-next-line global-require, import/no-dynamic-require
29
- require(`prismjs/components/prism-${lang}`);
30
- });
27
+ additionalLanguages.forEach((lang) => {
28
+ // eslint-disable-next-line global-require, import/no-dynamic-require
29
+ require(`prismjs/components/prism-${lang}`);
30
+ });
31
31
 
32
- delete (window as Window & {Prism?: typeof PrismNamespace}).Prism;
33
- }
34
- };
35
-
36
- export default prismIncludeLanguages;
32
+ delete (globalThis as Global & {Prism?: typeof PrismNamespace}).Prism;
33
+ }
@@ -24,8 +24,7 @@ declare module '@theme/Admonition' {
24
24
  }
25
25
 
26
26
  declare module '@theme/AnnouncementBar' {
27
- const AnnouncementBar: () => JSX.Element | null;
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
- const BlogListPaginator: (props: Props) => JSX.Element;
43
- export default BlogListPaginator;
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
- const BlogPostItem: (props: Props) => JSX.Element;
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
- const BlogPostPaginator: (props: Props) => JSX.Element;
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
- const BlogLayout: (props: Props) => JSX.Element;
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
- const CodeBlock: (props: Props) => JSX.Element;
123
- export default CodeBlock;
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
- const DocSidebar: (props: Props) => JSX.Element;
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 type Props = Omit<DocSidebarItemProps, 'item' | 'index'> & {
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
- const DocVersionSuggestions: () => JSX.Element;
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
- const EditThisPage: (props: Props) => JSX.Element;
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
- const Footer: () => JSX.Element | null;
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
- const SearchMetadata: (props: Props) => JSX.Element;
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
- const LastUpdated: (props: Props) => JSX.Element;
273
- export default LastUpdated;
316
+ export default function LastUpdated(props: Props): JSX.Element;
274
317
  }
275
318
 
276
319
  declare module '@theme/SkipToContent' {
277
- const SkipToContent: () => JSX.Element;
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
- const Navbar: () => JSX.Element;
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 type Props = LinkProps & {
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
- const DropdownNavbarItem: (props: Props) => JSX.Element;
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
- const SearchNavbarItem: (props: Props) => JSX.Element;
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
- const LocaleDropdownNavbarItem: (props: Props) => JSX.Element;
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
- const DocsVersionDropdownNavbarItem: (props: Props) => JSX.Element;
393
- export default DocsVersionDropdownNavbarItem;
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
- const DocsVersionNavbarItem: (props: Props) => JSX.Element;
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
- const DocsSidebarNavbarItem: (props: Props) => JSX.Element;
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
- const DocSidebarNavbarItem: (props: Props) => JSX.Element;
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
- const NavbarItem: (props: Props) => JSX.Element;
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
- const TabItem: (props: Props) => JSX.Element;
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
- const Tabs: (props: Props) => JSX.Element;
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
- const ThemedImage: (props: Props) => JSX.Element;
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 type TOCItemsProps = {
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: TOCItemsProps): JSX.Element;
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
- // and won't have a default set by Joi. See TOC, TOCInline,
568
- // TOCCollapsible for examples
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
- const TOC: (props: TOCProps) => JSX.Element;
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 type TOCInlineProps = {
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
- const TOCInline: (props: TOCInlineProps) => JSX.Element;
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 type TOCCollapsibleProps = {
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
- const TOCCollapsible: (props: TOCCollapsibleProps) => JSX.Element;
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
- const Toggle: (props: Props) => JSX.Element;
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
- const Logo: (props: Props) => JSX.Element;
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
- const IconArrow: (props: Props) => JSX.Element;
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
- const IconEdit: (props: Props) => JSX.Element;
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
- const IconMenu: (props: Props) => JSX.Element;
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
- const IconClose: (props: Props) => JSX.Element;
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
- const IconLanguage: (props: Props) => JSX.Element;
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
- const IconExternalLink: (props: Props) => JSX.Element;
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
+ }