@docusaurus/theme-classic 2.0.0-beta.20 → 2.0.0-beta.21

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 (422) hide show
  1. package/lib/getSwizzleConfig.d.ts +8 -0
  2. package/lib/getSwizzleConfig.js +219 -234
  3. package/lib/index.d.ts +12 -0
  4. package/lib/index.js +103 -157
  5. package/lib/nprogress.d.ts +10 -0
  6. package/lib/nprogress.js +16 -37
  7. package/lib/prism-include-languages.d.ts +7 -0
  8. package/lib/prism-include-languages.js +3 -9
  9. package/lib/theme/Admonition/index.d.ts +9 -0
  10. package/{lib-next → lib}/theme/Admonition/index.js +0 -0
  11. package/lib/theme/AnnouncementBar/index.d.ts +8 -0
  12. package/{lib-next → lib}/theme/AnnouncementBar/index.js +4 -10
  13. package/{lib-next → lib}/theme/AnnouncementBar/styles.module.css +0 -0
  14. package/lib/theme/BackToTopButton/index.d.ts +8 -0
  15. package/{lib-next → lib}/theme/BackToTopButton/index.js +1 -3
  16. package/{lib-next → lib}/theme/BackToTopButton/styles.module.css +0 -0
  17. package/lib/theme/BlogArchivePage/index.d.ts +10 -0
  18. package/{lib-next → lib}/theme/BlogArchivePage/index.js +1 -5
  19. package/lib/theme/BlogLayout/index.d.ts +9 -0
  20. package/{lib-next → lib}/theme/BlogLayout/index.js +0 -0
  21. package/lib/theme/BlogListPage/index.d.ts +10 -0
  22. package/{lib-next → lib}/theme/BlogListPage/index.js +4 -7
  23. package/lib/theme/BlogListPaginator/index.d.ts +9 -0
  24. package/{lib-next → lib}/theme/BlogListPaginator/index.js +0 -0
  25. package/lib/theme/BlogPostAuthor/index.d.ts +9 -0
  26. package/{lib-next → lib}/theme/BlogPostAuthor/index.js +0 -3
  27. package/lib/theme/BlogPostAuthors/index.d.ts +9 -0
  28. package/{lib-next → lib}/theme/BlogPostAuthors/index.js +2 -4
  29. package/{lib-next → lib}/theme/BlogPostAuthors/styles.module.css +0 -0
  30. package/lib/theme/BlogPostItem/index.d.ts +9 -0
  31. package/{lib-next → lib}/theme/BlogPostItem/index.js +9 -21
  32. package/{lib-next → lib}/theme/BlogPostItem/styles.module.css +0 -0
  33. package/lib/theme/BlogPostPage/index.d.ts +10 -0
  34. package/{lib-next → lib}/theme/BlogPostPage/index.js +4 -7
  35. package/lib/theme/BlogPostPaginator/index.d.ts +9 -0
  36. package/{lib-next → lib}/theme/BlogPostPaginator/index.js +0 -0
  37. package/lib/theme/BlogSidebar/Desktop/index.d.ts +9 -0
  38. package/{lib-next → lib}/theme/BlogSidebar/Desktop/index.js +0 -0
  39. package/{lib-next → lib}/theme/BlogSidebar/Desktop/styles.module.css +0 -0
  40. package/lib/theme/BlogSidebar/Mobile/index.d.ts +9 -0
  41. package/{lib-next → lib}/theme/BlogSidebar/Mobile/index.js +0 -2
  42. package/lib/theme/BlogSidebar/index.d.ts +9 -0
  43. package/{lib-next → lib}/theme/BlogSidebar/index.js +3 -5
  44. package/lib/theme/BlogTagsListPage/index.d.ts +10 -0
  45. package/{lib-next → lib}/theme/BlogTagsListPage/index.js +3 -3
  46. package/lib/theme/BlogTagsPostsPage/index.d.ts +10 -0
  47. package/{lib-next → lib}/theme/BlogTagsPostsPage/index.js +7 -13
  48. package/lib/theme/CodeBlock/Container/index.d.ts +10 -0
  49. package/{lib-next → lib}/theme/CodeBlock/Container/index.js +2 -1
  50. package/{lib-next → lib}/theme/CodeBlock/Container/styles.module.css +0 -0
  51. package/lib/theme/CodeBlock/Content/Element.d.ts +9 -0
  52. package/{lib-next → lib}/theme/CodeBlock/Content/Element.js +3 -3
  53. package/lib/theme/CodeBlock/Content/String.d.ts +9 -0
  54. package/{lib-next → lib}/theme/CodeBlock/Content/String.js +4 -4
  55. package/{lib-next → lib}/theme/CodeBlock/Content/styles.module.css +0 -0
  56. package/lib/theme/CodeBlock/CopyButton/index.d.ts +9 -0
  57. package/{lib-next → lib}/theme/CodeBlock/CopyButton/index.js +0 -0
  58. package/{lib-next → lib}/theme/CodeBlock/CopyButton/styles.module.css +0 -0
  59. package/lib/theme/CodeBlock/Line/index.d.ts +9 -0
  60. package/{lib-next → lib}/theme/CodeBlock/Line/index.js +1 -8
  61. package/{lib-next → lib}/theme/CodeBlock/Line/styles.module.css +0 -0
  62. package/lib/theme/CodeBlock/WordWrapButton/index.d.ts +9 -0
  63. package/{lib-next → lib}/theme/CodeBlock/WordWrapButton/index.js +0 -0
  64. package/{lib-next → lib}/theme/CodeBlock/WordWrapButton/styles.module.css +0 -0
  65. package/lib/theme/CodeBlock/index.d.ts +9 -0
  66. package/{lib-next → lib}/theme/CodeBlock/index.js +2 -4
  67. package/lib/theme/ColorModeToggle/index.d.ts +11 -0
  68. package/{lib-next → lib}/theme/ColorModeToggle/index.js +1 -3
  69. package/{lib-next → lib}/theme/ColorModeToggle/styles.module.css +0 -0
  70. package/lib/theme/Details/index.d.ts +9 -0
  71. package/{lib-next → lib}/theme/Details/index.js +2 -2
  72. package/{lib-next → lib}/theme/Details/styles.module.css +0 -0
  73. package/lib/theme/DocBreadcrumbs/index.d.ts +8 -0
  74. package/{lib-next → lib}/theme/DocBreadcrumbs/index.js +8 -13
  75. package/{lib-next → lib}/theme/DocBreadcrumbs/styles.module.css +0 -0
  76. package/lib/theme/DocCard/index.d.ts +9 -0
  77. package/{lib-next → lib}/theme/DocCard/index.js +5 -15
  78. package/{lib-next → lib}/theme/DocCard/styles.module.css +0 -0
  79. package/lib/theme/DocCardList/index.d.ts +9 -0
  80. package/{lib-next → lib}/theme/DocCardList/index.js +1 -4
  81. package/lib/theme/DocCategoryGeneratedIndexPage/index.d.ts +10 -0
  82. package/{lib-next → lib}/theme/DocCategoryGeneratedIndexPage/index.js +5 -6
  83. package/{lib-next → lib}/theme/DocCategoryGeneratedIndexPage/styles.module.css +0 -0
  84. package/lib/theme/DocItem/index.d.ts +10 -0
  85. package/{lib-next → lib}/theme/DocItem/index.js +15 -27
  86. package/{lib-next → lib}/theme/DocItem/styles.module.css +0 -0
  87. package/lib/theme/DocItemFooter/index.d.ts +10 -0
  88. package/{lib-next → lib}/theme/DocItemFooter/index.js +1 -6
  89. package/{lib-next → lib}/theme/DocItemFooter/styles.module.css +0 -0
  90. package/lib/theme/DocPage/Layout/Main/index.d.ts +9 -0
  91. package/{lib-next → lib}/theme/DocPage/Layout/Main/index.js +1 -1
  92. package/{lib-next → lib}/theme/DocPage/Layout/Main/styles.module.css +0 -0
  93. package/lib/theme/DocPage/Layout/Sidebar/ExpandButton/index.d.ts +9 -0
  94. package/{lib-next → lib}/theme/DocPage/Layout/Sidebar/ExpandButton/index.js +1 -1
  95. package/{lib-next → lib}/theme/DocPage/Layout/Sidebar/ExpandButton/styles.module.css +0 -0
  96. package/lib/theme/DocPage/Layout/Sidebar/index.d.ts +9 -0
  97. package/{lib-next → lib}/theme/DocPage/Layout/Sidebar/index.js +5 -8
  98. package/{lib-next/theme/DocPage/Layout/Sidebar/index.module.css → lib/theme/DocPage/Layout/Sidebar/styles.module.css} +0 -0
  99. package/lib/theme/DocPage/Layout/index.d.ts +9 -0
  100. package/{lib-next → lib}/theme/DocPage/Layout/index.js +2 -2
  101. package/{lib-next/theme/DocPage/Layout/index.module.css → lib/theme/DocPage/Layout/styles.module.css} +0 -0
  102. package/lib/theme/DocPage/index.d.ts +10 -0
  103. package/{lib-next → lib}/theme/DocPage/index.js +2 -4
  104. package/lib/theme/DocPaginator/index.d.ts +9 -0
  105. package/{lib-next → lib}/theme/DocPaginator/index.js +0 -0
  106. package/lib/theme/DocSidebar/Desktop/CollapseButton/index.d.ts +9 -0
  107. package/{lib-next → lib}/theme/DocSidebar/Desktop/CollapseButton/index.js +1 -1
  108. package/{lib-next → lib}/theme/DocSidebar/Desktop/CollapseButton/styles.module.css +0 -0
  109. package/lib/theme/DocSidebar/Desktop/Content/index.d.ts +9 -0
  110. package/{lib-next → lib}/theme/DocSidebar/Desktop/Content/index.js +0 -2
  111. package/{lib-next → lib}/theme/DocSidebar/Desktop/Content/styles.module.css +0 -0
  112. package/lib/theme/DocSidebar/Desktop/index.d.ts +11 -0
  113. package/{lib-next → lib}/theme/DocSidebar/Desktop/index.js +0 -2
  114. package/{lib-next → lib}/theme/DocSidebar/Desktop/styles.module.css +0 -0
  115. package/lib/theme/DocSidebar/Mobile/index.d.ts +11 -0
  116. package/{lib-next → lib}/theme/DocSidebar/Mobile/index.js +0 -4
  117. package/lib/theme/DocSidebar/index.d.ts +9 -0
  118. package/{lib-next → lib}/theme/DocSidebar/index.js +4 -4
  119. package/lib/theme/DocSidebarItem/Category/index.d.ts +9 -0
  120. package/{lib-next/theme/DocSidebarItem/Category.js → lib/theme/DocSidebarItem/Category/index.js} +17 -31
  121. package/lib/theme/DocSidebarItem/Html/index.d.ts +9 -0
  122. package/{lib-next/theme/DocSidebarItem/Html.js → lib/theme/DocSidebarItem/Html/index.js} +5 -6
  123. package/{lib-next/theme/DocSidebarItem/Html.module.css → lib/theme/DocSidebarItem/Html/styles.module.css} +0 -0
  124. package/lib/theme/DocSidebarItem/Link/index.d.ts +9 -0
  125. package/{lib-next/theme/DocSidebarItem/Link.js → lib/theme/DocSidebarItem/Link/index.js} +1 -1
  126. package/{lib-next/theme/DocSidebarItem/Link.module.css → lib/theme/DocSidebarItem/Link/styles.module.css} +0 -0
  127. package/lib/theme/DocSidebarItem/index.d.ts +9 -0
  128. package/{lib-next → lib}/theme/DocSidebarItem/index.js +0 -2
  129. package/lib/theme/DocSidebarItems/index.d.ts +11 -0
  130. package/{lib-next → lib}/theme/DocSidebarItems/index.js +3 -4
  131. package/lib/theme/DocTagDocListPage/index.d.ts +10 -0
  132. package/{lib-next → lib}/theme/DocTagDocListPage/index.js +5 -12
  133. package/lib/theme/DocTagsListPage/index.d.ts +10 -0
  134. package/{lib-next → lib}/theme/DocTagsListPage/index.js +2 -2
  135. package/lib/theme/DocVersionBadge/index.d.ts +9 -0
  136. package/{lib-next → lib}/theme/DocVersionBadge/index.js +2 -6
  137. package/lib/theme/DocVersionBanner/index.d.ts +9 -0
  138. package/{lib-next → lib}/theme/DocVersionBanner/index.js +4 -17
  139. package/lib/theme/EditThisPage/index.d.ts +9 -0
  140. package/{lib-next → lib}/theme/EditThisPage/index.js +1 -1
  141. package/lib/theme/ErrorPageContent.d.ts +10 -0
  142. package/{lib-next → lib}/theme/ErrorPageContent.js +0 -0
  143. package/lib/theme/Footer/Copyright/index.d.ts +9 -0
  144. package/{lib-next → lib}/theme/Footer/Copyright/index.js +3 -4
  145. package/lib/theme/Footer/Layout/index.d.ts +9 -0
  146. package/{lib-next → lib}/theme/Footer/Layout/index.js +0 -0
  147. package/lib/theme/Footer/LinkItem/index.d.ts +9 -0
  148. package/{lib-next → lib}/theme/Footer/LinkItem/index.js +1 -3
  149. package/lib/theme/Footer/Links/MultiColumn/index.d.ts +9 -0
  150. package/{lib-next → lib}/theme/Footer/Links/MultiColumn/index.js +4 -8
  151. package/lib/theme/Footer/Links/Simple/index.d.ts +9 -0
  152. package/{lib-next → lib}/theme/Footer/Links/Simple/index.js +3 -7
  153. package/lib/theme/Footer/Links/index.d.ts +9 -0
  154. package/{lib-next → lib}/theme/Footer/Links/index.js +0 -0
  155. package/lib/theme/Footer/Logo/index.d.ts +9 -0
  156. package/{lib-next → lib}/theme/Footer/Logo/index.js +1 -3
  157. package/{lib-next → lib}/theme/Footer/Logo/styles.module.css +0 -0
  158. package/lib/theme/Footer/index.d.ts +10 -0
  159. package/{lib-next → lib}/theme/Footer/index.js +0 -4
  160. package/lib/theme/Heading/index.d.ts +9 -0
  161. package/{lib-next → lib}/theme/Heading/index.js +2 -3
  162. package/{lib-next → lib}/theme/Heading/styles.module.css +0 -0
  163. package/lib/theme/IconArrow/index.d.ts +9 -0
  164. package/{lib-next → lib}/theme/IconArrow/index.js +0 -0
  165. package/lib/theme/IconClose/index.d.ts +9 -0
  166. package/{lib-next → lib}/theme/IconClose/index.js +0 -0
  167. package/lib/theme/IconDarkMode/index.d.ts +9 -0
  168. package/{lib-next → lib}/theme/IconDarkMode/index.js +0 -0
  169. package/lib/theme/IconEdit/index.d.ts +9 -0
  170. package/{lib-next → lib}/theme/IconEdit/index.js +0 -0
  171. package/{lib-next → lib}/theme/IconEdit/styles.module.css +0 -0
  172. package/lib/theme/IconExternalLink/index.d.ts +9 -0
  173. package/{lib-next → lib}/theme/IconExternalLink/index.js +0 -0
  174. package/{lib-next → lib}/theme/IconExternalLink/styles.module.css +0 -0
  175. package/lib/theme/IconHome/index.d.ts +9 -0
  176. package/{lib-next → lib}/theme/IconHome/index.js +0 -0
  177. package/lib/theme/IconLanguage/index.d.ts +9 -0
  178. package/{lib-next → lib}/theme/IconLanguage/index.js +0 -0
  179. package/lib/theme/IconLightMode/index.d.ts +9 -0
  180. package/{lib-next → lib}/theme/IconLightMode/index.js +0 -0
  181. package/lib/theme/IconMenu/index.d.ts +9 -0
  182. package/{lib-next → lib}/theme/IconMenu/index.js +0 -0
  183. package/lib/theme/LastUpdated/index.d.ts +9 -0
  184. package/{lib-next → lib}/theme/LastUpdated/index.js +0 -3
  185. package/lib/theme/Layout/index.d.ts +10 -0
  186. package/{lib-next → lib}/theme/Layout/index.js +8 -6
  187. package/{lib-next → lib}/theme/Layout/styles.css +0 -0
  188. package/lib/theme/LayoutProviders/index.d.ts +9 -0
  189. package/{lib-next → lib}/theme/LayoutProviders/index.js +0 -0
  190. package/lib/theme/Logo/index.d.ts +9 -0
  191. package/{lib-next → lib}/theme/Logo/index.js +3 -10
  192. package/lib/theme/MDXComponents/A.d.ts +9 -0
  193. package/{lib-next → lib}/theme/MDXComponents/A.js +0 -0
  194. package/lib/theme/MDXComponents/Code.d.ts +9 -0
  195. package/{lib-next → lib}/theme/MDXComponents/Code.js +0 -0
  196. package/lib/theme/MDXComponents/Details.d.ts +9 -0
  197. package/{lib-next → lib}/theme/MDXComponents/Details.js +5 -3
  198. package/lib/theme/MDXComponents/Head.d.ts +9 -0
  199. package/{lib-next → lib}/theme/MDXComponents/Head.js +2 -5
  200. package/lib/theme/MDXComponents/Heading.d.ts +9 -0
  201. package/{lib-next → lib}/theme/MDXComponents/Heading.js +0 -0
  202. package/lib/theme/MDXComponents/Img/index.d.ts +9 -0
  203. package/{lib-next/theme/MDXComponents/Img.js → lib/theme/MDXComponents/Img/index.js} +1 -3
  204. package/{lib-next/theme/MDXComponents/Img.module.css → lib/theme/MDXComponents/Img/styles.module.css} +0 -0
  205. package/lib/theme/MDXComponents/Pre.d.ts +9 -0
  206. package/{lib-next → lib}/theme/MDXComponents/Pre.js +4 -3
  207. package/lib/theme/MDXComponents/Ul/index.d.ts +9 -0
  208. package/{lib-next/theme/MDXComponents/Ul.js → lib/theme/MDXComponents/Ul/index.js} +5 -5
  209. package/lib/theme/MDXComponents/Ul/styles.module.css +14 -0
  210. package/lib/theme/MDXComponents/index.d.ts +9 -0
  211. package/{lib-next → lib}/theme/MDXComponents/index.js +0 -0
  212. package/lib/theme/MDXContent/index.d.ts +9 -0
  213. package/{lib-next → lib}/theme/MDXContent/index.js +0 -0
  214. package/lib/theme/MDXPage/index.d.ts +10 -0
  215. package/{lib-next → lib}/theme/MDXPage/index.js +3 -3
  216. package/{lib-next → lib}/theme/MDXPage/styles.module.css +0 -0
  217. package/lib/theme/Navbar/ColorModeToggle/index.d.ts +9 -0
  218. package/{lib-next → lib}/theme/Navbar/ColorModeToggle/index.js +1 -3
  219. package/lib/theme/Navbar/Content/index.d.ts +8 -0
  220. package/{lib-next → lib}/theme/Navbar/Content/index.js +5 -9
  221. package/{lib-next → lib}/theme/Navbar/Content/styles.module.css +0 -0
  222. package/lib/theme/Navbar/Layout/index.d.ts +9 -0
  223. package/{lib-next → lib}/theme/Navbar/Layout/index.js +1 -3
  224. package/{lib-next → lib}/theme/Navbar/Layout/styles.module.css +0 -0
  225. package/lib/theme/Navbar/Logo/index.d.ts +8 -0
  226. package/{lib-next → lib}/theme/Navbar/Logo/index.js +0 -0
  227. package/lib/theme/Navbar/MobileSidebar/Header/index.d.ts +8 -0
  228. package/{lib-next → lib}/theme/Navbar/MobileSidebar/Header/index.js +1 -3
  229. package/lib/theme/Navbar/MobileSidebar/Layout/index.d.ts +9 -0
  230. package/{lib-next → lib}/theme/Navbar/MobileSidebar/Layout/index.js +0 -0
  231. package/lib/theme/Navbar/MobileSidebar/PrimaryMenu/index.d.ts +8 -0
  232. package/{lib-next → lib}/theme/Navbar/MobileSidebar/PrimaryMenu/index.js +5 -6
  233. package/lib/theme/Navbar/MobileSidebar/SecondaryMenu/index.d.ts +8 -0
  234. package/{lib-next → lib}/theme/Navbar/MobileSidebar/SecondaryMenu/index.js +2 -3
  235. package/lib/theme/Navbar/MobileSidebar/Toggle/index.d.ts +8 -0
  236. package/{lib-next → lib}/theme/Navbar/MobileSidebar/Toggle/index.js +1 -1
  237. package/lib/theme/Navbar/MobileSidebar/index.d.ts +8 -0
  238. package/{lib-next → lib}/theme/Navbar/MobileSidebar/index.js +2 -4
  239. package/lib/theme/Navbar/Search/index.d.ts +9 -0
  240. package/{lib-next → lib}/theme/Navbar/Search/index.js +3 -2
  241. package/{lib-next → lib}/theme/Navbar/Search/styles.module.css +0 -0
  242. package/lib/theme/Navbar/index.d.ts +8 -0
  243. package/{lib-next → lib}/theme/Navbar/index.js +0 -0
  244. package/lib/theme/NavbarItem/ComponentTypes.d.ts +9 -0
  245. package/{lib-next → lib}/theme/NavbarItem/ComponentTypes.js +0 -0
  246. package/lib/theme/NavbarItem/DefaultNavbarItem.d.ts +10 -0
  247. package/{lib-next → lib}/theme/NavbarItem/DefaultNavbarItem.js +4 -9
  248. package/lib/theme/NavbarItem/DocNavbarItem.d.ts +9 -0
  249. package/{lib-next → lib}/theme/NavbarItem/DocNavbarItem.js +7 -15
  250. package/lib/theme/NavbarItem/DocSidebarNavbarItem.d.ts +9 -0
  251. package/{lib-next → lib}/theme/NavbarItem/DocSidebarNavbarItem.js +2 -10
  252. package/lib/theme/NavbarItem/DocsVersionDropdownNavbarItem.d.ts +9 -0
  253. package/{lib-next → lib}/theme/NavbarItem/DocsVersionDropdownNavbarItem.js +8 -12
  254. package/lib/theme/NavbarItem/DocsVersionNavbarItem.d.ts +9 -0
  255. package/{lib-next → lib}/theme/NavbarItem/DocsVersionNavbarItem.js +1 -3
  256. package/lib/theme/NavbarItem/DropdownNavbarItem.d.ts +9 -0
  257. package/{lib-next → lib}/theme/NavbarItem/DropdownNavbarItem.js +16 -21
  258. package/lib/theme/NavbarItem/HtmlNavbarItem.d.ts +9 -0
  259. package/{lib-next → lib}/theme/NavbarItem/HtmlNavbarItem.js +1 -3
  260. package/lib/theme/NavbarItem/LocaleDropdownNavbarItem/index.d.ts +9 -0
  261. package/{lib-next → lib}/theme/NavbarItem/LocaleDropdownNavbarItem/index.js +14 -6
  262. package/{lib-next → lib}/theme/NavbarItem/LocaleDropdownNavbarItem/styles.module.css +0 -0
  263. package/lib/theme/NavbarItem/NavbarNavLink.d.ts +9 -0
  264. package/{lib-next → lib}/theme/NavbarItem/NavbarNavLink.js +6 -22
  265. package/lib/theme/NavbarItem/SearchNavbarItem.d.ts +9 -0
  266. package/{lib-next → lib}/theme/NavbarItem/SearchNavbarItem.js +2 -3
  267. package/lib/theme/NavbarItem/index.d.ts +9 -0
  268. package/{lib-next → lib}/theme/NavbarItem/index.js +7 -17
  269. package/lib/theme/NotFound.d.ts +8 -0
  270. package/{lib-next → lib}/theme/NotFound.js +1 -1
  271. package/lib/theme/PaginatorNavLink/index.d.ts +9 -0
  272. package/{lib-next → lib}/theme/PaginatorNavLink/index.js +0 -0
  273. package/lib/theme/SearchBar.d.ts +7 -0
  274. package/{lib-next → lib}/theme/SearchBar.js +0 -0
  275. package/lib/theme/SearchMetadata/index.d.ts +9 -0
  276. package/{lib-next → lib}/theme/SearchMetadata/index.js +3 -3
  277. package/lib/theme/SiteMetadata/index.d.ts +8 -0
  278. package/{lib-next → lib}/theme/SiteMetadata/index.js +16 -17
  279. package/lib/theme/SkipToContent/index.d.ts +8 -0
  280. package/{lib-next → lib}/theme/SkipToContent/index.js +0 -0
  281. package/{lib-next → lib}/theme/SkipToContent/styles.module.css +0 -0
  282. package/lib/theme/TOC/index.d.ts +9 -0
  283. package/{lib-next → lib}/theme/TOC/index.js +2 -2
  284. package/{lib-next → lib}/theme/TOC/styles.module.css +0 -0
  285. package/lib/theme/TOCCollapsible/CollapseButton/index.d.ts +9 -0
  286. package/{lib-next/theme/TOCCollapsible/CollapseButton.js → lib/theme/TOCCollapsible/CollapseButton/index.js} +1 -1
  287. package/{lib-next/theme/TOCCollapsible/CollapseButton.module.css → lib/theme/TOCCollapsible/CollapseButton/styles.module.css} +0 -0
  288. package/lib/theme/TOCCollapsible/index.d.ts +9 -0
  289. package/{lib-next → lib}/theme/TOCCollapsible/index.js +1 -1
  290. package/{lib-next/theme/TOCCollapsible/index.module.css → lib/theme/TOCCollapsible/styles.module.css} +0 -0
  291. package/lib/theme/TOCInline/index.d.ts +9 -0
  292. package/{lib-next → lib}/theme/TOCInline/index.js +1 -1
  293. package/{lib-next → lib}/theme/TOCInline/styles.module.css +0 -0
  294. package/lib/theme/TOCItems/Tree.d.ts +11 -0
  295. package/{lib-next → lib}/theme/TOCItems/Tree.js +5 -8
  296. package/lib/theme/TOCItems/index.d.ts +9 -0
  297. package/{lib-next → lib}/theme/TOCItems/index.js +1 -2
  298. package/lib/theme/TabItem/index.d.ts +9 -0
  299. package/{lib-next → lib}/theme/TabItem/index.js +1 -3
  300. package/{lib-next → lib}/theme/TabItem/styles.module.css +0 -0
  301. package/lib/theme/Tabs/index.d.ts +9 -0
  302. package/{lib-next → lib}/theme/Tabs/index.js +17 -33
  303. package/{lib-next → lib}/theme/Tabs/styles.module.css +0 -0
  304. package/lib/theme/Tag/index.d.ts +9 -0
  305. package/{lib-next → lib}/theme/Tag/index.js +0 -0
  306. package/{lib-next → lib}/theme/Tag/styles.module.css +0 -0
  307. package/lib/theme/TagsListByLetter/index.d.ts +9 -0
  308. package/{lib-next → lib}/theme/TagsListByLetter/index.js +1 -3
  309. package/{lib-next → lib}/theme/TagsListByLetter/styles.module.css +0 -0
  310. package/lib/theme/TagsListInline/index.d.ts +9 -0
  311. package/{lib-next → lib}/theme/TagsListInline/index.js +0 -0
  312. package/{lib-next → lib}/theme/TagsListInline/styles.module.css +0 -0
  313. package/lib/theme/ThemedImage/index.d.ts +9 -0
  314. package/{lib-next → lib}/theme/ThemedImage/index.js +3 -2
  315. package/{lib-next → lib}/theme/ThemedImage/styles.module.css +0 -0
  316. package/lib/theme/prism-include-languages.d.ts +8 -0
  317. package/{lib-next → lib}/theme/prism-include-languages.js +2 -2
  318. package/lib/translations.d.ts +15 -0
  319. package/lib/translations.js +120 -136
  320. package/lib/validateThemeConfig.d.ts +12 -0
  321. package/lib/validateThemeConfig.js +355 -322
  322. package/package.json +24 -28
  323. package/src/getSwizzleConfig.ts +0 -7
  324. package/src/index.ts +15 -13
  325. package/src/theme/BlogArchivePage/index.tsx +2 -2
  326. package/src/theme/BlogListPage/index.tsx +5 -5
  327. package/src/theme/BlogPostAuthors/index.tsx +1 -1
  328. package/src/theme/BlogPostItem/index.tsx +2 -2
  329. package/src/theme/BlogPostPage/index.tsx +5 -5
  330. package/src/theme/BlogSidebar/Desktop/index.tsx +1 -1
  331. package/src/theme/BlogSidebar/index.tsx +1 -1
  332. package/src/theme/BlogTagsListPage/index.tsx +4 -5
  333. package/src/theme/BlogTagsPostsPage/index.tsx +5 -6
  334. package/src/theme/CodeBlock/Content/Element.tsx +1 -1
  335. package/src/theme/CodeBlock/Content/String.tsx +2 -2
  336. package/src/theme/CodeBlock/Line/index.tsx +1 -0
  337. package/src/theme/CodeBlock/index.tsx +1 -1
  338. package/src/theme/ColorModeToggle/index.tsx +2 -2
  339. package/src/theme/Details/index.tsx +1 -0
  340. package/src/theme/DocBreadcrumbs/index.tsx +3 -2
  341. package/src/theme/DocCard/index.tsx +7 -6
  342. package/src/theme/DocCardList/index.tsx +2 -3
  343. package/src/theme/DocCategoryGeneratedIndexPage/index.tsx +2 -2
  344. package/src/theme/DocItem/index.tsx +9 -8
  345. package/src/theme/DocItemFooter/index.tsx +2 -3
  346. package/src/theme/DocPage/Layout/Main/index.tsx +2 -3
  347. package/src/theme/DocPage/Layout/Sidebar/ExpandButton/index.tsx +1 -1
  348. package/src/theme/DocPage/Layout/Sidebar/index.tsx +5 -6
  349. package/src/theme/DocPage/Layout/Sidebar/{index.module.css → styles.module.css} +0 -0
  350. package/src/theme/DocPage/Layout/index.tsx +3 -4
  351. package/src/theme/DocPage/Layout/{index.module.css → styles.module.css} +0 -0
  352. package/src/theme/DocPage/index.tsx +3 -5
  353. package/src/theme/DocSidebar/Desktop/CollapseButton/index.tsx +1 -1
  354. package/src/theme/DocSidebar/index.tsx +1 -1
  355. package/src/theme/DocSidebarItem/{Category.tsx → Category/index.tsx} +14 -15
  356. package/src/theme/DocSidebarItem/{Html.tsx → Html/index.tsx} +2 -2
  357. package/src/theme/DocSidebarItem/{Html.module.css → Html/styles.module.css} +0 -0
  358. package/src/theme/DocSidebarItem/{Link.tsx → Link/index.tsx} +1 -2
  359. package/src/theme/DocSidebarItem/{Link.module.css → Link/styles.module.css} +0 -0
  360. package/src/theme/DocSidebarItems/index.tsx +1 -1
  361. package/src/theme/DocTagDocListPage/index.tsx +3 -4
  362. package/src/theme/DocTagsListPage/index.tsx +3 -4
  363. package/src/theme/DocVersionBadge/index.tsx +1 -1
  364. package/src/theme/DocVersionBanner/index.tsx +1 -1
  365. package/src/theme/EditThisPage/index.tsx +2 -3
  366. package/src/theme/Footer/Links/MultiColumn/index.tsx +2 -2
  367. package/src/theme/Footer/Links/Simple/index.tsx +1 -1
  368. package/src/theme/Footer/Links/index.tsx +1 -1
  369. package/src/theme/Footer/Logo/index.tsx +2 -2
  370. package/src/theme/Heading/index.tsx +1 -1
  371. package/src/theme/IconEdit/index.tsx +0 -1
  372. package/src/theme/LastUpdated/index.tsx +1 -1
  373. package/src/theme/Layout/index.tsx +9 -7
  374. package/src/theme/Logo/index.tsx +2 -3
  375. package/src/theme/MDXComponents/Details.tsx +5 -3
  376. package/src/theme/MDXComponents/Head.tsx +5 -3
  377. package/src/theme/MDXComponents/{Img.tsx → Img/index.tsx} +3 -2
  378. package/src/theme/MDXComponents/{Img.module.css → Img/styles.module.css} +0 -0
  379. package/src/theme/MDXComponents/Pre.tsx +2 -2
  380. package/src/theme/MDXComponents/{Ul.tsx → Ul/index.tsx} +5 -3
  381. package/src/theme/MDXComponents/Ul/styles.module.css +14 -0
  382. package/src/theme/MDXPage/index.tsx +4 -4
  383. package/src/theme/Navbar/ColorModeToggle/index.tsx +1 -1
  384. package/src/theme/Navbar/Content/index.tsx +6 -6
  385. package/src/theme/Navbar/Layout/index.tsx +2 -2
  386. package/src/theme/Navbar/MobileSidebar/Header/index.tsx +1 -1
  387. package/src/theme/Navbar/MobileSidebar/Layout/index.tsx +1 -1
  388. package/src/theme/Navbar/MobileSidebar/PrimaryMenu/index.tsx +1 -2
  389. package/src/theme/Navbar/MobileSidebar/Toggle/index.tsx +1 -1
  390. package/src/theme/Navbar/MobileSidebar/index.tsx +2 -2
  391. package/src/theme/Navbar/Search/index.tsx +6 -2
  392. package/src/theme/NavbarItem/DefaultNavbarItem.tsx +3 -5
  393. package/src/theme/NavbarItem/DocNavbarItem.tsx +6 -14
  394. package/src/theme/NavbarItem/DocSidebarNavbarItem.tsx +2 -10
  395. package/src/theme/NavbarItem/DocsVersionDropdownNavbarItem.tsx +5 -6
  396. package/src/theme/NavbarItem/DocsVersionNavbarItem.tsx +2 -2
  397. package/src/theme/NavbarItem/DropdownNavbarItem.tsx +8 -10
  398. package/src/theme/NavbarItem/LocaleDropdownNavbarItem/index.tsx +13 -5
  399. package/src/theme/NavbarItem/NavbarNavLink.tsx +3 -9
  400. package/src/theme/NavbarItem/SearchNavbarItem.tsx +6 -3
  401. package/src/theme/NavbarItem/index.tsx +9 -19
  402. package/src/theme/NotFound.tsx +1 -1
  403. package/src/theme/SiteMetadata/index.tsx +1 -1
  404. package/src/theme/TOC/index.tsx +2 -1
  405. package/src/theme/TOCCollapsible/{CollapseButton.tsx → CollapseButton/index.tsx} +2 -1
  406. package/src/theme/TOCCollapsible/{CollapseButton.module.css → CollapseButton/styles.module.css} +0 -0
  407. package/src/theme/TOCCollapsible/index.tsx +3 -2
  408. package/src/theme/TOCCollapsible/{index.module.css → styles.module.css} +0 -0
  409. package/src/theme/TOCInline/index.tsx +2 -1
  410. package/src/theme/TOCItems/index.tsx +2 -2
  411. package/src/theme/TabItem/index.tsx +1 -1
  412. package/src/theme/Tabs/index.tsx +9 -8
  413. package/src/theme/TagsListByLetter/index.tsx +1 -1
  414. package/src/theme/ThemedImage/index.tsx +0 -1
  415. package/src/theme-classic.d.ts +8 -15
  416. package/src/translations.ts +2 -3
  417. package/src/validateThemeConfig.ts +8 -8
  418. package/lib/deps.d.ts +0 -13
  419. package/lib/theme-classic.d.ts +0 -1279
  420. package/lib-next/theme/NavbarItem/utils.js +0 -10
  421. package/lib-next/theme/Tabs/__tests__/index.test.js +0 -146
  422. package/src/theme/NavbarItem/utils.ts +0 -13
