@docusaurus/theme-classic 2.0.0-beta.15a2b59f9 → 2.0.0-beta.17

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