@docusaurus/theme-classic 2.0.0-beta.12faed89d → 2.0.0-beta.14

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