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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (319) hide show
  1. package/lib/admonitions.css +4 -0
  2. package/lib/default.css +3038 -0
  3. package/lib/getSwizzleConfig.js +177 -36
  4. package/lib/index.js +10 -15
  5. package/lib/nprogress.css +41 -0
  6. package/lib/nprogress.js +46 -0
  7. package/lib/theme-classic.d.ts +600 -76
  8. package/lib/translations.js +12 -2
  9. package/lib/validateThemeConfig.js +77 -28
  10. package/lib-next/theme/BackToTopButton/index.js +6 -104
  11. package/lib-next/theme/BlogArchivePage/index.js +14 -10
  12. package/lib-next/theme/BlogLayout/index.js +1 -5
  13. package/lib-next/theme/BlogListPage/index.js +34 -13
  14. package/lib-next/theme/BlogListPaginator/index.js +25 -28
  15. package/lib-next/theme/BlogPostAuthor/index.js +16 -7
  16. package/lib-next/theme/BlogPostItem/index.js +6 -6
  17. package/lib-next/theme/BlogPostItem/styles.module.css +9 -0
  18. package/lib-next/theme/BlogPostPage/index.js +56 -45
  19. package/lib-next/theme/BlogPostPaginator/index.js +25 -28
  20. package/lib-next/theme/BlogSidebar/Desktop/index.js +41 -0
  21. package/lib-next/theme/BlogSidebar/{styles.module.css → Desktop/styles.module.css} +1 -2
  22. package/lib-next/theme/BlogSidebar/Mobile/index.js +36 -0
  23. package/lib-next/theme/BlogSidebar/index.js +11 -31
  24. package/lib-next/theme/BlogTagsListPage/index.js +17 -14
  25. package/lib-next/theme/BlogTagsPostsPage/index.js +43 -38
  26. package/lib-next/theme/CodeBlock/Container/index.js +29 -0
  27. package/lib-next/theme/CodeBlock/Container/styles.module.css +14 -0
  28. package/lib-next/theme/CodeBlock/Content/Element.js +23 -0
  29. package/lib-next/theme/CodeBlock/Content/String.js +104 -0
  30. package/lib-next/theme/CodeBlock/{styles.module.css → Content/styles.module.css} +39 -29
  31. package/lib-next/theme/CodeBlock/CopyButton/index.js +61 -0
  32. package/lib-next/theme/CodeBlock/CopyButton/styles.module.css +47 -0
  33. package/lib-next/theme/CodeBlock/Line/index.js +49 -0
  34. package/lib-next/theme/CodeBlock/Line/styles.module.css +51 -0
  35. package/lib-next/theme/CodeBlock/WordWrapButton/index.js +40 -0
  36. package/lib-next/theme/CodeBlock/WordWrapButton/styles.module.css +15 -0
  37. package/lib-next/theme/CodeBlock/index.js +26 -164
  38. package/lib-next/theme/ColorModeToggle/index.js +62 -0
  39. package/lib-next/theme/ColorModeToggle/styles.module.css +35 -0
  40. package/lib-next/theme/Details/index.js +1 -1
  41. package/lib-next/theme/DocBreadcrumbs/index.js +63 -19
  42. package/lib-next/theme/DocBreadcrumbs/styles.module.css +8 -15
  43. package/lib-next/theme/DocCard/index.js +17 -15
  44. package/lib-next/theme/DocCard/styles.module.css +8 -17
  45. package/lib-next/theme/DocCardList/index.js +20 -6
  46. package/lib-next/theme/DocCategoryGeneratedIndexPage/index.js +30 -9
  47. package/lib-next/theme/DocCategoryGeneratedIndexPage/styles.module.css +8 -0
  48. package/lib-next/theme/DocItem/index.js +85 -67
  49. package/lib-next/theme/DocItem/styles.module.css +6 -0
  50. package/lib-next/theme/DocPage/Layout/Main/index.js +29 -0
  51. package/lib-next/theme/DocPage/Layout/Main/styles.module.css +28 -0
  52. package/lib-next/theme/DocPage/Layout/Sidebar/ExpandButton/index.js +34 -0
  53. package/lib-next/theme/DocPage/Layout/Sidebar/ExpandButton/styles.module.css +33 -0
  54. package/lib-next/theme/DocPage/Layout/Sidebar/index.js +68 -0
  55. package/lib-next/theme/DocPage/Layout/Sidebar/index.module.css +32 -0
  56. package/lib-next/theme/DocPage/Layout/index.js +34 -0
  57. package/lib-next/theme/{BlogPostAuthor/styles.module.css → DocPage/Layout/index.module.css} +6 -3
  58. package/lib-next/theme/DocPage/index.js +30 -149
  59. package/lib-next/theme/DocPaginator/index.js +25 -28
  60. package/lib-next/theme/DocSidebar/Desktop/CollapseButton/index.js +34 -0
  61. package/lib-next/theme/DocSidebar/Desktop/CollapseButton/styles.module.css +46 -0
  62. package/lib-next/theme/DocSidebar/Desktop/Content/index.js +46 -0
  63. package/lib-next/theme/DocSidebar/Desktop/Content/styles.module.css +23 -0
  64. package/lib-next/theme/DocSidebar/Desktop/index.js +36 -0
  65. package/lib-next/theme/DocSidebar/Desktop/styles.module.css +50 -0
  66. package/lib-next/theme/DocSidebar/Mobile/index.js +49 -0
  67. package/lib-next/theme/DocSidebar/index.js +6 -113
  68. package/lib-next/theme/DocSidebarItem/Category.js +197 -0
  69. package/lib-next/theme/DocSidebarItem/Html.js +27 -0
  70. package/lib-next/theme/DocSidebarItem/{styles.module.css → Html.module.css} +0 -0
  71. package/lib-next/theme/DocSidebarItem/Link.js +53 -0
  72. package/lib-next/theme/DocSidebarItem/Link.module.css +10 -0
  73. package/lib-next/theme/DocSidebarItem/index.js +4 -245
  74. package/lib-next/theme/DocSidebarItems/index.js +1 -6
  75. package/lib-next/theme/DocTagDocListPage/index.js +40 -33
  76. package/lib-next/theme/DocTagsListPage/index.js +21 -16
  77. package/lib-next/theme/DocVersionBanner/index.js +2 -2
  78. package/lib-next/theme/Footer/Copyright/index.js +18 -0
  79. package/lib-next/theme/Footer/Layout/index.js +26 -0
  80. package/lib-next/theme/Footer/LinkItem/index.js +33 -0
  81. package/lib-next/theme/Footer/Links/MultiColumn/index.js +47 -0
  82. package/lib-next/theme/Footer/Links/Simple/index.js +41 -0
  83. package/lib-next/theme/Footer/Links/index.js +17 -0
  84. package/lib-next/theme/Footer/Logo/index.js +38 -0
  85. package/lib-next/theme/Footer/{styles.module.css → Logo/styles.module.css} +0 -0
  86. package/lib-next/theme/Footer/index.js +11 -163
  87. package/lib-next/theme/Heading/index.js +10 -24
  88. package/lib-next/theme/IconDarkMode/index.js +17 -0
  89. package/lib-next/theme/IconExternalLink/styles.module.css +0 -2
  90. package/lib-next/theme/IconHome/index.js +17 -0
  91. package/lib-next/theme/IconLanguage/index.js +3 -3
  92. package/lib-next/theme/IconLightMode/index.js +17 -0
  93. package/lib-next/theme/LastUpdated/index.js +1 -0
  94. package/lib-next/theme/Layout/index.js +15 -10
  95. package/lib-next/theme/LayoutProviders/index.js +5 -4
  96. package/lib-next/theme/MDXComponents/A.js +11 -0
  97. package/lib-next/theme/MDXComponents/Code.js +28 -0
  98. package/lib-next/theme/MDXComponents/Details.js +20 -0
  99. package/lib-next/theme/MDXComponents/Head.js +26 -0
  100. package/lib-next/theme/MDXComponents/Heading.js +11 -0
  101. package/lib-next/theme/MDXComponents/Img.js +24 -0
  102. package/{src/theme/MDXComponents/styles.css → lib-next/theme/MDXComponents/Img.module.css} +1 -6
  103. package/lib-next/theme/MDXComponents/Pre.js +18 -0
  104. package/lib-next/theme/MDXComponents/Ul.js +21 -0
  105. package/lib-next/theme/MDXComponents/index.js +22 -57
  106. package/lib-next/theme/MDXContent/index.js +12 -0
  107. package/lib-next/theme/MDXPage/index.js +33 -28
  108. package/lib-next/theme/Navbar/ColorModeToggle/index.js +25 -0
  109. package/lib-next/theme/Navbar/Content/index.js +75 -0
  110. package/lib-next/theme/Navbar/Content/styles.module.css +15 -0
  111. package/lib-next/theme/Navbar/Layout/index.js +54 -0
  112. package/{src/theme/Navbar → lib-next/theme/Navbar/Layout}/styles.module.css +0 -13
  113. package/lib-next/theme/Navbar/Logo/index.js +17 -0
  114. package/lib-next/theme/Navbar/MobileSidebar/Header/index.js +33 -0
  115. package/lib-next/theme/Navbar/MobileSidebar/Layout/index.js +28 -0
  116. package/lib-next/theme/Navbar/MobileSidebar/PrimaryMenu/index.js +33 -0
  117. package/lib-next/theme/Navbar/MobileSidebar/SecondaryMenu/index.js +36 -0
  118. package/lib-next/theme/Navbar/MobileSidebar/Toggle/index.js +23 -0
  119. package/lib-next/theme/Navbar/MobileSidebar/index.js +31 -0
  120. package/lib-next/theme/Navbar/Search/index.js +11 -0
  121. package/lib-next/theme/Navbar/Search/styles.module.css +20 -0
  122. package/lib-next/theme/Navbar/index.js +6 -271
  123. package/lib-next/theme/NavbarItem/ComponentTypes.js +27 -0
  124. package/lib-next/theme/NavbarItem/DefaultNavbarItem.js +2 -6
  125. package/lib-next/theme/NavbarItem/DocNavbarItem.js +11 -28
  126. package/lib-next/theme/NavbarItem/DocSidebarNavbarItem.js +10 -42
  127. package/lib-next/theme/NavbarItem/DocsVersionDropdownNavbarItem.js +25 -29
  128. package/lib-next/theme/NavbarItem/DocsVersionNavbarItem.js +2 -9
  129. package/lib-next/theme/NavbarItem/DropdownNavbarItem.js +14 -3
  130. package/lib-next/theme/NavbarItem/HtmlNavbarItem.js +30 -0
  131. package/lib-next/theme/NavbarItem/LocaleDropdownNavbarItem/index.js +5 -10
  132. package/lib-next/theme/NavbarItem/NavbarNavLink.js +49 -35
  133. package/lib-next/theme/NavbarItem/SearchNavbarItem.js +6 -1
  134. package/lib-next/theme/NavbarItem/index.js +4 -23
  135. package/lib-next/theme/NavbarItem/utils.js +2 -1
  136. package/lib-next/theme/NotFound.js +38 -33
  137. package/lib-next/theme/PaginatorNavLink/index.js +8 -2
  138. package/lib-next/theme/SearchMetadata/index.js +9 -0
  139. package/lib-next/theme/{LayoutHead → SiteMetadata}/index.js +19 -33
  140. package/lib-next/theme/SkipToContent/index.js +3 -29
  141. package/lib-next/theme/TOCCollapsible/CollapseButton.js +29 -0
  142. package/{src/theme/TOCCollapsible/styles.module.css → lib-next/theme/TOCCollapsible/CollapseButton.module.css} +1 -22
  143. package/lib-next/theme/TOCCollapsible/index.js +4 -16
  144. package/lib-next/theme/TOCCollapsible/index.module.css +31 -0
  145. package/lib-next/theme/TOCItems/Tree.js +40 -0
  146. package/lib-next/theme/TOCItems/index.js +3 -34
  147. package/lib-next/theme/TabItem/index.js +3 -1
  148. package/lib-next/theme/TabItem/styles.module.css +10 -0
  149. package/lib-next/theme/Tabs/__tests__/index.test.js +8 -8
  150. package/lib-next/theme/Tabs/index.js +5 -5
  151. package/lib-next/theme/Tabs/styles.module.css +4 -0
  152. package/lib-next/theme/Tag/index.js +6 -7
  153. package/lib-next/theme/TagsListInline/index.js +1 -1
  154. package/lib-next/theme/ThemedImage/index.js +3 -3
  155. package/package.json +25 -20
  156. package/src/admonitions.css +4 -0
  157. package/src/getSwizzleConfig.ts +173 -22
  158. package/src/index.ts +14 -15
  159. package/src/nprogress.css +41 -0
  160. package/src/nprogress.ts +31 -0
  161. package/src/theme/BackToTopButton/index.tsx +5 -114
  162. package/src/theme/BlogArchivePage/index.tsx +18 -17
  163. package/src/theme/BlogLayout/index.tsx +1 -5
  164. package/src/theme/BlogListPage/index.tsx +32 -13
  165. package/src/theme/BlogListPaginator/index.tsx +25 -28
  166. package/src/theme/BlogPostAuthor/index.tsx +14 -8
  167. package/src/theme/BlogPostItem/index.tsx +6 -6
  168. package/src/theme/BlogPostItem/styles.module.css +9 -0
  169. package/src/theme/BlogPostPage/index.tsx +55 -48
  170. package/src/theme/BlogPostPaginator/index.tsx +25 -28
  171. package/src/theme/BlogSidebar/Desktop/index.tsx +45 -0
  172. package/src/theme/BlogSidebar/{styles.module.css → Desktop/styles.module.css} +1 -2
  173. package/src/theme/BlogSidebar/Mobile/index.tsx +38 -0
  174. package/src/theme/BlogSidebar/index.tsx +10 -31
  175. package/src/theme/BlogTagsListPage/index.tsx +17 -14
  176. package/src/theme/BlogTagsPostsPage/index.tsx +46 -36
  177. package/src/theme/CodeBlock/Container/index.tsx +35 -0
  178. package/src/theme/CodeBlock/Container/styles.module.css +14 -0
  179. package/src/theme/CodeBlock/Content/Element.tsx +30 -0
  180. package/src/theme/CodeBlock/Content/String.tsx +111 -0
  181. package/src/theme/CodeBlock/{styles.module.css → Content/styles.module.css} +39 -29
  182. package/src/theme/CodeBlock/CopyButton/index.tsx +67 -0
  183. package/src/theme/CodeBlock/CopyButton/styles.module.css +47 -0
  184. package/src/theme/CodeBlock/Line/index.tsx +48 -0
  185. package/src/theme/CodeBlock/Line/styles.module.css +51 -0
  186. package/src/theme/CodeBlock/WordWrapButton/index.tsx +49 -0
  187. package/src/theme/CodeBlock/WordWrapButton/styles.module.css +15 -0
  188. package/src/theme/CodeBlock/index.tsx +29 -165
  189. package/src/theme/ColorModeToggle/index.tsx +67 -0
  190. package/src/theme/ColorModeToggle/styles.module.css +35 -0
  191. package/src/theme/Details/index.tsx +1 -1
  192. package/src/theme/DocBreadcrumbs/index.tsx +65 -16
  193. package/src/theme/DocBreadcrumbs/styles.module.css +8 -15
  194. package/src/theme/DocCard/index.tsx +24 -17
  195. package/src/theme/DocCard/styles.module.css +8 -17
  196. package/src/theme/DocCardList/index.tsx +19 -10
  197. package/src/theme/DocCategoryGeneratedIndexPage/index.tsx +34 -7
  198. package/src/theme/DocCategoryGeneratedIndexPage/styles.module.css +8 -0
  199. package/src/theme/DocItem/index.tsx +72 -56
  200. package/src/theme/DocItem/styles.module.css +6 -0
  201. package/src/theme/DocPage/Layout/Main/index.tsx +37 -0
  202. package/src/theme/DocPage/Layout/Main/styles.module.css +28 -0
  203. package/src/theme/DocPage/Layout/Sidebar/ExpandButton/index.tsx +40 -0
  204. package/src/theme/DocPage/Layout/Sidebar/ExpandButton/styles.module.css +33 -0
  205. package/src/theme/DocPage/Layout/Sidebar/index.module.css +32 -0
  206. package/src/theme/DocPage/Layout/Sidebar/index.tsx +74 -0
  207. package/src/theme/{BlogPostAuthor/styles.module.css → DocPage/Layout/index.module.css} +6 -3
  208. package/src/theme/DocPage/Layout/index.tsx +39 -0
  209. package/src/theme/DocPage/index.tsx +30 -160
  210. package/src/theme/DocPaginator/index.tsx +25 -28
  211. package/src/theme/DocSidebar/Desktop/CollapseButton/index.tsx +38 -0
  212. package/src/theme/DocSidebar/Desktop/CollapseButton/styles.module.css +46 -0
  213. package/src/theme/DocSidebar/Desktop/Content/index.tsx +55 -0
  214. package/src/theme/DocSidebar/Desktop/Content/styles.module.css +23 -0
  215. package/src/theme/DocSidebar/Desktop/index.tsx +40 -0
  216. package/src/theme/DocSidebar/Desktop/styles.module.css +50 -0
  217. package/src/theme/DocSidebar/Mobile/index.tsx +54 -0
  218. package/src/theme/DocSidebar/index.tsx +6 -121
  219. package/src/theme/DocSidebarItem/Category.tsx +210 -0
  220. package/src/theme/DocSidebarItem/{styles.module.css → Html.module.css} +0 -0
  221. package/src/theme/DocSidebarItem/Html.tsx +34 -0
  222. package/src/theme/DocSidebarItem/Link.module.css +10 -0
  223. package/src/theme/DocSidebarItem/Link.tsx +58 -0
  224. package/src/theme/DocSidebarItem/index.tsx +4 -260
  225. package/src/theme/DocSidebarItems/index.tsx +1 -6
  226. package/src/theme/DocTagDocListPage/index.tsx +40 -33
  227. package/src/theme/DocTagsListPage/index.tsx +21 -16
  228. package/src/theme/DocVersionBanner/index.tsx +5 -6
  229. package/src/theme/Footer/Copyright/index.tsx +20 -0
  230. package/src/theme/Footer/Layout/index.tsx +34 -0
  231. package/src/theme/Footer/LinkItem/index.tsx +36 -0
  232. package/src/theme/Footer/Links/MultiColumn/index.tsx +51 -0
  233. package/src/theme/Footer/Links/Simple/index.tsx +42 -0
  234. package/src/theme/Footer/Links/index.tsx +21 -0
  235. package/src/theme/Footer/Logo/index.tsx +41 -0
  236. package/src/theme/Footer/{styles.module.css → Logo/styles.module.css} +0 -0
  237. package/src/theme/Footer/index.tsx +12 -186
  238. package/src/theme/Heading/index.tsx +10 -22
  239. package/src/theme/IconDarkMode/index.tsx +20 -0
  240. package/src/theme/IconExternalLink/styles.module.css +0 -2
  241. package/src/theme/IconHome/index.tsx +20 -0
  242. package/src/theme/IconLanguage/index.tsx +3 -3
  243. package/src/theme/IconLightMode/index.tsx +20 -0
  244. package/src/theme/LastUpdated/index.tsx +1 -0
  245. package/src/theme/Layout/index.tsx +15 -10
  246. package/src/theme/LayoutProviders/index.tsx +5 -4
  247. package/src/theme/MDXComponents/A.tsx +14 -0
  248. package/src/theme/MDXComponents/Code.tsx +37 -0
  249. package/src/theme/MDXComponents/Details.tsx +25 -0
  250. package/src/theme/MDXComponents/Head.tsx +29 -0
  251. package/src/theme/MDXComponents/Heading.tsx +14 -0
  252. package/{lib-next/theme/MDXComponents/styles.css → src/theme/MDXComponents/Img.module.css} +1 -6
  253. package/src/theme/MDXComponents/Img.tsx +26 -0
  254. package/src/theme/MDXComponents/Pre.tsx +22 -0
  255. package/src/theme/MDXComponents/Ul.tsx +24 -0
  256. package/src/theme/MDXComponents/index.tsx +23 -66
  257. package/src/theme/MDXContent/index.tsx +15 -0
  258. package/src/theme/MDXPage/index.tsx +33 -28
  259. package/src/theme/Navbar/ColorModeToggle/index.tsx +30 -0
  260. package/src/theme/Navbar/Content/index.tsx +86 -0
  261. package/src/theme/Navbar/Content/styles.module.css +15 -0
  262. package/src/theme/Navbar/Layout/index.tsx +57 -0
  263. package/{lib-next/theme/Navbar → src/theme/Navbar/Layout}/styles.module.css +0 -13
  264. package/src/theme/Navbar/Logo/index.tsx +19 -0
  265. package/src/theme/Navbar/MobileSidebar/Header/index.tsx +34 -0
  266. package/src/theme/Navbar/MobileSidebar/Layout/index.tsx +31 -0
  267. package/src/theme/Navbar/MobileSidebar/PrimaryMenu/index.tsx +38 -0
  268. package/src/theme/Navbar/MobileSidebar/SecondaryMenu/index.tsx +38 -0
  269. package/src/theme/Navbar/MobileSidebar/Toggle/index.tsx +25 -0
  270. package/src/theme/Navbar/MobileSidebar/index.tsx +33 -0
  271. package/src/theme/Navbar/Search/index.tsx +15 -0
  272. package/src/theme/Navbar/Search/styles.module.css +20 -0
  273. package/src/theme/Navbar/index.tsx +6 -286
  274. package/src/theme/NavbarItem/ComponentTypes.tsx +32 -0
  275. package/src/theme/NavbarItem/DefaultNavbarItem.tsx +2 -2
  276. package/src/theme/NavbarItem/DocNavbarItem.tsx +13 -32
  277. package/src/theme/NavbarItem/DocSidebarNavbarItem.tsx +9 -49
  278. package/src/theme/NavbarItem/DocsVersionDropdownNavbarItem.tsx +26 -33
  279. package/src/theme/NavbarItem/DocsVersionNavbarItem.tsx +3 -10
  280. package/src/theme/NavbarItem/DropdownNavbarItem.tsx +15 -3
  281. package/src/theme/NavbarItem/HtmlNavbarItem.tsx +32 -0
  282. package/src/theme/NavbarItem/LocaleDropdownNavbarItem/index.tsx +5 -9
  283. package/src/theme/NavbarItem/NavbarNavLink.tsx +41 -29
  284. package/src/theme/NavbarItem/SearchNavbarItem.tsx +6 -1
  285. package/src/theme/NavbarItem/index.tsx +9 -39
  286. package/src/theme/NavbarItem/utils.ts +5 -2
  287. package/src/theme/NotFound.tsx +38 -33
  288. package/src/theme/PaginatorNavLink/index.tsx +8 -2
  289. package/src/theme/SearchMetadata/index.tsx +9 -0
  290. package/src/theme/{LayoutHead → SiteMetadata}/index.tsx +19 -33
  291. package/src/theme/SkipToContent/index.tsx +3 -29
  292. package/{lib-next/theme/TOCCollapsible/styles.module.css → src/theme/TOCCollapsible/CollapseButton.module.css} +1 -22
  293. package/src/theme/TOCCollapsible/CollapseButton.tsx +35 -0
  294. package/src/theme/TOCCollapsible/index.module.css +31 -0
  295. package/src/theme/TOCCollapsible/index.tsx +4 -17
  296. package/src/theme/TOCItems/Tree.tsx +46 -0
  297. package/src/theme/TOCItems/index.tsx +2 -41
  298. package/src/theme/TabItem/index.tsx +7 -1
  299. package/src/theme/TabItem/styles.module.css +10 -0
  300. package/src/theme/Tabs/index.tsx +8 -9
  301. package/src/theme/Tabs/styles.module.css +4 -0
  302. package/src/theme/Tag/index.tsx +6 -8
  303. package/src/theme/TagsListInline/index.tsx +1 -1
  304. package/src/theme/ThemedImage/index.tsx +4 -3
  305. package/src/theme-classic.d.ts +600 -76
  306. package/src/translations.ts +12 -6
  307. package/src/validateThemeConfig.ts +90 -39
  308. package/lib/types.d.ts +0 -11
  309. package/lib-next/theme/DocPage/styles.module.css +0 -86
  310. package/lib-next/theme/DocSidebar/styles.module.css +0 -107
  311. package/lib-next/theme/Seo/index.js +0 -40
  312. package/lib-next/theme/Toggle/index.js +0 -100
  313. package/lib-next/theme/Toggle/styles.module.css +0 -106
  314. package/src/theme/DocPage/styles.module.css +0 -86
  315. package/src/theme/DocSidebar/styles.module.css +0 -107
  316. package/src/theme/Seo/index.tsx +0 -49
  317. package/src/theme/Toggle/index.tsx +0 -117
  318. package/src/theme/Toggle/styles.module.css +0 -106
  319. package/src/types.d.ts +0 -11
