@docusaurus/theme-classic 2.0.0-beta.18 → 2.0.0-beta.19

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 (204) hide show
  1. package/lib/admonitions.css +4 -0
  2. package/lib/default.css +3038 -0
  3. package/lib/getSwizzleConfig.js +9 -2
  4. package/lib/index.js +4 -4
  5. package/lib/nprogress.css +41 -0
  6. package/lib/nprogress.js +46 -0
  7. package/lib/theme-classic.d.ts +315 -33
  8. package/lib/validateThemeConfig.js +72 -14
  9. package/lib-next/theme/BackToTopButton/index.js +6 -102
  10. package/lib-next/theme/BlogLayout/index.js +1 -5
  11. package/lib-next/theme/BlogListPaginator/index.js +25 -28
  12. package/lib-next/theme/BlogPostAuthor/index.js +3 -6
  13. package/lib-next/theme/BlogPostItem/styles.module.css +9 -0
  14. package/lib-next/theme/BlogPostPaginator/index.js +25 -28
  15. package/lib-next/theme/BlogSidebar/Desktop/index.js +41 -0
  16. package/lib-next/theme/BlogSidebar/{styles.module.css → Desktop/styles.module.css} +1 -2
  17. package/lib-next/theme/BlogSidebar/Mobile/index.js +36 -0
  18. package/lib-next/theme/BlogSidebar/index.js +11 -31
  19. package/lib-next/theme/BlogTagsListPage/index.js +2 -3
  20. package/lib-next/theme/BlogTagsPostsPage/index.js +4 -6
  21. package/lib-next/theme/CodeBlock/Container/index.js +29 -0
  22. package/lib-next/theme/CodeBlock/Container/styles.module.css +14 -0
  23. package/lib-next/theme/CodeBlock/Content/Element.js +23 -0
  24. package/lib-next/theme/CodeBlock/Content/String.js +104 -0
  25. package/{src/theme/CodeBlock → lib-next/theme/CodeBlock/Content}/styles.module.css +39 -9
  26. package/lib-next/theme/CodeBlock/CopyButton/index.js +3 -2
  27. package/lib-next/theme/CodeBlock/CopyButton/styles.module.css +0 -19
  28. package/lib-next/theme/CodeBlock/Line/index.js +49 -0
  29. package/lib-next/theme/CodeBlock/Line/styles.module.css +51 -0
  30. package/lib-next/theme/CodeBlock/WordWrapButton/index.js +40 -0
  31. package/lib-next/theme/CodeBlock/WordWrapButton/styles.module.css +15 -0
  32. package/lib-next/theme/CodeBlock/index.js +27 -133
  33. package/lib-next/theme/Details/index.js +1 -1
  34. package/lib-next/theme/DocBreadcrumbs/index.js +50 -23
  35. package/lib-next/theme/DocBreadcrumbs/styles.module.css +8 -0
  36. package/lib-next/theme/DocCardList/index.js +6 -4
  37. package/lib-next/theme/DocCategoryGeneratedIndexPage/index.js +3 -3
  38. package/lib-next/theme/DocCategoryGeneratedIndexPage/styles.module.css +8 -0
  39. package/lib-next/theme/DocItem/index.js +1 -1
  40. package/lib-next/theme/DocItem/styles.module.css +6 -0
  41. package/lib-next/theme/DocPage/Layout/Main/index.js +29 -0
  42. package/lib-next/theme/DocPage/Layout/Main/styles.module.css +28 -0
  43. package/lib-next/theme/DocPage/Layout/Sidebar/ExpandButton/index.js +34 -0
  44. package/lib-next/theme/DocPage/Layout/Sidebar/ExpandButton/styles.module.css +33 -0
  45. package/lib-next/theme/DocPage/Layout/Sidebar/index.js +68 -0
  46. package/lib-next/theme/DocPage/Layout/Sidebar/index.module.css +32 -0
  47. package/lib-next/theme/DocPage/Layout/index.js +34 -0
  48. package/lib-next/theme/{BlogPostAuthor/styles.module.css → DocPage/Layout/index.module.css} +6 -3
  49. package/lib-next/theme/DocPage/index.js +28 -146
  50. package/lib-next/theme/DocPaginator/index.js +25 -28
  51. package/lib-next/theme/DocSidebar/Desktop/CollapseButton/styles.module.css +11 -9
  52. package/lib-next/theme/DocSidebar/Desktop/Content/styles.module.css +6 -0
  53. package/lib-next/theme/DocSidebar/Desktop/index.js +4 -2
  54. package/lib-next/theme/DocSidebarItem/Category.js +197 -0
  55. package/lib-next/theme/DocSidebarItem/Html.js +27 -0
  56. package/{src/theme/DocSidebarItem/styles.module.css → lib-next/theme/DocSidebarItem/Html.module.css} +0 -4
  57. package/lib-next/theme/DocSidebarItem/Link.js +53 -0
  58. package/{src/theme/MDXComponents/Ul.module.css → lib-next/theme/DocSidebarItem/Link.module.css} +2 -3
  59. package/lib-next/theme/DocSidebarItem/index.js +4 -246
  60. package/lib-next/theme/DocSidebarItems/index.js +1 -6
  61. package/lib-next/theme/DocTagDocListPage/index.js +3 -3
  62. package/lib-next/theme/DocVersionBanner/index.js +2 -2
  63. package/lib-next/theme/Footer/Links/MultiColumn/index.js +1 -1
  64. package/lib-next/theme/Heading/index.js +4 -20
  65. package/lib-next/theme/IconHome/index.js +17 -0
  66. package/lib-next/theme/LastUpdated/index.js +1 -0
  67. package/lib-next/theme/Layout/index.js +1 -1
  68. package/lib-next/theme/MDXComponents/Ul.js +2 -4
  69. package/lib-next/theme/Navbar/Content/index.js +6 -1
  70. package/lib-next/theme/Navbar/Logo/index.js +1 -1
  71. package/lib-next/theme/Navbar/Search/index.js +11 -0
  72. package/lib-next/theme/Navbar/Search/styles.module.css +20 -0
  73. package/lib-next/theme/NavbarItem/ComponentTypes.js +27 -0
  74. package/lib-next/theme/NavbarItem/DocNavbarItem.js +11 -28
  75. package/lib-next/theme/NavbarItem/DocSidebarNavbarItem.js +10 -42
  76. package/lib-next/theme/NavbarItem/DocsVersionDropdownNavbarItem.js +25 -29
  77. package/lib-next/theme/NavbarItem/DocsVersionNavbarItem.js +2 -9
  78. package/lib-next/theme/NavbarItem/DropdownNavbarItem.js +4 -1
  79. package/lib-next/theme/NavbarItem/HtmlNavbarItem.js +30 -0
  80. package/lib-next/theme/NavbarItem/LocaleDropdownNavbarItem/index.js +5 -10
  81. package/lib-next/theme/NavbarItem/NavbarNavLink.js +49 -31
  82. package/lib-next/theme/NavbarItem/SearchNavbarItem.js +6 -1
  83. package/lib-next/theme/NavbarItem/index.js +4 -23
  84. package/lib-next/theme/NavbarItem/utils.js +2 -1
  85. package/lib-next/theme/PaginatorNavLink/index.js +8 -2
  86. package/lib-next/theme/SiteMetadata/index.js +8 -7
  87. package/lib-next/theme/SkipToContent/index.js +3 -29
  88. package/lib-next/theme/TOCCollapsible/CollapseButton.js +29 -0
  89. package/{src/theme/TOCCollapsible/styles.module.css → lib-next/theme/TOCCollapsible/CollapseButton.module.css} +1 -22
  90. package/lib-next/theme/TOCCollapsible/index.js +3 -13
  91. package/lib-next/theme/TOCCollapsible/index.module.css +31 -0
  92. package/lib-next/theme/TOCItems/Tree.js +40 -0
  93. package/lib-next/theme/TOCItems/index.js +3 -34
  94. package/lib-next/theme/TabItem/index.js +3 -1
  95. package/lib-next/theme/{MDXComponents/Ul.module.css → TabItem/styles.module.css} +2 -3
  96. package/lib-next/theme/Tabs/__tests__/index.test.js +3 -3
  97. package/lib-next/theme/Tabs/index.js +3 -3
  98. package/lib-next/theme/Tabs/styles.module.css +4 -0
  99. package/lib-next/theme/Tag/index.js +2 -3
  100. package/lib-next/theme/TagsListInline/index.js +1 -1
  101. package/package.json +23 -18
  102. package/src/admonitions.css +4 -0
  103. package/src/getSwizzleConfig.ts +10 -2
  104. package/src/index.ts +4 -3
  105. package/src/nprogress.css +41 -0
  106. package/src/nprogress.ts +31 -0
  107. package/src/theme/BackToTopButton/index.tsx +5 -112
  108. package/src/theme/BlogLayout/index.tsx +1 -5
  109. package/src/theme/BlogListPaginator/index.tsx +25 -28
  110. package/src/theme/BlogPostAuthor/index.tsx +3 -7
  111. package/src/theme/BlogPostItem/styles.module.css +9 -0
  112. package/src/theme/BlogPostPaginator/index.tsx +25 -28
  113. package/src/theme/BlogSidebar/Desktop/index.tsx +45 -0
  114. package/src/theme/BlogSidebar/{styles.module.css → Desktop/styles.module.css} +1 -2
  115. package/src/theme/BlogSidebar/Mobile/index.tsx +38 -0
  116. package/src/theme/BlogSidebar/index.tsx +10 -31
  117. package/src/theme/BlogTagsListPage/index.tsx +2 -3
  118. package/src/theme/BlogTagsPostsPage/index.tsx +8 -5
  119. package/src/theme/CodeBlock/Container/index.tsx +35 -0
  120. package/src/theme/CodeBlock/Container/styles.module.css +14 -0
  121. package/src/theme/CodeBlock/Content/Element.tsx +30 -0
  122. package/src/theme/CodeBlock/Content/String.tsx +111 -0
  123. package/{lib-next/theme/CodeBlock → src/theme/CodeBlock/Content}/styles.module.css +39 -9
  124. package/src/theme/CodeBlock/CopyButton/index.tsx +3 -2
  125. package/src/theme/CodeBlock/CopyButton/styles.module.css +0 -19
  126. package/src/theme/CodeBlock/Line/index.tsx +48 -0
  127. package/src/theme/CodeBlock/Line/styles.module.css +51 -0
  128. package/src/theme/CodeBlock/WordWrapButton/index.tsx +49 -0
  129. package/src/theme/CodeBlock/WordWrapButton/styles.module.css +15 -0
  130. package/src/theme/CodeBlock/index.tsx +29 -133
  131. package/src/theme/Details/index.tsx +1 -1
  132. package/src/theme/DocBreadcrumbs/index.tsx +50 -20
  133. package/src/theme/DocBreadcrumbs/styles.module.css +8 -0
  134. package/src/theme/DocCardList/index.tsx +5 -7
  135. package/src/theme/DocCategoryGeneratedIndexPage/index.tsx +3 -3
  136. package/src/theme/DocCategoryGeneratedIndexPage/styles.module.css +8 -0
  137. package/src/theme/DocItem/index.tsx +1 -1
  138. package/src/theme/DocItem/styles.module.css +6 -0
  139. package/src/theme/DocPage/Layout/Main/index.tsx +37 -0
  140. package/src/theme/DocPage/Layout/Main/styles.module.css +28 -0
  141. package/src/theme/DocPage/Layout/Sidebar/ExpandButton/index.tsx +40 -0
  142. package/src/theme/DocPage/Layout/Sidebar/ExpandButton/styles.module.css +33 -0
  143. package/src/theme/DocPage/Layout/Sidebar/index.module.css +32 -0
  144. package/src/theme/DocPage/Layout/Sidebar/index.tsx +74 -0
  145. package/src/theme/{BlogPostAuthor/styles.module.css → DocPage/Layout/index.module.css} +6 -3
  146. package/src/theme/DocPage/Layout/index.tsx +39 -0
  147. package/src/theme/DocPage/index.tsx +28 -157
  148. package/src/theme/DocPaginator/index.tsx +25 -28
  149. package/src/theme/DocSidebar/Desktop/CollapseButton/styles.module.css +11 -9
  150. package/src/theme/DocSidebar/Desktop/Content/styles.module.css +6 -0
  151. package/src/theme/DocSidebar/Desktop/index.tsx +4 -2
  152. package/src/theme/DocSidebarItem/Category.tsx +210 -0
  153. package/{lib-next/theme/DocSidebarItem/styles.module.css → src/theme/DocSidebarItem/Html.module.css} +0 -4
  154. package/src/theme/DocSidebarItem/Html.tsx +34 -0
  155. package/src/theme/DocSidebarItem/Link.module.css +10 -0
  156. package/src/theme/DocSidebarItem/Link.tsx +58 -0
  157. package/src/theme/DocSidebarItem/index.tsx +4 -259
  158. package/src/theme/DocSidebarItems/index.tsx +1 -6
  159. package/src/theme/DocTagDocListPage/index.tsx +3 -4
  160. package/src/theme/DocVersionBanner/index.tsx +2 -2
  161. package/src/theme/Footer/Links/MultiColumn/index.tsx +1 -1
  162. package/src/theme/Heading/index.tsx +4 -18
  163. package/src/theme/IconHome/index.tsx +20 -0
  164. package/src/theme/LastUpdated/index.tsx +1 -0
  165. package/src/theme/Layout/index.tsx +1 -1
  166. package/src/theme/MDXComponents/Details.tsx +2 -3
  167. package/src/theme/MDXComponents/Ul.tsx +2 -6
  168. package/src/theme/Navbar/Content/index.tsx +6 -1
  169. package/src/theme/Navbar/Logo/index.tsx +1 -1
  170. package/src/theme/Navbar/Search/index.tsx +15 -0
  171. package/src/theme/Navbar/Search/styles.module.css +20 -0
  172. package/src/theme/NavbarItem/ComponentTypes.tsx +32 -0
  173. package/src/theme/NavbarItem/DocNavbarItem.tsx +13 -32
  174. package/src/theme/NavbarItem/DocSidebarNavbarItem.tsx +9 -49
  175. package/src/theme/NavbarItem/DocsVersionDropdownNavbarItem.tsx +26 -33
  176. package/src/theme/NavbarItem/DocsVersionNavbarItem.tsx +3 -10
  177. package/src/theme/NavbarItem/DropdownNavbarItem.tsx +4 -1
  178. package/src/theme/NavbarItem/HtmlNavbarItem.tsx +32 -0
  179. package/src/theme/NavbarItem/LocaleDropdownNavbarItem/index.tsx +5 -9
  180. package/src/theme/NavbarItem/NavbarNavLink.tsx +41 -25
  181. package/src/theme/NavbarItem/SearchNavbarItem.tsx +6 -1
  182. package/src/theme/NavbarItem/index.tsx +9 -38
  183. package/src/theme/NavbarItem/utils.ts +5 -2
  184. package/src/theme/PaginatorNavLink/index.tsx +8 -2
  185. package/src/theme/SiteMetadata/index.tsx +8 -8
  186. package/src/theme/SkipToContent/index.tsx +3 -29
  187. package/{lib-next/theme/TOCCollapsible/styles.module.css → src/theme/TOCCollapsible/CollapseButton.module.css} +1 -22
  188. package/src/theme/TOCCollapsible/CollapseButton.tsx +35 -0
  189. package/src/theme/TOCCollapsible/index.module.css +31 -0
  190. package/src/theme/TOCCollapsible/index.tsx +3 -14
  191. package/src/theme/TOCItems/Tree.tsx +46 -0
  192. package/src/theme/TOCItems/index.tsx +2 -41
  193. package/src/theme/TabItem/index.tsx +7 -1
  194. package/src/theme/TabItem/styles.module.css +10 -0
  195. package/src/theme/Tabs/index.tsx +3 -3
  196. package/src/theme/Tabs/styles.module.css +4 -0
  197. package/src/theme/Tag/index.tsx +2 -4
  198. package/src/theme/TagsListInline/index.tsx +1 -1
  199. package/src/theme-classic.d.ts +315 -33
  200. package/src/validateThemeConfig.ts +80 -13
  201. package/lib/types.d.ts +0 -11
  202. package/lib-next/theme/DocPage/styles.module.css +0 -82
  203. package/src/theme/DocPage/styles.module.css +0 -82
  204. package/src/types.d.ts +0 -11
