@docusaurus/theme-classic 2.0.0-beta.8bda3b2db → 2.0.0-beta.9

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 (310) hide show
  1. package/README.md +1 -1
  2. package/codeTranslations/ar.json +12 -7
  3. package/codeTranslations/base.json +17 -7
  4. package/codeTranslations/bn.json +11 -5
  5. package/codeTranslations/cs.json +62 -0
  6. package/codeTranslations/da.json +8 -3
  7. package/codeTranslations/de.json +8 -3
  8. package/codeTranslations/es.json +15 -10
  9. package/codeTranslations/fa.json +31 -26
  10. package/codeTranslations/fil.json +8 -3
  11. package/codeTranslations/fr.json +8 -3
  12. package/codeTranslations/he.json +9 -4
  13. package/codeTranslations/hi.json +9 -4
  14. package/codeTranslations/ja.json +8 -3
  15. package/codeTranslations/ko.json +8 -3
  16. package/codeTranslations/pl.json +8 -3
  17. package/codeTranslations/pt-BR.json +16 -11
  18. package/codeTranslations/pt-PT.json +8 -3
  19. package/codeTranslations/ru.json +10 -5
  20. package/codeTranslations/sr.json +62 -0
  21. package/codeTranslations/tr.json +9 -4
  22. package/codeTranslations/vi.json +10 -5
  23. package/codeTranslations/zh-Hans.json +9 -4
  24. package/codeTranslations/zh-Hant.json +9 -4
  25. package/lib/__tests__/validateThemeConfig.test.js +277 -3
  26. package/lib/admonitions.css +35 -0
  27. package/lib/index.js +31 -8
  28. package/lib/prism-include-languages.js +9 -5
  29. package/lib/theme/AnnouncementBar/index.js +10 -16
  30. package/lib/theme/AnnouncementBar/styles.module.css +25 -30
  31. package/lib/theme/BackToTopButton/index.js +140 -0
  32. package/lib/theme/BackToTopButton/styles.module.css +42 -0
  33. package/lib/theme/BlogArchivePage/index.js +89 -0
  34. package/lib/theme/BlogLayout/index.js +51 -0
  35. package/lib/theme/BlogListPage/index.js +10 -21
  36. package/lib/theme/BlogPostAuthor/index.js +51 -0
  37. package/lib/theme/BlogPostAuthor/styles.module.css +12 -0
  38. package/lib/theme/BlogPostAuthors/index.js +47 -0
  39. package/lib/theme/BlogPostAuthors/styles.module.css +11 -0
  40. package/lib/theme/BlogPostItem/index.js +58 -67
  41. package/lib/theme/BlogPostPage/index.js +37 -24
  42. package/lib/theme/BlogSidebar/styles.module.css +2 -2
  43. package/lib/theme/BlogTagsListPage/index.js +8 -44
  44. package/lib/theme/BlogTagsPostsPage/index.js +24 -38
  45. package/lib/theme/CodeBlock/index.js +45 -41
  46. package/lib/theme/CodeBlock/styles.module.css +6 -9
  47. package/lib/theme/Details/index.js +30 -0
  48. package/lib/theme/Details/styles.module.css +13 -0
  49. package/lib/theme/DocItem/index.js +29 -45
  50. package/lib/theme/DocItem/styles.module.css +5 -9
  51. package/lib/theme/DocItemFooter/index.js +79 -0
  52. package/lib/theme/DocItemFooter/styles.module.css +18 -0
  53. package/lib/theme/DocPage/index.js +25 -49
  54. package/lib/theme/DocPage/styles.module.css +8 -23
  55. package/lib/theme/DocSidebar/index.js +45 -227
  56. package/lib/theme/DocSidebar/styles.module.css +0 -18
  57. package/lib/theme/DocSidebarItem/index.js +177 -0
  58. package/lib/theme/DocSidebarItem/styles.module.css +15 -0
  59. package/lib/theme/DocTagDocListPage/index.js +89 -0
  60. package/lib/theme/DocTagsListPage/index.js +44 -0
  61. package/lib/theme/{DocVersionSuggestions → DocVersionBanner}/index.js +37 -18
  62. package/lib/theme/EditThisPage/index.js +3 -1
  63. package/lib/theme/Footer/index.js +13 -4
  64. package/lib/theme/Heading/index.js +7 -9
  65. package/lib/theme/Heading/styles.css +4 -6
  66. package/lib/theme/Heading/styles.module.css +9 -5
  67. package/lib/theme/IconClose/index.js +31 -0
  68. package/lib/theme/LastUpdated/index.js +4 -2
  69. package/lib/theme/LayoutHead/index.js +13 -11
  70. package/lib/theme/LayoutProviders/index.js +11 -5
  71. package/lib/theme/Logo/index.js +14 -12
  72. package/lib/theme/MDXComponents/index.js +45 -4
  73. package/lib/theme/MDXComponents/styles.css +11 -0
  74. package/lib/theme/MDXPage/index.js +2 -1
  75. package/lib/theme/Navbar/index.js +164 -42
  76. package/lib/theme/Navbar/styles.module.css +10 -3
  77. package/lib/theme/NavbarItem/DefaultNavbarItem.js +27 -123
  78. package/lib/theme/NavbarItem/DocNavbarItem.js +6 -5
  79. package/lib/theme/NavbarItem/DocsVersionDropdownNavbarItem.js +19 -12
  80. package/lib/theme/NavbarItem/DropdownNavbarItem.js +155 -0
  81. package/lib/theme/NavbarItem/{LocaleDropdownNavbarItem.js → LocaleDropdownNavbarItem/index.js} +5 -6
  82. package/lib/theme/NavbarItem/LocaleDropdownNavbarItem/styles.module.css +11 -0
  83. package/lib/theme/NavbarItem/index.js +31 -11
  84. package/lib/theme/Seo/index.js +10 -7
  85. package/lib/theme/SkipToContent/index.js +9 -3
  86. package/lib/theme/SkipToContent/styles.module.css +1 -0
  87. package/lib/theme/TOC/index.js +9 -29
  88. package/lib/theme/TOC/styles.module.css +1 -1
  89. package/lib/theme/TOCCollapsible/index.js +53 -0
  90. package/lib/theme/TOCCollapsible/styles.module.css +50 -0
  91. package/lib/theme/TOCInline/index.js +7 -27
  92. package/lib/theme/TOCItems/index.js +78 -0
  93. package/lib/theme/Tabs/__tests__/index.test.js +123 -0
  94. package/lib/theme/Tabs/index.js +73 -50
  95. package/lib/theme/Tabs/styles.module.css +0 -13
  96. package/lib/theme/Tag/index.js +40 -0
  97. package/lib/theme/Tag/styles.module.css +70 -0
  98. package/lib/theme/TagsListByLetter/index.js +48 -0
  99. package/lib/theme/TagsListByLetter/styles.module.css +11 -0
  100. package/lib/theme/TagsListInline/index.js +44 -0
  101. package/lib/theme/TagsListInline/styles.module.css +15 -0
  102. package/lib/theme/ThemedImage/index.js +4 -5
  103. package/lib/theme/Toggle/index.js +23 -18
  104. package/lib/theme/Toggle/styles.module.css +91 -0
  105. package/lib/theme/UserPreferencesProvider/index.js +1 -9
  106. package/lib/theme/hooks/useHideableNavbar.js +14 -32
  107. package/lib/theme/hooks/useTabGroupChoice.js +2 -4
  108. package/lib/theme/hooks/useTheme.js +2 -2
  109. package/lib/theme/hooks/useWindowSize.js +33 -20
  110. package/lib/theme/prism-include-languages.js +4 -3
  111. package/lib/translations.js +4 -4
  112. package/lib/types.d.ts +338 -138
  113. package/lib/validateThemeConfig.js +226 -245
  114. package/lib-next/__tests__/validateThemeConfig.test.js +277 -3
  115. package/lib-next/admonitions.css +35 -0
  116. package/lib-next/index.js +33 -7
  117. package/lib-next/prism-include-languages.js +0 -2
  118. package/lib-next/theme/AnnouncementBar/index.js +9 -18
  119. package/lib-next/theme/AnnouncementBar/styles.module.css +25 -30
  120. package/lib-next/theme/BackToTopButton/index.js +131 -0
  121. package/lib-next/theme/BackToTopButton/styles.module.css +42 -0
  122. package/lib-next/theme/BlogArchivePage/index.js +80 -0
  123. package/lib-next/theme/BlogLayout/index.js +40 -0
  124. package/lib-next/theme/BlogListPage/index.js +16 -24
  125. package/lib-next/theme/BlogPostAuthor/index.js +46 -0
  126. package/lib-next/theme/BlogPostAuthor/styles.module.css +12 -0
  127. package/lib-next/theme/BlogPostAuthors/index.js +34 -0
  128. package/lib-next/theme/BlogPostAuthors/styles.module.css +11 -0
  129. package/lib-next/theme/BlogPostItem/index.js +79 -86
  130. package/lib-next/theme/BlogPostPage/index.js +70 -35
  131. package/lib-next/theme/BlogSidebar/styles.module.css +2 -2
  132. package/lib-next/theme/BlogTagsListPage/index.js +13 -54
  133. package/lib-next/theme/BlogTagsPostsPage/index.js +28 -38
  134. package/lib-next/theme/CodeBlock/index.js +54 -53
  135. package/lib-next/theme/CodeBlock/styles.module.css +6 -9
  136. package/lib-next/theme/Details/index.js +20 -0
  137. package/lib-next/theme/Details/styles.module.css +13 -0
  138. package/lib-next/theme/DocItem/index.js +46 -55
  139. package/lib-next/theme/DocItem/styles.module.css +5 -9
  140. package/lib-next/theme/DocItemFooter/index.js +79 -0
  141. package/lib-next/theme/DocItemFooter/styles.module.css +18 -0
  142. package/lib-next/theme/DocPage/index.js +25 -43
  143. package/lib-next/theme/DocPage/styles.module.css +8 -23
  144. package/lib-next/theme/DocSidebar/index.js +59 -288
  145. package/lib-next/theme/DocSidebar/styles.module.css +0 -18
  146. package/lib-next/theme/DocSidebarItem/index.js +181 -0
  147. package/lib-next/theme/DocSidebarItem/styles.module.css +15 -0
  148. package/lib-next/theme/DocTagDocListPage/index.js +89 -0
  149. package/lib-next/theme/DocTagsListPage/index.js +38 -0
  150. package/lib-next/theme/{DocVersionSuggestions → DocVersionBanner}/index.js +44 -36
  151. package/lib-next/theme/EditThisPage/index.js +6 -1
  152. package/lib-next/theme/Footer/index.js +24 -4
  153. package/lib-next/theme/Heading/index.js +10 -13
  154. package/lib-next/theme/Heading/styles.css +4 -6
  155. package/lib-next/theme/Heading/styles.module.css +9 -5
  156. package/lib-next/theme/IconClose/index.js +23 -0
  157. package/lib-next/theme/LastUpdated/index.js +3 -2
  158. package/lib-next/theme/LayoutHead/index.js +9 -15
  159. package/lib-next/theme/LayoutProviders/index.js +17 -6
  160. package/lib-next/theme/Logo/index.js +23 -19
  161. package/lib-next/theme/MDXComponents/index.js +34 -7
  162. package/lib-next/theme/MDXComponents/styles.css +11 -0
  163. package/lib-next/theme/MDXPage/index.js +10 -2
  164. package/lib-next/theme/Navbar/index.js +192 -56
  165. package/lib-next/theme/Navbar/styles.module.css +10 -3
  166. package/lib-next/theme/NavbarItem/DefaultNavbarItem.js +45 -147
  167. package/lib-next/theme/NavbarItem/DocNavbarItem.js +6 -5
  168. package/lib-next/theme/NavbarItem/DocsVersionDropdownNavbarItem.js +31 -19
  169. package/lib-next/theme/NavbarItem/DropdownNavbarItem.js +158 -0
  170. package/lib-next/theme/NavbarItem/{LocaleDropdownNavbarItem.js → LocaleDropdownNavbarItem/index.js} +4 -8
  171. package/lib-next/theme/NavbarItem/LocaleDropdownNavbarItem/styles.module.css +11 -0
  172. package/lib-next/theme/NavbarItem/index.js +25 -12
  173. package/lib-next/theme/Seo/index.js +11 -7
  174. package/lib-next/theme/SkipToContent/index.js +5 -6
  175. package/lib-next/theme/SkipToContent/styles.module.css +1 -0
  176. package/lib-next/theme/TOC/index.js +12 -36
  177. package/lib-next/theme/TOC/styles.module.css +1 -1
  178. package/lib-next/theme/TOCCollapsible/index.js +54 -0
  179. package/lib-next/theme/TOCCollapsible/styles.module.css +50 -0
  180. package/lib-next/theme/TOCInline/index.js +10 -28
  181. package/lib-next/theme/TOCItems/index.js +85 -0
  182. package/lib-next/theme/Tabs/__tests__/index.test.js +142 -0
  183. package/lib-next/theme/Tabs/index.js +91 -43
  184. package/lib-next/theme/Tabs/styles.module.css +0 -13
  185. package/lib-next/theme/Tag/index.js +27 -0
  186. package/lib-next/theme/Tag/styles.module.css +70 -0
  187. package/lib-next/theme/TagsListByLetter/index.js +42 -0
  188. package/lib-next/theme/TagsListByLetter/styles.module.css +11 -0
  189. package/lib-next/theme/TagsListInline/index.js +31 -0
  190. package/lib-next/theme/TagsListInline/styles.module.css +15 -0
  191. package/lib-next/theme/ThemedImage/index.js +5 -6
  192. package/lib-next/theme/Toggle/index.js +20 -15
  193. package/lib-next/theme/Toggle/styles.module.css +91 -0
  194. package/lib-next/theme/UserPreferencesProvider/index.js +0 -4
  195. package/lib-next/theme/hooks/useHideableNavbar.js +31 -44
  196. package/lib-next/theme/hooks/useTabGroupChoice.js +2 -4
  197. package/lib-next/theme/hooks/useTheme.js +2 -2
  198. package/lib-next/theme/hooks/useWindowSize.js +34 -20
  199. package/lib-next/theme/prism-include-languages.js +2 -1
  200. package/lib-next/translations.js +6 -10
  201. package/lib-next/types.d.ts +338 -138
  202. package/lib-next/validateThemeConfig.js +134 -110
  203. package/package.json +24 -19
  204. package/src/__tests__/validateThemeConfig.test.js +277 -3
  205. package/src/admonitions.css +35 -0
  206. package/src/index.ts +44 -14
  207. package/src/{prism-include-languages.js → prism-include-languages.ts} +0 -0
  208. package/src/theme/AnnouncementBar/index.tsx +10 -17
  209. package/src/theme/AnnouncementBar/styles.module.css +25 -30
  210. package/src/theme/BackToTopButton/index.tsx +142 -0
  211. package/src/theme/BackToTopButton/styles.module.css +42 -0
  212. package/src/theme/BlogArchivePage/index.tsx +91 -0
  213. package/src/theme/BlogLayout/index.tsx +44 -0
  214. package/src/theme/BlogListPage/index.tsx +17 -24
  215. package/src/theme/BlogPostAuthor/index.tsx +49 -0
  216. package/src/theme/BlogPostAuthor/styles.module.css +12 -0
  217. package/src/theme/BlogPostAuthors/index.tsx +36 -0
  218. package/src/theme/BlogPostAuthors/styles.module.css +11 -0
  219. package/src/theme/BlogPostItem/index.tsx +70 -80
  220. package/src/theme/BlogPostPage/index.tsx +72 -35
  221. package/src/theme/BlogSidebar/styles.module.css +2 -2
  222. package/src/theme/BlogTagsListPage/index.tsx +13 -56
  223. package/src/theme/BlogTagsPostsPage/index.tsx +28 -38
  224. package/src/theme/CodeBlock/index.tsx +70 -55
  225. package/src/theme/CodeBlock/styles.module.css +6 -9
  226. package/src/theme/Details/index.tsx +24 -0
  227. package/src/theme/Details/styles.module.css +13 -0
  228. package/src/theme/DocItem/index.tsx +49 -55
  229. package/src/theme/DocItem/styles.module.css +5 -9
  230. package/src/theme/DocItemFooter/index.tsx +91 -0
  231. package/src/theme/DocItemFooter/styles.module.css +18 -0
  232. package/src/theme/DocPage/index.tsx +24 -38
  233. package/src/theme/DocPage/styles.module.css +8 -23
  234. package/src/theme/DocSidebar/index.tsx +70 -300
  235. package/src/theme/DocSidebar/styles.module.css +0 -18
  236. package/src/theme/DocSidebarItem/index.tsx +206 -0
  237. package/src/theme/DocSidebarItem/styles.module.css +15 -0
  238. package/src/theme/DocTagDocListPage/index.tsx +89 -0
  239. package/src/theme/DocTagsListPage/index.tsx +41 -0
  240. package/src/theme/{DocVersionSuggestions → DocVersionBanner}/index.tsx +58 -44
  241. package/src/theme/EditThisPage/index.tsx +6 -1
  242. package/src/theme/Footer/index.tsx +26 -4
  243. package/src/theme/Heading/index.tsx +10 -13
  244. package/src/theme/Heading/styles.css +4 -6
  245. package/src/theme/Heading/styles.module.css +9 -5
  246. package/src/theme/IconClose/index.tsx +26 -0
  247. package/src/theme/LastUpdated/index.tsx +3 -2
  248. package/src/theme/LayoutHead/index.tsx +9 -9
  249. package/src/theme/LayoutProviders/index.tsx +17 -6
  250. package/src/theme/Logo/index.tsx +19 -15
  251. package/src/theme/MDXComponents/index.tsx +39 -5
  252. package/src/theme/MDXComponents/styles.css +11 -0
  253. package/src/theme/MDXPage/index.tsx +10 -2
  254. package/src/theme/Navbar/index.tsx +202 -61
  255. package/src/theme/Navbar/styles.module.css +10 -3
  256. package/src/theme/NavbarItem/DefaultNavbarItem.tsx +42 -154
  257. package/src/theme/NavbarItem/DocNavbarItem.tsx +11 -14
  258. package/src/theme/NavbarItem/DocsVersionDropdownNavbarItem.tsx +33 -21
  259. package/src/theme/NavbarItem/DocsVersionNavbarItem.tsx +7 -3
  260. package/src/theme/NavbarItem/DropdownNavbarItem.tsx +180 -0
  261. package/src/theme/NavbarItem/{LocaleDropdownNavbarItem.tsx → LocaleDropdownNavbarItem/index.tsx} +8 -7
  262. package/src/theme/NavbarItem/LocaleDropdownNavbarItem/styles.module.css +11 -0
  263. package/src/theme/NavbarItem/index.tsx +41 -16
  264. package/src/theme/Seo/index.tsx +7 -4
  265. package/src/theme/SkipToContent/index.tsx +5 -6
  266. package/src/theme/SkipToContent/styles.module.css +1 -0
  267. package/src/theme/TOC/index.tsx +12 -41
  268. package/src/theme/TOC/styles.module.css +1 -1
  269. package/src/theme/TOCCollapsible/index.tsx +58 -0
  270. package/src/theme/TOCCollapsible/styles.module.css +50 -0
  271. package/src/theme/TOCInline/index.tsx +13 -32
  272. package/src/theme/TOCItems/index.tsx +96 -0
  273. package/src/theme/Tabs/__tests__/index.test.tsx +129 -0
  274. package/src/theme/Tabs/index.tsx +93 -49
  275. package/src/theme/Tabs/styles.module.css +0 -13
  276. package/src/theme/Tag/index.tsx +31 -0
  277. package/src/theme/Tag/styles.module.css +70 -0
  278. package/src/theme/TagsListByLetter/index.tsx +45 -0
  279. package/src/theme/TagsListByLetter/styles.module.css +11 -0
  280. package/src/theme/TagsListInline/index.tsx +35 -0
  281. package/src/theme/TagsListInline/styles.module.css +15 -0
  282. package/src/theme/ThemedImage/index.tsx +6 -6
  283. package/src/theme/Toggle/index.tsx +20 -15
  284. package/src/theme/Toggle/styles.module.css +91 -0
  285. package/src/theme/UserPreferencesProvider/index.tsx +0 -5
  286. package/src/theme/hooks/useContextualSearchFilters.ts +1 -1
  287. package/src/theme/hooks/useHideableNavbar.ts +32 -45
  288. package/src/theme/hooks/useTabGroupChoice.ts +4 -4
  289. package/src/theme/hooks/useTheme.ts +2 -2
  290. package/src/theme/hooks/useWindowSize.ts +38 -20
  291. package/src/theme/prism-include-languages.ts +3 -2
  292. package/src/translations.ts +6 -10
  293. package/src/types.d.ts +338 -138
  294. package/src/{validateThemeConfig.js → validateThemeConfig.ts} +144 -90
  295. package/tsconfig.json +1 -2
  296. package/update-code-translations.js +10 -6
  297. package/update-code-translations.test.js +1 -1
  298. package/update.js +151 -0
  299. package/lib/theme/Toggle/styles.css +0 -103
  300. package/lib/theme/hooks/useAnnouncementBar.js +0 -63
  301. package/lib/theme/hooks/useScrollPosition.js +0 -49
  302. package/lib/theme/hooks/useTOCHighlight.js +0 -87
  303. package/lib-next/theme/Toggle/styles.css +0 -103
  304. package/lib-next/theme/hooks/useAnnouncementBar.js +0 -49
  305. package/lib-next/theme/hooks/useScrollPosition.js +0 -38
  306. package/lib-next/theme/hooks/useTOCHighlight.js +0 -84
  307. package/src/theme/Toggle/styles.css +0 -103
  308. package/src/theme/hooks/useAnnouncementBar.ts +0 -58
  309. package/src/theme/hooks/useScrollPosition.ts +0 -45
  310. package/src/theme/hooks/useTOCHighlight.ts +0 -98