@@ -7,15 +7,13 @@
7
7
  import React from 'react';
8
8
  import clsx from 'clsx';
9
9
  import BlogPostAuthor from '@theme/BlogPostAuthor';
10
- import styles from './styles.module.css'; // Component responsible for the authors layout
11
-
10
+ import styles from './styles.module.css';
11
+ // Component responsible for the authors layout
12
12
  export default function BlogPostAuthors({authors, assets}) {
13
13
  const authorsCount = authors.length;
14
-
15
14
  if (authorsCount === 0) {
16
15
  return null;
17
16
  }
18
-
19
17
  const imageOnly = authors.every(({name}) => !name);
20
18
  return (
21
19
  <div
@@ -0,0 +1,9 @@
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
+ /// <reference types="react" />
8
+ import type { Props } from '@theme/BlogPostItem';
9
+ export default function BlogPostItem(props: Props): JSX.Element;
@@ -13,10 +13,10 @@ import {usePluralForm} from '@docusaurus/theme-common';
13
13
  import {blogPostContainerID} from '@docusaurus/utils-common';
14
14
  import MDXContent from '@theme/MDXContent';
15
15
  import EditThisPage from '@theme/EditThisPage';
16
- import styles from './styles.module.css';
17
16
  import TagsListInline from '@theme/TagsListInline';
18
- import BlogPostAuthors from '@theme/BlogPostAuthors'; // Very simple pluralization: probably good enough for now
19
-
17
+ import BlogPostAuthors from '@theme/BlogPostAuthors';
18
+ import styles from './styles.module.css';
19
+ // Very simple pluralization: probably good enough for now
20
20
  function useReadingTimePlural() {
21
21
  const {selectMessage} = usePluralForm();
22
22
  return (readingTimeFloat) => {
@@ -30,14 +30,11 @@ function useReadingTimePlural() {
30
30
  'Pluralized label for "{readingTime} min read". Use as much plural forms (separated by "|") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)',
31
31
  message: 'One min read|{readingTime} min read',
32
32
  },
33
- {
34
- readingTime,
35
- },
33
+ {readingTime},
36
34
  ),
37
35
  );
38
36
  };
39
37
  }
