@docusaurus/theme-classic 3.3.2 → 3.5.0

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 (335) hide show
  1. package/lib/getSwizzleConfig.js +32 -1
  2. package/lib/index.d.ts +0 -2
  3. package/lib/index.js +7 -88
  4. package/lib/inlineScripts.d.ts +16 -0
  5. package/lib/inlineScripts.js +98 -0
  6. package/lib/options.d.ts +0 -1
  7. package/lib/options.js +15 -3
  8. package/lib/theme/Admonition/Icon/Danger.d.ts +0 -2
  9. package/lib/theme/Admonition/Icon/Info.d.ts +0 -2
  10. package/lib/theme/Admonition/Icon/Note.d.ts +0 -2
  11. package/lib/theme/Admonition/Icon/Tip.d.ts +0 -2
  12. package/lib/theme/Admonition/Icon/Warning.d.ts +0 -2
  13. package/lib/theme/Admonition/Layout/index.d.ts +0 -2
  14. package/lib/theme/Admonition/Type/Caution.d.ts +0 -2
  15. package/lib/theme/Admonition/Type/Danger.d.ts +0 -2
  16. package/lib/theme/Admonition/Type/Info.d.ts +0 -2
  17. package/lib/theme/Admonition/Type/Note.d.ts +0 -2
  18. package/lib/theme/Admonition/Type/Tip.d.ts +0 -2
  19. package/lib/theme/Admonition/Type/Warning.d.ts +0 -2
  20. package/lib/theme/Admonition/Types.d.ts +0 -1
  21. package/lib/theme/Admonition/index.d.ts +0 -2
  22. package/lib/theme/AnnouncementBar/CloseButton/index.d.ts +0 -2
  23. package/lib/theme/AnnouncementBar/Content/index.d.ts +0 -2
  24. package/lib/theme/AnnouncementBar/index.d.ts +0 -1
  25. package/lib/theme/BackToTopButton/index.d.ts +0 -1
  26. package/lib/theme/Blog/Components/Author/Socials/index.d.ts +10 -0
  27. package/lib/theme/Blog/Components/Author/Socials/index.js +49 -0
  28. package/lib/theme/Blog/Components/Author/Socials/styles.module.css +39 -0
  29. package/lib/theme/Blog/Components/Author/index.d.ts +8 -0
  30. package/lib/theme/Blog/Components/Author/index.js +86 -0
  31. package/lib/theme/Blog/Components/Author/styles.module.css +74 -0
  32. package/lib/theme/Blog/Pages/BlogAuthorsListPage/index.d.ts +9 -0
  33. package/lib/theme/Blog/Pages/BlogAuthorsListPage/index.js +54 -0
  34. package/lib/theme/Blog/Pages/BlogAuthorsListPage/styles.module.css +11 -0
  35. package/lib/theme/Blog/Pages/BlogAuthorsPostsPage/index.d.ts +8 -0
  36. package/lib/theme/Blog/Pages/BlogAuthorsPostsPage/index.js +67 -0
  37. package/lib/theme/BlogArchivePage/index.d.ts +0 -2
  38. package/lib/theme/BlogLayout/index.d.ts +0 -2
  39. package/lib/theme/BlogListPage/StructuredData/index.d.ts +0 -2
  40. package/lib/theme/BlogListPage/StructuredData/index.js +1 -1
  41. package/lib/theme/BlogListPage/index.d.ts +0 -2
  42. package/lib/theme/BlogListPaginator/index.d.ts +0 -2
  43. package/lib/theme/BlogPostItem/Container/index.d.ts +0 -2
  44. package/lib/theme/BlogPostItem/Content/index.d.ts +0 -2
  45. package/lib/theme/BlogPostItem/Content/index.js +1 -1
  46. package/lib/theme/BlogPostItem/Footer/ReadMoreLink/index.d.ts +0 -2
  47. package/lib/theme/BlogPostItem/Footer/index.d.ts +0 -1
  48. package/lib/theme/BlogPostItem/Footer/index.js +1 -1
  49. package/lib/theme/BlogPostItem/Header/Authors/index.d.ts +0 -2
  50. package/lib/theme/BlogPostItem/Header/Authors/index.js +5 -4
  51. package/lib/theme/BlogPostItem/Header/Authors/styles.module.css +0 -1
  52. package/lib/theme/BlogPostItem/Header/Info/index.d.ts +0 -2
  53. package/lib/theme/BlogPostItem/Header/Info/index.js +2 -4
  54. package/lib/theme/BlogPostItem/Header/Title/index.d.ts +0 -2
  55. package/lib/theme/BlogPostItem/Header/Title/index.js +1 -1
  56. package/lib/theme/BlogPostItem/Header/index.d.ts +0 -1
  57. package/lib/theme/BlogPostItem/index.d.ts +0 -2
  58. package/lib/theme/BlogPostItem/index.js +1 -1
  59. package/lib/theme/BlogPostItems/index.d.ts +0 -2
  60. package/lib/theme/BlogPostItems/index.js +1 -1
  61. package/lib/theme/BlogPostPage/Metadata/index.d.ts +0 -1
  62. package/lib/theme/BlogPostPage/Metadata/index.js +1 -1
  63. package/lib/theme/BlogPostPage/StructuredData/index.d.ts +0 -1
  64. package/lib/theme/BlogPostPage/StructuredData/index.js +1 -1
  65. package/lib/theme/BlogPostPage/index.d.ts +0 -2
  66. package/lib/theme/BlogPostPage/index.js +7 -4
  67. package/lib/theme/BlogPostPaginator/index.d.ts +0 -2
  68. package/lib/theme/BlogSidebar/Content/index.d.ts +11 -0
  69. package/lib/theme/BlogSidebar/Content/index.js +41 -0
  70. package/lib/theme/BlogSidebar/Desktop/index.d.ts +4 -3
  71. package/lib/theme/BlogSidebar/Desktop/index.js +24 -17
  72. package/lib/theme/BlogSidebar/Desktop/styles.module.css +5 -0
  73. package/lib/theme/BlogSidebar/Mobile/index.d.ts +4 -3
  74. package/lib/theme/BlogSidebar/Mobile/index.js +25 -17
  75. package/lib/theme/BlogSidebar/Mobile/styles.module.css +10 -0
  76. package/lib/theme/BlogSidebar/index.d.ts +0 -2
  77. package/lib/theme/BlogTagsListPage/index.d.ts +0 -2
  78. package/lib/theme/BlogTagsPostsPage/index.d.ts +0 -2
  79. package/lib/theme/BlogTagsPostsPage/index.js +5 -32
  80. package/lib/theme/CodeBlock/Content/Element.d.ts +0 -2
  81. package/lib/theme/CodeBlock/Content/String.d.ts +0 -2
  82. package/lib/theme/CodeBlock/CopyButton/index.d.ts +0 -2
  83. package/lib/theme/CodeBlock/Line/index.d.ts +0 -2
  84. package/lib/theme/CodeBlock/WordWrapButton/index.d.ts +0 -2
  85. package/lib/theme/CodeBlock/index.d.ts +0 -2
  86. package/lib/theme/CodeInline/index.d.ts +0 -2
  87. package/lib/theme/ColorModeToggle/index.d.ts +0 -1
  88. package/lib/theme/ContentVisibility/Draft/index.d.ts +8 -0
  89. package/lib/theme/ContentVisibility/Draft/index.js +24 -0
  90. package/lib/theme/{Unlisted → ContentVisibility/Unlisted}/index.d.ts +1 -3
  91. package/lib/theme/ContentVisibility/index.d.ts +8 -0
  92. package/lib/theme/ContentVisibility/index.js +21 -0
  93. package/lib/theme/Details/index.d.ts +0 -2
  94. package/lib/theme/DocBreadcrumbs/Items/Home/index.d.ts +0 -1
  95. package/lib/theme/DocBreadcrumbs/index.d.ts +0 -1
  96. package/lib/theme/DocBreadcrumbs/index.js +2 -4
  97. package/lib/theme/DocCard/index.d.ts +0 -2
  98. package/lib/theme/DocCard/index.js +3 -3
  99. package/lib/theme/DocCardList/index.d.ts +0 -2
  100. package/lib/theme/DocCardList/index.js +1 -1
  101. package/lib/theme/DocCategoryGeneratedIndexPage/index.d.ts +0 -2
  102. package/lib/theme/DocCategoryGeneratedIndexPage/index.js +2 -4
  103. package/lib/theme/DocItem/Content/index.d.ts +0 -2
  104. package/lib/theme/DocItem/Content/index.js +1 -1
  105. package/lib/theme/DocItem/Footer/index.d.ts +0 -1
  106. package/lib/theme/DocItem/Footer/index.js +1 -1
  107. package/lib/theme/DocItem/Layout/index.d.ts +0 -2
  108. package/lib/theme/DocItem/Layout/index.js +4 -6
  109. package/lib/theme/DocItem/Metadata/index.d.ts +0 -1
  110. package/lib/theme/DocItem/Metadata/index.js +1 -1
  111. package/lib/theme/DocItem/Paginator/index.d.ts +0 -1
  112. package/lib/theme/DocItem/Paginator/index.js +1 -1
  113. package/lib/theme/DocItem/TOC/Desktop/index.d.ts +0 -1
  114. package/lib/theme/DocItem/TOC/Desktop/index.js +1 -1
  115. package/lib/theme/DocItem/TOC/Mobile/index.d.ts +0 -1
  116. package/lib/theme/DocItem/TOC/Mobile/index.js +1 -1
  117. package/lib/theme/DocItem/index.d.ts +0 -2
  118. package/lib/theme/DocItem/index.js +1 -1
  119. package/lib/theme/DocPaginator/index.d.ts +0 -2
  120. package/lib/theme/DocRoot/Layout/Main/index.d.ts +0 -2
  121. package/lib/theme/DocRoot/Layout/Main/index.js +1 -1
  122. package/lib/theme/DocRoot/Layout/Sidebar/ExpandButton/index.d.ts +0 -2
  123. package/lib/theme/DocRoot/Layout/Sidebar/index.d.ts +0 -2
  124. package/lib/theme/DocRoot/Layout/Sidebar/index.js +1 -1
  125. package/lib/theme/DocRoot/Layout/index.d.ts +0 -2
  126. package/lib/theme/DocRoot/Layout/index.js +1 -1
  127. package/lib/theme/DocRoot/index.d.ts +0 -2
  128. package/lib/theme/DocRoot/index.js +1 -1
  129. package/lib/theme/DocSidebar/Desktop/CollapseButton/index.d.ts +0 -2
  130. package/lib/theme/DocSidebar/Desktop/Content/index.d.ts +0 -2
  131. package/lib/theme/DocSidebar/Desktop/index.d.ts +0 -1
  132. package/lib/theme/DocSidebar/Mobile/index.d.ts +0 -1
  133. package/lib/theme/DocSidebar/index.d.ts +0 -2
  134. package/lib/theme/DocSidebarItem/Category/index.d.ts +0 -2
  135. package/lib/theme/DocSidebarItem/Category/index.js +2 -2
  136. package/lib/theme/DocSidebarItem/Html/index.d.ts +0 -2
  137. package/lib/theme/DocSidebarItem/Link/index.d.ts +0 -2
  138. package/lib/theme/DocSidebarItem/Link/index.js +1 -1
  139. package/lib/theme/DocSidebarItem/index.d.ts +0 -2
  140. package/lib/theme/DocSidebarItems/index.d.ts +0 -1
  141. package/lib/theme/DocSidebarItems/index.js +1 -1
  142. package/lib/theme/DocTagDocListPage/index.d.ts +0 -2
  143. package/lib/theme/DocTagDocListPage/index.js +4 -3
  144. package/lib/theme/DocTagsListPage/index.d.ts +0 -2
  145. package/lib/theme/DocVersionBadge/index.d.ts +0 -2
  146. package/lib/theme/DocVersionBadge/index.js +1 -1
  147. package/lib/theme/DocVersionBanner/index.d.ts +0 -2
  148. package/lib/theme/DocVersionBanner/index.js +1 -1
  149. package/lib/theme/DocVersionRoot/index.d.ts +0 -2
  150. package/lib/theme/DocVersionRoot/index.js +3 -3
  151. package/lib/theme/DocsRoot/index.d.ts +0 -2
  152. package/lib/theme/EditMetaRow/index.d.ts +0 -2
  153. package/lib/theme/EditThisPage/index.d.ts +0 -2
  154. package/lib/theme/ErrorPageContent.d.ts +0 -2
  155. package/lib/theme/Footer/Copyright/index.d.ts +0 -2
  156. package/lib/theme/Footer/Layout/index.d.ts +0 -2
  157. package/lib/theme/Footer/LinkItem/index.d.ts +0 -2
  158. package/lib/theme/Footer/Links/MultiColumn/index.d.ts +0 -2
  159. package/lib/theme/Footer/Links/Simple/index.d.ts +0 -2
  160. package/lib/theme/Footer/Links/index.d.ts +0 -2
  161. package/lib/theme/Footer/Logo/index.d.ts +0 -2
  162. package/lib/theme/Heading/index.d.ts +0 -2
  163. package/lib/theme/Icon/Arrow/index.d.ts +0 -2
  164. package/lib/theme/Icon/Close/index.d.ts +0 -2
  165. package/lib/theme/Icon/Copy/index.d.ts +0 -2
  166. package/lib/theme/Icon/DarkMode/index.d.ts +0 -2
  167. package/lib/theme/Icon/Edit/index.d.ts +0 -2
  168. package/lib/theme/Icon/ExternalLink/index.d.ts +0 -2
  169. package/lib/theme/Icon/Home/index.d.ts +0 -2
  170. package/lib/theme/Icon/Language/index.d.ts +0 -2
  171. package/lib/theme/Icon/LightMode/index.d.ts +0 -2
  172. package/lib/theme/Icon/Menu/index.d.ts +0 -2
  173. package/lib/theme/Icon/Socials/Default/index.d.ts +9 -0
  174. package/lib/theme/Icon/Socials/Default/index.js +30 -0
  175. package/lib/theme/Icon/Socials/GitHub/index.d.ts +9 -0
  176. package/lib/theme/Icon/Socials/GitHub/index.js +25 -0
  177. package/lib/theme/Icon/Socials/GitHub/styles.module.css +14 -0
  178. package/lib/theme/Icon/Socials/LinkedIn/index.d.ts +9 -0
  179. package/lib/theme/Icon/Socials/LinkedIn/index.js +24 -0
  180. package/lib/theme/Icon/Socials/StackOverflow/index.d.ts +9 -0
  181. package/lib/theme/Icon/Socials/StackOverflow/index.js +27 -0
  182. package/lib/theme/Icon/Socials/Twitter/index.d.ts +9 -0
  183. package/lib/theme/Icon/Socials/Twitter/index.js +24 -0
  184. package/lib/theme/Icon/Socials/X/index.d.ts +9 -0
  185. package/lib/theme/Icon/Socials/X/index.js +25 -0
  186. package/lib/theme/Icon/Socials/X/styles.module.css +14 -0
  187. package/lib/theme/Icon/Success/index.d.ts +0 -2
  188. package/lib/theme/Icon/WordWrap/index.d.ts +0 -2
  189. package/lib/theme/LastUpdated/index.d.ts +0 -2
  190. package/lib/theme/Layout/Provider/index.d.ts +0 -2
  191. package/lib/theme/Layout/Provider/index.js +1 -1
  192. package/lib/theme/Layout/index.d.ts +0 -3
  193. package/lib/theme/Logo/index.d.ts +0 -2
  194. package/lib/theme/MDXComponents/A.d.ts +0 -2
  195. package/lib/theme/MDXComponents/Code.d.ts +0 -2
  196. package/lib/theme/MDXComponents/Details.d.ts +0 -2
  197. package/lib/theme/MDXComponents/Heading.d.ts +0 -2
  198. package/lib/theme/MDXComponents/Img/index.d.ts +0 -2
  199. package/lib/theme/MDXComponents/Li.d.ts +0 -1
  200. package/lib/theme/MDXComponents/Pre.d.ts +0 -1
  201. package/lib/theme/MDXComponents/Ul/index.d.ts +0 -2
  202. package/lib/theme/MDXComponents/index.d.ts +0 -1
  203. package/lib/theme/MDXContent/index.d.ts +0 -2
  204. package/lib/theme/MDXPage/index.d.ts +0 -2
  205. package/lib/theme/MDXPage/index.js +10 -13
  206. package/lib/theme/Mermaid.d.ts +0 -1
  207. package/lib/theme/Navbar/ColorModeToggle/index.d.ts +0 -2
  208. package/lib/theme/Navbar/Content/index.d.ts +0 -1
  209. package/lib/theme/Navbar/Layout/index.d.ts +0 -2
  210. package/lib/theme/Navbar/Logo/index.d.ts +0 -1
  211. package/lib/theme/Navbar/MobileSidebar/Header/index.d.ts +0 -1
  212. package/lib/theme/Navbar/MobileSidebar/Layout/index.d.ts +0 -2
  213. package/lib/theme/Navbar/MobileSidebar/PrimaryMenu/index.d.ts +0 -1
  214. package/lib/theme/Navbar/MobileSidebar/SecondaryMenu/index.d.ts +0 -1
  215. package/lib/theme/Navbar/MobileSidebar/Toggle/index.d.ts +0 -1
  216. package/lib/theme/Navbar/MobileSidebar/index.d.ts +0 -1
  217. package/lib/theme/Navbar/Search/index.d.ts +0 -2
  218. package/lib/theme/Navbar/index.d.ts +0 -1
  219. package/lib/theme/NavbarItem/ComponentTypes.d.ts +0 -1
  220. package/lib/theme/NavbarItem/DefaultNavbarItem.d.ts +0 -2
  221. package/lib/theme/NavbarItem/DocNavbarItem.d.ts +0 -2
  222. package/lib/theme/NavbarItem/DocNavbarItem.js +4 -2
  223. package/lib/theme/NavbarItem/DocSidebarNavbarItem.d.ts +0 -2
  224. package/lib/theme/NavbarItem/DocSidebarNavbarItem.js +4 -2
  225. package/lib/theme/NavbarItem/DocsVersionDropdownNavbarItem.d.ts +0 -2
  226. package/lib/theme/NavbarItem/DocsVersionDropdownNavbarItem.js +19 -14
  227. package/lib/theme/NavbarItem/DocsVersionNavbarItem.d.ts +0 -2
  228. package/lib/theme/NavbarItem/DocsVersionNavbarItem.js +1 -1
  229. package/lib/theme/NavbarItem/DropdownNavbarItem/index.d.ts +0 -2
  230. package/lib/theme/NavbarItem/HtmlNavbarItem.d.ts +0 -2
  231. package/lib/theme/NavbarItem/LocaleDropdownNavbarItem/index.d.ts +0 -2
  232. package/lib/theme/NavbarItem/NavbarNavLink.d.ts +0 -2
  233. package/lib/theme/NavbarItem/SearchNavbarItem.d.ts +0 -2
  234. package/lib/theme/NavbarItem/index.d.ts +0 -2
  235. package/lib/theme/NotFound/Content/index.d.ts +0 -2
  236. package/lib/theme/NotFound/index.d.ts +0 -1
  237. package/lib/theme/PaginatorNavLink/index.d.ts +0 -2
  238. package/lib/theme/SearchBar.d.ts +0 -1
  239. package/lib/theme/SearchMetadata/index.d.ts +0 -2
  240. package/lib/theme/SiteMetadata/index.d.ts +0 -1
  241. package/lib/theme/SkipToContent/index.d.ts +0 -1
  242. package/lib/theme/TOC/index.d.ts +0 -2
  243. package/lib/theme/TOCCollapsible/CollapseButton/index.d.ts +0 -2
  244. package/lib/theme/TOCCollapsible/index.d.ts +0 -2
  245. package/lib/theme/TOCInline/index.d.ts +0 -2
  246. package/lib/theme/TOCItems/Tree.d.ts +0 -1
  247. package/lib/theme/TOCItems/index.d.ts +0 -2
  248. package/lib/theme/TabItem/index.d.ts +0 -2
  249. package/lib/theme/Tabs/index.d.ts +0 -2
  250. package/lib/theme/Tabs/index.js +3 -1
  251. package/lib/theme/Tag/index.d.ts +1 -3
  252. package/lib/theme/Tag/index.js +2 -1
  253. package/lib/theme/TagsListByLetter/index.d.ts +0 -2
  254. package/lib/theme/TagsListInline/index.d.ts +0 -2
  255. package/lib/theme/TagsListInline/index.js +3 -3
  256. package/lib/theme/ThemedImage/index.d.ts +0 -2
  257. package/lib/translations.js +2 -3
  258. package/package.json +15 -15
  259. package/src/getSwizzleConfig.ts +32 -0
  260. package/src/index.ts +8 -93
  261. package/src/inlineScripts.ts +114 -0
  262. package/src/options.ts +18 -2
  263. package/src/theme/Blog/Components/Author/Socials/index.tsx +66 -0
  264. package/src/theme/Blog/Components/Author/Socials/styles.module.css +39 -0
  265. package/src/theme/Blog/Components/Author/index.tsx +99 -0
  266. package/src/theme/Blog/Components/Author/styles.module.css +74 -0
  267. package/src/theme/Blog/Pages/BlogAuthorsListPage/index.tsx +62 -0
  268. package/src/theme/Blog/Pages/BlogAuthorsListPage/styles.module.css +11 -0
  269. package/src/theme/Blog/Pages/BlogAuthorsPostsPage/index.tsx +73 -0
  270. package/src/theme/BlogListPage/StructuredData/index.tsx +1 -1
  271. package/src/theme/BlogPostItem/Content/index.tsx +1 -1
  272. package/src/theme/BlogPostItem/Footer/index.tsx +1 -1
  273. package/src/theme/BlogPostItem/Header/Authors/index.tsx +5 -4
  274. package/src/theme/BlogPostItem/Header/Authors/styles.module.css +0 -1
  275. package/src/theme/BlogPostItem/Header/Info/index.tsx +2 -4
  276. package/src/theme/BlogPostItem/Header/Title/index.tsx +1 -1
  277. package/src/theme/BlogPostItem/index.tsx +1 -1
  278. package/src/theme/BlogPostItems/index.tsx +1 -1
  279. package/src/theme/BlogPostPage/Metadata/index.tsx +1 -1
  280. package/src/theme/BlogPostPage/StructuredData/index.tsx +1 -1
  281. package/src/theme/BlogPostPage/index.tsx +7 -4
  282. package/src/theme/BlogSidebar/Content/index.tsx +57 -0
  283. package/src/theme/BlogSidebar/Desktop/index.tsx +27 -17
  284. package/src/theme/BlogSidebar/Desktop/styles.module.css +5 -0
  285. package/src/theme/BlogSidebar/Mobile/index.tsx +29 -17
  286. package/src/theme/BlogSidebar/Mobile/styles.module.css +10 -0
  287. package/src/theme/BlogTagsPostsPage/index.tsx +5 -34
  288. package/src/theme/ContentVisibility/Draft/index.tsx +27 -0
  289. package/src/theme/{Unlisted → ContentVisibility/Unlisted}/index.tsx +1 -1
  290. package/src/theme/ContentVisibility/index.tsx +27 -0
  291. package/src/theme/DocBreadcrumbs/index.tsx +2 -4
  292. package/src/theme/DocCard/index.tsx +3 -3
  293. package/src/theme/DocCardList/index.tsx +1 -1
  294. package/src/theme/DocCategoryGeneratedIndexPage/index.tsx +2 -4
  295. package/src/theme/DocItem/Content/index.tsx +1 -1
  296. package/src/theme/DocItem/Footer/index.tsx +1 -1
  297. package/src/theme/DocItem/Layout/index.tsx +4 -6
  298. package/src/theme/DocItem/Metadata/index.tsx +1 -1
  299. package/src/theme/DocItem/Paginator/index.tsx +1 -1
  300. package/src/theme/DocItem/TOC/Desktop/index.tsx +1 -1
  301. package/src/theme/DocItem/TOC/Mobile/index.tsx +1 -1
  302. package/src/theme/DocItem/index.tsx +1 -1
  303. package/src/theme/DocRoot/Layout/Main/index.tsx +1 -1
  304. package/src/theme/DocRoot/Layout/Sidebar/index.tsx +1 -1
  305. package/src/theme/DocRoot/Layout/index.tsx +1 -1
  306. package/src/theme/DocRoot/index.tsx +1 -1
  307. package/src/theme/DocSidebarItem/Category/index.tsx +2 -2
  308. package/src/theme/DocSidebarItem/Link/index.tsx +1 -1
  309. package/src/theme/DocSidebarItems/index.tsx +1 -1
  310. package/src/theme/DocTagDocListPage/index.tsx +4 -2
  311. package/src/theme/DocVersionBadge/index.tsx +1 -1
  312. package/src/theme/DocVersionBanner/index.tsx +1 -1
  313. package/src/theme/DocVersionRoot/index.tsx +3 -3
  314. package/src/theme/Icon/Socials/Default/index.tsx +33 -0
  315. package/src/theme/Icon/Socials/GitHub/index.tsx +29 -0
  316. package/src/theme/Icon/Socials/GitHub/styles.module.css +14 -0
  317. package/src/theme/Icon/Socials/LinkedIn/index.tsx +27 -0
  318. package/src/theme/Icon/Socials/StackOverflow/index.tsx +30 -0
  319. package/src/theme/Icon/Socials/Twitter/index.tsx +27 -0
  320. package/src/theme/Icon/Socials/X/index.tsx +29 -0
  321. package/src/theme/Icon/Socials/X/styles.module.css +14 -0
  322. package/src/theme/Layout/Provider/index.tsx +1 -1
  323. package/src/theme/MDXPage/index.tsx +10 -13
  324. package/src/theme/NavbarItem/DocNavbarItem.tsx +4 -2
  325. package/src/theme/NavbarItem/DocSidebarNavbarItem.tsx +4 -2
  326. package/src/theme/NavbarItem/DocsVersionDropdownNavbarItem.tsx +32 -16
  327. package/src/theme/NavbarItem/DocsVersionNavbarItem.tsx +1 -1
  328. package/src/theme/Tabs/index.tsx +3 -1
  329. package/src/theme/Tag/index.tsx +7 -1
  330. package/src/theme/TagsListInline/index.tsx +3 -3
  331. package/src/theme-classic.d.ts +106 -12
  332. package/lib/theme/BlogPostItem/Header/Author/index.d.ts +0 -10
  333. package/lib/theme/BlogPostItem/Header/Author/index.js +0 -39
  334. package/src/theme/BlogPostItem/Header/Author/index.tsx +0 -47
  335. /package/lib/theme/{Unlisted → ContentVisibility/Unlisted}/index.js +0 -0