@@ -5,10 +5,32 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
+ /* eslint-disable @typescript-eslint/triple-slash-reference */
9
+
10
+ /// <reference types="@docusaurus/module-type-aliases" />
11
+ /// <reference types="@docusaurus/plugin-content-docs" />
12
+ /// <reference types="@docusaurus/plugin-content-blog" />
13
+ /// <reference types="@docusaurus/plugin-content-pages" />
14
+
15
+ // This file, like all the other ambient declaration files for plugins, is
16
+ // needed for TS to understand our `@theme` alias. The export signatures are
17
+ // duplicated from the implementation, which is fine, since every module only
18
+ // default-exports a React component.
19
+ // TODO we'll eventually migrate to TS `paths` option. This is not easy due to
20
+ // our theme shadowing—we probably need the user to specify multiple theme paths
21
+ // in their tsconfig.
22
+
8
23
  declare module '@docusaurus/theme-classic' {
24
+ import type {LoadContext, Plugin} from '@docusaurus/types';
25
+
9
26
  export type Options = {
10
27
  customCss?: string | string[];
11
28
  };
29
+
30
+ export default function themeClassic(
31
+ context: LoadContext,
32
+ options: Options,
33
+ ): Plugin<undefined>;
12
34
  }
13
35
 
14
36
  declare module '@theme/Admonition' {
@@ -32,21 +54,41 @@ declare module '@theme/BackToTopButton' {
32
54
  }
33
55
 
34
56
  declare module '@theme/BlogListPaginator' {
35
- import type {Metadata} from '@theme/BlogListPage';
57
+ import type {BlogPaginatedMetadata} from '@docusaurus/plugin-content-blog';
36
58
 
37
59
  export interface Props {
38
- readonly metadata: Metadata;
60
+ readonly metadata: BlogPaginatedMetadata;
39
61
  }
40
62
  export default function BlogListPaginator(props: Props): JSX.Element;
41
63
  }
42
64
 
43
- declare module '@theme/BlogSidebar' {
65
+ declare module '@theme/BlogSidebar/Desktop' {
44
66
  import type {BlogSidebar} from '@docusaurus/plugin-content-blog';
45
67
 
46
68
  export interface Props {
47
69
  readonly sidebar: BlogSidebar;
48
70
  }
49
71
 
72
+ export default function BlogSidebarDesktop(props: Props): JSX.Element;
73
+ }
74
+
75
+ declare module '@theme/BlogSidebar/Mobile' {
76
+ import type {BlogSidebar} from '@docusaurus/plugin-content-blog';
77
+
78
+ export interface Props {
79
+ readonly sidebar: BlogSidebar;
80
+ }
81
+
82
+ export default function BlogSidebarMobile(props: Props): JSX.Element;
83
+ }
84
+
85
+ declare module '@theme/BlogSidebar' {
86
+ import type {BlogSidebar} from '@docusaurus/plugin-content-blog';
87
+
88
+ export interface Props {
89
+ readonly sidebar?: BlogSidebar;
90
+ }
91
+
50
92
  export default function BlogSidebar(props: Props): JSX.Element;
51
93
  }
52
94
 
@@ -113,14 +155,15 @@ declare module '@theme/BlogLayout' {
113
155
  }
114
156
 
115
157
  declare module '@theme/CodeBlock' {
116
- import type {ReactElement} from 'react';
158
+ import type {ReactNode} from 'react';
117
159
 
118
160
  export interface Props {
119
- readonly children: string | ReactElement;
161
+ readonly children: ReactNode;
120
162
  readonly className?: string;
121
163
  readonly metastring?: string;
122
164
  readonly title?: string;
123
165
  readonly language?: string;
166
+ readonly showLineNumbers?: boolean;
124
167
  }
125
168
 
126
169
  export default function CodeBlock(props: Props): JSX.Element;
@@ -129,11 +172,72 @@ declare module '@theme/CodeBlock' {
129
172
  declare module '@theme/CodeBlock/CopyButton' {
130
173
  export interface Props {
131
174
  readonly code: string;
175
+ readonly className?: string;
132
176
  }
133
177
 
134
178
  export default function CopyButton(props: Props): JSX.Element;
135
179
  }
136
180
 
181
+ declare module '@theme/CodeBlock/Container' {
182
+ import type {ComponentProps} from 'react';
183
+
184
+ export default function CodeBlockContainer<T extends 'div' | 'pre'>({
185
+ as: As,
186
+ ...props
187
+ }: {as: T} & ComponentProps<T>): JSX.Element;
188
+ }
189
+
190
+ declare module '@theme/CodeBlock/Content/Element' {
191
+ import type {Props} from '@theme/CodeBlock';
192
+
193
+ export type {Props};
194
+
195
+ export default function CodeBlockElementContent(props: Props): JSX.Element;
196
+ }
197
+
198
+ declare module '@theme/CodeBlock/Content/String' {
199
+ import type {Props as CodeBlockProps} from '@theme/CodeBlock';
200
+
201
+ export interface Props extends Omit<CodeBlockProps, 'children'> {
202
+ readonly children: string;
203
+ }
204
+
205
+ export default function CodeBlockStringContent(props: Props): JSX.Element;
206
+ }
207
+
208
+ declare module '@theme/CodeBlock/Line' {
209
+ import type {ComponentProps} from 'react';
210
+ import type Highlight from 'prism-react-renderer';
211
+
212
+ // Lib does not make this easy
213
+ type RenderProps = Parameters<
214
+ ComponentProps<typeof Highlight>['children']
215
+ >[0];
216
+ type GetLineProps = RenderProps['getLineProps'];
217
+ type GetTokenProps = RenderProps['getTokenProps'];
218
+ type Token = RenderProps['tokens'][number][number];
219
+
220
+ export interface Props {
221
+ readonly line: Token[];
222
+ readonly classNames: string[] | undefined;
223
+ readonly showLineNumbers: boolean;
224
+ readonly getLineProps: GetLineProps;
225
+ readonly getTokenProps: GetTokenProps;
226
+ }
227
+
228
+ export default function CodeBlockLine(props: Props): JSX.Element;
229
+ }
230
+
231
+ declare module '@theme/CodeBlock/WordWrapButton' {
232
+ export interface Props {
233
+ readonly className?: string;
234
+ readonly onClick: React.MouseEventHandler;
235
+ readonly isEnabled: boolean;
236
+ }
237
+
238
+ export default function WordWrapButton(props: Props): JSX.Element;
239
+ }
240
+
137
241
  declare module '@theme/DocCard' {
138
242
  import type {PropSidebarItem} from '@docusaurus/plugin-content-docs';
139
243
 
@@ -149,6 +253,7 @@ declare module '@theme/DocCardList' {
149
253
 
150
254
  export interface Props {
151
255
  readonly items: PropSidebarItem[];
256
+ readonly className?: string;
152
257
  }
153
258
 
154
259
  export default function DocCardList(props: Props): JSX.Element;
@@ -160,6 +265,50 @@ declare module '@theme/DocItemFooter' {
160
265
  export default function DocItemFooter(props: Props): JSX.Element;
161
266
  }
162
267
 
268
+ declare module '@theme/DocPage/Layout' {
269
+ import type {ReactNode} from 'react';
270
+
271
+ export interface Props {
272
+ readonly children: ReactNode;
273
+ }
274
+
275
+ export default function DocPageLayout(props: Props): JSX.Element;
276
+ }
277
+
278
+ declare module '@theme/DocPage/Layout/Sidebar' {
279
+ import type {Dispatch, SetStateAction} from 'react';
280
+ import type {PropSidebar} from '@docusaurus/plugin-content-docs';
281
+
282
+ export interface Props {
283
+ readonly sidebar: PropSidebar;
284
+ readonly hiddenSidebarContainer: boolean;
285
+ readonly setHiddenSidebarContainer: Dispatch<SetStateAction<boolean>>;
286
+ }
287
+
288
+ export default function DocPageLayoutSidebar(props: Props): JSX.Element;
289
+ }
290
+
291
+ declare module '@theme/DocPage/Layout/Sidebar/ExpandButton' {
292
+ export interface Props {
293
+ toggleSidebar: () => void;
294
+ }
295
+
296
+ export default function DocPageLayoutSidebarExpandButton(
297
+ props: Props,
298
+ ): JSX.Element;
299
+ }
300
+
301
+ declare module '@theme/DocPage/Layout/Main' {
302
+ import type {ReactNode} from 'react';
303
+
304
+ export interface Props {
305
+ readonly hiddenSidebarContainer: boolean;
306
+ readonly children: ReactNode;
307
+ }
308
+
309
+ export default function DocPageLayoutMain(props: Props): JSX.Element;
310
+ }
311
+
163
312
  declare module '@theme/DocPaginator' {
164
313
  import type {PropNavigation} from '@docusaurus/plugin-content-docs';
165
314
 
@@ -214,7 +363,7 @@ declare module '@theme/DocSidebar/Desktop/Content' {
214
363
 
215
364
  declare module '@theme/DocSidebar/Desktop/CollapseButton' {
216
365
  export interface Props {
217
- onClick: React.MouseEventHandler;
366
+ readonly onClick: React.MouseEventHandler;
218
367
  }
219
368
 
220
369
  export default function CollapseButton(props: Props): JSX.Element;
@@ -235,6 +384,40 @@ declare module '@theme/DocSidebarItem' {
235
384
  export default function DocSidebarItem(props: Props): JSX.Element;
236
385
  }
237
386
 
387
+ declare module '@theme/DocSidebarItem/Link' {
388
+ import type {Props as DocSidebarItemProps} from '@theme/DocSidebarItem';
389
+
390
+ import type {PropSidebarItemLink} from '@docusaurus/plugin-content-docs';
391
+
392
+ export interface Props extends DocSidebarItemProps {
393
+ readonly item: PropSidebarItemLink;
394
+ }
395
+
396
+ export default function DocSidebarItemLink(props: Props): JSX.Element;
397
+ }
398
+
399
+ declare module '@theme/DocSidebarItem/Html' {
400
+ import type {Props as DocSidebarItemProps} from '@theme/DocSidebarItem';
401
+ import type {PropSidebarItemHtml} from '@docusaurus/plugin-content-docs';
402
+
403
+ export interface Props extends DocSidebarItemProps {
404
+ readonly item: PropSidebarItemHtml;
405
+ }
406
+
407
+ export default function DocSidebarItemHtml(props: Props): JSX.Element;
408
+ }
409
+
410
+ declare module '@theme/DocSidebarItem/Category' {
411
+ import type {Props as DocSidebarItemProps} from '@theme/DocSidebarItem';
412
+ import type {PropSidebarItemCategory} from '@docusaurus/plugin-content-docs';
413
+
414
+ export interface Props extends DocSidebarItemProps {
415
+ readonly item: PropSidebarItemCategory;
416
+ }
417
+
418
+ export default function DocSidebarItemCategory(props: Props): JSX.Element;
419
+ }
420
+
238
421
  declare module '@theme/DocSidebarItems' {
239
422
  import type {Props as DocSidebarItemProps} from '@theme/DocSidebarItem';
240
423
  import type {PropSidebarItem} from '@docusaurus/plugin-content-docs';
@@ -288,7 +471,7 @@ declare module '@theme/Footer/Logo' {
288
471
  import type {FooterLogo} from '@docusaurus/theme-common';
289
472
 
290
473
  export interface Props {
291
- logo: FooterLogo;
474
+ readonly logo: FooterLogo;
292
475
  }
293
476
 
294
477
  export default function FooterLogo(props: Props): JSX.Element;
@@ -296,7 +479,7 @@ declare module '@theme/Footer/Logo' {
296
479
 
297
480
  declare module '@theme/Footer/Copyright' {
298
481
  export interface Props {
299
- copyright: string;
482
+ readonly copyright: string;
300
483
  }
301
484
 
302
485
  export default function FooterCopyright(props: Props): JSX.Element;
@@ -306,7 +489,7 @@ declare module '@theme/Footer/LinkItem' {
306
489
  import type {FooterLinkItem} from '@docusaurus/theme-common';
307
490
 
308
491
  export interface Props {
309
- item: FooterLinkItem;
492
+ readonly item: FooterLinkItem;
310
493
  }
311
494
 
312
495
  export default function FooterLinkItem(props: Props): JSX.Element;
@@ -316,10 +499,10 @@ declare module '@theme/Footer/Layout' {
316
499
  import type {ReactNode} from 'react';
317
500
 
318
501
  export interface Props {
319
- style: 'light' | 'dark';
320
- links: ReactNode;
321
- logo: ReactNode;
322
- copyright: ReactNode;
502
+ readonly style: 'light' | 'dark';
503
+ readonly links: ReactNode;
504
+ readonly logo: ReactNode;
505
+ readonly copyright: ReactNode;
323
506
  }
324
507
 
325
508
  export default function FooterLayout(props: Props): JSX.Element;
@@ -329,7 +512,7 @@ declare module '@theme/Footer/Links' {
329
512
  import type {Footer} from '@docusaurus/theme-common';
330
513
 
331
514
  export interface Props {
332
- links: Footer['links'];
515
+ readonly links: Footer['links'];
333
516
  }
334
517
 
335
518
  export default function FooterLinks(props: Props): JSX.Element;
@@ -339,7 +522,7 @@ declare module '@theme/Footer/Links/MultiColumn' {
339
522
  import type {MultiColumnFooter} from '@docusaurus/theme-common';
340
523
 
341
524
  export interface Props {
342
- columns: MultiColumnFooter['links'];
525
+ readonly columns: MultiColumnFooter['links'];
343
526
  }
344
527
 
345
528
  export default function FooterLinksMultiColumn(props: Props): JSX.Element;
@@ -349,7 +532,7 @@ declare module '@theme/Footer/Links/Simple' {
349
532
  import type {SimpleFooter} from '@docusaurus/theme-common';
350
533
 
351
534
  export interface Props {
352
- links: SimpleFooter['links'];
535
+ readonly links: SimpleFooter['links'];
353
536
  }
354
537
 
355
538
  export default function FooterLinksSimple(props: Props): JSX.Element;
@@ -361,7 +544,7 @@ declare module '@theme/Heading' {
361
544
  type HeadingType = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
362
545
 
363
546
  export interface Props extends ComponentProps<HeadingType> {
364
- as: HeadingType;
547
+ readonly as: HeadingType;
365
548
  }
366
549
 
367
550
  export default function Heading(props: Props): JSX.Element;
@@ -507,7 +690,9 @@ declare module '@theme/MDXComponents' {
507
690
  readonly h4: (props: ComponentProps<'h4'>) => JSX.Element;
508
691
  readonly h5: (props: ComponentProps<'h5'>) => JSX.Element;
509
692
  readonly h6: (props: ComponentProps<'h6'>) => JSX.Element;
510
- } & {[tagName: string]: ComponentType<unknown>};
693
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
694
+ [tagName: string]: ComponentType<any>;
695
+ };
511
696
 
512
697
  const MDXComponents: MDXComponentsObject;
513
698
  export default MDXComponents;
@@ -561,9 +746,9 @@ declare module '@theme/Navbar/MobileSidebar/Layout' {
561
746
  import type {ReactNode} from 'react';
562
747
 
563
748
  interface Props {
564
- header: ReactNode;
565
- primaryMenu: ReactNode;
566
- secondaryMenu: ReactNode;
749
+ readonly header: ReactNode;
750
+ readonly primaryMenu: ReactNode;
751
+ readonly secondaryMenu: ReactNode;
567
752
  }
568
753
 
569
754
  export default function NavbarMobileSidebarLayout(props: Props): JSX.Element;
@@ -585,6 +770,16 @@ declare module '@theme/Navbar/MobileSidebar/Header' {
585
770
  export default function NavbarMobileSidebarHeader(): JSX.Element;
586
771
  }
587
772
 
773
+ declare module '@theme/Navbar/Search' {
774
+ import type {ReactNode} from 'react';
775
+
776
+ export interface Props {
777
+ readonly children: ReactNode;
778
+ }
779
+
780
+ export default function NavbarSearch(props: Props): JSX.Element;
781
+ }
782
+
588
783
  declare module '@theme/NavbarItem/DefaultNavbarItem' {
589
784
  import type {Props as NavbarNavLinkProps} from '@theme/NavbarItem/NavbarNavLink';
590
785
 
@@ -610,6 +805,7 @@ declare module '@theme/NavbarItem/NavbarNavLink' {
610
805
  readonly activeBaseRegex?: string;
611
806
  readonly exact?: boolean;
612
807
  readonly label?: ReactNode;
808
+ readonly html?: string;
613
809
  readonly prependBaseUrlToHref?: string;
614
810
  }
615
811
 
@@ -688,7 +884,9 @@ declare module '@theme/NavbarItem/DocNavbarItem' {
688
884
  readonly docsPluginId?: string;
689
885
  }
690
886
 
691
- export default function DocsSidebarNavbarItem(props: Props): JSX.Element;
887
+ export default function DocsSidebarNavbarItem(
888
+ props: Props,
889
+ ): JSX.Element | null;
692
890
  }
693
891
 
694
892
  declare module '@theme/NavbarItem/DocSidebarNavbarItem' {
@@ -702,6 +900,47 @@ declare module '@theme/NavbarItem/DocSidebarNavbarItem' {
702
900
  export default function DocSidebarNavbarItem(props: Props): JSX.Element;
703
901
  }
704
902
 
903
+ declare module '@theme/NavbarItem/HtmlNavbarItem' {
904
+ import type {Props as DefaultNavbarItemProps} from '@theme/NavbarItem/DefaultNavbarItem';
905
+
906
+ export interface Props extends DefaultNavbarItemProps {
907
+ readonly value: string;
908
+ }
909
+
910
+ export default function HtmlNavbarItem(props: Props): JSX.Element;
911
+ }
912
+
913
+ declare module '@theme/NavbarItem/ComponentTypes' {
914
+ import type {ComponentType} from 'react';
915
+
916
+ import type DefaultNavbarItem from '@theme/NavbarItem/DefaultNavbarItem';
917
+ import type DropdownNavbarItem from '@theme/NavbarItem/DropdownNavbarItem';
918
+ import type LocaleDropdownNavbarItem from '@theme/NavbarItem/LocaleDropdownNavbarItem';
919
+ import type SearchNavbarItem from '@theme/NavbarItem/SearchNavbarItem';
920
+ import type HtmlNavbarItem from '@theme/NavbarItem/HtmlNavbarItem';
921
+ import type DocNavbarItem from '@theme/NavbarItem/DocNavbarItem';
922
+ import type DocSidebarNavbarItem from '@theme/NavbarItem/DocSidebarNavbarItem';
923
+ import type DocsVersionNavbarItem from '@theme/NavbarItem/DocsVersionNavbarItem';
924
+ import type DocsVersionDropdownNavbarItem from '@theme/NavbarItem/DocsVersionDropdownNavbarItem';
925
+
926
+ export type ComponentTypesObject = {
927
+ readonly default: typeof DefaultNavbarItem;
928
+ readonly localeDropdown: typeof LocaleDropdownNavbarItem;
929
+ readonly search: typeof SearchNavbarItem;
930
+ readonly dropdown: typeof DropdownNavbarItem;
931
+ readonly html: typeof HtmlNavbarItem;
932
+ readonly doc: typeof DocNavbarItem;
933
+ readonly docSidebar: typeof DocSidebarNavbarItem;
934
+ readonly docsVersion: typeof DocsVersionNavbarItem;
935
+ readonly docsVersionDropdown: typeof DocsVersionDropdownNavbarItem;
936
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
937
+ [customComponentType: string]: ComponentType<any>;
938
+ };
939
+
940
+ const ComponentTypes: ComponentTypesObject;
941
+ export default ComponentTypes;
942
+ }
943
+
705
944
  declare module '@theme/NavbarItem' {
706
945
  import type {ComponentProps} from 'react';
707
946
  import type {Props as DefaultNavbarItemProps} from '@theme/NavbarItem/DefaultNavbarItem';
@@ -712,12 +951,14 @@ declare module '@theme/NavbarItem' {
712
951
  import type {Props as DocsVersionDropdownNavbarItemProps} from '@theme/NavbarItem/DocsVersionDropdownNavbarItem';
713
952
  import type {Props as LocaleDropdownNavbarItemProps} from '@theme/NavbarItem/LocaleDropdownNavbarItem';
714
953
  import type {Props as SearchNavbarItemProps} from '@theme/NavbarItem/SearchNavbarItem';
954
+ import type {Props as HtmlNavbarItemProps} from '@theme/NavbarItem/HtmlNavbarItem';
715
955
 
716
956
  export type LinkLikeNavbarItemProps =
717
957
  | ({readonly type?: 'default'} & DefaultNavbarItemProps)
718
958
  | ({readonly type: 'doc'} & DocNavbarItemProps)
719
959
  | ({readonly type: 'docsVersion'} & DocsVersionNavbarItemProps)
720
- | ({readonly type: 'docSidebar'} & DocSidebarNavbarItemProps);
960
+ | ({readonly type: 'docSidebar'} & DocSidebarNavbarItemProps)
961
+ | ({readonly type: 'html'} & HtmlNavbarItemProps);
721
962
 
722
963
  export type Props = ComponentProps<'a'> & {
723
964
  readonly position?: 'left' | 'right';
@@ -739,7 +980,14 @@ declare module '@theme/NavbarItem' {
739
980
  }
740
981
 
741
982
  declare module '@theme/NavbarItem/utils' {
742
- export function getInfimaActiveClassName(mobile?: boolean): string;
983
+ /**
984
+ * On desktop and mobile, we would apply different class names for dropdown
985
+ * items.
986
+ * @see https://github.com/facebook/docusaurus/pull/5431
987
+ */
988
+ export function getInfimaActiveClassName(
989
+ mobile?: boolean,
990
+ ): `${'menu' | 'navbar'}__link--active`;
743
991
  }
744
992
 
745
993
  declare module '@theme/PaginatorNavLink' {
@@ -749,6 +997,7 @@ declare module '@theme/PaginatorNavLink' {
749
997
  export interface Props extends Omit<PropNavigationLink, 'title'> {
750
998
  readonly title: ReactNode;
751
999
  readonly subLabel?: JSX.Element;
1000
+ readonly isNext?: boolean;
752
1001
  }
753
1002
 
754
1003
  export default function PaginatorNavLink(props: Props): JSX.Element;
@@ -809,14 +1058,14 @@ declare module '@theme/ThemedImage' {
809
1058
  }
810
1059
 
811
1060
  declare module '@theme/Details' {
812
- import {Details, type DetailsProps} from '@docusaurus/theme-common';
1061
+ import {Details, type DetailsProps} from '@docusaurus/theme-common/Details';
813
1062
 
814
1063
  export interface Props extends DetailsProps {}
815
1064
  export default Details;
816
1065
  }
817
1066
 
818
1067
  declare module '@theme/TOCItems' {
819
- import type {TOCItem} from '@docusaurus/types';
1068
+ import type {TOCItem} from '@docusaurus/mdx-loader';
820
1069
 
821
1070
  export interface Props {
822
1071
  readonly toc: readonly TOCItem[];
@@ -830,11 +1079,24 @@ declare module '@theme/TOCItems' {
830
1079
  export default function TOCItems(props: Props): JSX.Element;
831
1080
  }
832
1081
 
1082
+ declare module '@theme/TOCItems/Tree' {
1083
+ import type {TOCTreeNode} from '@docusaurus/theme-common';
1084
+
1085
+ export interface Props {
1086
+ readonly toc: readonly TOCTreeNode[];
1087
+ readonly className: string;
1088
+ readonly linkClassName: string | null;
1089
+ readonly isChild?: boolean;
1090
+ }
1091
+
1092
+ export default function TOCItems(props: Props): JSX.Element;
1093
+ }
1094
+
833
1095
  declare module '@theme/TOC' {
834
- import type {TOCItem} from '@docusaurus/types';
1096
+ import type {TOCItem} from '@docusaurus/mdx-loader';
835
1097
 
836
- // minHeadingLevel only exists as a per-doc option, and won't have a default
837
- // set by Joi. See TOC, TOCInline, TOCCollapsible for examples
1098
+ // `minHeadingLevel` only comes from doc/post front matter, and won't have a
1099
+ // default set by Joi. See TOC, TOCInline, TOCCollapsible for examples.
838
1100
  export interface Props {
839
1101
  readonly toc: readonly TOCItem[];
840
1102
  readonly minHeadingLevel?: number;
@@ -846,7 +1108,7 @@ declare module '@theme/TOC' {
846
1108
  }
847
1109
 
848
1110
  declare module '@theme/TOCInline' {
849
- import type {TOCItem} from '@docusaurus/types';
1111
+ import type {TOCItem} from '@docusaurus/mdx-loader';
850
1112
 
851
1113
  export interface Props {
852
1114
  readonly toc: readonly TOCItem[];
@@ -858,7 +1120,7 @@ declare module '@theme/TOCInline' {
858
1120
  }
859
1121
 
860
1122
  declare module '@theme/TOCCollapsible' {
861
- import type {TOCItem} from '@docusaurus/types';
1123
+ import type {TOCItem} from '@docusaurus/mdx-loader';
862
1124
 
863
1125
  export interface Props {
864
1126
  readonly className?: string;
@@ -870,6 +1132,18 @@ declare module '@theme/TOCCollapsible' {
870
1132
  export default function TOCCollapsible(props: Props): JSX.Element;
871
1133
  }
872
1134
 
1135
+ declare module '@theme/TOCCollapsible/CollapseButton' {
1136
+ import type {ComponentProps} from 'react';
1137
+
1138
+ export interface Props extends ComponentProps<'button'> {
1139
+ collapsed: boolean;
1140
+ }
1141
+
1142
+ export default function TOCCollapsibleCollapseButton(
1143
+ props: Props,
1144
+ ): JSX.Element;
1145
+ }
1146
+
873
1147
  declare module '@theme/ColorModeToggle' {
874
1148
  import type {ColorMode} from '@docusaurus/theme-common';
875
1149
 
@@ -921,6 +1195,14 @@ declare module '@theme/IconEdit' {
921
1195
  export default function IconEdit(props: Props): JSX.Element;
922
1196
  }
923
1197
 
1198
+ declare module '@theme/IconHome' {
1199
+ import type {ComponentProps} from 'react';
1200
+
1201
+ export interface Props extends ComponentProps<'svg'> {}
1202
+
1203
+ export default function IconHome(props: Props): JSX.Element;
1204
+ }
1205
+
924
1206
  declare module '@theme/IconLightMode' {
925
1207
  import type {ComponentProps} from 'react';
926
1208
 
@@ -962,7 +1244,7 @@ declare module '@theme/IconExternalLink' {
962
1244
  }
963
1245
 
964
1246
  declare module '@theme/TagsListByLetter' {
965
- import type {TagsListItem} from '@docusaurus/theme-common';
1247
+ import type {TagsListItem} from '@docusaurus/utils';
966
1248
 
967
1249
  export interface Props {
968
1250
  readonly tags: readonly TagsListItem[];
@@ -980,7 +1262,7 @@ declare module '@theme/TagsListInline' {
980
1262
  }
981
1263
 
982
1264
  declare module '@theme/Tag' {
983
- import type {TagsListItem} from '@docusaurus/theme-common';
1265
+ import type {TagsListItem} from '@docusaurus/utils';
984
1266
  import type {Optional} from 'utility-types';
985
1267
 
986
1268
  export interface Props extends Optional<TagsListItem, 'count'> {}