@@ -5,58 +5,107 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- /* eslint-disable import/no-duplicates */
9
- /* eslint-disable spaced-comment */
10
8
  /// <reference types="@docusaurus/module-type-aliases" />
11
9
  /// <reference types="@docusaurus/plugin-content-blog" />
12
10
  /// <reference types="@docusaurus/plugin-content-docs" />
13
11
  /// <reference types="@docusaurus/plugin-content-pages" />
14
12
 
13
+ declare module '@docusaurus/theme-classic' {
14
+ export type Options = Partial<import('./index').PluginOptions>;
15
+ }
16
+
15
17
  declare module '@theme/AnnouncementBar' {
16
18
  const AnnouncementBar: () => JSX.Element | null;
17
19
  export default AnnouncementBar;
18
20
  }
19
21
 
22
+ declare module '@theme/BackToTopButton' {
23
+ export default function BackToTopButton(): JSX.Element;
24
+ }
25
+
20
26
  declare module '@theme/BlogListPaginator' {
21
27
  import type {Metadata} from '@theme/BlogListPage';
22
28
 
23
- export type Props = {readonly metadata: Metadata};
29
+ export interface Props {
30
+ readonly metadata: Metadata;
31
+ }
24
32
 
25
33
  const BlogListPaginator: (props: Props) => JSX.Element;
26
34
  export default BlogListPaginator;
27
35
  }