@@ -6,6 +6,7 @@
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.default = getSwizzleConfig;
9
10
  /* eslint sort-keys: "error" */
10
11
  function getSwizzleConfig() {
11
12
  return {
@@ -116,6 +117,27 @@ function getSwizzleConfig() {
116
117
  },
117
118
  description: 'The object mapping admonition type to a React component.\nUse it to add custom admonition type components, or replace existing ones.\nCan be ejected or wrapped (only manually, see our documentation).',
118
119
  },
120
+ Blog: {
121
+ actions: {
122
+ // Forbidden because it's a parent folder, makes the CLI crash atm
123
+ eject: 'forbidden',
124
+ wrap: 'forbidden',
125
+ },
126
+ },
127
+ 'Blog/Components': {
128
+ actions: {
129
+ // Forbidden because it's a parent folder, makes the CLI crash atm
130
+ eject: 'forbidden',
131
+ wrap: 'forbidden',
132
+ },
133
+ },
134
+ 'Blog/Pages': {
135
+ actions: {
136
+ // Forbidden because it's a parent folder, makes the CLI crash atm
137
+ eject: 'forbidden',
138
+ wrap: 'forbidden',
139
+ },
140
+ },
119
141
  CodeBlock: {
120
142
  actions: {
121
143
  eject: 'safe',
@@ -269,6 +291,16 @@ function getSwizzleConfig() {
269
291
  },
270
292
  description: 'The menu icon component',
271
293
  },
294
+ 'Icon/Socials': {
295
+ actions: {
296
+ // Forbidden because it's a parent folder, makes the CLI crash atm
297
+ // TODO the CLI should rather support --eject
298
+ // Subfolders can be swizzled
299
+ eject: 'forbidden',
300
+ wrap: 'forbidden',
301
+ },
302
+ description: 'The Icon/Socials folder is not directly swizzle-able, but you can swizzle its sub-components.',
303
+ },
272
304
  MDXComponents: {
273
305
  actions: {
274
306
  eject: 'safe',
@@ -372,4 +404,3 @@ function getSwizzleConfig() {
372
404
  },
373
405
  };
374
406
  }
375
- exports.default = getSwizzleConfig;
package/lib/index.d.ts CHANGED
@@ -4,10 +4,8 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- /// <reference path="../src/theme-classic.d.ts" />
8
7
  import type { LoadContext, Plugin } from '@docusaurus/types';
9
8
  import type { PluginOptions } from '@docusaurus/theme-classic';
10
- export declare const AnnouncementBarDismissStorageKey = "docusaurus.announcement.dismiss";
11
9
  export default function themeClassic(context: LoadContext, options: PluginOptions): Plugin<undefined>;
12
10
  export { default as getSwizzleConfig } from './getSwizzleConfig';
13
11
  export { validateThemeConfig, validateOptions } from './options';
package/lib/index.js CHANGED
@@ -6,102 +6,22 @@
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.validateOptions = exports.validateThemeConfig = exports.getSwizzleConfig = exports.AnnouncementBarDismissStorageKey = void 0;
9
+ exports.validateOptions = exports.validateThemeConfig = exports.getSwizzleConfig = void 0;
10
+ exports.default = themeClassic;
10
11
  const tslib_1 = require("tslib");
11
12
  const path_1 = tslib_1.__importDefault(require("path"));
12
13
  const module_1 = require("module");
13
14
  const rtlcss_1 = tslib_1.__importDefault(require("rtlcss"));
14
15
  const theme_translations_1 = require("@docusaurus/theme-translations");
15
16
  const translations_1 = require("./translations");
17
+ const inlineScripts_1 = require("./inlineScripts");
16
18
  const requireFromDocusaurusCore = (0, module_1.createRequire)(require.resolve('@docusaurus/core/package.json'));
17
19
  const ContextReplacementPlugin = requireFromDocusaurusCore('webpack/lib/ContextReplacementPlugin');
18
- // Need to be inlined to prevent dark mode FOUC
19
- // Make sure the key is the same as the one in `/theme/hooks/useTheme.js`
20
- const ThemeStorageKey = 'theme';
21
- // Support for ?docusaurus-theme=dark
22
- const ThemeQueryStringKey = 'docusaurus-theme';
23
- // Support for ?docusaurus-data-mode=embed&docusaurus-data-myAttr=42
24
- const DataQueryStringPrefixKey = 'docusaurus-data-';
25
- const noFlashColorMode = ({ defaultMode, respectPrefersColorScheme, }) =>
26
- /* language=js */
27
- `(function() {
28
- var defaultMode = '${defaultMode}';
29
- var respectPrefersColorScheme = ${respectPrefersColorScheme};
30
-
31
- function setDataThemeAttribute(theme) {
32
- document.documentElement.setAttribute('data-theme', theme);
33
- }
34
-
35
- function getQueryStringTheme() {
36
- try {
37
- return new URLSearchParams(window.location.search).get('${ThemeQueryStringKey}')
38
- } catch(e) {}
39
- }
40
-
41
- function getStoredTheme() {
42
- try {
43
- return localStorage.getItem('${ThemeStorageKey}');
44
- } catch (err) {}
45
- }
46
-
47
- var initialTheme = getQueryStringTheme() || getStoredTheme();
48
- if (initialTheme !== null) {
49
- setDataThemeAttribute(initialTheme);
50
- } else {
51
- if (
52
- respectPrefersColorScheme &&
53
- window.matchMedia('(prefers-color-scheme: dark)').matches
54
- ) {
55
- setDataThemeAttribute('dark');
56
- } else if (
57
- respectPrefersColorScheme &&
58
- window.matchMedia('(prefers-color-scheme: light)').matches
59
- ) {
60
- setDataThemeAttribute('light');
61
- } else {
62
- setDataThemeAttribute(defaultMode === 'dark' ? 'dark' : 'light');
63
- }
64
- }
65
- })();`;
66
- /* language=js */
67
- const DataAttributeQueryStringInlineJavaScript = `
68
- (function() {
69
- try {
70
- const entries = new URLSearchParams(window.location.search).entries();
71
- for (var [searchKey, value] of entries) {
72
- if (searchKey.startsWith('${DataQueryStringPrefixKey}')) {
73
- var key = searchKey.replace('${DataQueryStringPrefixKey}',"data-")
74
- document.documentElement.setAttribute(key, value);
75
- }
76
- }
77
- } catch(e) {}
78
- })();
79
- `;
80
- // Duplicated constant. Unfortunately we can't import it from theme-common, as
81
- // we need to support older nodejs versions without ESM support
82
- // TODO: import from theme-common once we only support Node.js with ESM support
83
- // + move all those announcementBar stuff there too
84
- exports.AnnouncementBarDismissStorageKey = 'docusaurus.announcement.dismiss';
85
- const AnnouncementBarDismissDataAttribute = 'data-announcement-bar-initially-dismissed';
86
- // We always render the announcement bar html on the server, to prevent layout
87
- // shifts on React hydration. The theme can use CSS + the data attribute to hide
88
- // the announcement bar asap (before React hydration)
89
- /* language=js */
90
- const AnnouncementBarInlineJavaScript = `
91
- (function() {
92
- function isDismissed() {
93
- try {
94
- return localStorage.getItem('${exports.AnnouncementBarDismissStorageKey}') === 'true';
95
- } catch (err) {}
96
- return false;
97
- }
98
- document.documentElement.setAttribute('${AnnouncementBarDismissDataAttribute}', isDismissed());
99
- })();`;
100
20
  function getInfimaCSSFile(direction) {
101
21
  return `infima/dist/css/default/default${direction === 'rtl' ? '-rtl' : ''}.css`;
102
22
  }
103
23
  function themeClassic(context, options) {
104
- const { i18n: { currentLocale, localeConfigs }, } = context;
24
+ const { i18n: { currentLocale, localeConfigs }, siteStorage, } = context;
105
25
  const themeConfig = context.siteConfig.themeConfig;
106
26
  const { announcementBar, colorMode, prism: { additionalLanguages }, } = themeConfig;
107
27
  const { customCss } = options;
@@ -171,9 +91,9 @@ function themeClassic(context, options) {
171
91
  {
172
92
  tagName: 'script',
173
93
  innerHTML: `
174
- ${noFlashColorMode(colorMode)}
175
- ${DataAttributeQueryStringInlineJavaScript}
176
- ${announcementBar ? AnnouncementBarInlineJavaScript : ''}
94
+ ${(0, inlineScripts_1.getThemeInlineScript)({ colorMode, siteStorage })}
95
+ ${inlineScripts_1.DataAttributeQueryStringInlineJavaScript}
96
+ ${announcementBar ? (0, inlineScripts_1.getAnnouncementBarInlineScript)({ siteStorage }) : ''}
177
97
  `,
178
98
  },
179
99
  ],
@@ -181,7 +101,6 @@ ${announcementBar ? AnnouncementBarInlineJavaScript : ''}
181
101
  },
182
102
  };
183
103
  }