40
-
41
38
  export default function BlogPostItem(props) {
42
39
  const readingTimePlural = useReadingTimePlural();
43
40
  const {withBaseUrl} = useBaseUrlUtils();
@@ -95,15 +92,11 @@ export default function BlogPostItem(props) {
95
92
  </header>
96
93
 
97
94
  {image && (
98
- <meta
99
- itemProp="image"
100
- content={withBaseUrl(image, {
101
- absolute: true,
102
- })}
103
- />
95
+ <meta itemProp="image" content={withBaseUrl(image, {absolute: true})} />
104
96
  )}
105
97
 
106
- <div // This ID is used for the feed generation to locate the main content
98
+ <div
99
+ // This ID is used for the feed generation to locate the main content
107
100
  id={isBlogPostPage ? blogPostContainerID : undefined}
108
101
  className="markdown"
109
102
  itemProp="articleBody">
@@ -117,10 +110,7 @@ export default function BlogPostItem(props) {
117
110
  isBlogPostPage && styles.blogPostDetailsFull,
118
111
  )}>
119
112
  {tagsExists && (
120
- <div
121
- className={clsx('col', {
122
- 'col--9': truncatedPost,
123
- })}>
113
+ <div className={clsx('col', {'col--9': truncatedPost})}>
124
114
  <TagsListInline tags={tags} />
125
115
  </div>
126
116
  )}
@@ -145,9 +135,7 @@ export default function BlogPostItem(props) {
145
135
  description:
146
136
  'The ARIA label for the link to full blog posts from excerpts',
147
137
  },
148
- {
149
- title,
150
- },
138
+ {title},
151
139
  )}>
