@docusaurus/theme-classic 0.0.0-5030 → 0.0.0-5033
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.
- package/lib/getSwizzleConfig.d.ts +8 -0
- package/lib/getSwizzleConfig.js +226 -234
- package/lib/index.d.ts +12 -0
- package/lib/index.js +103 -155
- package/lib/nprogress.d.ts +10 -0
- package/lib/nprogress.js +16 -37
- package/lib/prism-include-languages.d.ts +7 -0
- package/lib/prism-include-languages.js +3 -9
- package/lib/theme/Admonition/index.d.ts +9 -0
- package/{lib-next → lib}/theme/Admonition/index.js +0 -0
- package/lib/theme/AnnouncementBar/index.d.ts +8 -0
- package/{lib-next → lib}/theme/AnnouncementBar/index.js +4 -10
- package/{lib-next → lib}/theme/AnnouncementBar/styles.module.css +0 -0
- package/lib/theme/BackToTopButton/index.d.ts +8 -0
- package/{lib-next → lib}/theme/BackToTopButton/index.js +1 -3
- package/{lib-next → lib}/theme/BackToTopButton/styles.module.css +0 -0
- package/lib/theme/BlogArchivePage/index.d.ts +10 -0
- package/{lib-next → lib}/theme/BlogArchivePage/index.js +0 -4
- package/lib/theme/BlogLayout/index.d.ts +9 -0
- package/{lib-next → lib}/theme/BlogLayout/index.js +0 -0
- package/lib/theme/BlogListPage/index.d.ts +10 -0
- package/{lib-next → lib}/theme/BlogListPage/index.js +0 -3
- package/lib/theme/BlogListPaginator/index.d.ts +9 -0
- package/{lib-next → lib}/theme/BlogListPaginator/index.js +0 -0
- package/lib/theme/BlogPostAuthor/index.d.ts +9 -0
- package/{lib-next → lib}/theme/BlogPostAuthor/index.js +0 -3
- package/lib/theme/BlogPostAuthors/index.d.ts +9 -0
- package/{lib-next → lib}/theme/BlogPostAuthors/index.js +2 -4
- package/{lib-next → lib}/theme/BlogPostAuthors/styles.module.css +0 -0
- package/lib/theme/BlogPostItem/index.d.ts +9 -0
- package/{lib-next → lib}/theme/BlogPostItem/index.js +8 -20
- package/{lib-next → lib}/theme/BlogPostItem/styles.module.css +0 -0
- package/lib/theme/BlogPostPage/index.d.ts +10 -0
- package/{lib-next → lib}/theme/BlogPostPage/index.js +0 -3
- package/lib/theme/BlogPostPaginator/index.d.ts +9 -0
- package/{lib-next → lib}/theme/BlogPostPaginator/index.js +0 -0
- package/lib/theme/BlogSidebar/Desktop/index.d.ts +9 -0
- package/{lib-next → lib}/theme/BlogSidebar/Desktop/index.js +0 -0
- package/{lib-next → lib}/theme/BlogSidebar/Desktop/styles.module.css +0 -0
- package/lib/theme/BlogSidebar/Mobile/index.d.ts +9 -0
- package/{lib-next → lib}/theme/BlogSidebar/Mobile/index.js +0 -2
- package/lib/theme/BlogSidebar/index.d.ts +9 -0
- package/{lib-next → lib}/theme/BlogSidebar/index.js +2 -4
- package/lib/theme/BlogTagsListPage/index.d.ts +10 -0
- package/{lib-next → lib}/theme/BlogTagsListPage/index.js +0 -0
- package/lib/theme/BlogTagsPostsPage/index.d.ts +10 -0
- package/{lib-next → lib}/theme/BlogTagsPostsPage/index.js +2 -9
- package/lib/theme/CodeBlock/Container/index.d.ts +10 -0
- package/{lib-next → lib}/theme/CodeBlock/Container/index.js +2 -1
- package/{lib-next → lib}/theme/CodeBlock/Container/styles.module.css +0 -0
- package/lib/theme/CodeBlock/Content/Element.d.ts +9 -0
- package/{lib-next → lib}/theme/CodeBlock/Content/Element.js +2 -2
- package/lib/theme/CodeBlock/Content/String.d.ts +9 -0
- package/{lib-next → lib}/theme/CodeBlock/Content/String.js +2 -2
- package/{lib-next → lib}/theme/CodeBlock/Content/styles.module.css +0 -0
- package/lib/theme/CodeBlock/CopyButton/index.d.ts +9 -0
- package/{lib-next → lib}/theme/CodeBlock/CopyButton/index.js +0 -0
- package/{lib-next → lib}/theme/CodeBlock/CopyButton/styles.module.css +0 -0
- package/lib/theme/CodeBlock/Line/index.d.ts +9 -0
- package/{lib-next → lib}/theme/CodeBlock/Line/index.js +1 -8
- package/{lib-next → lib}/theme/CodeBlock/Line/styles.module.css +0 -0
- package/lib/theme/CodeBlock/WordWrapButton/index.d.ts +9 -0
- package/{lib-next → lib}/theme/CodeBlock/WordWrapButton/index.js +0 -0
- package/{lib-next → lib}/theme/CodeBlock/WordWrapButton/styles.module.css +0 -0
- package/lib/theme/CodeBlock/index.d.ts +9 -0
- package/{lib-next → lib}/theme/CodeBlock/index.js +2 -4
- package/lib/theme/ColorModeToggle/index.d.ts +11 -0
- package/{lib-next → lib}/theme/ColorModeToggle/index.js +0 -2
- package/{lib-next → lib}/theme/ColorModeToggle/styles.module.css +0 -0
- package/lib/theme/Details/index.d.ts +9 -0
- package/{lib-next → lib}/theme/Details/index.js +2 -2
- package/{lib-next → lib}/theme/Details/styles.module.css +0 -0
- package/lib/theme/DocBreadcrumbs/index.d.ts +8 -0
- package/{lib-next → lib}/theme/DocBreadcrumbs/index.js +6 -11
- package/{lib-next → lib}/theme/DocBreadcrumbs/styles.module.css +0 -0
- package/lib/theme/DocCard/index.d.ts +9 -0
- package/{lib-next → lib}/theme/DocCard/index.js +3 -13
- package/{lib-next → lib}/theme/DocCard/styles.module.css +0 -0
- package/lib/theme/DocCardList/index.d.ts +9 -0
- package/{lib-next → lib}/theme/DocCardList/index.js +0 -3
- package/lib/theme/DocCategoryGeneratedIndexPage/index.d.ts +10 -0
- package/{lib-next → lib}/theme/DocCategoryGeneratedIndexPage/index.js +4 -5
- package/{lib-next → lib}/theme/DocCategoryGeneratedIndexPage/styles.module.css +0 -0
- package/lib/theme/DocItem/index.d.ts +10 -0
- package/{lib-next → lib}/theme/DocItem/index.js +8 -20
- package/{lib-next → lib}/theme/DocItem/styles.module.css +0 -0
- package/lib/theme/DocItemFooter/index.d.ts +10 -0
- package/{lib-next → lib}/theme/DocItemFooter/index.js +0 -5
- package/{lib-next → lib}/theme/DocItemFooter/styles.module.css +0 -0
- package/lib/theme/DocPage/Layout/Main/index.d.ts +9 -0
- package/{lib-next → lib}/theme/DocPage/Layout/Main/index.js +0 -0
- package/{lib-next → lib}/theme/DocPage/Layout/Main/styles.module.css +0 -0
- package/lib/theme/DocPage/Layout/Sidebar/ExpandButton/index.d.ts +9 -0
- package/{lib-next → lib}/theme/DocPage/Layout/Sidebar/ExpandButton/index.js +0 -0
- package/{lib-next → lib}/theme/DocPage/Layout/Sidebar/ExpandButton/styles.module.css +0 -0
- package/lib/theme/DocPage/Layout/Sidebar/index.d.ts +9 -0
- package/{lib-next → lib}/theme/DocPage/Layout/Sidebar/index.js +2 -5
- package/{lib-next → lib}/theme/DocPage/Layout/Sidebar/styles.module.css +0 -0
- package/lib/theme/DocPage/Layout/index.d.ts +9 -0
- package/{lib-next → lib}/theme/DocPage/Layout/index.js +0 -0
- package/{lib-next → lib}/theme/DocPage/Layout/styles.module.css +0 -0
- package/lib/theme/DocPage/index.d.ts +10 -0
- package/{lib-next → lib}/theme/DocPage/index.js +0 -2
- package/lib/theme/DocPaginator/index.d.ts +9 -0
- package/{lib-next → lib}/theme/DocPaginator/index.js +0 -0
- package/lib/theme/DocSidebar/Desktop/CollapseButton/index.d.ts +9 -0
- package/{lib-next → lib}/theme/DocSidebar/Desktop/CollapseButton/index.js +0 -0
- package/{lib-next → lib}/theme/DocSidebar/Desktop/CollapseButton/styles.module.css +0 -0
- package/lib/theme/DocSidebar/Desktop/Content/index.d.ts +9 -0
- package/{lib-next → lib}/theme/DocSidebar/Desktop/Content/index.js +0 -2
- package/{lib-next → lib}/theme/DocSidebar/Desktop/Content/styles.module.css +0 -0
- package/lib/theme/DocSidebar/Desktop/index.d.ts +11 -0
- package/{lib-next → lib}/theme/DocSidebar/Desktop/index.js +0 -2
- package/{lib-next → lib}/theme/DocSidebar/Desktop/styles.module.css +0 -0
- package/lib/theme/DocSidebar/Mobile/index.d.ts +11 -0
- package/{lib-next → lib}/theme/DocSidebar/Mobile/index.js +0 -4
- package/lib/theme/DocSidebar/index.d.ts +9 -0
- package/{lib-next → lib}/theme/DocSidebar/index.js +4 -4
- package/lib/theme/DocSidebarItem/Category/index.d.ts +9 -0
- package/{lib-next → lib}/theme/DocSidebarItem/Category/index.js +6 -21
- package/lib/theme/DocSidebarItem/Html/index.d.ts +9 -0
- package/{lib-next → lib}/theme/DocSidebarItem/Html/index.js +3 -4
- package/{lib-next → lib}/theme/DocSidebarItem/Html/styles.module.css +0 -0
- package/lib/theme/DocSidebarItem/Link/index.d.ts +9 -0
- package/{lib-next → lib}/theme/DocSidebarItem/Link/index.js +0 -0
- package/{lib-next → lib}/theme/DocSidebarItem/Link/styles.module.css +0 -0
- package/lib/theme/DocSidebarItem/index.d.ts +9 -0
- package/{lib-next → lib}/theme/DocSidebarItem/index.js +0 -2
- package/lib/theme/DocSidebarItems/index.d.ts +11 -0
- package/{lib-next → lib}/theme/DocSidebarItems/index.js +2 -3
- package/lib/theme/DocTagDocListPage/index.d.ts +10 -0
- package/{lib-next → lib}/theme/DocTagDocListPage/index.js +2 -10
- package/lib/theme/DocTagsListPage/index.d.ts +10 -0
- package/{lib-next → lib}/theme/DocTagsListPage/index.js +0 -0
- package/lib/theme/DocVersionBadge/index.d.ts +9 -0
- package/{lib-next → lib}/theme/DocVersionBadge/index.js +1 -5
- package/lib/theme/DocVersionBanner/index.d.ts +9 -0
- package/{lib-next → lib}/theme/DocVersionBanner/index.js +3 -16
- package/lib/theme/EditThisPage/index.d.ts +9 -0
- package/{lib-next → lib}/theme/EditThisPage/index.js +0 -0
- package/lib/theme/ErrorPageContent.d.ts +10 -0
- package/{lib-next → lib}/theme/ErrorPageContent.js +0 -0
- package/lib/theme/Footer/Copyright/index.d.ts +9 -0
- package/{lib-next → lib}/theme/Footer/Copyright/index.js +3 -4
- package/lib/theme/Footer/Layout/index.d.ts +9 -0
- package/{lib-next → lib}/theme/Footer/Layout/index.js +0 -0
- package/lib/theme/Footer/LinkItem/index.d.ts +9 -0
- package/{lib-next → lib}/theme/Footer/LinkItem/index.js +1 -3
- package/lib/theme/Footer/Links/MultiColumn/index.d.ts +9 -0
- package/{lib-next → lib}/theme/Footer/Links/MultiColumn/index.js +3 -7
- package/lib/theme/Footer/Links/Simple/index.d.ts +9 -0
- package/{lib-next → lib}/theme/Footer/Links/Simple/index.js +3 -7
- package/lib/theme/Footer/Links/index.d.ts +9 -0
- package/{lib-next → lib}/theme/Footer/Links/index.js +0 -0
- package/lib/theme/Footer/Logo/index.d.ts +9 -0
- package/{lib-next → lib}/theme/Footer/Logo/index.js +0 -2
- package/{lib-next → lib}/theme/Footer/Logo/styles.module.css +0 -0
- package/lib/theme/Footer/index.d.ts +10 -0
- package/{lib-next → lib}/theme/Footer/index.js +0 -4
- package/lib/theme/Heading/index.d.ts +9 -0
- package/{lib-next → lib}/theme/Heading/index.js +2 -3
- package/{lib-next → lib}/theme/Heading/styles.module.css +0 -0
- package/lib/theme/IconArrow/index.d.ts +9 -0
- package/{lib-next → lib}/theme/IconArrow/index.js +0 -0
- package/lib/theme/IconClose/index.d.ts +9 -0
- package/{lib-next → lib}/theme/IconClose/index.js +0 -0
- package/lib/theme/IconDarkMode/index.d.ts +9 -0
- package/{lib-next → lib}/theme/IconDarkMode/index.js +0 -0
- package/lib/theme/IconEdit/index.d.ts +9 -0
- package/{lib-next → lib}/theme/IconEdit/index.js +0 -0
- package/{lib-next → lib}/theme/IconEdit/styles.module.css +0 -0
- package/lib/theme/IconExternalLink/index.d.ts +9 -0
- package/{lib-next → lib}/theme/IconExternalLink/index.js +0 -0
- package/{lib-next → lib}/theme/IconExternalLink/styles.module.css +0 -0
- package/lib/theme/IconHome/index.d.ts +9 -0
- package/{lib-next → lib}/theme/IconHome/index.js +0 -0
- package/lib/theme/IconLanguage/index.d.ts +9 -0
- package/{lib-next → lib}/theme/IconLanguage/index.js +0 -0
- package/lib/theme/IconLightMode/index.d.ts +9 -0
- package/{lib-next → lib}/theme/IconLightMode/index.js +0 -0
- package/lib/theme/IconMenu/index.d.ts +9 -0
- package/{lib-next → lib}/theme/IconMenu/index.js +0 -0
- package/lib/theme/LastUpdated/index.d.ts +9 -0
- package/{lib-next → lib}/theme/LastUpdated/index.js +0 -3
- package/lib/theme/Layout/index.d.ts +10 -0
- package/{lib-next → lib}/theme/Layout/index.js +0 -0
- package/{lib-next → lib}/theme/Layout/styles.css +0 -0
- package/lib/theme/LayoutProviders/index.d.ts +9 -0
- package/{lib-next → lib}/theme/LayoutProviders/index.js +0 -0
- package/lib/theme/Logo/index.d.ts +9 -0
- package/{lib-next → lib}/theme/Logo/index.js +2 -9
- package/lib/theme/MDXComponents/A.d.ts +9 -0
- package/{lib-next → lib}/theme/MDXComponents/A.js +0 -0
- package/lib/theme/MDXComponents/Code.d.ts +9 -0
- package/{lib-next → lib}/theme/MDXComponents/Code.js +0 -0
- package/lib/theme/MDXComponents/Details.d.ts +9 -0
- package/{lib-next → lib}/theme/MDXComponents/Details.js +2 -2
- package/lib/theme/MDXComponents/Head.d.ts +9 -0
- package/{lib-next → lib}/theme/MDXComponents/Head.js +0 -3
- package/lib/theme/MDXComponents/Heading.d.ts +9 -0
- package/{lib-next → lib}/theme/MDXComponents/Heading.js +0 -0
- package/lib/theme/MDXComponents/Img/index.d.ts +9 -0
- package/{lib-next → lib}/theme/MDXComponents/Img/index.js +0 -2
- package/{lib-next → lib}/theme/MDXComponents/Img/styles.module.css +0 -0
- package/lib/theme/MDXComponents/Pre.d.ts +9 -0
- package/{lib-next → lib}/theme/MDXComponents/Pre.js +2 -1
- package/lib/theme/MDXComponents/Ul.d.ts +9 -0
- package/{lib-next → lib}/theme/MDXComponents/Ul.js +2 -3
- package/lib/theme/MDXComponents/index.d.ts +9 -0
- package/{lib-next → lib}/theme/MDXComponents/index.js +0 -0
- package/lib/theme/MDXContent/index.d.ts +9 -0
- package/{lib-next → lib}/theme/MDXContent/index.js +0 -0
- package/lib/theme/MDXPage/index.d.ts +10 -0
- package/{lib-next → lib}/theme/MDXPage/index.js +0 -0
- package/{lib-next → lib}/theme/MDXPage/styles.module.css +0 -0
- package/lib/theme/Navbar/ColorModeToggle/index.d.ts +9 -0
- package/{lib-next → lib}/theme/Navbar/ColorModeToggle/index.js +0 -2
- package/lib/theme/Navbar/Content/index.d.ts +8 -0
- package/{lib-next → lib}/theme/Navbar/Content/index.js +0 -4
- package/{lib-next → lib}/theme/Navbar/Content/styles.module.css +0 -0
- package/lib/theme/Navbar/Layout/index.d.ts +9 -0
- package/{lib-next → lib}/theme/Navbar/Layout/index.js +0 -2
- package/{lib-next → lib}/theme/Navbar/Layout/styles.module.css +0 -0
- package/lib/theme/Navbar/Logo/index.d.ts +8 -0
- package/{lib-next → lib}/theme/Navbar/Logo/index.js +0 -0
- package/lib/theme/Navbar/MobileSidebar/Header/index.d.ts +8 -0
- package/{lib-next → lib}/theme/Navbar/MobileSidebar/Header/index.js +0 -2
- package/lib/theme/Navbar/MobileSidebar/Layout/index.d.ts +9 -0
- package/{lib-next → lib}/theme/Navbar/MobileSidebar/Layout/index.js +0 -0
- package/lib/theme/Navbar/MobileSidebar/PrimaryMenu/index.d.ts +8 -0
- package/{lib-next → lib}/theme/Navbar/MobileSidebar/PrimaryMenu/index.js +4 -5
- package/lib/theme/Navbar/MobileSidebar/SecondaryMenu/index.d.ts +8 -0
- package/{lib-next → lib}/theme/Navbar/MobileSidebar/SecondaryMenu/index.js +2 -3
- package/lib/theme/Navbar/MobileSidebar/Toggle/index.d.ts +8 -0
- package/{lib-next → lib}/theme/Navbar/MobileSidebar/Toggle/index.js +0 -0
- package/lib/theme/Navbar/MobileSidebar/index.d.ts +8 -0
- package/{lib-next → lib}/theme/Navbar/MobileSidebar/index.js +0 -2
- package/lib/theme/Navbar/Search/index.d.ts +9 -0
- package/{lib-next → lib}/theme/Navbar/Search/index.js +0 -0
- package/{lib-next → lib}/theme/Navbar/Search/styles.module.css +0 -0
- package/lib/theme/Navbar/index.d.ts +8 -0
- package/{lib-next → lib}/theme/Navbar/index.js +0 -0
- package/lib/theme/NavbarItem/ComponentTypes.d.ts +9 -0
- package/{lib-next → lib}/theme/NavbarItem/ComponentTypes.js +0 -0
- package/lib/theme/NavbarItem/DefaultNavbarItem.d.ts +10 -0
- package/{lib-next → lib}/theme/NavbarItem/DefaultNavbarItem.js +1 -7
- package/lib/theme/NavbarItem/DocNavbarItem.d.ts +9 -0
- package/{lib-next → lib}/theme/NavbarItem/DocNavbarItem.js +3 -4
- package/lib/theme/NavbarItem/DocSidebarNavbarItem.d.ts +9 -0
- package/{lib-next → lib}/theme/NavbarItem/DocSidebarNavbarItem.js +0 -2
- package/lib/theme/NavbarItem/DocsVersionDropdownNavbarItem.d.ts +9 -0
- package/{lib-next → lib}/theme/NavbarItem/DocsVersionDropdownNavbarItem.js +4 -7
- package/lib/theme/NavbarItem/DocsVersionNavbarItem.d.ts +9 -0
- package/{lib-next → lib}/theme/NavbarItem/DocsVersionNavbarItem.js +0 -2
- package/lib/theme/NavbarItem/DropdownNavbarItem.d.ts +9 -0
- package/{lib-next → lib}/theme/NavbarItem/DropdownNavbarItem.js +6 -17
- package/lib/theme/NavbarItem/HtmlNavbarItem.d.ts +9 -0
- package/{lib-next → lib}/theme/NavbarItem/HtmlNavbarItem.js +1 -3
- package/lib/theme/NavbarItem/LocaleDropdownNavbarItem/index.d.ts +9 -0
- package/{lib-next → lib}/theme/NavbarItem/LocaleDropdownNavbarItem/index.js +2 -2
- package/{lib-next → lib}/theme/NavbarItem/LocaleDropdownNavbarItem/styles.module.css +0 -0
- package/lib/theme/NavbarItem/NavbarNavLink.d.ts +9 -0
- package/{lib-next → lib}/theme/NavbarItem/NavbarNavLink.js +5 -16
- package/lib/theme/NavbarItem/SearchNavbarItem.d.ts +9 -0
- package/{lib-next → lib}/theme/NavbarItem/SearchNavbarItem.js +0 -1
- package/lib/theme/NavbarItem/index.d.ts +9 -0
- package/{lib-next → lib}/theme/NavbarItem/index.js +0 -6
- package/lib/theme/NavbarItem/utils.d.ts +7 -0
- package/{lib-next → lib}/theme/NavbarItem/utils.js +0 -1
- package/lib/theme/NotFound.d.ts +8 -0
- package/{lib-next → lib}/theme/NotFound.js +0 -0
- package/lib/theme/PaginatorNavLink/index.d.ts +9 -0
- package/{lib-next → lib}/theme/PaginatorNavLink/index.js +0 -0
- package/lib/theme/SearchBar.d.ts +7 -0
- package/{lib-next → lib}/theme/SearchBar.js +0 -0
- package/lib/theme/SearchMetadata/index.d.ts +9 -0
- package/{lib-next → lib}/theme/SearchMetadata/index.js +3 -3
- package/lib/theme/SiteMetadata/index.d.ts +8 -0
- package/{lib-next → lib}/theme/SiteMetadata/index.js +15 -16
- package/lib/theme/SkipToContent/index.d.ts +8 -0
- package/{lib-next → lib}/theme/SkipToContent/index.js +0 -0
- package/{lib-next → lib}/theme/SkipToContent/styles.module.css +0 -0
- package/lib/theme/TOC/index.d.ts +9 -0
- package/{lib-next → lib}/theme/TOC/index.js +2 -2
- package/{lib-next → lib}/theme/TOC/styles.module.css +0 -0
- package/lib/theme/TOCCollapsible/CollapseButton/index.d.ts +9 -0
- package/{lib-next → lib}/theme/TOCCollapsible/CollapseButton/index.js +0 -0
- package/{lib-next → lib}/theme/TOCCollapsible/CollapseButton/styles.module.css +0 -0
- package/lib/theme/TOCCollapsible/index.d.ts +9 -0
- package/{lib-next → lib}/theme/TOCCollapsible/index.js +0 -0
- package/{lib-next → lib}/theme/TOCCollapsible/styles.module.css +0 -0
- package/lib/theme/TOCInline/index.d.ts +9 -0
- package/{lib-next → lib}/theme/TOCInline/index.js +0 -0
- package/{lib-next → lib}/theme/TOCInline/styles.module.css +0 -0
- package/lib/theme/TOCItems/Tree.d.ts +11 -0
- package/{lib-next → lib}/theme/TOCItems/Tree.js +5 -8
- package/lib/theme/TOCItems/index.d.ts +9 -0
- package/{lib-next → lib}/theme/TOCItems/index.js +0 -1
- package/lib/theme/TabItem/index.d.ts +9 -0
- package/{lib-next → lib}/theme/TabItem/index.js +1 -3
- package/{lib-next → lib}/theme/TabItem/styles.module.css +0 -0
- package/lib/theme/Tabs/index.d.ts +9 -0
- package/{lib-next → lib}/theme/Tabs/index.js +11 -27
- package/{lib-next → lib}/theme/Tabs/styles.module.css +0 -0
- package/lib/theme/Tag/index.d.ts +9 -0
- package/{lib-next → lib}/theme/Tag/index.js +0 -0
- package/{lib-next → lib}/theme/Tag/styles.module.css +0 -0
- package/lib/theme/TagsListByLetter/index.d.ts +9 -0
- package/{lib-next → lib}/theme/TagsListByLetter/index.js +0 -2
- package/{lib-next → lib}/theme/TagsListByLetter/styles.module.css +0 -0
- package/lib/theme/TagsListInline/index.d.ts +9 -0
- package/{lib-next → lib}/theme/TagsListInline/index.js +0 -0
- package/{lib-next → lib}/theme/TagsListInline/styles.module.css +0 -0
- package/lib/theme/ThemedImage/index.d.ts +9 -0
- package/{lib-next → lib}/theme/ThemedImage/index.js +3 -2
- package/{lib-next → lib}/theme/ThemedImage/styles.module.css +0 -0
- package/lib/theme/prism-include-languages.d.ts +8 -0
- package/{lib-next → lib}/theme/prism-include-languages.js +2 -2
- package/lib/translations.d.ts +15 -0
- package/lib/translations.js +120 -136
- package/lib/validateThemeConfig.d.ts +68 -0
- package/lib/validateThemeConfig.js +353 -322
- package/package.json +19 -25
- package/src/index.ts +1 -1
- package/lib/deps.d.ts +0 -13
- package/lib/theme-classic.d.ts +0 -1279
- package/lib-next/theme/Tabs/__tests__/index.test.js +0 -146
|
@@ -15,8 +15,8 @@ import MDXContent from '@theme/MDXContent';
|
|
|
15
15
|
import EditThisPage from '@theme/EditThisPage';
|
|
16
16
|
import TagsListInline from '@theme/TagsListInline';
|
|
17
17
|
import BlogPostAuthors from '@theme/BlogPostAuthors';
|
|
18
|
-
import styles from './styles.module.css';
|
|
19
|
-
|
|
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
|
|
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
|
|
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-blog" />
|
|
8
|
+
/// <reference types="react" />
|
|
9
|
+
import type { Props } from '@theme/BlogPostPage';
|
|
10
|
+
export default function BlogPostPage(props: Props): JSX.Element;
|
|
@@ -15,7 +15,6 @@ import BlogLayout from '@theme/BlogLayout';
|
|
|
15
15
|
import BlogPostItem from '@theme/BlogPostItem';
|
|
16
16
|
import BlogPostPaginator from '@theme/BlogPostPaginator';
|
|
17
17
|
import TOC from '@theme/TOC';
|
|
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;
|
|
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/BlogSidebar/Desktop';
|
|
9
|
+
export default function BlogSidebarDesktop({ sidebar }: Props): JSX.Element;
|
|
File without changes
|
|
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/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;
|
|
@@ -10,14 +10,12 @@ import BlogSidebarDesktop from '@theme/BlogSidebar/Desktop';
|
|
|
10
10
|
import BlogSidebarMobile from '@theme/BlogSidebar/Mobile';
|
|
11
11
|
export default function BlogSidebar({sidebar}) {
|
|
12
12
|
const windowSize = useWindowSize();
|
|
13
|
-
|
|
14
13
|
if (!sidebar?.items.length) {
|
|
15
14
|
return null;
|
|
16
|
-
}
|
|
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;
|
|
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-blog" />
|
|
8
|
+
/// <reference types="react" />
|
|
9
|
+
import type { Props } from '@theme/BlogTagsPostsPage';
|
|
10
|
+
export default function BlogTagsPostsPage({ tag, items, sidebar, listMetadata, }: Props): JSX.Element;
|
|
@@ -18,7 +18,6 @@ import BlogLayout from '@theme/BlogLayout';
|
|
|
18
18
|
import BlogPostItem from '@theme/BlogPostItem';
|
|
19
19
|
import BlogListPaginator from '@theme/BlogListPaginator';
|
|
20
20
|
import SearchMetadata from '@theme/SearchMetadata';
|
|
21
|
-
|
|
22
21
|
// Very simple pluralization: probably good enough for now
|
|
23
22
|
function useBlogPostsPlural() {
|
|
24
23
|
const {selectMessage} = usePluralForm();
|
|
@@ -32,13 +31,10 @@ function useBlogPostsPlural() {
|
|
|
32
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)',
|
|
33
32
|
message: 'One post|{count} posts',
|
|
34
33
|
},
|
|
35
|
-
{
|
|
36
|
-
count,
|
|
37
|
-
},
|
|
34
|
+
{count},
|
|
38
35
|
),
|
|
39
36
|
);
|
|
40
37
|
}
|
|
41
|
-
|
|
42
38
|
export default function BlogTagsPostsPage({tag, items, sidebar, listMetadata}) {
|
|
43
39
|
const blogPostsPlural = useBlogPostsPlural();
|
|
44
40
|
const title = translate(
|
|
@@ -47,10 +43,7 @@ export default function BlogTagsPostsPage({tag, items, sidebar, listMetadata}) {
|
|
|
47
43
|
description: 'The title of the page for a blog tag',
|
|
48
44
|
message: '{nPosts} tagged with "{tagName}"',
|
|
49
45
|
},
|
|
50
|
-
{
|
|
51
|
-
nPosts: blogPostsPlural(tag.count),
|
|
52
|
-
tagName: tag.label,
|
|
53
|
-
},
|
|
46
|
+
{nPosts: blogPostsPlural(tag.count), tagName: tag.label},
|
|
54
47
|
);
|
|
55
48
|
return (
|
|
56
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
|
|
19
|
+
<As
|
|
20
|
+
// Polymorphic components are hard to type, without `oneOf` generics
|
|
20
21
|
{...props}
|
|
21
22
|
style={prismCssVariables}
|
|
22
23
|
className={clsx(
|
|
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/CodeBlock/Content/Element';
|
|
9
|
+
export default function CodeBlockJSX({ children, className, }: Props): JSX.Element;
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import clsx from 'clsx';
|
|
9
9
|
import Container from '@theme/CodeBlock/Container';
|
|
10
|
-
import styles from './styles.module.css';
|
|
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;
|
|
@@ -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();
|
|
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,
|
|
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/CodeBlock/CopyButton';
|
|
9
|
+
export default function CopyButton({ code, className }: Props): JSX.Element;
|
|
File without changes
|
|
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/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}>
|
|
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/CodeBlock/WordWrapButton';
|
|
9
|
+
export default function WordWrapButton({ className, onClick, isEnabled, }: Props): JSX.Element | null;
|
|
File without changes
|
|
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/CodeBlock';
|
|
9
|
+
export default function CodeBlock({ children: rawChildren, ...props }: Props): JSX.Element;
|
|
@@ -8,7 +8,6 @@ import React, {isValidElement} from 'react';
|
|
|
8
8
|
import useIsBrowser from '@docusaurus/useIsBrowser';
|
|
9
9
|
import ElementContent from '@theme/CodeBlock/Content/Element';
|
|
10
10
|
import StringContent from '@theme/CodeBlock/Content/String';
|
|
11
|
-
|
|
12
11
|
/**
|
|
13
12
|
* Best attempt to make the children a plain string so it is copyable. If there
|
|
14
13
|
* are react elements, we will not be able to copy the content, and it will
|
|
@@ -18,11 +17,10 @@ import StringContent from '@theme/CodeBlock/Content/String';
|
|
|
18
17
|
function maybeStringifyChildren(children) {
|
|
19
18
|
if (React.Children.toArray(children).some((el) => isValidElement(el))) {
|
|
20
19
|
return children;
|
|
21
|
-
}
|
|
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;
|
|
@@ -11,7 +11,6 @@ import {translate} from '@docusaurus/Translate';
|
|
|
11
11
|
import IconLightMode from '@theme/IconLightMode';
|
|
12
12
|
import IconDarkMode from '@theme/IconDarkMode';
|
|
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);
|
|
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/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';
|
|
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 (
|
|
File without changes
|
|
@@ -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;
|
|
@@ -15,11 +15,10 @@ import Link from '@docusaurus/Link';
|
|
|
15
15
|
import useBaseUrl from '@docusaurus/useBaseUrl';
|
|
16
16
|
import {translate} from '@docusaurus/Translate';
|
|
17
17
|
import IconHome from '@theme/IconHome';
|
|
18
|
-
import styles from './styles.module.css';
|
|
19
|
-
|
|
18
|
+
import styles from './styles.module.css';
|
|
19
|
+
// TODO move to design system folder
|
|
20
20
|
function BreadcrumbsItemLink({children, href, isLast}) {
|
|
21
21
|
const className = 'breadcrumbs__link';
|
|
22
|
-
|
|
23
22
|
if (isLast) {
|
|
24
23
|
return (
|
|
25
24
|
<span className={className} itemProp="name">
|
|
@@ -27,20 +26,20 @@ function BreadcrumbsItemLink({children, href, isLast}) {
|
|
|
27
26
|
</span>
|
|
28
27
|
);
|
|
29
28
|
}
|
|
30
|
-
|
|
31
29
|
return href ? (
|
|
32
30
|
<Link className={className} href={href} itemProp="item">
|
|
33
31
|
<span itemProp="name">{children}</span>
|
|
34
|
-
</Link>
|
|
32
|
+
</Link>
|
|
35
33
|
) : (
|
|
34
|
+
// TODO Google search console doesn't like breadcrumb items without href.
|
|
36
35
|
// The schema doesn't seem to require `id` for each `item`, although Google
|
|
37
36
|
// insist to infer one, even if it's invalid. Removing `itemProp="item
|
|
38
37
|
// name"` for now, since I don't know how to properly fix it.
|
|
39
38
|
// See https://github.com/facebook/docusaurus/issues/7241
|
|
40
39
|
<span className={className}>{children}</span>
|
|
41
40
|
);
|
|
42
|
-
}
|
|
43
|
-
|
|
41
|
+
}
|
|
42
|
+
// TODO move to design system folder
|
|
44
43
|
function BreadcrumbsItem({children, active, index, addMicrodata}) {
|
|
45
44
|
return (
|
|
46
45
|
<li
|
|
@@ -57,7 +56,6 @@ function BreadcrumbsItem({children, active, index, addMicrodata}) {
|
|
|
57
56
|
</li>
|
|
58
57
|
);
|
|
59
58
|
}
|
|
60
|
-
|
|
61
59
|
function HomeBreadcrumbItem() {
|
|
62
60
|
const homeHref = useBaseUrl('/');
|
|
63
61
|
return (
|
|
@@ -75,15 +73,12 @@ function HomeBreadcrumbItem() {
|
|
|
75
73
|
</li>
|
|
76
74
|
);
|
|
77
75
|
}
|
|
78
|
-
|
|
79
76
|
export default function DocBreadcrumbs() {
|
|
80
77
|
const breadcrumbs = useSidebarBreadcrumbs();
|
|
81
78
|
const homePageRoute = useHomePageRoute();
|
|
82
|
-
|
|
83
79
|
if (!breadcrumbs) {
|
|
84
80
|
return null;
|
|
85
81
|
}
|
|
86
|
-
|
|
87
82
|
return (
|
|
88
83
|
<nav
|
|
89
84
|
className={clsx(
|
|
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/DocCard';
|
|
9
|
+
export default function DocCard({ item }: Props): JSX.Element;
|
|
@@ -11,7 +11,6 @@ import {findFirstCategoryLink, useDocById} from '@docusaurus/theme-common';
|
|
|
11
11
|
import isInternalUrl from '@docusaurus/isInternalUrl';
|
|
12
12
|
import {translate} from '@docusaurus/Translate';
|
|
13
13
|
import styles from './styles.module.css';
|
|
14
|
-
|
|
15
14
|
function CardContainer({href, children}) {
|
|
16
15
|
return (
|
|
17
16
|
<Link
|
|
@@ -21,7 +20,6 @@ function CardContainer({href, children}) {
|
|
|
21
20
|
</Link>
|
|
22
21
|
);
|
|
23
22
|
}
|
|
24
|
-
|
|
25
23
|
function CardLayout({href, icon, title, description}) {
|
|
26
24
|
return (
|
|
27
25
|
<CardContainer href={href}>
|
|
@@ -38,14 +36,12 @@ function CardLayout({href, icon, title, description}) {
|
|
|
38
36
|
</CardContainer>
|
|
39
37
|
);
|
|
40
38
|
}
|
|
41
|
-
|
|
42
39
|
function CardCategory({item}) {
|
|
43
|
-
const href = findFirstCategoryLink(item);
|
|
44
|
-
|
|
40
|
+
const href = findFirstCategoryLink(item);
|
|
41
|
+
// Unexpected: categories that don't have a link have been filtered upfront
|
|
45
42
|
if (!href) {
|
|
46
43
|
return null;
|
|
47
44
|
}
|
|
48
|
-
|
|
49
45
|
return (
|
|
50
46
|
<CardLayout
|
|
51
47
|
href={href}
|
|
@@ -58,14 +54,11 @@ function CardCategory({item}) {
|
|
|
58
54
|
description:
|
|
59
55
|
'The default description for a category card in the generated index about how many items this category includes',
|
|
60
56
|
},
|
|
61
|
-
{
|
|
62
|
-
count: item.items.length,
|
|
63
|
-
},
|
|
57
|
+
{count: item.items.length},
|
|
64
58
|
)}
|
|
65
59
|
/>
|
|
66
60
|
);
|
|
67
61
|
}
|
|
68
|
-
|
|
69
62
|
function CardLink({item}) {
|
|
70
63
|
const icon = isInternalUrl(item.href) ? '📄️' : '🔗';
|
|
71
64
|
const doc = useDocById(item.docId ?? undefined);
|
|
@@ -78,15 +71,12 @@ function CardLink({item}) {
|
|
|
78
71
|
/>
|
|
79
72
|
);
|
|
80
73
|
}
|
|
81
|
-
|
|
82
74
|
export default function DocCard({item}) {
|
|
83
75
|
switch (item.type) {
|
|
84
76
|
case 'link':
|
|
85
77
|
return <CardLink item={item} />;
|
|
86
|
-
|
|
87
78
|
case 'category':
|
|
88
79
|
return <CardCategory item={item} />;
|
|
89
|
-
|
|
90
80
|
default:
|
|
91
81
|
throw new Error(`unknown item type ${JSON.stringify(item)}`);
|
|
92
82
|
}
|
|
File without changes
|