184
- exports.default = themeClassic;
185
104
  var getSwizzleConfig_1 = require("./getSwizzleConfig");
186
105
  Object.defineProperty(exports, "getSwizzleConfig", { enumerable: true, get: function () { return tslib_1.__importDefault(getSwizzleConfig_1).default; } });
187
106
  var options_1 = require("./options");
@@ -0,0 +1,16 @@
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 { SiteStorage } from '@docusaurus/types';
8
+ import type { ThemeConfig } from '@docusaurus/theme-common';
9
+ export declare function getThemeInlineScript({ colorMode: { defaultMode, respectPrefersColorScheme }, siteStorage, }: {
10
+ colorMode: ThemeConfig['colorMode'];
11
+ siteStorage: SiteStorage;
12
+ }): string;
13
+ export declare const DataAttributeQueryStringInlineJavaScript = "\n(function() {\n try {\n const entries = new URLSearchParams(window.location.search).entries();\n for (var [searchKey, value] of entries) {\n if (searchKey.startsWith('docusaurus-data-')) {\n var key = searchKey.replace('docusaurus-data-',\"data-\")\n document.documentElement.setAttribute(key, value);\n }\n }\n } catch(e) {}\n})();\n";
14
+ export declare function getAnnouncementBarInlineScript({ siteStorage, }: {
15
+ siteStorage: SiteStorage;
16
+ }): string;
@@ -0,0 +1,98 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright (c) Facebook, Inc. and its affiliates.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.DataAttributeQueryStringInlineJavaScript = void 0;
10
+ exports.getThemeInlineScript = getThemeInlineScript;
11
+ exports.getAnnouncementBarInlineScript = getAnnouncementBarInlineScript;
12
+ // Support for ?docusaurus-theme=dark
13
+ const ThemeQueryStringKey = 'docusaurus-theme';
14
+ // Support for ?docusaurus-data-mode=embed&docusaurus-data-myAttr=42
15
+ const DataQueryStringPrefixKey = 'docusaurus-data-';
16
+ function getThemeInlineScript({ colorMode: { defaultMode, respectPrefersColorScheme }, siteStorage, }) {
17
+ // Need to be inlined to prevent dark mode FOUC
18
+ // Make sure the key is the same as the one in the color mode React context
19
+ // Currently defined in: `docusaurus-theme-common/src/contexts/colorMode.tsx`
20
+ const themeStorageKey = `theme${siteStorage.namespace}`;
21
+ /* language=js */
22
+ return `(function() {
23
+ var defaultMode = '${defaultMode}';
24
+ var respectPrefersColorScheme = ${respectPrefersColorScheme};
25
+
26
+ function setDataThemeAttribute(theme) {
27
+ document.documentElement.setAttribute('data-theme', theme);
28
+ }
29
+
30
+ function getQueryStringTheme() {
31
+ try {
32
+ return new URLSearchParams(window.location.search).get('${ThemeQueryStringKey}')
33
+ } catch (e) {
34
+ }
35
+ }
36
+
37
+ function getStoredTheme() {
38
+ try {
39
+ return window['${siteStorage.type}'].getItem('${themeStorageKey}');
40
+ } catch (err) {
41
+ }
42
+ }
43
+
44
+ var initialTheme = getQueryStringTheme() || getStoredTheme();
45
+ if (initialTheme !== null) {
46
+ setDataThemeAttribute(initialTheme);
47
+ } else {
48
+ if (
49
+ respectPrefersColorScheme &&
50
+ window.matchMedia('(prefers-color-scheme: dark)').matches
51
+ ) {
52
+ setDataThemeAttribute('dark');
53
+ } else if (
54
+ respectPrefersColorScheme &&
55
+ window.matchMedia('(prefers-color-scheme: light)').matches
56
+ ) {
57
+ setDataThemeAttribute('light');
58
+ } else {
59
+ setDataThemeAttribute(defaultMode === 'dark' ? 'dark' : 'light');
60
+ }
61
+ }
62
+ })();`;
63
+ }
64
+ /* language=js */
65
+ exports.DataAttributeQueryStringInlineJavaScript = `
66
+ (function() {
67
+ try {
68
+ const entries = new URLSearchParams(window.location.search).entries();
69
+ for (var [searchKey, value] of entries) {
70
+ if (searchKey.startsWith('${DataQueryStringPrefixKey}')) {
71
+ var key = searchKey.replace('${DataQueryStringPrefixKey}',"data-")
72
+ document.documentElement.setAttribute(key, value);
73
+ }
74
+ }
75
+ } catch(e) {}
76
+ })();
77
+ `;
78
+ // We always render the announcement bar html on the server, to prevent layout
79
+ // shifts on React hydration. The theme can use CSS + the data attribute to hide
80
+ // the announcement bar asap (before React hydration)
81
+ function getAnnouncementBarInlineScript({ siteStorage, }) {
82
+ // Duplicated constant. Unfortunately we can't import it from theme-common, as
83
+ // we need to support older nodejs versions without ESM support
84
+ // TODO: import from theme-common once we support Node.js with ESM support
85
+ // + move all those announcementBar stuff there too
86
+ const AnnouncementBarDismissStorageKey = `docusaurus.announcement.dismiss${siteStorage.namespace}`;
87
+ const AnnouncementBarDismissDataAttribute = 'data-announcement-bar-initially-dismissed';
88
+ /* language=js */
89
+ return `(function() {
90
+ function isDismissed() {
91
+ try {
92
+ return localStorage.getItem('${AnnouncementBarDismissStorageKey}') === 'true';
93
+ } catch (err) {}
94
+ return false;
95
+ }
96
+ document.documentElement.setAttribute('${AnnouncementBarDismissDataAttribute}', isDismissed());
97
+ })();`;
98
+ }
package/lib/options.d.ts CHANGED
@@ -4,7 +4,6 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- /// <reference path="../src/theme-classic.d.ts" />
8
7
  import { Joi } from '@docusaurus/utils-validation';
