@docusaurus/theme-classic 0.0.0-5030 → 0.0.0-5031

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 (327) hide show
  1. package/lib/getSwizzleConfig.d.ts +8 -0
  2. package/lib/getSwizzleConfig.js +226 -234
  3. package/lib/index.d.ts +12 -0
  4. package/lib/index.js +103 -155
  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 +0 -4
  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 +0 -3
  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 +8 -20
  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 +0 -3
  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 +2 -4
  44. package/lib/theme/BlogTagsListPage/index.d.ts +10 -0
  45. package/{lib-next → lib}/theme/BlogTagsListPage/index.js +0 -0
  46. package/lib/theme/BlogTagsPostsPage/index.d.ts +10 -0
  47. package/{lib-next → lib}/theme/BlogTagsPostsPage/index.js +2 -9
  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 +2 -2
  53. package/lib/theme/CodeBlock/Content/String.d.ts +9 -0
  54. package/{lib-next → lib}/theme/CodeBlock/Content/String.js +2 -2
  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 +0 -2
  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 +6 -11
  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 +3 -13
  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 +0 -3
  81. package/lib/theme/DocCategoryGeneratedIndexPage/index.d.ts +10 -0
  82. package/{lib-next → lib}/theme/DocCategoryGeneratedIndexPage/index.js +4 -5
  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 +8 -20
  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 +0 -5
  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 +0 -0
  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 +0 -0
  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 +2 -5
  98. package/{lib-next → 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 +0 -0
  101. package/{lib-next → 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 +0 -2
  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 +0 -0
  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 → lib}/theme/DocSidebarItem/Category/index.js +6 -21
  121. package/lib/theme/DocSidebarItem/Html/index.d.ts +9 -0
  122. package/{lib-next → lib}/theme/DocSidebarItem/Html/index.js +3 -4
  123. package/{lib-next → lib}/theme/DocSidebarItem/Html/styles.module.css +0 -0
  124. package/lib/theme/DocSidebarItem/Link/index.d.ts +9 -0
  125. package/{lib-next → lib}/theme/DocSidebarItem/Link/index.js +0 -0
  126. package/{lib-next → 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 +2 -3
  131. package/lib/theme/DocTagDocListPage/index.d.ts +10 -0
  132. package/{lib-next → lib}/theme/DocTagDocListPage/index.js +2 -10
  133. package/lib/theme/DocTagsListPage/index.d.ts +10 -0
  134. package/{lib-next → lib}/theme/DocTagsListPage/index.js +0 -0
  135. package/lib/theme/DocVersionBadge/index.d.ts +9 -0
  136. package/{lib-next → lib}/theme/DocVersionBadge/index.js +1 -5
  137. package/lib/theme/DocVersionBanner/index.d.ts +9 -0
  138. package/{lib-next → lib}/theme/DocVersionBanner/index.js +3 -16
  139. package/lib/theme/EditThisPage/index.d.ts +9 -0
  140. package/{lib-next → lib}/theme/EditThisPage/index.js +0 -0
  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 +3 -7
  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 +0 -2
  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 +0 -0
  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 +2 -9
  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 +2 -2
  198. package/lib/theme/MDXComponents/Head.d.ts +9 -0
  199. package/{lib-next → lib}/theme/MDXComponents/Head.js +0 -3
  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 → lib}/theme/MDXComponents/Img/index.js +0 -2
  204. package/{lib-next → 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 +2 -1
  207. package/lib/theme/MDXComponents/Ul.d.ts +9 -0
  208. package/{lib-next → lib}/theme/MDXComponents/Ul.js +2 -3
  209. package/lib/theme/MDXComponents/index.d.ts +9 -0
  210. package/{lib-next → lib}/theme/MDXComponents/index.js +0 -0
  211. package/lib/theme/MDXContent/index.d.ts +9 -0
  212. package/{lib-next → lib}/theme/MDXContent/index.js +0 -0
  213. package/lib/theme/MDXPage/index.d.ts +10 -0
  214. package/{lib-next → lib}/theme/MDXPage/index.js +0 -0
  215. package/{lib-next → lib}/theme/MDXPage/styles.module.css +0 -0
  216. package/lib/theme/Navbar/ColorModeToggle/index.d.ts +9 -0
  217. package/{lib-next → lib}/theme/Navbar/ColorModeToggle/index.js +0 -2
  218. package/lib/theme/Navbar/Content/index.d.ts +8 -0
  219. package/{lib-next → lib}/theme/Navbar/Content/index.js +0 -4
  220. package/{lib-next → lib}/theme/Navbar/Content/styles.module.css +0 -0
  221. package/lib/theme/Navbar/Layout/index.d.ts +9 -0
  222. package/{lib-next → lib}/theme/Navbar/Layout/index.js +0 -2
  223. package/{lib-next → lib}/theme/Navbar/Layout/styles.module.css +0 -0
  224. package/lib/theme/Navbar/Logo/index.d.ts +8 -0
  225. package/{lib-next → lib}/theme/Navbar/Logo/index.js +0 -0
  226. package/lib/theme/Navbar/MobileSidebar/Header/index.d.ts +8 -0
  227. package/{lib-next → lib}/theme/Navbar/MobileSidebar/Header/index.js +0 -2
  228. package/lib/theme/Navbar/MobileSidebar/Layout/index.d.ts +9 -0
  229. package/{lib-next → lib}/theme/Navbar/MobileSidebar/Layout/index.js +0 -0
  230. package/lib/theme/Navbar/MobileSidebar/PrimaryMenu/index.d.ts +8 -0
  231. package/{lib-next → lib}/theme/Navbar/MobileSidebar/PrimaryMenu/index.js +4 -5
  232. package/lib/theme/Navbar/MobileSidebar/SecondaryMenu/index.d.ts +8 -0
  233. package/{lib-next → lib}/theme/Navbar/MobileSidebar/SecondaryMenu/index.js +2 -3
  234. package/lib/theme/Navbar/MobileSidebar/Toggle/index.d.ts +8 -0
  235. package/{lib-next → lib}/theme/Navbar/MobileSidebar/Toggle/index.js +0 -0
  236. package/lib/theme/Navbar/MobileSidebar/index.d.ts +8 -0
  237. package/{lib-next → lib}/theme/Navbar/MobileSidebar/index.js +0 -2
  238. package/lib/theme/Navbar/Search/index.d.ts +9 -0
  239. package/{lib-next → lib}/theme/Navbar/Search/index.js +0 -0
  240. package/{lib-next → lib}/theme/Navbar/Search/styles.module.css +0 -0
  241. package/lib/theme/Navbar/index.d.ts +8 -0
  242. package/{lib-next → lib}/theme/Navbar/index.js +0 -0
  243. package/lib/theme/NavbarItem/ComponentTypes.d.ts +9 -0
  244. package/{lib-next → lib}/theme/NavbarItem/ComponentTypes.js +0 -0
  245. package/lib/theme/NavbarItem/DefaultNavbarItem.d.ts +10 -0
  246. package/{lib-next → lib}/theme/NavbarItem/DefaultNavbarItem.js +1 -7
  247. package/lib/theme/NavbarItem/DocNavbarItem.d.ts +9 -0
  248. package/{lib-next → lib}/theme/NavbarItem/DocNavbarItem.js +3 -4
  249. package/lib/theme/NavbarItem/DocSidebarNavbarItem.d.ts +9 -0
  250. package/{lib-next → lib}/theme/NavbarItem/DocSidebarNavbarItem.js +0 -2
  251. package/lib/theme/NavbarItem/DocsVersionDropdownNavbarItem.d.ts +9 -0
  252. package/{lib-next → lib}/theme/NavbarItem/DocsVersionDropdownNavbarItem.js +4 -7
  253. package/lib/theme/NavbarItem/DocsVersionNavbarItem.d.ts +9 -0
  254. package/{lib-next → lib}/theme/NavbarItem/DocsVersionNavbarItem.js +0 -2
  255. package/lib/theme/NavbarItem/DropdownNavbarItem.d.ts +9 -0
  256. package/{lib-next → lib}/theme/NavbarItem/DropdownNavbarItem.js +6 -17
  257. package/lib/theme/NavbarItem/HtmlNavbarItem.d.ts +9 -0
  258. package/{lib-next → lib}/theme/NavbarItem/HtmlNavbarItem.js +1 -3
  259. package/lib/theme/NavbarItem/LocaleDropdownNavbarItem/index.d.ts +9 -0
  260. package/{lib-next → lib}/theme/NavbarItem/LocaleDropdownNavbarItem/index.js +2 -2
  261. package/{lib-next → lib}/theme/NavbarItem/LocaleDropdownNavbarItem/styles.module.css +0 -0
  262. package/lib/theme/NavbarItem/NavbarNavLink.d.ts +9 -0
  263. package/{lib-next → lib}/theme/NavbarItem/NavbarNavLink.js +5 -16
  264. package/lib/theme/NavbarItem/SearchNavbarItem.d.ts +9 -0
  265. package/{lib-next → lib}/theme/NavbarItem/SearchNavbarItem.js +0 -1
  266. package/lib/theme/NavbarItem/index.d.ts +9 -0
  267. package/{lib-next → lib}/theme/NavbarItem/index.js +0 -6
  268. package/lib/theme/NavbarItem/utils.d.ts +7 -0
  269. package/{lib-next → lib}/theme/NavbarItem/utils.js +0 -1
  270. package/lib/theme/NotFound.d.ts +8 -0
  271. package/{lib-next → lib}/theme/NotFound.js +0 -0
  272. package/lib/theme/PaginatorNavLink/index.d.ts +9 -0
  273. package/{lib-next → lib}/theme/PaginatorNavLink/index.js +0 -0
  274. package/lib/theme/SearchBar.d.ts +7 -0
  275. package/{lib-next → lib}/theme/SearchBar.js +0 -0
  276. package/lib/theme/SearchMetadata/index.d.ts +9 -0
  277. package/{lib-next → lib}/theme/SearchMetadata/index.js +3 -3
  278. package/lib/theme/SiteMetadata/index.d.ts +8 -0
  279. package/{lib-next → lib}/theme/SiteMetadata/index.js +15 -16
  280. package/lib/theme/SkipToContent/index.d.ts +8 -0
  281. package/{lib-next → lib}/theme/SkipToContent/index.js +0 -0
  282. package/{lib-next → lib}/theme/SkipToContent/styles.module.css +0 -0
  283. package/lib/theme/TOC/index.d.ts +9 -0
  284. package/{lib-next → lib}/theme/TOC/index.js +2 -2
  285. package/{lib-next → lib}/theme/TOC/styles.module.css +0 -0
  286. package/lib/theme/TOCCollapsible/CollapseButton/index.d.ts +9 -0
  287. package/{lib-next → lib}/theme/TOCCollapsible/CollapseButton/index.js +0 -0
  288. package/{lib-next → lib}/theme/TOCCollapsible/CollapseButton/styles.module.css +0 -0
  289. package/lib/theme/TOCCollapsible/index.d.ts +9 -0
  290. package/{lib-next → lib}/theme/TOCCollapsible/index.js +0 -0
  291. package/{lib-next → lib}/theme/TOCCollapsible/styles.module.css +0 -0
  292. package/lib/theme/TOCInline/index.d.ts +9 -0
  293. package/{lib-next → lib}/theme/TOCInline/index.js +0 -0
  294. package/{lib-next → lib}/theme/TOCInline/styles.module.css +0 -0
  295. package/lib/theme/TOCItems/Tree.d.ts +11 -0
  296. package/{lib-next → lib}/theme/TOCItems/Tree.js +5 -8
  297. package/lib/theme/TOCItems/index.d.ts +9 -0
  298. package/{lib-next → lib}/theme/TOCItems/index.js +0 -1
  299. package/lib/theme/TabItem/index.d.ts +9 -0
  300. package/{lib-next → lib}/theme/TabItem/index.js +1 -3
  301. package/{lib-next → lib}/theme/TabItem/styles.module.css +0 -0
  302. package/lib/theme/Tabs/index.d.ts +9 -0
  303. package/{lib-next → lib}/theme/Tabs/index.js +11 -27
  304. package/{lib-next → lib}/theme/Tabs/styles.module.css +0 -0
  305. package/lib/theme/Tag/index.d.ts +9 -0
  306. package/{lib-next → lib}/theme/Tag/index.js +0 -0
  307. package/{lib-next → lib}/theme/Tag/styles.module.css +0 -0
  308. package/lib/theme/TagsListByLetter/index.d.ts +9 -0
  309. package/{lib-next → lib}/theme/TagsListByLetter/index.js +0 -2
  310. package/{lib-next → lib}/theme/TagsListByLetter/styles.module.css +0 -0
  311. package/lib/theme/TagsListInline/index.d.ts +9 -0
  312. package/{lib-next → lib}/theme/TagsListInline/index.js +0 -0
  313. package/{lib-next → lib}/theme/TagsListInline/styles.module.css +0 -0
  314. package/lib/theme/ThemedImage/index.d.ts +9 -0
  315. package/{lib-next → lib}/theme/ThemedImage/index.js +3 -2
  316. package/{lib-next → lib}/theme/ThemedImage/styles.module.css +0 -0
  317. package/lib/theme/prism-include-languages.d.ts +8 -0
  318. package/{lib-next → lib}/theme/prism-include-languages.js +2 -2
  319. package/lib/translations.d.ts +15 -0
  320. package/lib/translations.js +120 -136
  321. package/lib/validateThemeConfig.d.ts +68 -0
  322. package/lib/validateThemeConfig.js +353 -322
  323. package/package.json +19 -25
  324. package/src/index.ts +1 -1
  325. package/lib/deps.d.ts +0 -13
  326. package/lib/theme-classic.d.ts +0 -1279
  327. package/lib-next/theme/Tabs/__tests__/index.test.js +0 -146
@@ -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/DocCardList';
9
+ export default function DocCardList({ items, className }: Props): JSX.Element;
@@ -8,18 +8,15 @@ import React from 'react';
8
8
  import clsx from 'clsx';
9
9
  import {findFirstCategoryLink} from '@docusaurus/theme-common';
10
10
  import DocCard from '@theme/DocCard';
11
-
12
11
  // Filter categories that don't have a link.
13
12
  function filterItems(items) {
14
13
  return items.filter((item) => {
15
14
  if (item.type === 'category') {
16
15
  return !!findFirstCategoryLink(item);
17
16
  }
18
-
19
17
  return true;
20
18
  });
21
19
  }
22
-
23
20
  export default function DocCardList({items, className}) {
24
21
  return (
25
22
  <section className={clsx('row', className)}>
@@ -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-docs" />
8
+ /// <reference types="react" />
9
+ import type { Props } from '@theme/DocCategoryGeneratedIndexPage';
10
+ export default function DocCategoryGeneratedIndexPage(props: Props): JSX.Element;
@@ -17,18 +17,17 @@ import DocVersionBadge from '@theme/DocVersionBadge';
17
17
  import DocBreadcrumbs from '@theme/DocBreadcrumbs';
18
18
  import Heading from '@theme/Heading';
19
19
  import styles from './styles.module.css';
20
-
21
20
  function DocCategoryGeneratedIndexPageMetadata({categoryGeneratedIndex}) {
22
21
  return (
23
22
  <PageMetadata
24
23
  title={categoryGeneratedIndex.title}
25
24
  description={categoryGeneratedIndex.description}
26
- keywords={categoryGeneratedIndex.keywords} // TODO `require` this?
25
+ keywords={categoryGeneratedIndex.keywords}
26
+ // TODO `require` this?
27
27
  image={useBaseUrl(categoryGeneratedIndex.image)}
28
28
  />
29
29
  );
30
30
  }
31
-
32
31
  function DocCategoryGeneratedIndexPageContent({categoryGeneratedIndex}) {
33
32
  const category = useCurrentSidebarCategory();
34
33
  return (
@@ -36,7 +35,8 @@ function DocCategoryGeneratedIndexPageContent({categoryGeneratedIndex}) {
36
35
  <PageMetadata
37
36
  title={categoryGeneratedIndex.title}
38
37
  description={categoryGeneratedIndex.description}
39
- keywords={categoryGeneratedIndex.keywords} // TODO `require` this?
38
+ keywords={categoryGeneratedIndex.keywords}
39
+ // TODO `require` this?
40
40
  image={useBaseUrl(categoryGeneratedIndex.image)}
41
41
  />
42
42
  <div className={styles.generatedIndexPage}>
@@ -64,7 +64,6 @@ function DocCategoryGeneratedIndexPageContent({categoryGeneratedIndex}) {
64
64
  </>
65
65
  );
66
66
  }
67
-
68
67
  export default function DocCategoryGeneratedIndexPage(props) {
69
68
  return (
70
69
  <>
@@ -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-docs" />
8
+ /// <reference types="react" />
9
+ import type { Props } from '@theme/DocItem';
10
+ export default function DocItem(props: Props): JSX.Element;
@@ -22,25 +22,14 @@ import Heading from '@theme/Heading';
22
22
  import DocBreadcrumbs from '@theme/DocBreadcrumbs';
23
23
  import MDXContent from '@theme/MDXContent';
24
24
  import styles from './styles.module.css';
25
-
26
25
  function DocItemMetadata(props) {
27
26
  const {content: DocContent} = props;
28
27
  const {metadata, frontMatter, assets} = DocContent;
29
28
  const {keywords} = frontMatter;
30
29
  const {description, title} = metadata;
31
30
  const image = assets.image ?? frontMatter.image;
32
- return (
33
- <PageMetadata
34
- {...{
35
- title,
36
- description,
37
- keywords,
38
- image,
39
- }}
40
- />
41
- );
31
+ return <PageMetadata {...{title, description, keywords, image}} />;
42
32
  }
43
-
44
33
  function DocItemContent(props) {
45
34
  const {content: DocContent} = props;
46
35
  const {metadata, frontMatter} = DocContent;
@@ -50,10 +39,10 @@ function DocItemContent(props) {
50
39
  toc_min_heading_level: tocMinHeadingLevel,
51
40
  toc_max_heading_level: tocMaxHeadingLevel,
52
41
  } = frontMatter;
53
- const {title} = metadata; // We only add a title if:
42
+ const {title} = metadata;
43
+ // We only add a title if:
54
44
  // - user doesn't ask to hide it with front matter
55
45
  // - the markdown content does not already contain a top-level h1 heading
56
-
57
46
  const shouldAddTitle =
58
47
  !hideTitle && typeof DocContent.contentTitle === 'undefined';
59
48
  const windowSize = useWindowSize();
@@ -84,11 +73,11 @@ function DocItemContent(props) {
84
73
 
85
74
  <div className={clsx(ThemeClassNames.docs.docMarkdown, 'markdown')}>
86
75
  {/*
87
- Title can be declared inside md content or declared through
88
- front matter and added manually. To make both cases consistent,
89
- the added title is added under the same div.markdown block
90
- See https://github.com/facebook/docusaurus/pull/4882#issuecomment-853021120
91
- */}
76
+ Title can be declared inside md content or declared through
77
+ front matter and added manually. To make both cases consistent,
78
+ the added title is added under the same div.markdown block
79
+ See https://github.com/facebook/docusaurus/pull/4882#issuecomment-853021120
80
+ */}
92
81
  {shouldAddTitle && (
93
82
  <header>
94
83
  <Heading as="h1">{title}</Heading>
@@ -118,7 +107,6 @@ function DocItemContent(props) {
118
107
  </div>
119
108
  );
120
109
  }
121
-
122
110
  export default function DocItem(props) {
123
111
  const docHtmlClassName = `docs-doc-id-${props.content.metadata.unversionedId}`;
124
112
  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-docs" />
8
+ /// <reference types="react" />
9
+ import type { Props } from '@theme/DocItem';
10
+ export default function DocItemFooter(props: Props): JSX.Element | null;
@@ -11,7 +11,6 @@ import LastUpdated from '@theme/LastUpdated';
11
11
  import EditThisPage from '@theme/EditThisPage';
12
12
  import TagsListInline from '@theme/TagsListInline';
13
13
  import styles from './styles.module.css';
14
-
15
14
  function TagsRow(props) {
16
15
  return (
17
16
  <div
@@ -25,7 +24,6 @@ function TagsRow(props) {
25
24
  </div>
26
25
  );
27
26
  }
28
-
29
27
  function EditMetaRow({
30
28
  editUrl,
31
29
  lastUpdatedAt,
@@ -48,7 +46,6 @@ function EditMetaRow({
48
46
  </div>
49
47
  );
50
48
  }
51
-
52
49
  export default function DocItemFooter(props) {
53
50
  const {content: DocContent} = props;
54
51
  const {metadata} = DocContent;
@@ -57,11 +54,9 @@ export default function DocItemFooter(props) {
57
54
  const canDisplayTagsRow = tags.length > 0;
58
55
  const canDisplayEditMetaRow = !!(editUrl || lastUpdatedAt || lastUpdatedBy);
59
56
  const canDisplayFooter = canDisplayTagsRow || canDisplayEditMetaRow;
60
-
61
57
  if (!canDisplayFooter) {
62
58
  return null;
63
59
  }
64
-
65
60
  return (
66
61
  <footer
67
62
  className={clsx(ThemeClassNames.docs.docFooter, 'docusaurus-mt-lg')}>
@@ -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/DocPage/Layout/Main';
9
+ export default function DocPageLayoutMain({ hiddenSidebarContainer, children, }: 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/DocPage/Layout/Sidebar/ExpandButton';
9
+ export default function DocPageLayoutSidebarExpandButton({ toggleSidebar, }: 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/DocPage/Layout/Sidebar';
9
+ export default function DocPageLayoutSidebar({ sidebar, hiddenSidebarContainer, setHiddenSidebarContainer, }: Props): JSX.Element;
@@ -10,10 +10,10 @@ import {ThemeClassNames, useDocsSidebar} from '@docusaurus/theme-common';
10
10
  import {useLocation} from '@docusaurus/router';
11
11
  import DocSidebar from '@theme/DocSidebar';
12
12
  import ExpandButton from '@theme/DocPage/Layout/Sidebar/ExpandButton';
13
- import styles from './styles.module.css'; // Reset sidebar state when sidebar changes
13
+ import styles from './styles.module.css';
14
+ // Reset sidebar state when sidebar changes
14
15
  // Use React key to unmount/remount the children
15
16
  // See https://github.com/facebook/docusaurus/issues/3414
16
-
17
17
  function ResetOnSidebarChange({children}) {
18
18
  const sidebar = useDocsSidebar();
19
19
  return (
@@ -22,7 +22,6 @@ function ResetOnSidebarChange({children}) {
22
22
  </React.Fragment>
23
23
  );
24
24
  }
25
-
26
25
  export default function DocPageLayoutSidebar({
27
26
  sidebar,
28
27
  hiddenSidebarContainer,
@@ -34,7 +33,6 @@ export default function DocPageLayoutSidebar({
34
33
  if (hiddenSidebar) {
35
34
  setHiddenSidebar(false);
36
35
  }
37
-
38
36
  setHiddenSidebarContainer((value) => !value);
39
37
  }, [setHiddenSidebarContainer, hiddenSidebar]);
40
38
  return (
@@ -48,7 +46,6 @@ export default function DocPageLayoutSidebar({
48
46
  if (!e.currentTarget.classList.contains(styles.docSidebarContainer)) {
49
47
  return;
50
48
  }
51
-
52
49
  if (hiddenSidebarContainer) {
53
50
  setHiddenSidebar(true);
54
51
  }
@@ -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/DocPage/Layout';
9
+ export default function DocPageLayout({ children }: Props): JSX.Element;
File without changes
@@ -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-docs" />
8
+ /// <reference types="react" />
9
+ import type { Props } from '@theme/DocPage';
10
+ export default function DocPage(props: Props): JSX.Element;
@@ -20,11 +20,9 @@ import SearchMetadata from '@theme/SearchMetadata';
20
20
  export default function DocPage(props) {
21
21
  const {versionMetadata} = props;
22
22
  const currentDocRouteMetadata = useDocRouteMetadata(props);
23
-
24
23
  if (!currentDocRouteMetadata) {
25
24
  return <NotFound />;
26
25
  }
27
-
28
26
  const {docElement, sidebarName, sidebarItems} = currentDocRouteMetadata;
29
27
  return (
30
28
  <>
@@ -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/DocPaginator';
9
+ export default function DocPaginator(props: Props): JSX.Element;
File without changes
@@ -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/DocSidebar/Desktop/CollapseButton';
9
+ export default function CollapseButton({ onClick }: 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/DocSidebar/Desktop/Content';
9
+ export default function DocSidebarDesktopContent({ path, sidebar, className, }: Props): JSX.Element;
@@ -13,7 +13,6 @@ import {
13
13
  } from '@docusaurus/theme-common';
14
14
  import DocSidebarItems from '@theme/DocSidebarItems';
15
15
  import styles from './styles.module.css';
16
-
17
16
  function useShowAnnouncementBar() {
18
17
  const {isActive} = useAnnouncementBar();
19
18
  const [showAnnouncementBar, setShowAnnouncementBar] = useState(isActive);
@@ -27,7 +26,6 @@ function useShowAnnouncementBar() {
27
26
  );
28
27
  return isActive && showAnnouncementBar;
29
28
  }
30
-
31
29
  export default function DocSidebarDesktopContent({path, sidebar, className}) {
32
30
  const showAnnouncementBar = useShowAnnouncementBar();
33
31
  return (
@@ -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/DocSidebar/Desktop';
9
+ declare function DocSidebarDesktop({ path, sidebar, onCollapse, isHidden }: Props): JSX.Element;
10
+ declare const _default: React.MemoExoticComponent<typeof DocSidebarDesktop>;
11
+ export default _default;
@@ -11,7 +11,6 @@ import Logo from '@theme/Logo';
11
11
  import CollapseButton from '@theme/DocSidebar/Desktop/CollapseButton';
12
12
  import Content from '@theme/DocSidebar/Desktop/Content';
13
13
  import styles from './styles.module.css';
14
-
15
14
  function DocSidebarDesktop({path, sidebar, onCollapse, isHidden}) {
16
15
  const {
17
16
  navbar: {hideOnScroll},
@@ -32,5 +31,4 @@ function DocSidebarDesktop({path, sidebar, onCollapse, isHidden}) {
32
31
  </div>
33
32
  );
34
33
  }
35
-
36
34
  export default React.memo(DocSidebarDesktop);
@@ -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/DocSidebar/Mobile';
9
+ declare function DocSidebarMobile(props: Props): JSX.Element;
10
+ declare const _default: React.MemoExoticComponent<typeof DocSidebarMobile>;
11
+ export default _default;
@@ -12,7 +12,6 @@ import {
12
12
  useNavbarMobileSidebar,
13
13
  } from '@docusaurus/theme-common';
14
14
  import DocSidebarItems from '@theme/DocSidebarItems';
15
-
16
15
  // eslint-disable-next-line react/function-component-definition
17
16
  const DocSidebarMobileSecondaryMenu = ({sidebar, path}) => {
18
17
  const mobileSidebar = useNavbarMobileSidebar();
@@ -26,7 +25,6 @@ const DocSidebarMobileSecondaryMenu = ({sidebar, path}) => {
26
25
  if (item.type === 'category' && item.href) {
27
26
  mobileSidebar.toggle();
28
27
  }
29
-
30
28
  if (item.type === 'link') {
31
29
  mobileSidebar.toggle();
32
30
  }
@@ -36,7 +34,6 @@ const DocSidebarMobileSecondaryMenu = ({sidebar, path}) => {
36
34
  </ul>
37
35
  );
38
36
  };
39
-
40
37
  function DocSidebarMobile(props) {
41
38
  return (
42
39
  <NavbarSecondaryMenuFiller
@@ -45,5 +42,4 @@ function DocSidebarMobile(props) {
45
42
  />
46
43
  );
47
44
  }
48
-
49
45
  export default React.memo(DocSidebarMobile);
@@ -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/DocSidebar';
9
+ export default function DocSidebar(props: Props): JSX.Element;
@@ -9,11 +9,11 @@ import {useWindowSize} from '@docusaurus/theme-common';
9
9
  import DocSidebarDesktop from '@theme/DocSidebar/Desktop';
10
10
  import DocSidebarMobile from '@theme/DocSidebar/Mobile';
11
11
  export default function DocSidebar(props) {
12
- const windowSize = useWindowSize(); // Desktop sidebar visible on hydration: need SSR rendering
13
-
12
+ const windowSize = useWindowSize();
13
+ // Desktop sidebar visible on hydration: need SSR rendering
14
14
  const shouldRenderSidebarDesktop =
15
- windowSize === 'desktop' || windowSize === 'ssr'; // Mobile sidebar not visible on hydration: can avoid SSR rendering
16
-
15
+ windowSize === 'desktop' || windowSize === 'ssr';
16
+ // Mobile sidebar not visible on hydration: can avoid SSR rendering
17
17
  const shouldRenderSidebarMobile = windowSize === 'mobile';
18
18
  return (
19
19
  <>
@@ -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/DocSidebarItem/Category';
9
+ export default function DocSidebarItemCategory({ item, onItemClick, activePath, level, index, ...props }: Props): JSX.Element;
@@ -21,14 +21,12 @@ import Link from '@docusaurus/Link';
21
21
  import {translate} from '@docusaurus/Translate';
22
22
  import useIsBrowser from '@docusaurus/useIsBrowser';
23
23
  import DocSidebarItems from '@theme/DocSidebarItems';
24
-
25
24
  // If we navigate to a category and it becomes active, it should automatically
26
25
  // expand itself
27
26
  function useAutoExpandActiveCategory({isActive, collapsed, updateCollapsed}) {
28
27
  const wasActive = usePrevious(isActive);
29
28
  useEffect(() => {
30
29
  const justBecameActive = isActive && !wasActive;
31
-
32
30
  if (justBecameActive && collapsed) {
33
31
  updateCollapsed(false);
34
32
  }
@@ -42,23 +40,20 @@ function useAutoExpandActiveCategory({isActive, collapsed, updateCollapsed}) {
42
40
  * see https://github.com/facebookincubator/infima/issues/36#issuecomment-772543188
43
41
  * see https://github.com/facebook/docusaurus/issues/3030
44
42
  */
45
-
46
43
  function useCategoryHrefWithSSRFallback(item) {
47
44
  const isBrowser = useIsBrowser();
48
45
  return useMemo(() => {
49
46
  if (item.href) {
50
47
  return item.href;
51
- } // In these cases, it's not necessary to render a fallback
48
+ }
49
+ // In these cases, it's not necessary to render a fallback
52
50
  // We skip the "findFirstCategoryLink" computation
53
-
54
51
  if (isBrowser || !item.collapsible) {
55
52
  return undefined;
56
53
  }
57
-
58
54
  return findFirstCategoryLink(item);
59
55
  }, [item, isBrowser]);
60
56
  }
61
-
62
57
  function CollapseButton({categoryLabel, onClick}) {
63
58
  return (
64
59
  <button
@@ -69,9 +64,7 @@ function CollapseButton({categoryLabel, onClick}) {
69
64
  description:
70
65
  'The ARIA label to toggle the collapsible sidebar category',
71
66
  },
72
- {
73
- label: categoryLabel,
74
- },
67
+ {label: categoryLabel},
75
68
  )}
76
69
  type="button"
77
70
  className="clean-btn menu__caret"
@@ -79,7 +72,6 @@ function CollapseButton({categoryLabel, onClick}) {
79
72
  />
80
73
  );
81
74
  }
82
-
83
75
  export default function DocSidebarItemCategory({
84
76
  item,
85
77
  onItemClick,
@@ -104,22 +96,16 @@ export default function DocSidebarItemCategory({
104
96
  if (!collapsible) {
105
97
  return false;
106
98
  }
107
-
108
99
  return isActive ? false : item.collapsed;
109
100
  },
110
101
  });
111
- const {expandedItem, setExpandedItem} = useDocSidebarItemsExpandedState(); // Use this instead of `setCollapsed`, because it is also reactive
112
-
102
+ const {expandedItem, setExpandedItem} = useDocSidebarItemsExpandedState();
103
+ // Use this instead of `setCollapsed`, because it is also reactive
113
104
  const updateCollapsed = (toCollapsed = !collapsed) => {
114
105
  setExpandedItem(toCollapsed ? null : index);
115
106
  setCollapsed(toCollapsed);
116
107
  };
117
-
118
- useAutoExpandActiveCategory({
119
- isActive,
120
- collapsed,
121
- updateCollapsed,
122
- });
108
+ useAutoExpandActiveCategory({isActive, collapsed, updateCollapsed});
123
109
  useEffect(() => {
124
110
  if (
125
111
  collapsible &&
@@ -155,7 +141,6 @@ export default function DocSidebarItemCategory({
155
141
  collapsible
156
142
  ? (e) => {
157
143
  onItemClick?.(item);
158
-
159
144
  if (href) {
160
145
  updateCollapsed(false);
161
146
  } else {
@@ -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/DocSidebarItem/Html';
9
+ export default function DocSidebarItemHtml({ item, level, index, }: Props): JSX.Element;
@@ -18,10 +18,9 @@ export default function DocSidebarItemHtml({item, level, index}) {
18
18
  defaultStyle && `${styles.menuHtmlItem} menu__list-item`,
19
19
  className,
20
20
  )}
21
- key={index} // eslint-disable-next-line react/no-danger
22
- dangerouslySetInnerHTML={{
23
- __html: value,
24
- }}
21
+ key={index}
22
+ // eslint-disable-next-line react/no-danger
23
+ dangerouslySetInnerHTML={{__html: value}}
25
24
  />
26
25
  );
27
26
  }
@@ -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/DocSidebarItem/Link';
9
+ export default function DocSidebarItemLink({ item, onItemClick, activePath, level, index, ...props }: Props): JSX.Element;