28
36
 
29
37
  declare module '@theme/BlogPostItem' {
30
- import type {FrontMatter, Metadata} from '@theme/BlogPostPage';
38
+ import type {FrontMatter, Assets, Metadata} from '@theme/BlogPostPage';
31
39
 
32
- export type Props = {
40
+ export interface Props {
33
41
  readonly frontMatter: FrontMatter;
42
+ readonly assets: Assets;
34
43
  readonly metadata: Metadata;
35
44
  readonly truncated?: string | boolean;
36
45
  readonly isBlogPostPage?: boolean;
37
46
  readonly children: JSX.Element;
38
- };
47
+ }
39
48
 
40
49
  const BlogPostItem: (props: Props) => JSX.Element;
41
50
  export default BlogPostItem;
42
51
  }
43
52
 
53
+ declare module '@theme/BlogPostAuthor' {
54
+ import type {Metadata} from '@theme/BlogPostPage';
55
+
56
+ export interface Props {
57
+ readonly author: Metadata['authors'][number];
58
+ }
59
+
60
+ export default function BlogPostAuthor(props: Props): JSX.Element;
61
+ }
62
+
63
+ declare module '@theme/BlogPostAuthors' {
64
+ import type {Metadata, Assets} from '@theme/BlogPostPage';
65
+
66
+ export interface Props {
67
+ readonly authors: Metadata['authors'];
68
+ readonly assets: Assets;
69
+ }
70
+
71
+ export default function BlogPostAuthors(props: Props): JSX.Element;
72
+ }
73
+
44
74
  declare module '@theme/BlogPostPaginator' {
45
75
  type Item = {readonly title: string; readonly permalink: string};
46
76
 
47
- export type Props = {readonly nextItem?: Item; readonly prevItem?: Item};
77
+ export interface Props {
78
+ readonly nextItem?: Item;
79
+ readonly prevItem?: Item;
80
+ }
48
81
 
49
82
  const BlogPostPaginator: (props: Props) => JSX.Element;
50
83
  export default BlogPostPaginator;
51
84
  }