9
8
  import type { Options, PluginOptions } from '@docusaurus/theme-classic';
10
9
  import type { ThemeConfig } from '@docusaurus/theme-common';
package/lib/options.js CHANGED
@@ -6,7 +6,9 @@
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.validateOptions = exports.validateThemeConfig = exports.ThemeConfigSchema = exports.DEFAULT_CONFIG = void 0;
9
+ exports.ThemeConfigSchema = exports.DEFAULT_CONFIG = void 0;
10
+ exports.validateThemeConfig = validateThemeConfig;
11
+ exports.validateOptions = validateOptions;
10
12
  const prism_react_renderer_1 = require("prism-react-renderer");
11
13
  const utils_validation_1 = require("@docusaurus/utils-validation");
12
14
  const defaultPrismTheme = prism_react_renderer_1.themes.palenight;
@@ -26,6 +28,16 @@ const DocsSchema = utils_validation_1.Joi.object({
26
28
  autoCollapseCategories: utils_validation_1.Joi.bool().default(DEFAULT_DOCS_CONFIG.sidebar.autoCollapseCategories),
27
29
  }).default(DEFAULT_DOCS_CONFIG.sidebar),
28
30
  }).default(DEFAULT_DOCS_CONFIG);
31
+ const DEFAULT_BLOG_CONFIG = {
32
+ sidebar: {
33
+ groupByYear: true,
34
+ },
35
+ };
36
+ const BlogSchema = utils_validation_1.Joi.object({
37
+ sidebar: utils_validation_1.Joi.object({
38
+ groupByYear: utils_validation_1.Joi.bool().default(DEFAULT_BLOG_CONFIG.sidebar.groupByYear),
39
+ }).default(DEFAULT_BLOG_CONFIG.sidebar),
40
+ }).default(DEFAULT_BLOG_CONFIG);
29
41
  const DEFAULT_COLOR_MODE_CONFIG = {
30
42
  defaultMode: 'light',
31
43
  disableSwitch: false,
@@ -34,6 +46,7 @@ const DEFAULT_COLOR_MODE_CONFIG = {
34
46
  exports.DEFAULT_CONFIG = {
35
47
  colorMode: DEFAULT_COLOR_MODE_CONFIG,
36
48
  docs: DEFAULT_DOCS_CONFIG,
49
+ blog: DEFAULT_BLOG_CONFIG,
37
50
  metadata: [],
38
51
  prism: {
39
52
  additionalLanguages: [],
@@ -293,6 +306,7 @@ exports.ThemeConfigSchema = utils_validation_1.Joi.object({
293
306
  colorMode: ColorModeSchema,
294
307
  image: utils_validation_1.Joi.string(),
295
308
  docs: DocsSchema,
309
+ blog: BlogSchema,
296
310
  metadata: utils_validation_1.Joi.array()
297
311
  .items(HtmlMetadataSchema)
298
312
  .default(exports.DEFAULT_CONFIG.metadata),
@@ -392,7 +406,6 @@ exports.ThemeConfigSchema = utils_validation_1.Joi.object({
392
406
  function validateThemeConfig({ validate, themeConfig, }) {
393
407
  return validate(exports.ThemeConfigSchema, themeConfig);
394
408
  }
395
- exports.validateThemeConfig = validateThemeConfig;
396
409
  const DEFAULT_OPTIONS = {
397
410
  customCss: [],
398
411
  };
@@ -410,4 +423,3 @@ function validateOptions({ validate, options, }) {
410
423
  const validatedOptions = validate(PluginOptionSchema, options);
411
424
  return validatedOptions;
412
425
  }
413
- exports.validateOptions = validateOptions;
@@ -4,7 +4,5 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- /// <reference path="../../../../src/theme-classic.d.ts" />
8
- /// <reference types="react" />
9
7
  import type { Props } from '@theme/Admonition/Icon/Danger';
10
8
  export default function AdmonitionIconDanger(props: Props): JSX.Element;
@@ -4,7 +4,5 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- /// <reference path="../../../../src/theme-classic.d.ts" />
8
- /// <reference types="react" />
9
7
  import type { Props } from '@theme/Admonition/Icon/Info';
10
8
  export default function AdmonitionIconInfo(props: Props): JSX.Element;
@@ -4,7 +4,5 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- /// <reference path="../../../../src/theme-classic.d.ts" />
8
- /// <reference types="react" />
9
7
  import type { Props } from '@theme/Admonition/Icon/Note';
10
8
  export default function AdmonitionIconNote(props: Props): JSX.Element;
@@ -4,7 +4,5 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- /// <reference path="../../../../src/theme-classic.d.ts" />
8
- /// <reference types="react" />
9
7
  import type { Props } from '@theme/Admonition/Icon/Tip';
10
8
  export default function AdmonitionIconTip(props: Props): JSX.Element;
@@ -4,7 +4,5 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- /// <reference path="../../../../src/theme-classic.d.ts" />
8
- /// <reference types="react" />
9
7
  import type { Props } from '@theme/Admonition/Icon/Warning';
10
8
  export default function AdmonitionIconCaution(props: Props): JSX.Element;
@@ -4,7 +4,5 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- /// <reference path="../../../../src/theme-classic.d.ts" />
8
- /// <reference types="react" />
9
7
  import type { Props } from '@theme/Admonition/Layout';
10
8
  export default function AdmonitionLayout(props: Props): JSX.Element;
@@ -4,7 +4,5 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- /// <reference path="../../../../src/theme-classic.d.ts" />
8
- /// <reference types="react" />
9
7
  import type { Props } from '@theme/Admonition/Type/Caution';
10
8
  export default function AdmonitionTypeCaution(props: Props): JSX.Element;
@@ -4,7 +4,5 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- /// <reference path="../../../../src/theme-classic.d.ts" />
8
- /// <reference types="react" />
9
7
  import type { Props } from '@theme/Admonition/Type/Danger';
10
8
  export default function AdmonitionTypeDanger(props: Props): JSX.Element;
@@ -4,7 +4,5 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- /// <reference path="../../../../src/theme-classic.d.ts" />
8
- /// <reference types="react" />
9
7
  import type { Props } from '@theme/Admonition/Type/Info';
10
8
  export default function AdmonitionTypeInfo(props: Props): JSX.Element;
@@ -4,7 +4,5 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- /// <reference path="../../../../src/theme-classic.d.ts" />
8
- /// <reference types="react" />
9
7
  import type { Props } from '@theme/Admonition/Type/Note';
10
8
  export default function AdmonitionTypeNote(props: Props): JSX.Element;
@@ -4,7 +4,5 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- /// <reference path="../../../../src/theme-classic.d.ts" />
8
- /// <reference types="react" />
9
7
  import type { Props } from '@theme/Admonition/Type/Tip';
10
8
  export default function AdmonitionTypeTip(props: Props): JSX.Element;
@@ -4,7 +4,5 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- /// <reference path="../../../../src/theme-classic.d.ts" />
8
- /// <reference types="react" />
9
7
  import type { Props } from '@theme/Admonition/Type/Warning';
10
8
  export default function AdmonitionTypeWarning(props: Props): JSX.Element;
@@ -4,7 +4,6 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- /// <reference path="../../../src/theme-classic.d.ts" />
8
7
  import React from 'react';
9
8
  declare const _default: {
10
9
  [x: string]: React.ComponentType<import("@theme/Admonition").Props>;
@@ -4,7 +4,5 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- /// <reference path="../../../src/theme-classic.d.ts" />
8
- /// <reference types="react" />
9
7
  import type { Props } from '@theme/Admonition';
10
8
  export default function Admonition(unprocessedProps: Props): JSX.Element;
@@ -4,7 +4,5 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- /// <reference path="../../../../src/theme-classic.d.ts" />
8
- /// <reference types="react" />
9
7
  import type { Props } from '@theme/AnnouncementBar/CloseButton';
10
8
  export default function AnnouncementBarCloseButton(props: Props): JSX.Element | null;
@@ -4,7 +4,5 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- /// <reference path="../../../../src/theme-classic.d.ts" />
8
- /// <reference types="react" />
9
7
  import type { Props } from '@theme/AnnouncementBar/Content';
10
8
  export default function AnnouncementBarContent(props: Props): JSX.Element | null;
@@ -4,5 +4,4 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- /// <reference types="react" />
8
7
  export default function AnnouncementBar(): JSX.Element | null;
@@ -4,5 +4,4 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- /// <reference types="react" />
8
7
  export default function BackToTopButton(): JSX.Element;
@@ -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 { Props } from '@theme/Blog/Components/Author/Socials';
8
+ export default function BlogAuthorSocials({ author, }: {
9
+ author: Props['author'];
10
+ }): JSX.Element;
@@ -0,0 +1,49 @@
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 clsx from 'clsx';
9
+ import Link from '@docusaurus/Link';
10
+ import Twitter from '@theme/Icon/Socials/Twitter';
11
+ import GitHub from '@theme/Icon/Socials/GitHub';
12
+ import X from '@theme/Icon/Socials/X';
13
+ import StackOverflow from '@theme/Icon/Socials/StackOverflow';
14
+ import LinkedIn from '@theme/Icon/Socials/LinkedIn';
15
+ import DefaultSocialIcon from '@theme/Icon/Socials/Default';
16
+ import styles from './styles.module.css';
17
+ const SocialPlatformConfigs = {
18
+ twitter: {Icon: Twitter, label: 'Twitter'},
19
+ github: {Icon: GitHub, label: 'GitHub'},
20
+ stackoverflow: {Icon: StackOverflow, label: 'Stack Overflow'},
21
+ linkedin: {Icon: LinkedIn, label: 'LinkedIn'},
22
+ x: {Icon: X, label: 'X'},
23
+ };
24
+ function getSocialPlatformConfig(platformKey) {
25
+ return (
26
+ SocialPlatformConfigs[platformKey] ?? {
27
+ Icon: DefaultSocialIcon,
28
+ label: platformKey,
29
+ }
30
+ );
31
+ }
32
+ function SocialLink({platform, link}) {
33
+ const {Icon, label} = getSocialPlatformConfig(platform);
34
+ return (
35
+ <Link className={styles.authorSocialLink} href={link} title={label}>
36
+ <Icon className={clsx(styles.authorSocialLink)} />
37
+ </Link>
38
+ );
39
+ }
40
+ export default function BlogAuthorSocials({author}) {
41
+ const entries = Object.entries(author.socials ?? {});
42
+ return (
43
+ <div className={styles.authorSocials}>
44
+ {entries.map(([platform, linkUrl]) => {
45
+ return <SocialLink key={platform} platform={platform} link={linkUrl} />;
46
+ })}
47
+ </div>
48
+ );
49
+ }
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Copyright (c) Facebook, Inc. and its affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ :root {
9
+ --docusaurus-blog-social-icon-size: 1rem;
10
+ }
11
+
12
+ .authorSocials {
13
+ /*
14
+ This ensures that container takes height even if there's no social link
15
+ This keeps author names aligned even if only some have socials
16
+ */
17
+ height: var(--docusaurus-blog-social-icon-size);
18
+
19
+ display: flex;
20
+ flex-wrap: wrap;
21
+ align-items: center;
22
+ line-height: 0;
23
+ overflow: hidden;
24
+ line-clamp: 1;
25
+ -webkit-line-clamp: 1;
26
+ -webkit-box-orient: vertical;
27
+ }
28
+
29
+ .authorSocialLink {
30
+ height: var(--docusaurus-blog-social-icon-size);
31
+ width: var(--docusaurus-blog-social-icon-size);
32
+ line-height: 0;
33
+ margin-right: 0.4rem;
34
+ }
35
+
36
+ .authorSocialIcon {
37
+ width: var(--docusaurus-blog-social-icon-size);
38
+ height: var(--docusaurus-blog-social-icon-size);
39
+ }
@@ -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
+ import type { Props } from '@theme/Blog/Components/Author';
8
+ export default function BlogAuthor({ as, author, className, count, }: Props): JSX.Element;