152
140
  <b>
153
141
  <Translate
@@ -0,0 +1,10 @@
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
+ /// <reference types="@docusaurus/plugin-content-blog" />
8
+ /// <reference types="react" />
9
+ import type { Props } from '@theme/BlogPostPage';
10
+ export default function BlogPostPage(props: Props): JSX.Element;
@@ -5,17 +5,16 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  import React from 'react';
8
- import BlogLayout from '@theme/BlogLayout';
9
- import BlogPostItem from '@theme/BlogPostItem';
10
- import BlogPostPaginator from '@theme/BlogPostPaginator';
8
+ import clsx from 'clsx';
11
9
  import {
12
10
  PageMetadata,
13
11
  HtmlClassNameProvider,
14
12
  ThemeClassNames,
15
13
  } from '@docusaurus/theme-common';
14
+ import BlogLayout from '@theme/BlogLayout';
15
+ import BlogPostItem from '@theme/BlogPostItem';
16
+ import BlogPostPaginator from '@theme/BlogPostPaginator';
16
17
  import TOC from '@theme/TOC';
17
- import clsx from 'clsx';
18
-
19
18
  function BlogPostPageMetadata(props) {
20
19
  const {content: BlogPostContents} = props;
21
20
  const {assets, metadata} = BlogPostContents;
@@ -49,7 +48,6 @@ function BlogPostPageMetadata(props) {
49
48
  </PageMetadata>
50
49
  );
51
50
  }
