@docusaurus/theme-classic 2.0.0-beta.20 → 2.0.0-beta.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/getSwizzleConfig.d.ts +8 -0
- package/lib/getSwizzleConfig.js +219 -234
- package/lib/index.d.ts +12 -0
- package/lib/index.js +103 -157
- 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 +1 -5
- 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 +4 -7
- 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 +9 -21
- 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 +4 -7
- 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 +3 -5
- package/lib/theme/BlogTagsListPage/index.d.ts +10 -0
- package/{lib-next → lib}/theme/BlogTagsListPage/index.js +3 -3
- package/lib/theme/BlogTagsPostsPage/index.d.ts +10 -0
- package/{lib-next → lib}/theme/BlogTagsPostsPage/index.js +7 -13
- 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 +3 -3
- package/lib/theme/CodeBlock/Content/String.d.ts +9 -0
- package/{lib-next → lib}/theme/CodeBlock/Content/String.js +4 -4
- 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 +1 -3
- 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 +8 -13
- 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 +5 -15
- 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 +1 -4
- package/lib/theme/DocCategoryGeneratedIndexPage/index.d.ts +10 -0
- package/{lib-next → lib}/theme/DocCategoryGeneratedIndexPage/index.js +5 -6
- 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 +15 -27
- 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 +1 -6
- 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 +1 -1
- 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 +1 -1
- 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 +5 -8
- package/{lib-next/theme/DocPage/Layout/Sidebar/index.module.css → 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 +2 -2
- package/{lib-next/theme/DocPage/Layout/index.module.css → 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 +2 -4
- 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 +1 -1
- 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/theme/DocSidebarItem/Category.js → lib/theme/DocSidebarItem/Category/index.js} +17 -31
- package/lib/theme/DocSidebarItem/Html/index.d.ts +9 -0
- package/{lib-next/theme/DocSidebarItem/Html.js → lib/theme/DocSidebarItem/Html/index.js} +5 -6
- package/{lib-next/theme/DocSidebarItem/Html.module.css → lib/theme/DocSidebarItem/Html/styles.module.css} +0 -0
- package/lib/theme/DocSidebarItem/Link/index.d.ts +9 -0
- package/{lib-next/theme/DocSidebarItem/Link.js → lib/theme/DocSidebarItem/Link/index.js} +1 -1
- package/{lib-next/theme/DocSidebarItem/Link.module.css → 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 +3 -4
- package/lib/theme/DocTagDocListPage/index.d.ts +10 -0
- package/{lib-next → lib}/theme/DocTagDocListPage/index.js +5 -12
- package/lib/theme/DocTagsListPage/index.d.ts +10 -0
- package/{lib-next → lib}/theme/DocTagsListPage/index.js +2 -2
- package/lib/theme/DocVersionBadge/index.d.ts +9 -0
- package/{lib-next → lib}/theme/DocVersionBadge/index.js +2 -6
- package/lib/theme/DocVersionBanner/index.d.ts +9 -0
- package/{lib-next → lib}/theme/DocVersionBanner/index.js +4 -17
- package/lib/theme/EditThisPage/index.d.ts +9 -0
- package/{lib-next → lib}/theme/EditThisPage/index.js +1 -1
- 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 +4 -8
- 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 +1 -3
- 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 +8 -6
- 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 +3 -10
- 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 +5 -3
- package/lib/theme/MDXComponents/Head.d.ts +9 -0
- package/{lib-next → lib}/theme/MDXComponents/Head.js +2 -5
- 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/theme/MDXComponents/Img.js → lib/theme/MDXComponents/Img/index.js} +1 -3
- package/{lib-next/theme/MDXComponents/Img.module.css → 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 +4 -3
- package/lib/theme/MDXComponents/Ul/index.d.ts +9 -0
- package/{lib-next/theme/MDXComponents/Ul.js → lib/theme/MDXComponents/Ul/index.js} +5 -5
- package/lib/theme/MDXComponents/Ul/styles.module.css +14 -0
- 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 +3 -3
- 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 +1 -3
- package/lib/theme/Navbar/Content/index.d.ts +8 -0
- package/{lib-next → lib}/theme/Navbar/Content/index.js +5 -9
- 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 +1 -3
- 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 +1 -3
- 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 +5 -6
- 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 +1 -1
- package/lib/theme/Navbar/MobileSidebar/index.d.ts +8 -0
- package/{lib-next → lib}/theme/Navbar/MobileSidebar/index.js +2 -4
- package/lib/theme/Navbar/Search/index.d.ts +9 -0
- package/{lib-next → lib}/theme/Navbar/Search/index.js +3 -2
- 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 +4 -9
- package/lib/theme/NavbarItem/DocNavbarItem.d.ts +9 -0
- package/{lib-next → lib}/theme/NavbarItem/DocNavbarItem.js +7 -15
- package/lib/theme/NavbarItem/DocSidebarNavbarItem.d.ts +9 -0
- package/{lib-next → lib}/theme/NavbarItem/DocSidebarNavbarItem.js +2 -10
- package/lib/theme/NavbarItem/DocsVersionDropdownNavbarItem.d.ts +9 -0
- package/{lib-next → lib}/theme/NavbarItem/DocsVersionDropdownNavbarItem.js +8 -12
- package/lib/theme/NavbarItem/DocsVersionNavbarItem.d.ts +9 -0
- package/{lib-next → lib}/theme/NavbarItem/DocsVersionNavbarItem.js +1 -3
- package/lib/theme/NavbarItem/DropdownNavbarItem.d.ts +9 -0
- package/{lib-next → lib}/theme/NavbarItem/DropdownNavbarItem.js +16 -21
- 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 +14 -6
- 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 +6 -22
- package/lib/theme/NavbarItem/SearchNavbarItem.d.ts +9 -0
- package/{lib-next → lib}/theme/NavbarItem/SearchNavbarItem.js +2 -3
- package/lib/theme/NavbarItem/index.d.ts +9 -0
- package/{lib-next → lib}/theme/NavbarItem/index.js +7 -17
- package/lib/theme/NotFound.d.ts +8 -0
- package/{lib-next → lib}/theme/NotFound.js +1 -1
- 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 +16 -17
- 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/theme/TOCCollapsible/CollapseButton.js → lib/theme/TOCCollapsible/CollapseButton/index.js} +1 -1
- package/{lib-next/theme/TOCCollapsible/CollapseButton.module.css → 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 +1 -1
- package/{lib-next/theme/TOCCollapsible/index.module.css → 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 +1 -1
- 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 +1 -2
- 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 +17 -33
- 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 +1 -3
- 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 +12 -0
- package/lib/validateThemeConfig.js +355 -322
- package/package.json +24 -28
- package/src/getSwizzleConfig.ts +0 -7
- package/src/index.ts +15 -13
- package/src/theme/BlogArchivePage/index.tsx +2 -2
- package/src/theme/BlogListPage/index.tsx +5 -5
- package/src/theme/BlogPostAuthors/index.tsx +1 -1
- package/src/theme/BlogPostItem/index.tsx +2 -2
- package/src/theme/BlogPostPage/index.tsx +5 -5
- package/src/theme/BlogSidebar/Desktop/index.tsx +1 -1
- package/src/theme/BlogSidebar/index.tsx +1 -1
- package/src/theme/BlogTagsListPage/index.tsx +4 -5
- package/src/theme/BlogTagsPostsPage/index.tsx +5 -6
- package/src/theme/CodeBlock/Content/Element.tsx +1 -1
- package/src/theme/CodeBlock/Content/String.tsx +2 -2
- package/src/theme/CodeBlock/Line/index.tsx +1 -0
- package/src/theme/CodeBlock/index.tsx +1 -1
- package/src/theme/ColorModeToggle/index.tsx +2 -2
- package/src/theme/Details/index.tsx +1 -0
- package/src/theme/DocBreadcrumbs/index.tsx +3 -2
- package/src/theme/DocCard/index.tsx +7 -6
- package/src/theme/DocCardList/index.tsx +2 -3
- package/src/theme/DocCategoryGeneratedIndexPage/index.tsx +2 -2
- package/src/theme/DocItem/index.tsx +9 -8
- package/src/theme/DocItemFooter/index.tsx +2 -3
- package/src/theme/DocPage/Layout/Main/index.tsx +2 -3
- package/src/theme/DocPage/Layout/Sidebar/ExpandButton/index.tsx +1 -1
- package/src/theme/DocPage/Layout/Sidebar/index.tsx +5 -6
- package/src/theme/DocPage/Layout/Sidebar/{index.module.css → styles.module.css} +0 -0
- package/src/theme/DocPage/Layout/index.tsx +3 -4
- package/src/theme/DocPage/Layout/{index.module.css → styles.module.css} +0 -0
- package/src/theme/DocPage/index.tsx +3 -5
- package/src/theme/DocSidebar/Desktop/CollapseButton/index.tsx +1 -1
- package/src/theme/DocSidebar/index.tsx +1 -1
- package/src/theme/DocSidebarItem/{Category.tsx → Category/index.tsx} +14 -15
- package/src/theme/DocSidebarItem/{Html.tsx → Html/index.tsx} +2 -2
- package/src/theme/DocSidebarItem/{Html.module.css → Html/styles.module.css} +0 -0
- package/src/theme/DocSidebarItem/{Link.tsx → Link/index.tsx} +1 -2
- package/src/theme/DocSidebarItem/{Link.module.css → Link/styles.module.css} +0 -0
- package/src/theme/DocSidebarItems/index.tsx +1 -1
- package/src/theme/DocTagDocListPage/index.tsx +3 -4
- package/src/theme/DocTagsListPage/index.tsx +3 -4
- package/src/theme/DocVersionBadge/index.tsx +1 -1
- package/src/theme/DocVersionBanner/index.tsx +1 -1
- package/src/theme/EditThisPage/index.tsx +2 -3
- package/src/theme/Footer/Links/MultiColumn/index.tsx +2 -2
- package/src/theme/Footer/Links/Simple/index.tsx +1 -1
- package/src/theme/Footer/Links/index.tsx +1 -1
- package/src/theme/Footer/Logo/index.tsx +2 -2
- package/src/theme/Heading/index.tsx +1 -1
- package/src/theme/IconEdit/index.tsx +0 -1
- package/src/theme/LastUpdated/index.tsx +1 -1
- package/src/theme/Layout/index.tsx +9 -7
- package/src/theme/Logo/index.tsx +2 -3
- package/src/theme/MDXComponents/Details.tsx +5 -3
- package/src/theme/MDXComponents/Head.tsx +5 -3
- package/src/theme/MDXComponents/{Img.tsx → Img/index.tsx} +3 -2
- package/src/theme/MDXComponents/{Img.module.css → Img/styles.module.css} +0 -0
- package/src/theme/MDXComponents/Pre.tsx +2 -2
- package/src/theme/MDXComponents/{Ul.tsx → Ul/index.tsx} +5 -3
- package/src/theme/MDXComponents/Ul/styles.module.css +14 -0
- package/src/theme/MDXPage/index.tsx +4 -4
- package/src/theme/Navbar/ColorModeToggle/index.tsx +1 -1
- package/src/theme/Navbar/Content/index.tsx +6 -6
- package/src/theme/Navbar/Layout/index.tsx +2 -2
- package/src/theme/Navbar/MobileSidebar/Header/index.tsx +1 -1
- package/src/theme/Navbar/MobileSidebar/Layout/index.tsx +1 -1
- package/src/theme/Navbar/MobileSidebar/PrimaryMenu/index.tsx +1 -2
- package/src/theme/Navbar/MobileSidebar/Toggle/index.tsx +1 -1
- package/src/theme/Navbar/MobileSidebar/index.tsx +2 -2
- package/src/theme/Navbar/Search/index.tsx +6 -2
- package/src/theme/NavbarItem/DefaultNavbarItem.tsx +3 -5
- package/src/theme/NavbarItem/DocNavbarItem.tsx +6 -14
- package/src/theme/NavbarItem/DocSidebarNavbarItem.tsx +2 -10
- package/src/theme/NavbarItem/DocsVersionDropdownNavbarItem.tsx +5 -6
- package/src/theme/NavbarItem/DocsVersionNavbarItem.tsx +2 -2
- package/src/theme/NavbarItem/DropdownNavbarItem.tsx +8 -10
- package/src/theme/NavbarItem/LocaleDropdownNavbarItem/index.tsx +13 -5
- package/src/theme/NavbarItem/NavbarNavLink.tsx +3 -9
- package/src/theme/NavbarItem/SearchNavbarItem.tsx +6 -3
- package/src/theme/NavbarItem/index.tsx +9 -19
- package/src/theme/NotFound.tsx +1 -1
- package/src/theme/SiteMetadata/index.tsx +1 -1
- package/src/theme/TOC/index.tsx +2 -1
- package/src/theme/TOCCollapsible/{CollapseButton.tsx → CollapseButton/index.tsx} +2 -1
- package/src/theme/TOCCollapsible/{CollapseButton.module.css → CollapseButton/styles.module.css} +0 -0
- package/src/theme/TOCCollapsible/index.tsx +3 -2
- package/src/theme/TOCCollapsible/{index.module.css → styles.module.css} +0 -0
- package/src/theme/TOCInline/index.tsx +2 -1
- package/src/theme/TOCItems/index.tsx +2 -2
- package/src/theme/TabItem/index.tsx +1 -1
- package/src/theme/Tabs/index.tsx +9 -8
- package/src/theme/TagsListByLetter/index.tsx +1 -1
- package/src/theme/ThemedImage/index.tsx +0 -1
- package/src/theme-classic.d.ts +8 -15
- package/src/translations.ts +2 -3
- package/src/validateThemeConfig.ts +8 -8
- package/lib/deps.d.ts +0 -13
- package/lib/theme-classic.d.ts +0 -1279
- package/lib-next/theme/NavbarItem/utils.js +0 -10
- package/lib-next/theme/Tabs/__tests__/index.test.js +0 -146
- package/src/theme/NavbarItem/utils.ts +0 -13
|
@@ -5,11 +5,9 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
|
-
import DefaultNavbarItem from '@theme/NavbarItem/DefaultNavbarItem';
|
|
9
8
|
import {useActiveDocContext} from '@docusaurus/plugin-content-docs/client';
|
|
10
|
-
import clsx from 'clsx';
|
|
11
|
-
import {getInfimaActiveClassName} from '@theme/NavbarItem/utils';
|
|
12
9
|
import {useLayoutDocsSidebar} from '@docusaurus/theme-common';
|
|
10
|
+
import DefaultNavbarItem from '@theme/NavbarItem/DefaultNavbarItem';
|
|
13
11
|
export default function DocSidebarNavbarItem({
|
|
14
12
|
sidebarId,
|
|
15
13
|
label,
|
|
@@ -18,22 +16,16 @@ export default function DocSidebarNavbarItem({
|
|
|
18
16
|
}) {
|
|
19
17
|
const {activeDoc} = useActiveDocContext(docsPluginId);
|
|
20
18
|
const sidebarLink = useLayoutDocsSidebar(sidebarId, docsPluginId).link;
|
|
21
|
-
|
|
22
19
|
if (!sidebarLink) {
|
|
23
20
|
throw new Error(
|
|
24
21
|
`DocSidebarNavbarItem: Sidebar with ID "${sidebarId}" doesn't have anything to be linked to.`,
|
|
25
22
|
);
|
|
26
23
|
}
|
|
27
|
-
|
|
28
|
-
const activeDocInfimaClassName = getInfimaActiveClassName(props.mobile);
|
|
29
24
|
return (
|
|
30
25
|
<DefaultNavbarItem
|
|
31
26
|
exact
|
|
32
27
|
{...props}
|
|
33
|
-
|
|
34
|
-
[activeDocInfimaClassName]: activeDoc?.sidebar === sidebarId,
|
|
35
|
-
})}
|
|
36
|
-
activeClassName={activeDocInfimaClassName}
|
|
28
|
+
isActive={() => activeDoc?.sidebar === sidebarId}
|
|
37
29
|
label={label ?? sidebarLink.label}
|
|
38
30
|
to={sidebarLink.path}
|
|
39
31
|
/>
|
|
@@ -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/NavbarItem/DocsVersionDropdownNavbarItem';
|
|
9
|
+
export default function DocsVersionDropdownNavbarItem({ mobile, docsPluginId, dropdownActiveClassDisabled, dropdownItemsBefore, dropdownItemsAfter, ...props }: Props): JSX.Element;
|
|
@@ -5,8 +5,6 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
|
-
import DefaultNavbarItem from '@theme/NavbarItem/DefaultNavbarItem';
|
|
9
|
-
import DropdownNavbarItem from '@theme/NavbarItem/DropdownNavbarItem';
|
|
10
8
|
import {
|
|
11
9
|
useVersions,
|
|
12
10
|
useActiveDocContext,
|
|
@@ -16,10 +14,10 @@ import {
|
|
|
16
14
|
useDocsVersionCandidates,
|
|
17
15
|
} from '@docusaurus/theme-common';
|
|
18
16
|
import {translate} from '@docusaurus/Translate';
|
|
19
|
-
|
|
17
|
+
import DefaultNavbarItem from '@theme/NavbarItem/DefaultNavbarItem';
|
|
18
|
+
import DropdownNavbarItem from '@theme/NavbarItem/DropdownNavbarItem';
|
|
20
19
|
const getVersionMainDoc = (version) =>
|
|
21
20
|
version.docs.find((doc) => doc.id === version.mainDocId);
|
|
22
|
-
|
|
23
21
|
export default function DocsVersionDropdownNavbarItem({
|
|
24
22
|
mobile,
|
|
25
23
|
docsPluginId,
|
|
@@ -35,13 +33,12 @@ export default function DocsVersionDropdownNavbarItem({
|
|
|
35
33
|
// We try to link to the same doc, in another version
|
|
36
34
|
// When not possible, fallback to the "main doc" of the version
|
|
37
35
|
const versionDoc =
|
|
38
|
-
activeDocContext
|
|
36
|
+
activeDocContext.alternateDocVersions[version.name] ??
|
|
39
37
|
getVersionMainDoc(version);
|
|
40
38
|
return {
|
|
41
|
-
isNavLink: true,
|
|
42
39
|
label: version.label,
|
|
43
40
|
to: versionDoc.path,
|
|
44
|
-
isActive: () => version === activeDocContext
|
|
41
|
+
isActive: () => version === activeDocContext.activeVersion,
|
|
45
42
|
onClick: () => savePreferredVersionName(version.name),
|
|
46
43
|
};
|
|
47
44
|
});
|
|
@@ -50,8 +47,8 @@ export default function DocsVersionDropdownNavbarItem({
|
|
|
50
47
|
...versionLinks,
|
|
51
48
|
...dropdownItemsAfter,
|
|
52
49
|
];
|
|
53
|
-
const dropdownVersion = useDocsVersionCandidates(docsPluginId)[0];
|
|
54
|
-
|
|
50
|
+
const dropdownVersion = useDocsVersionCandidates(docsPluginId)[0];
|
|
51
|
+
// Mobile dropdown is handled a bit differently
|
|
55
52
|
const dropdownLabel =
|
|
56
53
|
mobile && items.length > 1
|
|
57
54
|
? translate({
|
|
@@ -64,10 +61,10 @@ export default function DocsVersionDropdownNavbarItem({
|
|
|
64
61
|
const dropdownTo =
|
|
65
62
|
mobile && items.length > 1
|
|
66
63
|
? undefined
|
|
67
|
-
: getVersionMainDoc(dropdownVersion).path;
|
|
64
|
+
: getVersionMainDoc(dropdownVersion).path;
|
|
65
|
+
// We don't want to render a version dropdown with 0 or 1 item. If we build
|
|
68
66
|
// the site with a single docs version (onlyIncludeVersions: ['1.0.0']),
|
|
69
67
|
// We'd rather render a button instead of a dropdown
|
|
70
|
-
|
|
71
68
|
if (items.length <= 1) {
|
|
72
69
|
return (
|
|
73
70
|
<DefaultNavbarItem
|
|
@@ -79,7 +76,6 @@ export default function DocsVersionDropdownNavbarItem({
|
|
|
79
76
|
/>
|
|
80
77
|
);
|
|
81
78
|
}
|
|
82
|
-
|
|
83
79
|
return (
|
|
84
80
|
<DropdownNavbarItem
|
|
85
81
|
{...props}
|
|
@@ -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/NavbarItem/DocsVersionNavbarItem';
|
|
9
|
+
export default function DocsVersionNavbarItem({ label: staticLabel, to: staticTo, docsPluginId, ...props }: Props): JSX.Element;
|
|
@@ -5,12 +5,10 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
|
-
import DefaultNavbarItem from '@theme/NavbarItem/DefaultNavbarItem';
|
|
9
8
|
import {useDocsVersionCandidates} from '@docusaurus/theme-common';
|
|
10
|
-
|
|
9
|
+
import DefaultNavbarItem from '@theme/NavbarItem/DefaultNavbarItem';
|
|
11
10
|
const getVersionMainDoc = (version) =>
|
|
12
11
|
version.docs.find((doc) => doc.id === version.mainDocId);
|
|
13
|
-
|
|
14
12
|
export default function DocsVersionNavbarItem({
|
|
15
13
|
label: staticLabel,
|
|
16
14
|
to: staticTo,
|
|
@@ -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/NavbarItem/DropdownNavbarItem';
|
|
9
|
+
export default function DropdownNavbarItem({ mobile, ...props }: Props): JSX.Element;
|
|
@@ -15,29 +15,28 @@ import {
|
|
|
15
15
|
} from '@docusaurus/theme-common';
|
|
16
16
|
import NavbarNavLink from '@theme/NavbarItem/NavbarNavLink';
|
|
17
17
|
import NavbarItem from '@theme/NavbarItem';
|
|
18
|
-
const dropdownLinkActiveClass = 'dropdown__link--active';
|
|
19
|
-
|
|
20
18
|
function isItemActive(item, localPathname) {
|
|
21
19
|
if (isSamePath(item.to, localPathname)) {
|
|
22
20
|
return true;
|
|
23
21
|
}
|
|
24
|
-
|
|
25
22
|
if (isRegexpStringMatch(item.activeBaseRegex, localPathname)) {
|
|
26
23
|
return true;
|
|
27
24
|
}
|
|
28
|
-
|
|
29
25
|
if (item.activeBasePath && localPathname.startsWith(item.activeBasePath)) {
|
|
30
26
|
return true;
|
|
31
27
|
}
|
|
32
|
-
|
|
33
28
|
return false;
|
|
34
29
|
}
|
|
35
|
-
|
|
36
30
|
function containsActiveItems(items, localPathname) {
|
|
37
31
|
return items.some((item) => isItemActive(item, localPathname));
|
|
38
32
|
}
|
|
39
|
-
|
|
40
|
-
|
|
33
|
+
function DropdownNavbarItemDesktop({
|
|
34
|
+
items,
|
|
35
|
+
position,
|
|
36
|
+
className,
|
|
37
|
+
onClick,
|
|
38
|
+
...props
|
|
39
|
+
}) {
|
|
41
40
|
const dropdownRef = useRef(null);
|
|
42
41
|
const [showDropdown, setShowDropdown] = useState(false);
|
|
43
42
|
useEffect(() => {
|
|
@@ -45,10 +44,8 @@ function DropdownNavbarItemDesktop({items, position, className, ...props}) {
|
|
|
45
44
|
if (!dropdownRef.current || dropdownRef.current.contains(event.target)) {
|
|
46
45
|
return;
|
|
47
46
|
}
|
|
48
|
-
|
|
49
47
|
setShowDropdown(false);
|
|
50
48
|
};
|
|
51
|
-
|
|
52
49
|
document.addEventListener('mousedown', handleClickOutside);
|
|
53
50
|
document.addEventListener('touchstart', handleClickOutside);
|
|
54
51
|
return () => {
|
|
@@ -88,18 +85,18 @@ function DropdownNavbarItemDesktop({items, position, className, ...props}) {
|
|
|
88
85
|
e.preventDefault();
|
|
89
86
|
setShowDropdown(false);
|
|
90
87
|
const nextNavbarItem = dropdownRef.current.nextElementSibling;
|
|
91
|
-
|
|
92
88
|
if (nextNavbarItem) {
|
|
93
89
|
const targetItem =
|
|
94
90
|
nextNavbarItem instanceof HTMLAnchorElement
|
|
95
|
-
? nextNavbarItem
|
|
96
|
-
: //
|
|
91
|
+
? nextNavbarItem
|
|
92
|
+
: // Next item is another dropdown; focus on the inner
|
|
93
|
+
// anchor element instead so there's outline
|
|
97
94
|
nextNavbarItem.querySelector('a');
|
|
98
95
|
targetItem.focus();
|
|
99
96
|
}
|
|
100
97
|
}
|
|
101
98
|
}}
|
|
102
|
-
activeClassName=
|
|
99
|
+
activeClassName="dropdown__link--active"
|
|
103
100
|
{...childItemProps}
|
|
104
101
|
key={i}
|
|
105
102
|
/>
|
|
@@ -108,20 +105,19 @@ function DropdownNavbarItemDesktop({items, position, className, ...props}) {
|
|
|
108
105
|
</div>
|
|
109
106
|
);
|
|
110
107
|
}
|
|
111
|
-
|
|
112
108
|
function DropdownNavbarItemMobile({
|
|
113
109
|
items,
|
|
114
110
|
className,
|
|
115
|
-
position,
|
|
116
|
-
|
|
111
|
+
position, // Need to destructure position from props so that it doesn't get passed on.
|
|
112
|
+
onClick,
|
|
117
113
|
...props
|
|
118
114
|
}) {
|
|
119
115
|
const localPathname = useLocalPathname();
|
|
120
116
|
const containsActive = containsActiveItems(items, localPathname);
|
|
121
117
|
const {collapsed, toggleCollapsed, setCollapsed} = useCollapsible({
|
|
122
118
|
initialState: () => !containsActive,
|
|
123
|
-
});
|
|
124
|
-
|
|
119
|
+
});
|
|
120
|
+
// Expand/collapse if any item active after a navigation
|
|
125
121
|
useEffect(() => {
|
|
126
122
|
if (containsActive) {
|
|
127
123
|
setCollapsed(!containsActive);
|
|
@@ -150,7 +146,7 @@ function DropdownNavbarItemMobile({
|
|
|
150
146
|
<NavbarItem
|
|
151
147
|
mobile
|
|
152
148
|
isDropdownItem
|
|
153
|
-
onClick={
|
|
149
|
+
onClick={onClick}
|
|
154
150
|
activeClassName="menu__link--active"
|
|
155
151
|
{...childItemProps}
|
|
156
152
|
key={i}
|
|
@@ -160,7 +156,6 @@ function DropdownNavbarItemMobile({
|
|
|
160
156
|
</li>
|
|
161
157
|
);
|
|
162
158
|
}
|
|
163
|
-
|
|
164
159
|
export default function DropdownNavbarItem({mobile = false, ...props}) {
|
|
165
160
|
const Comp = mobile ? DropdownNavbarItemMobile : DropdownNavbarItemDesktop;
|
|
166
161
|
return <Comp {...props} />;
|
|
@@ -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/NavbarItem/HtmlNavbarItem';
|
|
9
|
+
export default function HtmlNavbarItem({ value, className, mobile, isDropdownItem, }: Props): JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
/// <reference types="react" />
|
|
8
|
+
import type { Props } from '@theme/NavbarItem/LocaleDropdownNavbarItem';
|
|
9
|
+
export default function LocaleDropdownNavbarItem({ mobile, dropdownItemsBefore, dropdownItemsAfter, ...props }: Props): JSX.Element;
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
|
-
import DropdownNavbarItem from '@theme/NavbarItem/DropdownNavbarItem';
|
|
9
|
-
import IconLanguage from '@theme/IconLanguage';
|
|
10
8
|
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
|
11
9
|
import {useAlternatePageUtils} from '@docusaurus/theme-common';
|
|
12
10
|
import {translate} from '@docusaurus/Translate';
|
|
11
|
+
import DropdownNavbarItem from '@theme/NavbarItem/DropdownNavbarItem';
|
|
12
|
+
import IconLanguage from '@theme/IconLanguage';
|
|
13
13
|
import styles from './styles.module.css';
|
|
14
14
|
export default function LocaleDropdownNavbarItem({
|
|
15
15
|
mobile,
|
|
@@ -27,16 +27,24 @@ export default function LocaleDropdownNavbarItem({
|
|
|
27
27
|
fullyQualified: false,
|
|
28
28
|
})}`;
|
|
29
29
|
return {
|
|
30
|
-
isNavLink: true,
|
|
31
30
|
label: localeConfigs[locale].label,
|
|
32
31
|
to,
|
|
33
32
|
target: '_self',
|
|
34
33
|
autoAddBaseUrl: false,
|
|
35
|
-
className:
|
|
34
|
+
className:
|
|
35
|
+
// eslint-disable-next-line no-nested-ternary
|
|
36
|
+
locale === currentLocale
|
|
37
|
+
? // Similar idea as DefaultNavbarItem: select the right Infima active
|
|
38
|
+
// class name. This cannot be substituted with isActive, because the
|
|
39
|
+
// target URLs contain `pathname://` and therefore are not NavLinks!
|
|
40
|
+
mobile
|
|
41
|
+
? 'menu__link--active'
|
|
42
|
+
: 'dropdown__link--active'
|
|
43
|
+
: '',
|
|
36
44
|
};
|
|
37
45
|
});
|
|
38
|
-
const items = [...dropdownItemsBefore, ...localeItems, ...dropdownItemsAfter];
|
|
39
|
-
|
|
46
|
+
const items = [...dropdownItemsBefore, ...localeItems, ...dropdownItemsAfter];
|
|
47
|
+
// Mobile is handled a bit differently
|
|
40
48
|
const dropdownLabel = mobile
|
|
41
49
|
? translate({
|
|
42
50
|
message: 'Languages',
|
|
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/NavbarItem/NavbarNavLink';
|
|
9
|
+
export default function NavbarNavLink({ activeBasePath, activeBaseRegex, to, href, label, html, isDropdownLink, prependBaseUrlToHref, ...props }: Props): JSX.Element;
|
|
@@ -7,10 +7,9 @@
|
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import Link from '@docusaurus/Link';
|
|
9
9
|
import useBaseUrl from '@docusaurus/useBaseUrl';
|
|
10
|
-
import IconExternalLink from '@theme/IconExternalLink';
|
|
11
10
|
import isInternalUrl from '@docusaurus/isInternalUrl';
|
|
12
11
|
import {isRegexpStringMatch} from '@docusaurus/theme-common';
|
|
13
|
-
|
|
12
|
+
import IconExternalLink from '@theme/IconExternalLink';
|
|
14
13
|
export default function NavbarNavLink({
|
|
15
14
|
activeBasePath,
|
|
16
15
|
activeBaseRegex,
|
|
@@ -18,7 +17,7 @@ export default function NavbarNavLink({
|
|
|
18
17
|
href,
|
|
19
18
|
label,
|
|
20
19
|
html,
|
|
21
|
-
|
|
20
|
+
isDropdownLink,
|
|
22
21
|
prependBaseUrlToHref,
|
|
23
22
|
...props
|
|
24
23
|
}) {
|
|
@@ -26,34 +25,23 @@ export default function NavbarNavLink({
|
|
|
26
25
|
// {to: 'version'} should probably be forbidden, in favor of {to: '/version'}
|
|
27
26
|
const toUrl = useBaseUrl(to);
|
|
28
27
|
const activeBaseUrl = useBaseUrl(activeBasePath);
|
|
29
|
-
const normalizedHref = useBaseUrl(href, {
|
|
30
|
-
forcePrependBaseUrl: true,
|
|
31
|
-
});
|
|
28
|
+
const normalizedHref = useBaseUrl(href, {forcePrependBaseUrl: true});
|
|
32
29
|
const isExternalLink = label && href && !isInternalUrl(href);
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
// Link content is set through html XOR label
|
|
35
31
|
const linkContentProps = html
|
|
36
|
-
? {
|
|
37
|
-
dangerouslySetInnerHTML: {
|
|
38
|
-
__html: html,
|
|
39
|
-
},
|
|
40
|
-
}
|
|
32
|
+
? {dangerouslySetInnerHTML: {__html: html}}
|
|
41
33
|
: {
|
|
42
34
|
children: (
|
|
43
35
|
<>
|
|
44
36
|
{label}
|
|
45
37
|
{isExternalLink && (
|
|
46
38
|
<IconExternalLink
|
|
47
|
-
{...(isDropdownLink && {
|
|
48
|
-
width: 12,
|
|
49
|
-
height: 12,
|
|
50
|
-
})}
|
|
39
|
+
{...(isDropdownLink && {width: 12, height: 12})}
|
|
51
40
|
/>
|
|
52
41
|
)}
|
|
53
42
|
</>
|
|
54
43
|
),
|
|
55
44
|
};
|
|
56
|
-
|
|
57
45
|
if (href) {
|
|
58
46
|
return (
|
|
59
47
|
<Link
|
|
@@ -63,14 +51,10 @@ export default function NavbarNavLink({
|
|
|
63
51
|
/>
|
|
64
52
|
);
|
|
65
53
|
}
|
|
66
|
-
|
|
67
54
|
return (
|
|
68
55
|
<Link
|
|
69
56
|
to={toUrl}
|
|
70
57
|
isNavLink
|
|
71
|
-
activeClassName={
|
|
72
|
-
!props.className?.includes(activeClassName) ? activeClassName : ''
|
|
73
|
-
}
|
|
74
58
|
{...((activeBasePath || activeBaseRegex) && {
|
|
75
59
|
isActive: (_match, location) =>
|
|
76
60
|
activeBaseRegex
|
|
@@ -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/NavbarItem/SearchNavbarItem';
|
|
9
|
+
export default function SearchNavbarItem({ mobile, className, }: Props): JSX.Element | null;
|
|
@@ -7,13 +7,12 @@
|
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import SearchBar from '@theme/SearchBar';
|
|
9
9
|
import NavbarSearch from '@theme/Navbar/Search';
|
|
10
|
-
export default function SearchNavbarItem({mobile}) {
|
|
10
|
+
export default function SearchNavbarItem({mobile, className}) {
|
|
11
11
|
if (mobile) {
|
|
12
12
|
return null;
|
|
13
13
|
}
|
|
14
|
-
|
|
15
14
|
return (
|
|
16
|
-
<NavbarSearch>
|
|
15
|
+
<NavbarSearch className={className}>
|
|
17
16
|
<SearchBar />
|
|
18
17
|
</NavbarSearch>
|
|
19
18
|
);
|
|
@@ -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/NavbarItem';
|
|
9
|
+
export default function NavbarItem({ type, ...props }: Props): JSX.Element;
|
|
@@ -6,29 +6,19 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import ComponentTypes from '@theme/NavbarItem/ComponentTypes';
|
|
9
|
-
|
|
10
|
-
const getNavbarItemComponent = (type) => {
|
|
11
|
-
const component = ComponentTypes[type];
|
|
12
|
-
|
|
13
|
-
if (!component) {
|
|
14
|
-
throw new Error(`No NavbarItem component found for type "${type}".`);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
return component;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
function getComponentType(type, isDropdown) {
|
|
9
|
+
function normalizeComponentType(type, props) {
|
|
21
10
|
// Backward compatibility: navbar item with no type set
|
|
22
11
|
// but containing dropdown items should use the type "dropdown"
|
|
23
12
|
if (!type || type === 'default') {
|
|
24
|
-
return
|
|
13
|
+
return 'items' in props ? 'dropdown' : 'default';
|
|
25
14
|
}
|
|
26
|
-
|
|
27
15
|
return type;
|
|
28
16
|
}
|
|
29
|
-
|
|
30
17
|
export default function NavbarItem({type, ...props}) {
|
|
31
|
-
const componentType =
|
|
32
|
-
const NavbarItemComponent =
|
|
18
|
+
const componentType = normalizeComponentType(type, props);
|
|
19
|
+
const NavbarItemComponent = ComponentTypes[componentType];
|
|
20
|
+
if (!NavbarItemComponent) {
|
|
21
|
+
throw new Error(`No NavbarItem component found for type "${type}".`);
|
|
22
|
+
}
|
|
33
23
|
return <NavbarItemComponent {...props} />;
|
|
34
24
|
}
|
|
@@ -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 NotFound(): JSX.Element;
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
|
-
import Layout from '@theme/Layout';
|
|
9
8
|
import Translate, {translate} from '@docusaurus/Translate';
|
|
10
9
|
import {PageMetadata} from '@docusaurus/theme-common';
|
|
10
|
+
import Layout from '@theme/Layout';
|
|
11
11
|
export default function NotFound() {
|
|
12
12
|
return (
|
|
13
13
|
<>
|
|
@@ -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/PaginatorNavLink';
|
|
9
|
+
export default function PaginatorNavLink(props: 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/SearchMetadata';
|
|
9
|
+
export default function SearchMetadata({ locale, version, tag, }: Props): JSX.Element;
|
|
@@ -18,9 +18,9 @@ export default function SearchMetadata({locale, version, tag}) {
|
|
|
18
18
|
return (
|
|
19
19
|
<Head>
|
|
20
20
|
{/*
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
Docusaurus metadata, used by third-party search plugin
|
|
22
|
+
See https://github.com/cmfcmf/docusaurus-search-local/issues/99
|
|
23
|
+
*/}
|
|
24
24
|
{locale && <meta name="docusaurus_locale" content={locale} />}
|
|
25
25
|
{version && <meta name="docusaurus_version" content={version} />}
|
|
26
26
|
{tag && <meta name="docusaurus_tag" content={tag} />}
|
|
@@ -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 SiteMetadata(): JSX.Element;
|