52
85
 
86
+ declare module '@theme/BlogLayout' {
87
+ import type {ReactNode} from 'react';
88
+ import type {Props as LayoutProps} from '@theme/Layout';
89
+ import type {BlogSidebar} from '@theme/BlogSidebar';
90
+
91
+ export interface Props extends LayoutProps {
92
+ readonly sidebar?: BlogSidebar;
93
+ readonly toc?: ReactNode;
94
+ }
95
+
96
+ const BlogLayout: (props: Props) => JSX.Element;
97
+ export default BlogLayout;
98
+ }
99
+
53
100
  declare module '@theme/CodeBlock' {
54
- export type Props = {
55
- readonly children: string;
101
+ import {ReactElement} from 'react';
102
+
103
+ export interface Props {
104
+ readonly children: string | ReactElement;
56
105
  readonly className?: string;
57
106
  readonly metastring?: string;
58
107
  readonly title?: string;
59
- };
108
+ }
60
109
 
61
110
  const CodeBlock: (props: Props) => JSX.Element;
62
111
  export default CodeBlock;
@@ -65,9 +114,9 @@ declare module '@theme/CodeBlock' {
65
114
  declare module '@theme/DocPaginator' {
66
115
  type PageInfo = {readonly permalink: string; readonly title: string};
67
116
 
68
- export type Props = {
117
+ export interface Props {
69
118
  readonly metadata: {readonly previous?: PageInfo; readonly next?: PageInfo};
70
- };
119
+ }
71
120
 
72
121
  const DocPaginator: (props: Props) => JSX.Element;
73
122
  export default DocPaginator;
@@ -76,27 +125,50 @@ declare module '@theme/DocPaginator' {
76
125
  declare module '@theme/DocSidebar' {
77
126
  import type {PropSidebarItem} from '@docusaurus/plugin-content-docs-types';
78
127
 
79
- export type Props = {
128
+ export interface Props {
80
129
  readonly path: string;
81
130
  readonly sidebar: readonly PropSidebarItem[];
82
- readonly sidebarCollapsible?: boolean;
83
131
  readonly onCollapse: () => void;
84
132
  readonly isHidden: boolean;
85
- };
133
+ // MobileSecondaryFilter expects Record<string, unknown>
134
+ readonly [key: string]: unknown;
135
+ }
86
136
 
87
137
  const DocSidebar: (props: Props) => JSX.Element;
88
138
  export default DocSidebar;
89
139
  }
90
140
 
141
+ declare module '@theme/DocSidebarItem' {
142
+ import type {PropSidebarItem} from '@docusaurus/plugin-content-docs-types';
143
+
144
+ type DocSidebarPropsBase = {
145
+ readonly activePath: string;
146
+ readonly onItemClick?: () => void;
147
+ readonly level: number;
148
+ readonly tabIndex?: number;
149
+ };
150
+
151
+ export interface Props extends DocSidebarPropsBase {
152
+ readonly item: PropSidebarItem;
153
+ }
154
+ const DocSidebarItem: (props: Props) => JSX.Element;
155
+ export default DocSidebarItem;
156
+
157
+ export type DocSidebarItemsProps = DocSidebarPropsBase & {
158
+ readonly items: readonly PropSidebarItem[];
159
+ };
160
+ export const DocSidebarItems: (props: DocSidebarItemsProps) => JSX.Element;
161
+ }
162
+
91
163
  declare module '@theme/DocVersionSuggestions' {
92
164
  const DocVersionSuggestions: () => JSX.Element;
93
165
  export default DocVersionSuggestions;
94
166
  }
95
167
 
96
168
  declare module '@theme/EditThisPage' {
97
- export type Props = {
169
+ export interface Props {
98
170
  readonly editUrl: string;
99
- };
171
+ }
100
172
  const EditThisPage: (props: Props) => JSX.Element;
101
173
  export default EditThisPage;
102
174
  }
@@ -110,23 +182,13 @@ declare module '@theme/Heading' {
110
182
  import type {ComponentProps} from 'react';
111
183
 
112
184
  export type HeadingType = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
113
- export type Props = ComponentProps<HeadingType>;
185
+ export interface Props extends ComponentProps<HeadingType> {}
114
186
 
115
187
  const Heading: (Tag: HeadingType) => (props: Props) => JSX.Element;
116
188
  export default Heading;
117
189
  export const MainHeading: (props: Props) => JSX.Element;
118
190
  }
119
191
 
120
- declare module '@theme/hooks/useAnnouncementBar' {
121
- export type useAnnouncementBarReturns = {
122
- readonly isAnnouncementBarClosed: boolean;
123
- readonly closeAnnouncementBar: () => void;
124
- };
125
-
126
- const useAnnouncementBar: () => useAnnouncementBarReturns;
127
- export default useAnnouncementBar;
128
- }
129
-
130
192
  declare module '@theme/hooks/useHideableNavbar' {
131
193
  export type useHideableNavbarReturns = {
132
194
  readonly navbarRef: (node: HTMLElement | null) => void;
@@ -161,16 +223,6 @@ declare module '@theme/hooks/usePrismTheme' {
161
223
  export default usePrismTheme;
162
224
  }
163
225
 
164
- declare module '@theme/hooks/useScrollPosition' {
165
- export type ScrollPosition = {scrollX: number; scrollY: number};
166
-
167
- const useScrollPosition: (
168
- effect?: (position: ScrollPosition, lastPosition: ScrollPosition) => void,
169
- deps?: unknown[],
170
- ) => void;
171
- export default useScrollPosition;
172
- }
173
-
174
226
  declare module '@theme/hooks/useTabGroupChoice' {
175
227
  export type useTabGroupChoiceReturns = {
176
228
  readonly tabGroupChoices: {readonly [groupId: string]: string};
@@ -202,20 +254,10 @@ declare module '@theme/hooks/useThemeContext' {
202
254
  export default function useThemeContext(): ThemeContextProps;
203
255
  }
204
256
 
205
- declare module '@theme/hooks/useTOCHighlight' {
206
- export default function useTOCHighlight(
207
- linkClassName: string,
208
- linkActiveClassName: string,
209
- topOffset: number,
210
- ): void;
211
- }
212
-
213
257
  declare module '@theme/hooks/useUserPreferencesContext' {
214
258
  export type UserPreferencesContextProps = {
215
259
  tabGroupChoices: {readonly [groupId: string]: string};
216
260
  setTabGroupChoices: (groupId: string, newChoice: string) => void;
217
- isAnnouncementBarClosed: boolean;
218
- closeAnnouncementBar: () => void;
219
261
  };
220
262
 
221
263
  export default function useUserPreferencesContext(): UserPreferencesContextProps;
@@ -225,11 +267,12 @@ declare module '@theme/hooks/useWindowSize' {
225
267
  export const windowSizes: {
226
268
  desktop: 'desktop';
227
269
  mobile: 'mobile';
270
+ ssr: 'ssr';
228
271
  };
229
272
 
230
273
  export type WindowSize = keyof typeof windowSizes;
231
274
 
232
- export default function useWindowSize(): WindowSize | undefined;
275
+ export default function useWindowSize(): WindowSize;
233
276
  }
234
277
 
235
278
  declare module '@theme/hooks/useKeyboardNavigation' {
@@ -241,21 +284,21 @@ declare module '@theme/hooks/useKeyboardNavigation' {
241
284
  declare module '@theme/Layout' {
242
285
  import type {ReactNode} from 'react';
243
286
 
244
- export type Props = {
245
- children: ReactNode;
246
- title?: string;
247
- noFooter?: boolean;
248
- description?: string;
249
- image?: string;
250
- keywords?: string | string[];
251
- permalink?: string;
252
- wrapperClassName?: string;
253
- pageClassName?: string;
254
- searchMetadatas?: {
255
- version?: string;
256
- tag?: string;
287
+ export interface Props {
288
+ readonly children: ReactNode;
289
+ readonly title?: string;
290
+ readonly noFooter?: boolean;
291
+ readonly description?: string;
292
+ readonly image?: string;
293
+ readonly keywords?: string | string[];
294
+ readonly permalink?: string;
295
+ readonly wrapperClassName?: string;
296
+ readonly pageClassName?: string;
297
+ readonly searchMetadatas?: {
298
+ readonly version?: string;
299
+ readonly tag?: string;
257
300
  };
258
- };
301
+ }
259
302
 
260
303
  const Layout: (props: Props) => JSX.Element;
261
304
  export default Layout;
@@ -264,29 +307,29 @@ declare module '@theme/Layout' {
264
307
  declare module '@theme/LayoutHead' {
265
308
  import type {Props as LayoutProps} from '@theme/Layout';
266
309
 
267
- export type Props = Omit<LayoutProps, 'children'>;
310
+ export interface Props extends Omit<LayoutProps, 'children'> {}
268
311
 
269
312
  const LayoutHead: (props: Props) => JSX.Element;
270
313
  export default LayoutHead;
271
314
  }
272
315
 
273
316
  declare module '@theme/SearchMetadatas' {
274
- export type Props = {
275
- locale?: string;
276
- version?: string;
277
- tag?: string;
278
- };
317
+ export interface Props {
318
+ readonly locale?: string;
319
+ readonly version?: string;
320
+ readonly tag?: string;
321
+ }
279
322
 
280
323
  const SearchMetadatas: (props: Props) => JSX.Element;
281
324
  export default SearchMetadatas;
282
325
  }
283
326
 
284
327
  declare module '@theme/LastUpdated' {
285
- export type Props = {
286
- lastUpdatedAt?: number;
287
- formattedLastUpdatedAt?: string;
288
- lastUpdatedBy?: string;
289
- };
328
+ export interface Props {
329
+ readonly lastUpdatedAt?: number;
330
+ readonly formattedLastUpdatedAt?: string;
331
+ readonly lastUpdatedBy?: string;
332
+ }
290
333
 
291
334
  const LastUpdated: (props: Props) => JSX.Element;
292
335
  export default LastUpdated;
@@ -300,11 +343,14 @@ declare module '@theme/SkipToContent' {
300
343
  declare module '@theme/MDXComponents' {
301
344
  import type {ComponentProps} from 'react';
302
345
  import type CodeBlock from '@theme/CodeBlock';
346
+ import type Head from '@docusaurus/Head';
303
347
 
304
348
  export type MDXComponentsObject = {
349
+ readonly head: typeof Head;
305
350
  readonly code: typeof CodeBlock;
306
351
  readonly a: (props: ComponentProps<'a'>) => JSX.Element;
307
352
  readonly pre: typeof CodeBlock;
353
+ readonly details: (props: ComponentProps<'details'>) => JSX.Element;
308
354
  readonly h1: (props: ComponentProps<'h1'>) => JSX.Element;
309
355
  readonly h2: (props: ComponentProps<'h2'>) => JSX.Element;
310
356
  readonly h3: (props: ComponentProps<'h3'>) => JSX.Element;
@@ -323,64 +369,83 @@ declare module '@theme/Navbar' {
323
369
  }
324
370
 
325
371
  declare module '@theme/NavbarItem/DefaultNavbarItem' {
326
- import type {ComponentProps, ReactNode} from 'react';
327
-
328
- export type NavLinkProps = {
329
- activeBasePath?: string;
330
- activeBaseRegex?: string;
331
- to?: string;
332
- exact?: boolean;
333
- href?: string;
334
- label?: ReactNode;
335
- activeClassName?: string;
336
- prependBaseUrlToHref?: string;
337
- isActive?: () => boolean;
338
- } & ComponentProps<'a'>;
372
+ import type {ReactNode} from 'react';
373
+ import type {LinkProps} from '@docusaurus/Link';
374
+
375
+ export type NavLinkProps = LinkProps & {
376
+ readonly activeBasePath?: string;
377
+ readonly activeBaseRegex?: string;
378
+ readonly exact?: boolean;
379
+ readonly label?: ReactNode;
380
+ readonly prependBaseUrlToHref?: string;
381
+ };
339
382
 
340
383
  export type DesktopOrMobileNavBarItemProps = NavLinkProps & {
341
- readonly items?: readonly NavLinkProps[];
342
- readonly position?: 'left' | 'right';
384
+ readonly isDropdownItem?: boolean;
343
385
  readonly className?: string;
386
+ readonly position?: 'left' | 'right';
344
387
  };
345
388
 
346
- export type Props = DesktopOrMobileNavBarItemProps & {
389
+ export interface Props extends DesktopOrMobileNavBarItemProps {
347
390
  readonly mobile?: boolean;
348
- };
391
+ }
392
+
393
+ export const NavLink: (props: NavLinkProps) => JSX.Element;
349
394
 
350
395
  const DefaultNavbarItem: (props: Props) => JSX.Element;
351
396
  export default DefaultNavbarItem;
352
397
  }
353
398
 
399
+ declare module '@theme/NavbarItem/DropdownNavbarItem' {
400
+ import type {NavLinkProps} from '@theme/NavbarItem/DefaultNavbarItem';
401
+ import type {LinkLikeNavbarItemProps} from '@theme/NavbarItem';
402
+
403
+ export type DesktopOrMobileNavBarItemProps = NavLinkProps & {
404
+ readonly position?: 'left' | 'right';
405
+ readonly items: readonly LinkLikeNavbarItemProps[];
406
+ readonly className?: string;
407
+ };
408
+
409
+ export interface Props extends DesktopOrMobileNavBarItemProps {
410
+ readonly mobile?: boolean;
411
+ }
412
+
413
+ const DropdownNavbarItem: (props: Props) => JSX.Element;
414
+ export default DropdownNavbarItem;
415
+ }
416
+
354
417
  declare module '@theme/NavbarItem/SearchNavbarItem' {
355
- export type Props = {readonly mobile?: boolean};
418
+ export interface Props {
419
+ readonly mobile?: boolean;
420
+ }
356
421
 
357
422
  const SearchNavbarItem: (props: Props) => JSX.Element;
358
423
  export default SearchNavbarItem;
359
424
  }
360
425
 
361
426
  declare module '@theme/NavbarItem/LocaleDropdownNavbarItem' {
362
- import type {Props as DefaultNavbarItemProps} from '@theme/NavbarItem/DefaultNavbarItem';
363
- import type {NavLinkProps} from '@theme/NavbarItem/DefaultNavbarItem';
427
+ import type {Props as DropdownNavbarItemProps} from '@theme/NavbarItem/DropdownNavbarItem';
428
+ import type {LinkLikeNavbarItemProps} from '@theme/NavbarItem';
364
429
 
365
- export type Props = DefaultNavbarItemProps & {
366
- readonly dropdownItemsBefore: NavLinkProps[];
367
- readonly dropdownItemsAfter: NavLinkProps[];
368
- };
430
+ export interface Props extends DropdownNavbarItemProps {
431
+ readonly dropdownItemsBefore: LinkLikeNavbarItemProps[];
432
+ readonly dropdownItemsAfter: LinkLikeNavbarItemProps[];
433
+ }
369
434
 
370
435
  const LocaleDropdownNavbarItem: (props: Props) => JSX.Element;
371
436
  export default LocaleDropdownNavbarItem;
372
437
  }
373
438
 
374
439
  declare module '@theme/NavbarItem/DocsVersionDropdownNavbarItem' {
375
- import type {Props as DefaultNavbarItemProps} from '@theme/NavbarItem/DefaultNavbarItem';
376
- import type {NavLinkProps} from '@theme/NavbarItem/DefaultNavbarItem';
440
+ import type {Props as DropdownNavbarItemProps} from '@theme/NavbarItem/DropdownNavbarItem';
441
+ import type {LinkLikeNavbarItemProps} from '@theme/NavbarItem';
377
442
 
378
- export type Props = DefaultNavbarItemProps & {
443
+ export interface Props extends DropdownNavbarItemProps {
379
444
  readonly docsPluginId?: string;
380
445
  readonly dropdownActiveClassDisabled?: boolean;
381
- readonly dropdownItemsBefore: NavLinkProps[];
382
- readonly dropdownItemsAfter: NavLinkProps[];
383
- };
446
+ readonly dropdownItemsBefore: LinkLikeNavbarItemProps[];
447
+ readonly dropdownItemsAfter: LinkLikeNavbarItemProps[];
448
+ }
384
449
 
385
450
  const DocsVersionDropdownNavbarItem: (props: Props) => JSX.Element;
386
451
  export default DocsVersionDropdownNavbarItem;
@@ -389,7 +454,9 @@ declare module '@theme/NavbarItem/DocsVersionDropdownNavbarItem' {
389
454
  declare module '@theme/NavbarItem/DocsVersionNavbarItem' {
390
455
  import type {Props as DefaultNavbarItemProps} from '@theme/NavbarItem/DefaultNavbarItem';
391
456
 
392
- export type Props = DefaultNavbarItemProps & {readonly docsPluginId?: string};
457
+ export interface Props extends DefaultNavbarItemProps {
458
+ readonly docsPluginId?: string;
459
+ }
393
460
 
394
461
  const DocsVersionNavbarItem: (props: Props) => JSX.Element;
395
462
  export default DocsVersionNavbarItem;
@@ -398,43 +465,65 @@ declare module '@theme/NavbarItem/DocsVersionNavbarItem' {
398
465
  declare module '@theme/NavbarItem/DocNavbarItem' {
399
466
  import type {Props as DefaultNavbarItemProps} from '@theme/NavbarItem/DefaultNavbarItem';
400
467
 
401
- export type Props = DefaultNavbarItemProps & {
468
+ export interface Props extends DefaultNavbarItemProps {
402
469
  readonly docId: string;
403
- readonly activeSidebarClassName: string;
404
470
  readonly docsPluginId?: string;
405
- };
471
+ }
406
472
 
407
473
  const DocsSidebarNavbarItem: (props: Props) => JSX.Element;
408
474
  export default DocsSidebarNavbarItem;
409
475
  }
410
476
 
411
477
  declare module '@theme/NavbarItem' {
478
+ import type {ComponentProps} from 'react';
412
479
  import type {Props as DefaultNavbarItemProps} from '@theme/NavbarItem/DefaultNavbarItem';
413
- import type {Props as DocsVersionDropdownNavbarItemProps} from '@theme/NavbarItem/DocsVersionDropdownNavbarItem';
480
+ import type {Props as DocNavbarItemProps} from '@theme/NavbarItem/DocNavbarItem';
414
481
  import type {Props as DocsVersionNavbarItemProps} from '@theme/NavbarItem/DocsVersionNavbarItem';
482
+ import type {Props as DropdownNavbarItemProps} from '@theme/NavbarItem/DropdownNavbarItem';
483
+ import type {Props as DocsVersionDropdownNavbarItemProps} from '@theme/NavbarItem/DocsVersionDropdownNavbarItem';
484
+ import type {Props as LocaleDropdownNavbarItemProps} from '@theme/NavbarItem/LocaleDropdownNavbarItem';
415
485
  import type {Props as SearchNavbarItemProps} from '@theme/NavbarItem/SearchNavbarItem';
416
486
 
417
- export type Props =
418
- | ({readonly type?: 'default' | undefined} & DefaultNavbarItemProps)
419
- | ({
420
- readonly type: 'docsVersionDropdown';
421
- } & DocsVersionDropdownNavbarItemProps)
422
- | ({readonly type: 'docsVersion'} & DocsVersionNavbarItemProps)
423
- | ({readonly type: 'search'} & SearchNavbarItemProps);
487
+ export type LinkLikeNavbarItemProps =
488
+ | ({readonly type?: 'default'} & DefaultNavbarItemProps)
489
+ | ({readonly type: 'doc'} & DocNavbarItemProps)
490
+ | ({readonly type: 'docsVersion'} & DocsVersionNavbarItemProps);
491
+
492
+ export type Props = ComponentProps<'a'> & {
493
+ readonly position?: 'left' | 'right';
494
+ } & (
495
+ | LinkLikeNavbarItemProps
496
+ | ({readonly type?: 'dropdown'} & DropdownNavbarItemProps)
497
+ | ({
498
+ readonly type: 'docsVersionDropdown';
499
+ } & DocsVersionDropdownNavbarItemProps)
500
+ | ({readonly type: 'localeDropdown'} & LocaleDropdownNavbarItemProps)
501
+ | ({
502
+ readonly type: 'search';
503
+ } & SearchNavbarItemProps)
504
+ );
505
+
506
+ export type Types = Props['type'];
424
507
 
425
508
  const NavbarItem: (props: Props) => JSX.Element;
426
509
  export default NavbarItem;
427
510
  }
428
511
 
512
+ declare module '@theme/SearchBar' {
513
+ export default function SearchBar(): JSX.Element;
514
+ }
515
+
429
516
  declare module '@theme/TabItem' {
430
517
  import type {ReactNode} from 'react';
431
518
 
432
- export type Props = {
519
+ export interface Props {
433
520
  readonly children: ReactNode;
434
521
  readonly value: string;
522
+ readonly default?: boolean;
523
+ readonly label?: string;
435
524
  readonly hidden?: boolean;
436
525
  readonly className?: string;
437
- };
526
+ }
438
527
 
439
528
  const TabItem: (props: Props) => JSX.Element;
440
529
  export default TabItem;
@@ -444,15 +533,15 @@ declare module '@theme/Tabs' {
444
533
  import type {ReactElement} from 'react';
445
534
  import type {Props as TabItemProps} from '@theme/TabItem';
446
535
 
447
- export type Props = {
536
+ export interface Props {
448
537
  readonly lazy?: boolean;
449
538
  readonly block?: boolean;
450
539
  readonly children: readonly ReactElement<TabItemProps>[];
451
- readonly defaultValue?: string;
452
- readonly values: readonly {value: string; label: string}[];
540
+ readonly defaultValue?: string | null;
541
+ readonly values?: readonly {value: string; label?: string}[];
453
542
  readonly groupId?: string;
454
543
  readonly className?: string;
455
- };
544
+ }
456
545
 
457
546
  const Tabs: (props: Props) => JSX.Element;
458
547
  export default Tabs;
@@ -461,33 +550,71 @@ declare module '@theme/Tabs' {
461
550
  declare module '@theme/ThemedImage' {
462
551
  import type {ComponentProps} from 'react';
463
552
 
464
- export type Props = {
553
+ export interface Props extends Omit<ComponentProps<'img'>, 'src'> {
465
554
  readonly sources: {
466
555
  readonly light: string;
467
556
  readonly dark: string;
468
557
  };
469
- } & Omit<ComponentProps<'img'>, 'src'>;
558
+ }
470
559
 
471
560
  const ThemedImage: (props: Props) => JSX.Element;
472
561
  export default ThemedImage;
473
562
  }
474
563
 
564
+ declare module '@theme/Details' {
565
+ import {Details, DetailsProps} from '@docusaurus/theme-common';
566
+
567
+ export interface Props extends DetailsProps {}
568
+ export default Details;
569
+ }
570
+
475
571
  declare module '@theme/ThemeProvider' {
476
572
  import type {ReactNode} from 'react';
477
573
 
478
- export type Props = {readonly children: ReactNode};
574
+ export interface Props {
575
+ readonly children: ReactNode;
576
+ }
479
577
 
480
578
  const ThemeProvider: (props: Props) => JSX.Element;
481
579
  export default ThemeProvider;
482
580
  }
483
581
 
582
+ declare module '@theme/TOCItems' {
583
+ import type {TOCItem} from '@docusaurus/types';
584
+
585
+ export type TOCItemsProps = {
586
+ readonly toc: readonly TOCItem[];
587
+ readonly minHeadingLevel?: number;
588
+ readonly maxHeadingLevel?: number;
589
+ readonly className?: string;
590
+ readonly linkClassName?: string | null;
591
+ readonly linkActiveClassName?: string;
592
+ };
593
+
594
+ export default function TOCItems(props: TOCItemsProps): JSX.Element;
595
+ }
596
+
484
597
  declare module '@theme/TOC' {
485
598
  import type {TOCItem} from '@docusaurus/types';
486
599
 
600
+ // minHeadingLevel only exists as a per-doc option,
601
+ // and won't have a default set by Joi. See TOC, TOCInline,
602
+ // TOCCollapsible for examples
487
603
  export type TOCProps = {
488
604
  readonly toc: readonly TOCItem[];
605
+ readonly minHeadingLevel?: number;
606
+ readonly maxHeadingLevel?: number;
607
+ readonly className?: string;
608
+ };
609
+
610
+ export type TOCHeadingsProps = {
611
+ readonly toc: readonly TOCItem[];
612
+ readonly minHeadingLevel?: number;
613
+ readonly maxHeadingLevel?: number;
489
614
  };
490
615
 
616
+ export const TOCHeadings: (props: TOCHeadingsProps) => JSX.Element;
617
+
491
618
  const TOC: (props: TOCProps) => JSX.Element;
492
619
  export default TOC;
493
620
  }
@@ -497,20 +624,36 @@ declare module '@theme/TOCInline' {
497
624
 
498
625
  export type TOCInlineProps = {
499
626
  readonly toc: readonly TOCItem[];
627
+ readonly minHeadingLevel?: number;
628
+ readonly maxHeadingLevel?: number;
500
629
  };
501
630
 
502
631
  const TOCInline: (props: TOCInlineProps) => JSX.Element;
503
632
  export default TOCInline;
504
633
  }
505
634
 
635
+ declare module '@theme/TOCCollapsible' {
636
+ import type {TOCItem} from '@docusaurus/types';
637
+
638
+ export type TOCCollapsibleProps = {
639
+ readonly className?: string;
640
+ readonly minHeadingLevel?: number;
641
+ readonly maxHeadingLevel?: number;
642
+ readonly toc: readonly TOCItem[];
643
+ };
644
+
645
+ const TOCCollapsible: (props: TOCCollapsibleProps) => JSX.Element;
646
+ export default TOCCollapsible;
647
+ }
648
+
506
649
  declare module '@theme/Toggle' {
507
650
  import type {SyntheticEvent} from 'react';
508
651
 
509
- export type Props = {
652
+ export interface Props {
510
653
  readonly className?: string;
511
654
  readonly checked: boolean;
512
655
  readonly onChange: (e: SyntheticEvent) => void;
513
- };
656
+ }
514
657
 
515
658
  const Toggle: (props: Props) => JSX.Element;
516
659
  export default Toggle;
@@ -519,7 +662,9 @@ declare module '@theme/Toggle' {
519
662
  declare module '@theme/UserPreferencesProvider' {
520
663
  import type {ReactNode} from 'react';
521
664
 
522
- export type Props = {readonly children: ReactNode};
665
+ export interface Props {
666
+ readonly children: ReactNode;
667
+ }
523
668
 
524
669
  const UserPreferencesProvider: (props: Props) => JSX.Element;
525
670
  export default UserPreferencesProvider;
@@ -528,7 +673,9 @@ declare module '@theme/UserPreferencesProvider' {
528
673
  declare module '@theme/LayoutProviders' {
529
674
  import type {ReactNode} from 'react';
530
675
 
531
- export type Props = {readonly children: ReactNode};
676
+ export interface Props {
677
+ readonly children: ReactNode;
678
+ }
532
679
 
533
680
  const LayoutProviders: (props: Props) => JSX.Element;
534
681
  export default LayoutProviders;
@@ -555,10 +702,10 @@ declare module '@theme/UserPreferencesContext' {
555
702
  declare module '@theme/Logo' {
556
703
  import type {ComponentProps} from 'react';
557
704
 
558
- export type Props = {
559
- imageClassName?: string;
560
- titleClassName?: string;
561
- } & ComponentProps<'a'>;
705
+ export interface Props extends ComponentProps<'a'> {
706
+ readonly imageClassName?: string;
707
+ readonly titleClassName?: string;
708
+ }
562
709
 
563
710
  const Logo: (props: Props) => JSX.Element;
564
711
  export default Logo;
@@ -567,7 +714,7 @@ declare module '@theme/Logo' {
567
714
  declare module '@theme/IconArrow' {
568
715
  import type {ComponentProps} from 'react';
569
716
 
570
- export type Props = ComponentProps<'svg'>;
717
+ export interface Props extends ComponentProps<'svg'> {}
571
718
 
572
719
  const IconArrow: (props: Props) => JSX.Element;
573
720
  export default IconArrow;
@@ -576,7 +723,7 @@ declare module '@theme/IconArrow' {
576
723
  declare module '@theme/IconEdit' {
577
724
  import type {ComponentProps} from 'react';
578
725
 
579
- export type Props = ComponentProps<'svg'>;
726
+ export interface Props extends ComponentProps<'svg'> {}
580
727
 
581
728
  const IconEdit: (props: Props) => JSX.Element;
582
729
  export default IconEdit;
@@ -585,16 +732,25 @@ declare module '@theme/IconEdit' {
585
732
  declare module '@theme/IconMenu' {
586
733
  import type {ComponentProps} from 'react';
587
734
 
588
- export type Props = ComponentProps<'svg'>;
735
+ export interface Props extends ComponentProps<'svg'> {}
589
736
 
590
737
  const IconMenu: (props: Props) => JSX.Element;
591
738
  export default IconMenu;
592
739
  }
593
740
 
741
+ declare module '@theme/IconClose' {
742
+ import type {ComponentProps} from 'react';
743
+
744
+ export interface Props extends ComponentProps<'svg'> {}
745
+
746
+ const IconClose: (props: Props) => JSX.Element;
747
+ export default IconClose;
748
+ }
749
+
594
750
  declare module '@theme/IconLanguage' {
595
751
  import type {ComponentProps} from 'react';
596
752
 
597
- export type Props = ComponentProps<'svg'>;
753
+ export interface Props extends ComponentProps<'svg'> {}
598
754
 
599
755
  const IconLanguage: (props: Props) => JSX.Element;
600
756
  export default IconLanguage;
@@ -603,8 +759,52 @@ declare module '@theme/IconLanguage' {
603
759
  declare module '@theme/IconExternalLink' {
604
760
  import type {ComponentProps} from 'react';
605
761
 
606
- export type Props = ComponentProps<'svg'>;
762
+ export interface Props extends ComponentProps<'svg'> {}
607
763
 
608
764
  const IconExternalLink: (props: Props) => JSX.Element;
609
765
  export default IconExternalLink;
610
766
  }
767
+
768
+ declare module '@theme/TagsListByLetter' {
769
+ export type TagsListItem = Readonly<{
770
+ name: string;
771
+ permalink: string;
772
+ count: number;
773
+ }>;
774
+ export interface Props {
775
+ readonly tags: readonly TagsListItem[];
776
+ }
777
+ export default function TagsListByLetter(props: Props): JSX.Element;
778
+ }
779
+
780
+ declare module '@theme/TagsListInline' {
781
+ export type Tag = Readonly<{label: string; permalink: string}>;
782
+ export interface Props {
783
+ readonly tags: readonly Tag[];
784
+ }
785
+ export default function TagsListInline(props: Props): JSX.Element;
786
+ }
787
+
788
+ declare module '@theme/Tag' {
789
+ import type {TagsListItem} from '@theme/TagsListByLetter';
790
+ import type {Optional} from 'utility-types';
791
+
792
+ export interface Props extends Optional<TagsListItem, 'count'> {}
793
+
794
+ export default function Tag(props: Props): JSX.Element;
795
+ }
796
+
797
+ declare module '@theme/prism-include-languages' {
798
+ import type * as PrismNamespace from 'prismjs';
799
+
800
+ export default function prismIncludeLanguages(
801
+ PrismObject: typeof PrismNamespace,
802
+ ): void;
803
+ }
804
+
805
+ declare module 'prism-react-renderer/prism' {
806
+ import type * as PrismNamespace from 'prismjs';
807
+
808
+ const Prism: typeof PrismNamespace;
809
+ export default Prism;
810
+ }