52
-
53
51
  function BlogPostPageContent(props) {
54
52
  const {content: BlogPostContents, sidebar} = props;
55
53
  const {assets, metadata} = BlogPostContents;
@@ -87,7 +85,6 @@ function BlogPostPageContent(props) {
87
85
  </BlogLayout>
88
86
  );
89
87
  }
90
-
91
88
  export default function BlogPostPage(props) {
92
89
  return (
93
90
  <HtmlClassNameProvider
@@ -0,0 +1,9 @@
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
+ /// <reference types="react" />
8
+ import type { Props } from '@theme/BlogPostPaginator';
9
+ export default function BlogPostPaginator(props: Props): JSX.Element;
@@ -0,0 +1,9 @@
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
+ /// <reference types="react" />
8
+ import type { Props } from '@theme/BlogSidebar/Desktop';
9
+ export default function BlogSidebarDesktop({ sidebar }: Props): JSX.Element;
@@ -0,0 +1,9 @@
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
+ /// <reference types="react" />
8
+ import type { Props } from '@theme/BlogSidebar/Mobile';
9
+ export default function BlogSidebarMobile(props: Props): JSX.Element;
@@ -7,7 +7,6 @@
7
7
  import React from 'react';
8
8
  import Link from '@docusaurus/Link';
9
9
  import {NavbarSecondaryMenuFiller} from '@docusaurus/theme-common';
10
-
11
10
  function BlogSidebarMobileSecondaryMenu({sidebar}) {
12
11
  return (
13
12
  <ul className="menu__list">
@@ -25,7 +24,6 @@ function BlogSidebarMobileSecondaryMenu({sidebar}) {
25
24
  </ul>
26
25
  );
27
26
  }
28
-
29
27
  export default function BlogSidebarMobile(props) {
30
28
  return (
31
29
  <NavbarSecondaryMenuFiller
@@ -0,0 +1,9 @@
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
+ /// <reference types="react" />
8
+ import type { Props } from '@theme/BlogSidebar';
9
+ export default function BlogSidebar({ sidebar }: Props): JSX.Element | null;
@@ -5,19 +5,17 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  import React from 'react';
8
+ import {useWindowSize} from '@docusaurus/theme-common';
8
9
  import BlogSidebarDesktop from '@theme/BlogSidebar/Desktop';
9
10
  import BlogSidebarMobile from '@theme/BlogSidebar/Mobile';
10
- import {useWindowSize} from '@docusaurus/theme-common';
11
11
  export default function BlogSidebar({sidebar}) {
12
12
  const windowSize = useWindowSize();
13
-
14
13
  if (!sidebar?.items.length) {
15
14
  return null;
16
- } // Mobile sidebar doesn't need to be server-rendered
17
-
15
+ }
16
+ // Mobile sidebar doesn't need to be server-rendered
18
17
  if (windowSize === 'mobile') {
19
18
  return <BlogSidebarMobile sidebar={sidebar} />;
20
19
  }
21
-
22
20
  return <BlogSidebarDesktop sidebar={sidebar} />;
23
21
  }
@@ -0,0 +1,10 @@
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
+ /// <reference types="@docusaurus/plugin-content-blog" />
8
+ /// <reference types="react" />
9
+ import type { Props } from '@theme/BlogTagsListPage';
10
+ export default function BlogTagsListPage({ tags, sidebar }: Props): JSX.Element;
@@ -5,16 +5,16 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  import React from 'react';
8
- import BlogLayout from '@theme/BlogLayout';
9
- import TagsListByLetter from '@theme/TagsListByLetter';
8
+ import clsx from 'clsx';
10
9
  import {
11
10
  PageMetadata,
12
11
  HtmlClassNameProvider,
13
12
  ThemeClassNames,
14
13
  translateTagsPageTitle,
15
14
  } from '@docusaurus/theme-common';
15
+ import BlogLayout from '@theme/BlogLayout';
16
+ import TagsListByLetter from '@theme/TagsListByLetter';
16
17
  import SearchMetadata from '../SearchMetadata';
17
- import clsx from 'clsx';
18
18
  export default function BlogTagsListPage({tags, sidebar}) {
19
19
  const title = translateTagsPageTitle();
20
20
  return (
@@ -0,0 +1,10 @@
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
+ /// <reference types="@docusaurus/plugin-content-blog" />
8
+ /// <reference types="react" />
9
+ import type { Props } from '@theme/BlogTagsPostsPage';
10
+ export default function BlogTagsPostsPage({ tag, items, sidebar, listMetadata, }: Props): JSX.Element;
@@ -5,9 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  import React from 'react';
8
- import Link from '@docusaurus/Link';
9
- import BlogLayout from '@theme/BlogLayout';
10
- import BlogPostItem from '@theme/BlogPostItem';
8
+ import clsx from 'clsx';
11
9
  import Translate, {translate} from '@docusaurus/Translate';
12
10
  import {
13
11
  PageMetadata,
@@ -15,10 +13,12 @@ import {
15
13
  ThemeClassNames,
16
14
  usePluralForm,
17
15
  } from '@docusaurus/theme-common';
16
+ import Link from '@docusaurus/Link';
17
+ import BlogLayout from '@theme/BlogLayout';
18
+ import BlogPostItem from '@theme/BlogPostItem';
18
19
  import BlogListPaginator from '@theme/BlogListPaginator';
19
20
  import SearchMetadata from '@theme/SearchMetadata';
20
- import clsx from 'clsx'; // Very simple pluralization: probably good enough for now
21
-
21
+ // Very simple pluralization: probably good enough for now
22
22
  function useBlogPostsPlural() {
23
23
  const {selectMessage} = usePluralForm();
24
24
  return (count) =>
@@ -31,13 +31,10 @@ function useBlogPostsPlural() {
31
31
  'Pluralized label for "{count} posts". Use as much plural forms (separated by "|") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)',
32
32
  message: 'One post|{count} posts',
33
33
  },
34
- {
35
- count,
36
- },
34
+ {count},
37
35
  ),
38
36
  );
39
37
  }
40
-
41
38
  export default function BlogTagsPostsPage({tag, items, sidebar, listMetadata}) {
42
39
  const blogPostsPlural = useBlogPostsPlural();
43
40
  const title = translate(
@@ -46,10 +43,7 @@ export default function BlogTagsPostsPage({tag, items, sidebar, listMetadata}) {
46
43
  description: 'The title of the page for a blog tag',
47
44
  message: '{nPosts} tagged with "{tagName}"',
48
45
  },
49
- {
50
- nPosts: blogPostsPlural(tag.count),
51
- tagName: tag.label,
52
- },
46
+ {nPosts: blogPostsPlural(tag.count), tagName: tag.label},
53
47
  );
54
48
  return (
55
49
  <HtmlClassNameProvider
@@ -0,0 +1,10 @@
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
+ import { type ComponentProps } from 'react';
8
+ export default function CodeBlockContainer<T extends 'div' | 'pre'>({ as: As, ...props }: {
9
+ as: T;
10
+ } & ComponentProps<T>): JSX.Element;
@@ -16,7 +16,8 @@ export default function CodeBlockContainer({as: As, ...props}) {
16
16
  const prismTheme = usePrismTheme();
17
17
  const prismCssVariables = getPrismCssVariables(prismTheme);
18
18
  return (
19
- <As // Polymorphic components are hard to type, without `oneOf` generics
19
+ <As
20
+ // Polymorphic components are hard to type, without `oneOf` generics
20
21
  {...props}
21
22
  style={prismCssVariables}
22
23
  className={clsx(
@@ -0,0 +1,9 @@
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
+ /// <reference types="react" />
8
+ import type { Props } from '@theme/CodeBlock/Content/Element';
9
+ export default function CodeBlockJSX({ children, className, }: Props): JSX.Element;
@@ -5,12 +5,12 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  import React from 'react';
8
- import Container from '@theme/CodeBlock/Container';
9
8
  import clsx from 'clsx';
10
- import styles from './styles.module.css'; // <pre> tags in markdown map to CodeBlocks. They may contain JSX children. When
9
+ import Container from '@theme/CodeBlock/Container';
10
+ import styles from './styles.module.css';
11
+ // <pre> tags in markdown map to CodeBlocks. They may contain JSX children. When
11
12
  // the children is not a simple string, we just return a styled block without
12
13
  // actually highlighting.
13
-
14
14
  export default function CodeBlockJSX({children, className}) {
15
15
  return (
16
16
  <Container
@@ -0,0 +1,9 @@
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
+ /// <reference types="react" />
8
+ import type { Props } from '@theme/CodeBlock/Content/String';
9
+ export default function CodeBlockString({ children, className: blockClassName, metastring, title: titleProp, showLineNumbers: showLineNumbersProp, language: languageProp, }: Props): JSX.Element;
@@ -5,6 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  import React from 'react';
8
+ import clsx from 'clsx';
8
9
  import {
9
10
  useThemeConfig,
10
11
  parseCodeBlockTitle,
@@ -14,7 +15,6 @@ import {
14
15
  usePrismTheme,
15
16
  useCodeWordWrap,
16
17
  } from '@docusaurus/theme-common';
17
- import clsx from 'clsx';
18
18
  import Highlight, {defaultProps} from 'prism-react-renderer';
19
19
  import Line from '@theme/CodeBlock/Line';
20
20
  import CopyButton from '@theme/CodeBlock/CopyButton';
@@ -35,10 +35,10 @@ export default function CodeBlockString({
35
35
  const language =
36
36
  languageProp ?? parseLanguage(blockClassName) ?? defaultLanguage;
37
37
  const prismTheme = usePrismTheme();
38
- const wordWrap = useCodeWordWrap(); // We still parse the metastring in case we want to support more syntax in the
38
+ const wordWrap = useCodeWordWrap();
39
+ // We still parse the metastring in case we want to support more syntax in the
39
40
  // future. Note that MDX doesn't strip quotes when parsing metastring:
40
41
  // "title=\"xyz\"" => title: "\"xyz\""
41
-
42
42
  const title = parseCodeBlockTitle(metastring) || titleProp;
43
43
  const {lineClassNames, code} = parseLines(children, {
44
44
  metastring,
@@ -46,7 +46,7 @@ export default function CodeBlockString({
46
46
  magicComments,
47
47
  });
48
48
  const showLineNumbers =
49
- showLineNumbersProp || containsLineNumbers(metastring);
49
+ showLineNumbersProp ?? containsLineNumbers(metastring);
50
50
  return (
51
51
  <Container
52
52
  as="div"
@@ -0,0 +1,9 @@
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
+ /// <reference types="react" />
8
+ import type { Props } from '@theme/CodeBlock/CopyButton';
9
+ export default function CopyButton({ code, className }: Props): JSX.Element;
@@ -0,0 +1,9 @@
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
+ /// <reference types="react" />
8
+ import type { Props } from '@theme/CodeBlock/Line';
9
+ export default function CodeBlockLine({ line, classNames, showLineNumbers, getLineProps, getTokenProps, }: Props): JSX.Element;
@@ -17,19 +17,12 @@ export default function CodeBlockLine({
17
17
  if (line.length === 1 && line[0].content === '\n') {
18
18
  line[0].content = '';
19
19
  }
20
-
21
20
  const lineProps = getLineProps({
22
21
  line,
23
22
  className: clsx(classNames, showLineNumbers && styles.codeLine),
24
23
  });
25
24
  const lineTokens = line.map((token, key) => (
26
- <span
27
- key={key}
28
- {...getTokenProps({
29
- token,
30
- key,
31
- })}
32
- />
25
+ <span key={key} {...getTokenProps({token, key})} />
33
26
  ));
34
27
  return (
35
28
  <span {...lineProps}>
@@ -0,0 +1,9 @@
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
+ /// <reference types="react" />
8
+ import type { Props } from '@theme/CodeBlock/WordWrapButton';
9
+ export default function WordWrapButton({ className, onClick, isEnabled, }: Props): JSX.Element | null;
@@ -0,0 +1,9 @@
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
+ /// <reference types="react" />
8
+ import type { Props } from '@theme/CodeBlock';
9
+ export default function CodeBlock({ children: rawChildren, ...props }: Props): JSX.Element;
@@ -14,15 +14,13 @@ import StringContent from '@theme/CodeBlock/Content/String';
14
14
  * return `children` as-is; otherwise, it concatenates the string children
15
15
  * together.
16
16
  */
17
-
18
17
  function maybeStringifyChildren(children) {
19
18
  if (React.Children.toArray(children).some((el) => isValidElement(el))) {
20
19
  return children;
21
- } // The children is now guaranteed to be one/more plain strings
22
-
20
+ }
21
+ // The children is now guaranteed to be one/more plain strings
23
22
  return Array.isArray(children) ? children.join('') : children;
24
23
  }
25
-
26
24
  export default function CodeBlock({children: rawChildren, ...props}) {
27
25
  // The Prism theme on SSR is always the default theme but the site theme can
28
26
  // be in a different mode. React hydration doesn't update DOM styles that come
@@ -0,0 +1,11 @@
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
+ import React from 'react';
8
+ import type { Props } from '@theme/ColorModeToggle';
9
+ declare function ColorModeToggle({ className, value, onChange }: Props): JSX.Element;
10
+ declare const _default: React.MemoExoticComponent<typeof ColorModeToggle>;
11
+ export default _default;
@@ -5,13 +5,12 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  import React from 'react';
8
+ import clsx from 'clsx';
8
9
  import useIsBrowser from '@docusaurus/useIsBrowser';
9
10
  import {translate} from '@docusaurus/Translate';
10
11
  import IconLightMode from '@theme/IconLightMode';
11
12
  import IconDarkMode from '@theme/IconDarkMode';
12
- import clsx from 'clsx';
13
13
  import styles from './styles.module.css';
14
-
15
14
  function ColorModeToggle({className, value, onChange}) {
16
15
  const isBrowser = useIsBrowser();
17
16
  const title = translate(
@@ -58,5 +57,4 @@ function ColorModeToggle({className, value, onChange}) {
58
57
  </div>
59
58
  );
60
59
  }
61
-
62
60
  export default React.memo(ColorModeToggle);
@@ -0,0 +1,9 @@
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
+ /// <reference types="react" />
8
+ import type { Props } from '@theme/Details';
9
+ export default function Details({ ...props }: Props): JSX.Element;
@@ -7,9 +7,9 @@
7
7
  import React from 'react';
8
8
  import clsx from 'clsx';
9
9
  import {Details as DetailsGeneric} from '@docusaurus/theme-common/Details';
10
- import styles from './styles.module.css'; // Should we have a custom details/summary comp in Infima instead of reusing
10
+ import styles from './styles.module.css';
11
+ // Should we have a custom details/summary comp in Infima instead of reusing
11
12
  // alert classes?
12
-
13
13
  const InfimaClasses = 'alert alert--info';
14
14
  export default function Details({...props}) {
15
15
  return (
@@ -0,0 +1,8 @@
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
+ /// <reference types="react" />
8
+ export default function DocBreadcrumbs(): JSX.Element | null;