@@ -5,10 +5,32 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
+ /* eslint-disable @typescript-eslint/triple-slash-reference */
9
+
10
+ /// <reference types="@docusaurus/module-type-aliases" />
11
+ /// <reference types="@docusaurus/plugin-content-docs" />
12
+ /// <reference types="@docusaurus/plugin-content-blog" />
13
+ /// <reference types="@docusaurus/plugin-content-pages" />
14
+
15
+ // This file, like all the other ambient declaration files for plugins, is
16
+ // needed for TS to understand our `@theme` alias. The export signatures are
17
+ // duplicated from the implementation, which is fine, since every module only
18
+ // default-exports a React component.
19
+ // TODO we'll eventually migrate to TS `paths` option. This is not easy due to
20
+ // our theme shadowing—we probably need the user to specify multiple theme paths
21
+ // in their tsconfig.
22
+
8
23
  declare module '@docusaurus/theme-classic' {
24
+ import type {LoadContext, Plugin} from '@docusaurus/types';
25
+
9
26
  export type Options = {
10
27
  customCss?: string | string[];
11
28
  };
29
+
30
+ export default function themeClassic(
31
+ context: LoadContext,
32
+ options: Options,
33
+ ): Plugin<undefined>;
12
34
  }
13
35
 
14
36
  declare module '@theme/Admonition' {
@@ -32,25 +54,41 @@ declare module '@theme/BackToTopButton' {
32
54
  }
33
55
 
34
56
  declare module '@theme/BlogListPaginator' {
35
- import type {Metadata} from '@theme/BlogListPage';
57
+ import type {BlogPaginatedMetadata} from '@docusaurus/plugin-content-blog';
36
58
 
37
59
  export interface Props {
38
- readonly metadata: Metadata;
60
+ readonly metadata: BlogPaginatedMetadata;
39
61
  }
40
62
  export default function BlogListPaginator(props: Props): JSX.Element;
41
63
  }
42
64
 
43
- declare module '@theme/BlogSidebar' {
44
- export type BlogSidebarItem = {title: string; permalink: string};
45
- export type BlogSidebar = {
46
- title: string;
47
- items: BlogSidebarItem[];
48
- };
65
+ declare module '@theme/BlogSidebar/Desktop' {
66
+ import type {BlogSidebar} from '@docusaurus/plugin-content-blog';
49
67
 
50
68
  export interface Props {
51
69
  readonly sidebar: BlogSidebar;
52
70
  }
53
71
 
72
+ export default function BlogSidebarDesktop(props: Props): JSX.Element;
73
+ }
74
+
75
+ declare module '@theme/BlogSidebar/Mobile' {
76
+ import type {BlogSidebar} from '@docusaurus/plugin-content-blog';
77
+
78
+ export interface Props {
79
+ readonly sidebar: BlogSidebar;
80
+ }
81
+
82
+ export default function BlogSidebarMobile(props: Props): JSX.Element;
83
+ }
84
+
85
+ declare module '@theme/BlogSidebar' {
86
+ import type {BlogSidebar} from '@docusaurus/plugin-content-blog';
87
+
88
+ export interface Props {
89
+ readonly sidebar?: BlogSidebar;
90
+ }
91
+
54
92
  export default function BlogSidebar(props: Props): JSX.Element;
55
93
  }
56
94
 
@@ -106,7 +144,7 @@ declare module '@theme/BlogPostPaginator' {
106
144
  declare module '@theme/BlogLayout' {
107
145
  import type {ReactNode} from 'react';
108
146
  import type {Props as LayoutProps} from '@theme/Layout';
109
- import type {BlogSidebar} from '@theme/BlogSidebar';
147
+ import type {BlogSidebar} from '@docusaurus/plugin-content-blog';
110
148
 
111
149
  export interface Props extends LayoutProps {
112
150
  readonly sidebar?: BlogSidebar;
@@ -117,19 +155,89 @@ declare module '@theme/BlogLayout' {
117
155
  }
118
156
 
119
157
  declare module '@theme/CodeBlock' {
120
- import type {ReactElement} from 'react';
158
+ import type {ReactNode} from 'react';
121
159
 
122
160
  export interface Props {
123
- readonly children: string | ReactElement;
161
+ readonly children: ReactNode;
124
162
  readonly className?: string;
125
163
  readonly metastring?: string;
126
164
  readonly title?: string;
127
165
  readonly language?: string;
166
+ readonly showLineNumbers?: boolean;
128
167
  }
129
168
 
130
169
  export default function CodeBlock(props: Props): JSX.Element;
131
170
  }
132
171
 
172
+ declare module '@theme/CodeBlock/CopyButton' {
173
+ export interface Props {
174
+ readonly code: string;
175
+ readonly className?: string;
176
+ }
177
+
178
+ export default function CopyButton(props: Props): JSX.Element;
179
+ }
180
+
181
+ declare module '@theme/CodeBlock/Container' {
182
+ import type {ComponentProps} from 'react';
183
+
184
+ export default function CodeBlockContainer<T extends 'div' | 'pre'>({
185
+ as: As,
186
+ ...props
187
+ }: {as: T} & ComponentProps<T>): JSX.Element;
188
+ }
189
+
190
+ declare module '@theme/CodeBlock/Content/Element' {
191
+ import type {Props} from '@theme/CodeBlock';
192
+
193
+ export type {Props};
194
+
195
+ export default function CodeBlockElementContent(props: Props): JSX.Element;
196
+ }
197
+
198
+ declare module '@theme/CodeBlock/Content/String' {
199
+ import type {Props as CodeBlockProps} from '@theme/CodeBlock';
200
+
201
+ export interface Props extends Omit<CodeBlockProps, 'children'> {
202
+ readonly children: string;
203
+ }
204
+
205
+ export default function CodeBlockStringContent(props: Props): JSX.Element;
206
+ }
207
+
208
+ declare module '@theme/CodeBlock/Line' {
209
+ import type {ComponentProps} from 'react';
210
+ import type Highlight from 'prism-react-renderer';
211
+
212
+ // Lib does not make this easy
213
+ type RenderProps = Parameters<
214
+ ComponentProps<typeof Highlight>['children']
215
+ >[0];
216
+ type GetLineProps = RenderProps['getLineProps'];
217
+ type GetTokenProps = RenderProps['getTokenProps'];
218
+ type Token = RenderProps['tokens'][number][number];
219
+
220
+ export interface Props {
221
+ readonly line: Token[];
222
+ readonly classNames: string[] | undefined;
223
+ readonly showLineNumbers: boolean;
224
+ readonly getLineProps: GetLineProps;
225
+ readonly getTokenProps: GetTokenProps;
226
+ }
227
+
228
+ export default function CodeBlockLine(props: Props): JSX.Element;
229
+ }
230
+
231
+ declare module '@theme/CodeBlock/WordWrapButton' {
232
+ export interface Props {
233
+ readonly className?: string;
234
+ readonly onClick: React.MouseEventHandler;
235
+ readonly isEnabled: boolean;
236
+ }
237
+
238
+ export default function WordWrapButton(props: Props): JSX.Element;
239
+ }
240
+
133
241
  declare module '@theme/DocCard' {
134
242
  import type {PropSidebarItem} from '@docusaurus/plugin-content-docs';
135
243
 
@@ -145,6 +253,7 @@ declare module '@theme/DocCardList' {
145
253
 
146
254
  export interface Props {
147
255
  readonly items: PropSidebarItem[];
256
+ readonly className?: string;
148
257
  }
149
258
 
150
259
  export default function DocCardList(props: Props): JSX.Element;
@@ -156,6 +265,50 @@ declare module '@theme/DocItemFooter' {
156
265
  export default function DocItemFooter(props: Props): JSX.Element;
157
266
  }
158
267
 
268
+ declare module '@theme/DocPage/Layout' {
269
+ import type {ReactNode} from 'react';
270
+
271
+ export interface Props {
272
+ readonly children: ReactNode;
273
+ }
274
+
275
+ export default function DocPageLayout(props: Props): JSX.Element;
276
+ }
277
+
278
+ declare module '@theme/DocPage/Layout/Sidebar' {
279
+ import type {Dispatch, SetStateAction} from 'react';
280
+ import type {PropSidebar} from '@docusaurus/plugin-content-docs';
281
+
282
+ export interface Props {
283
+ readonly sidebar: PropSidebar;
284
+ readonly hiddenSidebarContainer: boolean;
285
+ readonly setHiddenSidebarContainer: Dispatch<SetStateAction<boolean>>;
286
+ }
287
+
288
+ export default function DocPageLayoutSidebar(props: Props): JSX.Element;
289
+ }
290
+
291
+ declare module '@theme/DocPage/Layout/Sidebar/ExpandButton' {
292
+ export interface Props {
293
+ toggleSidebar: () => void;
294
+ }
295
+
296
+ export default function DocPageLayoutSidebarExpandButton(
297
+ props: Props,
298
+ ): JSX.Element;
299
+ }
300
+
301
+ declare module '@theme/DocPage/Layout/Main' {
302
+ import type {ReactNode} from 'react';
303
+
304
+ export interface Props {
305
+ readonly hiddenSidebarContainer: boolean;
306
+ readonly children: ReactNode;
307
+ }
308
+
309
+ export default function DocPageLayoutMain(props: Props): JSX.Element;
310
+ }
311
+
159
312
  declare module '@theme/DocPaginator' {
160
313
  import type {PropNavigation} from '@docusaurus/plugin-content-docs';
161
314
 
@@ -180,6 +333,42 @@ declare module '@theme/DocSidebar' {
180
333
  export default function DocSidebar(props: Props): JSX.Element;
181
334
  }
182
335
 
336
+ declare module '@theme/DocSidebar/Mobile' {
337
+ import type {Props as DocSidebarProps} from '@theme/DocSidebar';
338
+
339
+ export interface Props extends DocSidebarProps {}
340
+
341
+ export default function DocSidebarMobile(props: Props): JSX.Element;
342
+ }
343
+
344
+ declare module '@theme/DocSidebar/Desktop' {
345
+ import type {Props as DocSidebarProps} from '@theme/DocSidebar';
346
+
347
+ export interface Props extends DocSidebarProps {}
348
+
349
+ export default function DocSidebarDesktop(props: Props): JSX.Element;
350
+ }
351
+
352
+ declare module '@theme/DocSidebar/Desktop/Content' {
353
+ import type {PropSidebarItem} from '@docusaurus/plugin-content-docs';
354
+
355
+ export interface Props {
356
+ readonly className?: string;
357
+ readonly path: string;
358
+ readonly sidebar: readonly PropSidebarItem[];
359
+ }
360
+
361
+ export default function Content(props: Props): JSX.Element;
362
+ }
363
+
364
+ declare module '@theme/DocSidebar/Desktop/CollapseButton' {
365
+ export interface Props {
366
+ readonly onClick: React.MouseEventHandler;
367
+ }
368
+
369
+ export default function CollapseButton(props: Props): JSX.Element;
370
+ }
371
+
183
372
  declare module '@theme/DocSidebarItem' {
184
373
  import type {PropSidebarItem} from '@docusaurus/plugin-content-docs';
185
374
 
@@ -195,6 +384,40 @@ declare module '@theme/DocSidebarItem' {
195
384
  export default function DocSidebarItem(props: Props): JSX.Element;
196
385
  }
197
386
 
387
+ declare module '@theme/DocSidebarItem/Link' {
388
+ import type {Props as DocSidebarItemProps} from '@theme/DocSidebarItem';
389
+
390
+ import type {PropSidebarItemLink} from '@docusaurus/plugin-content-docs';
391
+
392
+ export interface Props extends DocSidebarItemProps {
393
+ readonly item: PropSidebarItemLink;
394
+ }
395
+
396
+ export default function DocSidebarItemLink(props: Props): JSX.Element;
397
+ }
398
+
399
+ declare module '@theme/DocSidebarItem/Html' {
400
+ import type {Props as DocSidebarItemProps} from '@theme/DocSidebarItem';
401
+ import type {PropSidebarItemHtml} from '@docusaurus/plugin-content-docs';
402
+
403
+ export interface Props extends DocSidebarItemProps {
404
+ readonly item: PropSidebarItemHtml;
405
+ }
406
+
407
+ export default function DocSidebarItemHtml(props: Props): JSX.Element;
408
+ }
409
+
410
+ declare module '@theme/DocSidebarItem/Category' {
411
+ import type {Props as DocSidebarItemProps} from '@theme/DocSidebarItem';
412
+ import type {PropSidebarItemCategory} from '@docusaurus/plugin-content-docs';
413
+
414
+ export interface Props extends DocSidebarItemProps {
415
+ readonly item: PropSidebarItemCategory;
416
+ }
417
+
418
+ export default function DocSidebarItemCategory(props: Props): JSX.Element;
419
+ }
420
+
198
421
  declare module '@theme/DocSidebarItems' {
199
422
  import type {Props as DocSidebarItemProps} from '@theme/DocSidebarItem';
200
423
  import type {PropSidebarItem} from '@docusaurus/plugin-content-docs';
@@ -244,13 +467,84 @@ declare module '@theme/Footer' {
244
467
  export default function Footer(): JSX.Element | null;
245
468
  }
246
469
 
470
+ declare module '@theme/Footer/Logo' {
471
+ import type {FooterLogo} from '@docusaurus/theme-common';
472
+
473
+ export interface Props {
474
+ readonly logo: FooterLogo;
475
+ }
476
+
477
+ export default function FooterLogo(props: Props): JSX.Element;
478
+ }
479
+
480
+ declare module '@theme/Footer/Copyright' {
481
+ export interface Props {
482
+ readonly copyright: string;
483
+ }
484
+
485
+ export default function FooterCopyright(props: Props): JSX.Element;
486
+ }
487
+
488
+ declare module '@theme/Footer/LinkItem' {
489
+ import type {FooterLinkItem} from '@docusaurus/theme-common';
490
+
491
+ export interface Props {
492
+ readonly item: FooterLinkItem;
493
+ }
494
+
495
+ export default function FooterLinkItem(props: Props): JSX.Element;
496
+ }
497
+
498
+ declare module '@theme/Footer/Layout' {
499
+ import type {ReactNode} from 'react';
500
+
501
+ export interface Props {
502
+ readonly style: 'light' | 'dark';
503
+ readonly links: ReactNode;
504
+ readonly logo: ReactNode;
505
+ readonly copyright: ReactNode;
506
+ }
507
+
508
+ export default function FooterLayout(props: Props): JSX.Element;
509
+ }
510
+
511
+ declare module '@theme/Footer/Links' {
512
+ import type {Footer} from '@docusaurus/theme-common';
513
+
514
+ export interface Props {
515
+ readonly links: Footer['links'];
516
+ }
517
+
518
+ export default function FooterLinks(props: Props): JSX.Element;
519
+ }
520
+
521
+ declare module '@theme/Footer/Links/MultiColumn' {
522
+ import type {MultiColumnFooter} from '@docusaurus/theme-common';
523
+
524
+ export interface Props {
525
+ readonly columns: MultiColumnFooter['links'];
526
+ }
527
+
528
+ export default function FooterLinksMultiColumn(props: Props): JSX.Element;
529
+ }
530
+
531
+ declare module '@theme/Footer/Links/Simple' {
532
+ import type {SimpleFooter} from '@docusaurus/theme-common';
533
+
534
+ export interface Props {
535
+ readonly links: SimpleFooter['links'];
536
+ }
537
+
538
+ export default function FooterLinksSimple(props: Props): JSX.Element;
539
+ }
540
+
247
541
  declare module '@theme/Heading' {
248
542
  import type {ComponentProps} from 'react';
249
543
 
250
544
  type HeadingType = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
251
545
 
252
546
  export interface Props extends ComponentProps<HeadingType> {
253
- as: HeadingType;
547
+ readonly as: HeadingType;
254
548
  }
255
549
 
256
550
  export default function Heading(props: Props): JSX.Element;
@@ -261,31 +555,17 @@ declare module '@theme/Layout' {
261
555
 
262
556
  export interface Props {
263
557
  readonly children?: ReactNode;
264
- readonly title?: string;
265
558
  readonly noFooter?: boolean;
266
- readonly description?: string;
267
- readonly image?: string;
268
- readonly keywords?: string | string[];
269
- readonly permalink?: string;
270
559
  readonly wrapperClassName?: string;
271
- readonly pageClassName?: string;
272
- readonly searchMetadata?: {
273
- readonly version?: string;
274
- readonly tag?: string;
275
- };
560
+
561
+ // Not really layout-related, but kept for convenience/retro-compatibility
562
+ readonly title?: string;
563
+ readonly description?: string;
276
564
  }
277
565
 
278
566
  export default function Layout(props: Props): JSX.Element;
279
567
  }
280
568
 
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
569
  declare module '@theme/LayoutProviders' {
290
570
  import type {ReactNode} from 'react';
291
571
 
@@ -320,33 +600,186 @@ declare module '@theme/SkipToContent' {
320
600
  export default function SkipToContent(): JSX.Element;
321
601
  }
322
602
 
323
- declare module '@theme/MDXComponents' {
603
+ declare module '@theme/MDXComponents/A' {
604
+ import type {ComponentProps} from 'react';
605
+
606
+ export interface Props extends ComponentProps<'a'> {}
607
+
608
+ export default function MDXA(props: Props): JSX.Element;
609
+ }
610
+
611
+ declare module '@theme/MDXComponents/Code' {
324
612
  import type {ComponentProps} from 'react';
325
- import type CodeBlock from '@theme/CodeBlock';
326
- import type Head from '@docusaurus/Head';
613
+
614
+ export interface Props extends ComponentProps<'code'> {}
615
+
616
+ export default function MDXCode(props: Props): JSX.Element;
617
+ }
618
+
619
+ declare module '@theme/MDXComponents/Details' {
620
+ import type {ComponentProps} from 'react';
621
+
622
+ export interface Props extends ComponentProps<'details'> {}
623
+
624
+ export default function MDXDetails(props: Props): JSX.Element;
625
+ }
626
+
627
+ declare module '@theme/MDXComponents/Ul' {
628
+ import type {ComponentProps} from 'react';
629
+
630
+ export interface Props extends ComponentProps<'ul'> {}
631
+
632
+ export default function MDXUl(props: Props): JSX.Element;
633
+ }
634
+
635
+ declare module '@theme/MDXComponents/Img' {
636
+ import type {ComponentProps} from 'react';
637
+
638
+ export interface Props extends ComponentProps<'img'> {}
639
+
640
+ export default function MDXImg(props: Props): JSX.Element;
641
+ }
642
+
643
+ declare module '@theme/MDXComponents/Head' {
644
+ import type {ComponentProps} from 'react';
645
+
646
+ export interface Props extends ComponentProps<'head'> {}
647
+
648
+ export default function MDXHead(props: Props): JSX.Element;
649
+ }
650
+
651
+ declare module '@theme/MDXComponents/Heading' {
652
+ import type {ComponentProps} from 'react';
653
+ import type Heading from '@theme/Heading';
654
+
655
+ export interface Props extends ComponentProps<typeof Heading> {}
656
+
657
+ export default function MDXHeading(props: Props): JSX.Element;
658
+ }
659
+
660
+ declare module '@theme/MDXComponents/Pre' {
661
+ import type {ComponentProps} from 'react';
662
+
663
+ export interface Props extends ComponentProps<'pre'> {}
664
+
665
+ export default function MDXPre(props: Props): JSX.Element;
666
+ }
667
+
668
+ declare module '@theme/MDXComponents' {
669
+ import type {ComponentType, ComponentProps} from 'react';
670
+
671
+ import type MDXHead from '@theme/MDXComponents/Head';
672
+ import type MDXCode from '@theme/MDXComponents/Code';
673
+ import type MDXA from '@theme/MDXComponents/A';
674
+ import type MDXPre from '@theme/MDXComponents/Pre';
675
+ import type MDXDetails from '@theme/MDXComponents/Details';
676
+ import type MDXUl from '@theme/MDXComponents/Ul';
677
+ import type MDXImg from '@theme/MDXComponents/Img';
327
678
 
328
679
  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;
680
+ readonly head: typeof MDXHead;
681
+ readonly code: typeof MDXCode;
682
+ readonly a: typeof MDXA;
683
+ readonly pre: typeof MDXPre;
684
+ readonly details: typeof MDXDetails;
685
+ readonly ul: typeof MDXUl;
686
+ readonly img: typeof MDXImg;
334
687
  readonly h1: (props: ComponentProps<'h1'>) => JSX.Element;
335
688
  readonly h2: (props: ComponentProps<'h2'>) => JSX.Element;
336
689
  readonly h3: (props: ComponentProps<'h3'>) => JSX.Element;
337
690
  readonly h4: (props: ComponentProps<'h4'>) => JSX.Element;
338
691
  readonly h5: (props: ComponentProps<'h5'>) => JSX.Element;
339
692
  readonly h6: (props: ComponentProps<'h6'>) => JSX.Element;
693
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
694
+ [tagName: string]: ComponentType<any>;
340
695
  };
341
696
 
342
697
  const MDXComponents: MDXComponentsObject;
343
698
  export default MDXComponents;
344
699
  }
345
700
 
701
+ declare module '@theme/MDXContent' {
702
+ import type {ReactNode} from 'react';
703
+
704
+ export interface Props {
705
+ readonly children: ReactNode;
706
+ }
707
+
708
+ export default function MDXContent(props: Props): JSX.Element;
709
+ }
710
+
346
711
  declare module '@theme/Navbar' {
347
712
  export default function Navbar(): JSX.Element;
348
713
  }
349
714
 
715
+ declare module '@theme/Navbar/ColorModeToggle' {
716
+ export interface Props {
717
+ readonly className?: string;
718
+ }
719
+
720
+ export default function NavbarColorModeToggle(
721
+ props: Props,
722
+ ): JSX.Element | null;
723
+ }
724
+
725
+ declare module '@theme/Navbar/Logo' {
726
+ export default function NavbarLogo(): JSX.Element;
727
+ }
728
+
729
+ declare module '@theme/Navbar/Content' {
730
+ export default function NavbarContent(): JSX.Element;
731
+ }
732
+
733
+ declare module '@theme/Navbar/Layout' {
734
+ export interface Props {
735
+ readonly children: React.ReactNode;
736
+ }
737
+
738
+ export default function NavbarLayout(props: Props): JSX.Element;
739
+ }
740
+
741
+ declare module '@theme/Navbar/MobileSidebar' {
742
+ export default function NavbarMobileSidebar(): JSX.Element;
743
+ }
744
+
745
+ declare module '@theme/Navbar/MobileSidebar/Layout' {
746
+ import type {ReactNode} from 'react';
747
+
748
+ interface Props {
749
+ readonly header: ReactNode;
750
+ readonly primaryMenu: ReactNode;
751
+ readonly secondaryMenu: ReactNode;
752
+ }
753
+
754
+ export default function NavbarMobileSidebarLayout(props: Props): JSX.Element;
755
+ }
756
+
757
+ declare module '@theme/Navbar/MobileSidebar/Toggle' {
758
+ export default function NavbarMobileSidebarToggle(): JSX.Element;
759
+ }
760
+
761
+ declare module '@theme/Navbar/MobileSidebar/PrimaryMenu' {
762
+ export default function NavbarMobileSidebarPrimaryMenu(): JSX.Element;
763
+ }
764
+
765
+ declare module '@theme/Navbar/MobileSidebar/SecondaryMenu' {
766
+ export default function NavbarMobileSidebarSecondaryMenu(): JSX.Element;
767
+ }
768
+
769
+ declare module '@theme/Navbar/MobileSidebar/Header' {
770
+ export default function NavbarMobileSidebarHeader(): JSX.Element;
771
+ }
772
+
773
+ declare module '@theme/Navbar/Search' {
774
+ import type {ReactNode} from 'react';
775
+
776
+ export interface Props {
777
+ readonly children: ReactNode;
778
+ }
779
+
780
+ export default function NavbarSearch(props: Props): JSX.Element;
781
+ }
782
+
350
783
  declare module '@theme/NavbarItem/DefaultNavbarItem' {
351
784
  import type {Props as NavbarNavLinkProps} from '@theme/NavbarItem/NavbarNavLink';
352
785
 
@@ -372,6 +805,7 @@ declare module '@theme/NavbarItem/NavbarNavLink' {
372
805
  readonly activeBaseRegex?: string;
373
806
  readonly exact?: boolean;
374
807
  readonly label?: ReactNode;
808
+ readonly html?: string;
375
809
  readonly prependBaseUrlToHref?: string;
376
810
  }
377
811
 
@@ -450,7 +884,9 @@ declare module '@theme/NavbarItem/DocNavbarItem' {
450
884
  readonly docsPluginId?: string;
451
885
  }
452
886
 
453
- export default function DocsSidebarNavbarItem(props: Props): JSX.Element;
887
+ export default function DocsSidebarNavbarItem(
888
+ props: Props,
889
+ ): JSX.Element | null;
454
890
  }
455
891
 
456
892
  declare module '@theme/NavbarItem/DocSidebarNavbarItem' {
@@ -464,6 +900,47 @@ declare module '@theme/NavbarItem/DocSidebarNavbarItem' {
464
900
  export default function DocSidebarNavbarItem(props: Props): JSX.Element;
465
901
  }
466
902
 
903
+ declare module '@theme/NavbarItem/HtmlNavbarItem' {
904
+ import type {Props as DefaultNavbarItemProps} from '@theme/NavbarItem/DefaultNavbarItem';
905
+
906
+ export interface Props extends DefaultNavbarItemProps {
907
+ readonly value: string;
908
+ }
909
+
910
+ export default function HtmlNavbarItem(props: Props): JSX.Element;
911
+ }
912
+
913
+ declare module '@theme/NavbarItem/ComponentTypes' {
914
+ import type {ComponentType} from 'react';
915
+
916
+ import type DefaultNavbarItem from '@theme/NavbarItem/DefaultNavbarItem';
917
+ import type DropdownNavbarItem from '@theme/NavbarItem/DropdownNavbarItem';
918
+ import type LocaleDropdownNavbarItem from '@theme/NavbarItem/LocaleDropdownNavbarItem';
919
+ import type SearchNavbarItem from '@theme/NavbarItem/SearchNavbarItem';
920
+ import type HtmlNavbarItem from '@theme/NavbarItem/HtmlNavbarItem';
921
+ import type DocNavbarItem from '@theme/NavbarItem/DocNavbarItem';
922
+ import type DocSidebarNavbarItem from '@theme/NavbarItem/DocSidebarNavbarItem';
923
+ import type DocsVersionNavbarItem from '@theme/NavbarItem/DocsVersionNavbarItem';
924
+ import type DocsVersionDropdownNavbarItem from '@theme/NavbarItem/DocsVersionDropdownNavbarItem';
925
+
926
+ export type ComponentTypesObject = {
927
+ readonly default: typeof DefaultNavbarItem;
928
+ readonly localeDropdown: typeof LocaleDropdownNavbarItem;
929
+ readonly search: typeof SearchNavbarItem;
930
+ readonly dropdown: typeof DropdownNavbarItem;
931
+ readonly html: typeof HtmlNavbarItem;
932
+ readonly doc: typeof DocNavbarItem;
933
+ readonly docSidebar: typeof DocSidebarNavbarItem;
934
+ readonly docsVersion: typeof DocsVersionNavbarItem;
935
+ readonly docsVersionDropdown: typeof DocsVersionDropdownNavbarItem;
936
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
937
+ [customComponentType: string]: ComponentType<any>;
938
+ };
939
+
940
+ const ComponentTypes: ComponentTypesObject;
941
+ export default ComponentTypes;
942
+ }
943
+
467
944
  declare module '@theme/NavbarItem' {
468
945
  import type {ComponentProps} from 'react';
469
946
  import type {Props as DefaultNavbarItemProps} from '@theme/NavbarItem/DefaultNavbarItem';
@@ -474,12 +951,14 @@ declare module '@theme/NavbarItem' {
474
951
  import type {Props as DocsVersionDropdownNavbarItemProps} from '@theme/NavbarItem/DocsVersionDropdownNavbarItem';
475
952
  import type {Props as LocaleDropdownNavbarItemProps} from '@theme/NavbarItem/LocaleDropdownNavbarItem';
476
953
  import type {Props as SearchNavbarItemProps} from '@theme/NavbarItem/SearchNavbarItem';
954
+ import type {Props as HtmlNavbarItemProps} from '@theme/NavbarItem/HtmlNavbarItem';
477
955
 
478
956
  export type LinkLikeNavbarItemProps =
479
957
  | ({readonly type?: 'default'} & DefaultNavbarItemProps)
480
958
  | ({readonly type: 'doc'} & DocNavbarItemProps)
481
959
  | ({readonly type: 'docsVersion'} & DocsVersionNavbarItemProps)
482
- | ({readonly type: 'docSidebar'} & DocSidebarNavbarItemProps);
960
+ | ({readonly type: 'docSidebar'} & DocSidebarNavbarItemProps)
961
+ | ({readonly type: 'html'} & HtmlNavbarItemProps);
483
962
 
484
963
  export type Props = ComponentProps<'a'> & {
485
964
  readonly position?: 'left' | 'right';
@@ -501,7 +980,14 @@ declare module '@theme/NavbarItem' {
501
980
  }
502
981
 
503
982
  declare module '@theme/NavbarItem/utils' {
504
- export function getInfimaActiveClassName(mobile?: boolean): string;
983
+ /**
984
+ * On desktop and mobile, we would apply different class names for dropdown
985
+ * items.
986
+ * @see https://github.com/facebook/docusaurus/pull/5431
987
+ */
988
+ export function getInfimaActiveClassName(
989
+ mobile?: boolean,
990
+ ): `${'menu' | 'navbar'}__link--active`;
505
991
  }
506
992
 
507
993
  declare module '@theme/PaginatorNavLink' {
@@ -511,6 +997,7 @@ declare module '@theme/PaginatorNavLink' {
511
997
  export interface Props extends Omit<PropNavigationLink, 'title'> {
512
998
  readonly title: ReactNode;
513
999
  readonly subLabel?: JSX.Element;
1000
+ readonly isNext?: boolean;
514
1001
  }
515
1002
 
516
1003
  export default function PaginatorNavLink(props: Props): JSX.Element;
@@ -530,7 +1017,7 @@ declare module '@theme/TabItem' {
530
1017
  readonly label?: string;
531
1018
  readonly hidden?: boolean;
532
1019
  readonly className?: string;
533
- readonly attributes?: Record<string, unknown>;
1020
+ readonly attributes?: {[key: string]: unknown};
534
1021
  }
535
1022
 
536
1023
  export default function TabItem(props: Props): JSX.Element;
@@ -548,7 +1035,7 @@ declare module '@theme/Tabs' {
548
1035
  readonly values?: readonly {
549
1036
  value: string;
550
1037
  label?: string;
551
- attributes?: Record<string, unknown>;
1038
+ attributes?: {[key: string]: unknown};
552
1039
  }[];
553
1040
  readonly groupId?: string;
554
1041
  readonly className?: string;
@@ -571,14 +1058,14 @@ declare module '@theme/ThemedImage' {
571
1058
  }
572
1059
 
573
1060
  declare module '@theme/Details' {
574
- import {Details, type DetailsProps} from '@docusaurus/theme-common';
1061
+ import {Details, type DetailsProps} from '@docusaurus/theme-common/Details';
575
1062
 
576
1063
  export interface Props extends DetailsProps {}
577
1064
  export default Details;
578
1065
  }
579
1066
 
580
1067
  declare module '@theme/TOCItems' {
581
- import type {TOCItem} from '@docusaurus/types';
1068
+ import type {TOCItem} from '@docusaurus/mdx-loader';
582
1069
 
583
1070
  export interface Props {
584
1071
  readonly toc: readonly TOCItem[];
@@ -592,11 +1079,24 @@ declare module '@theme/TOCItems' {
592
1079
  export default function TOCItems(props: Props): JSX.Element;
593
1080
  }
594
1081
 
1082
+ declare module '@theme/TOCItems/Tree' {
1083
+ import type {TOCTreeNode} from '@docusaurus/theme-common';
1084
+
1085
+ export interface Props {
1086
+ readonly toc: readonly TOCTreeNode[];
1087
+ readonly className: string;
1088
+ readonly linkClassName: string | null;
1089
+ readonly isChild?: boolean;
1090
+ }
1091
+
1092
+ export default function TOCItems(props: Props): JSX.Element;
1093
+ }
1094
+
595
1095
  declare module '@theme/TOC' {
596
- import type {TOCItem} from '@docusaurus/types';
1096
+ import type {TOCItem} from '@docusaurus/mdx-loader';
597
1097
 
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
1098
+ // `minHeadingLevel` only comes from doc/post front matter, and won't have a
1099
+ // default set by Joi. See TOC, TOCInline, TOCCollapsible for examples.
600
1100
  export interface Props {
601
1101
  readonly toc: readonly TOCItem[];
602
1102
  readonly minHeadingLevel?: number;
@@ -608,7 +1108,7 @@ declare module '@theme/TOC' {
608
1108
  }
609
1109
 
610
1110
  declare module '@theme/TOCInline' {
611
- import type {TOCItem} from '@docusaurus/types';
1111
+ import type {TOCItem} from '@docusaurus/mdx-loader';
612
1112
 
613
1113
  export interface Props {
614
1114
  readonly toc: readonly TOCItem[];
@@ -620,7 +1120,7 @@ declare module '@theme/TOCInline' {
620
1120
  }
621
1121
 
622
1122
  declare module '@theme/TOCCollapsible' {
623
- import type {TOCItem} from '@docusaurus/types';
1123
+ import type {TOCItem} from '@docusaurus/mdx-loader';
624
1124
 
625
1125
  export interface Props {
626
1126
  readonly className?: string;
@@ -632,16 +1132,32 @@ declare module '@theme/TOCCollapsible' {
632
1132
  export default function TOCCollapsible(props: Props): JSX.Element;
633
1133
  }
634
1134
 
635
- declare module '@theme/Toggle' {
636
- import type {SyntheticEvent} from 'react';
1135
+ declare module '@theme/TOCCollapsible/CollapseButton' {
1136
+ import type {ComponentProps} from 'react';
1137
+
1138
+ export interface Props extends ComponentProps<'button'> {
1139
+ collapsed: boolean;
1140
+ }
1141
+
1142
+ export default function TOCCollapsibleCollapseButton(
1143
+ props: Props,
1144
+ ): JSX.Element;
1145
+ }
1146
+
1147
+ declare module '@theme/ColorModeToggle' {
1148
+ import type {ColorMode} from '@docusaurus/theme-common';
637
1149
 
638
1150
  export interface Props {
639
1151
  readonly className?: string;
640
- readonly checked: boolean;
641
- readonly onChange: (e: SyntheticEvent) => void;
1152
+ readonly value: ColorMode;
1153
+ /**
1154
+ * The parameter represents the "to-be" value. For example, if currently in
1155
+ * dark mode, clicking the button should call `onChange("light")`
1156
+ */
1157
+ readonly onChange: (colorMode: ColorMode) => void;
642
1158
  }
643
1159
 
644
- export default function Toggle(props: Props): JSX.Element;
1160
+ export default function ColorModeToggle(props: Props): JSX.Element;
645
1161
  }
646
1162
 
647
1163
  declare module '@theme/Logo' {
@@ -663,6 +1179,14 @@ declare module '@theme/IconArrow' {
663
1179
  export default function IconArrow(props: Props): JSX.Element;
664
1180
  }
665
1181
 
1182
+ declare module '@theme/IconDarkMode' {
1183
+ import type {ComponentProps} from 'react';
1184
+
1185
+ export interface Props extends ComponentProps<'svg'> {}
1186
+
1187
+ export default function IconDarkMode(props: Props): JSX.Element;
1188
+ }
1189
+
666
1190
  declare module '@theme/IconEdit' {
667
1191
  import type {ComponentProps} from 'react';
668
1192
 
@@ -671,6 +1195,22 @@ declare module '@theme/IconEdit' {
671
1195
  export default function IconEdit(props: Props): JSX.Element;
672
1196
  }
673
1197
 
1198
+ declare module '@theme/IconHome' {
1199
+ import type {ComponentProps} from 'react';
1200
+
1201
+ export interface Props extends ComponentProps<'svg'> {}
1202
+
1203
+ export default function IconHome(props: Props): JSX.Element;
1204
+ }
1205
+
1206
+ declare module '@theme/IconLightMode' {
1207
+ import type {ComponentProps} from 'react';
1208
+
1209
+ export interface Props extends ComponentProps<'svg'> {}
1210
+
1211
+ export default function IconLightMode(props: Props): JSX.Element;
1212
+ }
1213
+
674
1214
  declare module '@theme/IconMenu' {
675
1215
  import type {ComponentProps} from 'react';
676
1216
 
@@ -704,11 +1244,8 @@ declare module '@theme/IconExternalLink' {
704
1244
  }
705
1245
 
706
1246
  declare module '@theme/TagsListByLetter' {
707
- export type TagsListItem = Readonly<{
708
- name: string;
709
- permalink: string;
710
- count: number;
711
- }>;
1247
+ import type {TagsListItem} from '@docusaurus/utils';
1248
+
712
1249
  export interface Props {
713
1250
  readonly tags: readonly TagsListItem[];
714
1251
  }
@@ -716,7 +1253,8 @@ declare module '@theme/TagsListByLetter' {
716
1253
  }
717
1254
 
718
1255
  declare module '@theme/TagsListInline' {
719
- export type Tag = Readonly<{label: string; permalink: string}>;
1256
+ import type {Tag} from '@docusaurus/utils';
1257
+
720
1258
  export interface Props {
721
1259
  readonly tags: readonly Tag[];
722
1260
  }
@@ -724,7 +1262,7 @@ declare module '@theme/TagsListInline' {
724
1262
  }
725
1263
 
726
1264
  declare module '@theme/Tag' {
727
- import type {TagsListItem} from '@theme/TagsListByLetter';
1265
+ import type {TagsListItem} from '@docusaurus/utils';
728
1266
  import type {Optional} from 'utility-types';
729
1267
 
730
1268
  export interface Props extends Optional<TagsListItem, 'count'> {}
@@ -739,17 +1277,3 @@ declare module '@theme/prism-include-languages' {
739
1277
  PrismObject: typeof PrismNamespace,
740
1278
  ): void;
741
1279
  }
742
-
743
- declare module '@theme/Seo' {
744
- import type {ReactNode} from 'react';
745
-
746
- export interface Props {
747
- readonly title?: string;
748
- readonly description?: string;
749
- readonly keywords?: readonly string[] | string;
750
- readonly image?: string;
751
- readonly children?: ReactNode;
752
- }
753
-
754
- export default function Seo(props: Props): JSX.Element;
755
- }