@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
|
@@ -6,10 +6,14 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
|
+
import clsx from 'clsx';
|
|
9
10
|
import type {Props} from '@theme/Navbar/Search';
|
|
10
11
|
|
|
11
12
|
import styles from './styles.module.css';
|
|
12
13
|
|
|
13
|
-
export default function NavbarSearch({
|
|
14
|
-
|
|
14
|
+
export default function NavbarSearch({
|
|
15
|
+
children,
|
|
16
|
+
className,
|
|
17
|
+
}: Props): JSX.Element {
|
|
18
|
+
return <div className={clsx(className, styles.searchBox)}>{children}</div>;
|
|
15
19
|
}
|
|
@@ -7,16 +7,12 @@
|
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import clsx from 'clsx';
|
|
10
|
-
|
|
11
10
|
import NavbarNavLink from '@theme/NavbarItem/NavbarNavLink';
|
|
12
|
-
|
|
13
11
|
import type {
|
|
14
12
|
DesktopOrMobileNavBarItemProps,
|
|
15
13
|
Props,
|
|
16
14
|
} from '@theme/NavbarItem/DefaultNavbarItem';
|
|
17
15
|
|
|
18
|
-
import {getInfimaActiveClassName} from '@theme/NavbarItem/utils';
|
|
19
|
-
|
|
20
16
|
function DefaultNavbarItemDesktop({
|
|
21
17
|
className,
|
|
22
18
|
isDropdownItem = false,
|
|
@@ -28,6 +24,7 @@ function DefaultNavbarItemDesktop({
|
|
|
28
24
|
isDropdownItem ? 'dropdown__link' : 'navbar__item navbar__link',
|
|
29
25
|
className,
|
|
30
26
|
)}
|
|
27
|
+
isDropdownLink={isDropdownItem}
|
|
31
28
|
{...props}
|
|
32
29
|
/>
|
|
33
30
|
);
|
|
@@ -61,7 +58,8 @@ export default function DefaultNavbarItem({
|
|
|
61
58
|
<Comp
|
|
62
59
|
{...props}
|
|
63
60
|
activeClassName={
|
|
64
|
-
props.activeClassName ??
|
|
61
|
+
props.activeClassName ??
|
|
62
|
+
(mobile ? 'menu__link--active' : 'navbar__link--active')
|
|
65
63
|
}
|
|
66
64
|
/>
|
|
67
65
|
);
|
|
@@ -6,12 +6,10 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
|
-
import DefaultNavbarItem from '@theme/NavbarItem/DefaultNavbarItem';
|
|
10
9
|
import {useActiveDocContext} from '@docusaurus/plugin-content-docs/client';
|
|
11
|
-
import clsx from 'clsx';
|
|
12
|
-
import {getInfimaActiveClassName} from '@theme/NavbarItem/utils';
|
|
13
|
-
import type {Props} from '@theme/NavbarItem/DocNavbarItem';
|
|
14
10
|
import {useLayoutDoc} from '@docusaurus/theme-common';
|
|
11
|
+
import DefaultNavbarItem from '@theme/NavbarItem/DefaultNavbarItem';
|
|
12
|
+
import type {Props} from '@theme/NavbarItem/DocNavbarItem';
|
|
15
13
|
|
|
16
14
|
export default function DocNavbarItem({
|
|
17
15
|
docId,
|
|
@@ -27,20 +25,14 @@ export default function DocNavbarItem({
|
|
|
27
25
|
return null;
|
|
28
26
|
}
|
|
29
27
|
|
|
30
|
-
const activeDocInfimaClassName = getInfimaActiveClassName(props.mobile);
|
|
31
|
-
|
|
32
28
|
return (
|
|
33
29
|
<DefaultNavbarItem
|
|
34
30
|
exact
|
|
35
31
|
{...props}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
// regardless of the existence of a sidebar
|
|
41
|
-
activeDoc?.sidebar && activeDoc.sidebar === doc.sidebar,
|
|
42
|
-
})}
|
|
43
|
-
activeClassName={activeDocInfimaClassName}
|
|
32
|
+
isActive={() =>
|
|
33
|
+
activeDoc?.path === doc.path ||
|
|
34
|
+
(!!activeDoc?.sidebar && activeDoc.sidebar === doc.sidebar)
|
|
35
|
+
}
|
|
44
36
|
label={staticLabel ?? doc.id}
|
|
45
37
|
to={doc.path}
|
|
46
38
|
/>
|
|
@@ -6,12 +6,9 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
|
-
import DefaultNavbarItem from '@theme/NavbarItem/DefaultNavbarItem';
|
|
10
9
|
import {useActiveDocContext} from '@docusaurus/plugin-content-docs/client';
|
|
11
|
-
import clsx from 'clsx';
|
|
12
|
-
import {getInfimaActiveClassName} from '@theme/NavbarItem/utils';
|
|
13
10
|
import {useLayoutDocsSidebar} from '@docusaurus/theme-common';
|
|
14
|
-
|
|
11
|
+
import DefaultNavbarItem from '@theme/NavbarItem/DefaultNavbarItem';
|
|
15
12
|
import type {Props} from '@theme/NavbarItem/DocSidebarNavbarItem';
|
|
16
13
|
|
|
17
14
|
export default function DocSidebarNavbarItem({
|
|
@@ -27,16 +24,11 @@ export default function DocSidebarNavbarItem({
|
|
|
27
24
|
`DocSidebarNavbarItem: Sidebar with ID "${sidebarId}" doesn't have anything to be linked to.`,
|
|
28
25
|
);
|
|
29
26
|
}
|
|
30
|
-
const activeDocInfimaClassName = getInfimaActiveClassName(props.mobile);
|
|
31
|
-
|
|
32
27
|
return (
|
|
33
28
|
<DefaultNavbarItem
|
|
34
29
|
exact
|
|
35
30
|
{...props}
|
|
36
|
-
|
|
37
|
-
[activeDocInfimaClassName]: activeDoc?.sidebar === sidebarId,
|
|
38
|
-
})}
|
|
39
|
-
activeClassName={activeDocInfimaClassName}
|
|
31
|
+
isActive={() => activeDoc?.sidebar === sidebarId}
|
|
40
32
|
label={label ?? sidebarLink.label}
|
|
41
33
|
to={sidebarLink.path}
|
|
42
34
|
/>
|
|
@@ -6,8 +6,6 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
|
-
import DefaultNavbarItem from '@theme/NavbarItem/DefaultNavbarItem';
|
|
10
|
-
import DropdownNavbarItem from '@theme/NavbarItem/DropdownNavbarItem';
|
|
11
9
|
import {
|
|
12
10
|
useVersions,
|
|
13
11
|
useActiveDocContext,
|
|
@@ -17,8 +15,10 @@ import {
|
|
|
17
15
|
useDocsVersionCandidates,
|
|
18
16
|
} from '@docusaurus/theme-common';
|
|
19
17
|
import {translate} from '@docusaurus/Translate';
|
|
20
|
-
import
|
|
18
|
+
import DefaultNavbarItem from '@theme/NavbarItem/DefaultNavbarItem';
|
|
19
|
+
import DropdownNavbarItem from '@theme/NavbarItem/DropdownNavbarItem';
|
|
21
20
|
import type {Props} from '@theme/NavbarItem/DocsVersionDropdownNavbarItem';
|
|
21
|
+
import type {GlobalVersion} from '@docusaurus/plugin-content-docs/client';
|
|
22
22
|
|
|
23
23
|
const getVersionMainDoc = (version: GlobalVersion) =>
|
|
24
24
|
version.docs.find((doc) => doc.id === version.mainDocId)!;
|
|
@@ -38,13 +38,12 @@ export default function DocsVersionDropdownNavbarItem({
|
|
|
38
38
|
// We try to link to the same doc, in another version
|
|
39
39
|
// When not possible, fallback to the "main doc" of the version
|
|
40
40
|
const versionDoc =
|
|
41
|
-
activeDocContext
|
|
41
|
+
activeDocContext.alternateDocVersions[version.name] ??
|
|
42
42
|
getVersionMainDoc(version);
|
|
43
43
|
return {
|
|
44
|
-
isNavLink: true,
|
|
45
44
|
label: version.label,
|
|
46
45
|
to: versionDoc.path,
|
|
47
|
-
isActive: () => version === activeDocContext
|
|
46
|
+
isActive: () => version === activeDocContext.activeVersion,
|
|
48
47
|
onClick: () => savePreferredVersionName(version.name),
|
|
49
48
|
};
|
|
50
49
|
});
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
|
-
import DefaultNavbarItem from '@theme/NavbarItem/DefaultNavbarItem';
|
|
10
9
|
import {useDocsVersionCandidates} from '@docusaurus/theme-common';
|
|
11
|
-
import
|
|
10
|
+
import DefaultNavbarItem from '@theme/NavbarItem/DefaultNavbarItem';
|
|
12
11
|
import type {Props} from '@theme/NavbarItem/DocsVersionNavbarItem';
|
|
12
|
+
import type {GlobalVersion} from '@docusaurus/plugin-content-docs/client';
|
|
13
13
|
|
|
14
14
|
const getVersionMainDoc = (version: GlobalVersion) =>
|
|
15
15
|
version.docs.find((doc) => doc.id === version.mainDocId)!;
|
|
@@ -14,16 +14,12 @@ import {
|
|
|
14
14
|
isRegexpStringMatch,
|
|
15
15
|
useLocalPathname,
|
|
16
16
|
} from '@docusaurus/theme-common';
|
|
17
|
+
import NavbarNavLink from '@theme/NavbarItem/NavbarNavLink';
|
|
18
|
+
import NavbarItem, {type LinkLikeNavbarItemProps} from '@theme/NavbarItem';
|
|
17
19
|
import type {
|
|
18
20
|
DesktopOrMobileNavBarItemProps,
|
|
19
21
|
Props,
|
|
20
22
|
} from '@theme/NavbarItem/DropdownNavbarItem';
|
|
21
|
-
import type {LinkLikeNavbarItemProps} from '@theme/NavbarItem';
|
|
22
|
-
|
|
23
|
-
import NavbarNavLink from '@theme/NavbarItem/NavbarNavLink';
|
|
24
|
-
import NavbarItem from '@theme/NavbarItem';
|
|
25
|
-
|
|
26
|
-
const dropdownLinkActiveClass = 'dropdown__link--active';
|
|
27
23
|
|
|
28
24
|
function isItemActive(
|
|
29
25
|
item: LinkLikeNavbarItemProps,
|
|
@@ -52,6 +48,7 @@ function DropdownNavbarItemDesktop({
|
|
|
52
48
|
items,
|
|
53
49
|
position,
|
|
54
50
|
className,
|
|
51
|
+
onClick,
|
|
55
52
|
...props
|
|
56
53
|
}: DesktopOrMobileNavBarItemProps) {
|
|
57
54
|
const dropdownRef = useRef<HTMLDivElement>(null);
|
|
@@ -115,12 +112,12 @@ function DropdownNavbarItemDesktop({
|
|
|
115
112
|
? nextNavbarItem
|
|
116
113
|
: // Next item is another dropdown; focus on the inner
|
|
117
114
|
// anchor element instead so there's outline
|
|
118
|
-
nextNavbarItem.querySelector('a')
|
|
119
|
-
|
|
115
|
+
nextNavbarItem.querySelector('a')!;
|
|
116
|
+
targetItem.focus();
|
|
120
117
|
}
|
|
121
118
|
}
|
|
122
119
|
}}
|
|
123
|
-
activeClassName=
|
|
120
|
+
activeClassName="dropdown__link--active"
|
|
124
121
|
{...childItemProps}
|
|
125
122
|
key={i}
|
|
126
123
|
/>
|
|
@@ -134,6 +131,7 @@ function DropdownNavbarItemMobile({
|
|
|
134
131
|
items,
|
|
135
132
|
className,
|
|
136
133
|
position, // Need to destructure position from props so that it doesn't get passed on.
|
|
134
|
+
onClick,
|
|
137
135
|
...props
|
|
138
136
|
}: DesktopOrMobileNavBarItemProps) {
|
|
139
137
|
const localPathname = useLocalPathname();
|
|
@@ -173,7 +171,7 @@ function DropdownNavbarItemMobile({
|
|
|
173
171
|
<NavbarItem
|
|
174
172
|
mobile
|
|
175
173
|
isDropdownItem
|
|
176
|
-
onClick={
|
|
174
|
+
onClick={onClick}
|
|
177
175
|
activeClassName="menu__link--active"
|
|
178
176
|
{...childItemProps}
|
|
179
177
|
key={i}
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
|
-
import DropdownNavbarItem from '@theme/NavbarItem/DropdownNavbarItem';
|
|
10
|
-
import IconLanguage from '@theme/IconLanguage';
|
|
11
|
-
import type {Props} from '@theme/NavbarItem/LocaleDropdownNavbarItem';
|
|
12
9
|
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
|
13
10
|
import {useAlternatePageUtils} from '@docusaurus/theme-common';
|
|
14
11
|
import {translate} from '@docusaurus/Translate';
|
|
12
|
+
import DropdownNavbarItem from '@theme/NavbarItem/DropdownNavbarItem';
|
|
13
|
+
import IconLanguage from '@theme/IconLanguage';
|
|
15
14
|
import type {LinkLikeNavbarItemProps} from '@theme/NavbarItem';
|
|
15
|
+
import type {Props} from '@theme/NavbarItem/LocaleDropdownNavbarItem';
|
|
16
16
|
|
|
17
17
|
import styles from './styles.module.css';
|
|
18
18
|
|
|
@@ -33,12 +33,20 @@ export default function LocaleDropdownNavbarItem({
|
|
|
33
33
|
fullyQualified: false,
|
|
34
34
|
})}`;
|
|
35
35
|
return {
|
|
36
|
-
isNavLink: true,
|
|
37
36
|
label: localeConfigs[locale]!.label,
|
|
38
37
|
to,
|
|
39
38
|
target: '_self',
|
|
40
39
|
autoAddBaseUrl: false,
|
|
41
|
-
className:
|
|
40
|
+
className:
|
|
41
|
+
// eslint-disable-next-line no-nested-ternary
|
|
42
|
+
locale === currentLocale
|
|
43
|
+
? // Similar idea as DefaultNavbarItem: select the right Infima active
|
|
44
|
+
// class name. This cannot be substituted with isActive, because the
|
|
45
|
+
// target URLs contain `pathname://` and therefore are not NavLinks!
|
|
46
|
+
mobile
|
|
47
|
+
? 'menu__link--active'
|
|
48
|
+
: 'dropdown__link--active'
|
|
49
|
+
: '',
|
|
42
50
|
};
|
|
43
51
|
});
|
|
44
52
|
|
|
@@ -8,12 +8,10 @@
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import Link from '@docusaurus/Link';
|
|
10
10
|
import useBaseUrl from '@docusaurus/useBaseUrl';
|
|
11
|
-
import type {Props} from '@theme/NavbarItem/NavbarNavLink';
|
|
12
|
-
import IconExternalLink from '@theme/IconExternalLink';
|
|
13
11
|
import isInternalUrl from '@docusaurus/isInternalUrl';
|
|
14
12
|
import {isRegexpStringMatch} from '@docusaurus/theme-common';
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
import IconExternalLink from '@theme/IconExternalLink';
|
|
14
|
+
import type {Props} from '@theme/NavbarItem/NavbarNavLink';
|
|
17
15
|
|
|
18
16
|
export default function NavbarNavLink({
|
|
19
17
|
activeBasePath,
|
|
@@ -22,7 +20,7 @@ export default function NavbarNavLink({
|
|
|
22
20
|
href,
|
|
23
21
|
label,
|
|
24
22
|
html,
|
|
25
|
-
|
|
23
|
+
isDropdownLink,
|
|
26
24
|
prependBaseUrlToHref,
|
|
27
25
|
...props
|
|
28
26
|
}: Props): JSX.Element {
|
|
@@ -32,7 +30,6 @@ export default function NavbarNavLink({
|
|
|
32
30
|
const activeBaseUrl = useBaseUrl(activeBasePath);
|
|
33
31
|
const normalizedHref = useBaseUrl(href, {forcePrependBaseUrl: true});
|
|
34
32
|
const isExternalLink = label && href && !isInternalUrl(href);
|
|
35
|
-
const isDropdownLink = activeClassName === dropdownLinkActiveClass;
|
|
36
33
|
|
|
37
34
|
// Link content is set through html XOR label
|
|
38
35
|
const linkContentProps = html
|
|
@@ -64,9 +61,6 @@ export default function NavbarNavLink({
|
|
|
64
61
|
<Link
|
|
65
62
|
to={toUrl}
|
|
66
63
|
isNavLink
|
|
67
|
-
activeClassName={
|
|
68
|
-
!props.className?.includes(activeClassName) ? activeClassName : ''
|
|
69
|
-
}
|
|
70
64
|
{...((activeBasePath || activeBaseRegex) && {
|
|
71
65
|
isActive: (_match, location) =>
|
|
72
66
|
activeBaseRegex
|
|
@@ -6,17 +6,20 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
|
-
import type {Props} from '@theme/NavbarItem/SearchNavbarItem';
|
|
10
9
|
import SearchBar from '@theme/SearchBar';
|
|
11
10
|
import NavbarSearch from '@theme/Navbar/Search';
|
|
11
|
+
import type {Props} from '@theme/NavbarItem/SearchNavbarItem';
|
|
12
12
|
|
|
13
|
-
export default function SearchNavbarItem({
|
|
13
|
+
export default function SearchNavbarItem({
|
|
14
|
+
mobile,
|
|
15
|
+
className,
|
|
16
|
+
}: Props): JSX.Element | null {
|
|
14
17
|
if (mobile) {
|
|
15
18
|
return null;
|
|
16
19
|
}
|
|
17
20
|
|
|
18
21
|
return (
|
|
19
|
-
<NavbarSearch>
|
|
22
|
+
<NavbarSearch className={className}>
|
|
20
23
|
<SearchBar />
|
|
21
24
|
</NavbarSearch>
|
|
22
25
|
);
|
|
@@ -6,33 +6,23 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
|
-
import {type Props as DropdownNavbarItemProps} from '@theme/NavbarItem/DropdownNavbarItem';
|
|
10
|
-
import type {Types, Props} from '@theme/NavbarItem';
|
|
11
|
-
|
|
12
9
|
import ComponentTypes from '@theme/NavbarItem/ComponentTypes';
|
|
10
|
+
import type {NavbarItemType, Props} from '@theme/NavbarItem';
|
|
13
11
|
|
|
14
|
-
|
|
15
|
-
const component = ComponentTypes[type];
|
|
16
|
-
if (!component) {
|
|
17
|
-
throw new Error(`No NavbarItem component found for type "${type}".`);
|
|
18
|
-
}
|
|
19
|
-
return component;
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
function getComponentType(type: Types, isDropdown: boolean) {
|
|
12
|
+
function normalizeComponentType(type: NavbarItemType, props: object) {
|
|
23
13
|
// Backward compatibility: navbar item with no type set
|
|
24
14
|
// but containing dropdown items should use the type "dropdown"
|
|
25
15
|
if (!type || type === 'default') {
|
|
26
|
-
return
|
|
16
|
+
return 'items' in props ? 'dropdown' : 'default';
|
|
27
17
|
}
|
|
28
|
-
return type
|
|
18
|
+
return type;
|
|
29
19
|
}
|
|
30
20
|
|
|
31
21
|
export default function NavbarItem({type, ...props}: Props): JSX.Element {
|
|
32
|
-
const componentType =
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
22
|
+
const componentType = normalizeComponentType(type, props);
|
|
23
|
+
const NavbarItemComponent = ComponentTypes[componentType];
|
|
24
|
+
if (!NavbarItemComponent) {
|
|
25
|
+
throw new Error(`No NavbarItem component found for type "${type}".`);
|
|
26
|
+
}
|
|
37
27
|
return <NavbarItemComponent {...(props as never)} />;
|
|
38
28
|
}
|
package/src/theme/NotFound.tsx
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
|
-
import Layout from '@theme/Layout';
|
|
10
9
|
import Translate, {translate} from '@docusaurus/Translate';
|
|
11
10
|
import {PageMetadata} from '@docusaurus/theme-common';
|
|
11
|
+
import Layout from '@theme/Layout';
|
|
12
12
|
|
|
13
13
|
export default function NotFound(): JSX.Element {
|
|
14
14
|
return (
|
|
@@ -9,7 +9,6 @@ import React from 'react';
|
|
|
9
9
|
import Head from '@docusaurus/Head';
|
|
10
10
|
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
|
11
11
|
import useBaseUrl from '@docusaurus/useBaseUrl';
|
|
12
|
-
import SearchMetadata from '@theme/SearchMetadata';
|
|
13
12
|
import {
|
|
14
13
|
PageMetadata,
|
|
15
14
|
DEFAULT_SEARCH_TAG,
|
|
@@ -18,6 +17,7 @@ import {
|
|
|
18
17
|
keyboardFocusedClassName,
|
|
19
18
|
} from '@docusaurus/theme-common';
|
|
20
19
|
import {useLocation} from '@docusaurus/router';
|
|
20
|
+
import SearchMetadata from '@theme/SearchMetadata';
|
|
21
21
|
|
|
22
22
|
// TODO move to SiteMetadataDefaults or theme-common ?
|
|
23
23
|
// Useful for i18n/SEO
|
package/src/theme/TOC/index.tsx
CHANGED
|
@@ -7,8 +7,9 @@
|
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import clsx from 'clsx';
|
|
10
|
-
import type {Props} from '@theme/TOC';
|
|
11
10
|
import TOCItems from '@theme/TOCItems';
|
|
11
|
+
import type {Props} from '@theme/TOC';
|
|
12
|
+
|
|
12
13
|
import styles from './styles.module.css';
|
|
13
14
|
|
|
14
15
|
// Using a custom className
|
|
@@ -8,9 +8,10 @@
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import clsx from 'clsx';
|
|
10
10
|
import Translate from '@docusaurus/Translate';
|
|
11
|
-
import styles from './CollapseButton.module.css';
|
|
12
11
|
import type {Props} from '@theme/TOCCollapsible/CollapseButton';
|
|
13
12
|
|
|
13
|
+
import styles from './styles.module.css';
|
|
14
|
+
|
|
14
15
|
export default function TOCCollapsibleCollapseButton({
|
|
15
16
|
collapsed,
|
|
16
17
|
...props
|
package/src/theme/TOCCollapsible/{CollapseButton.module.css → CollapseButton/styles.module.css}
RENAMED
|
File without changes
|
|
@@ -8,10 +8,11 @@
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import clsx from 'clsx';
|
|
10
10
|
import {useCollapsible, Collapsible} from '@docusaurus/theme-common';
|
|
11
|
-
import styles from './index.module.css';
|
|
12
11
|
import TOCItems from '@theme/TOCItems';
|
|
13
|
-
import type {Props} from '@theme/TOCCollapsible';
|
|
14
12
|
import CollapseButton from '@theme/TOCCollapsible/CollapseButton';
|
|
13
|
+
import type {Props} from '@theme/TOCCollapsible';
|
|
14
|
+
|
|
15
|
+
import styles from './styles.module.css';
|
|
15
16
|
|
|
16
17
|
export default function TOCCollapsible({
|
|
17
18
|
toc,
|
|
File without changes
|
|
@@ -6,9 +6,10 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
|
+
import TOCItems from '@theme/TOCItems';
|
|
9
10
|
import type {Props} from '@theme/TOCInline';
|
|
11
|
+
|
|
10
12
|
import styles from './styles.module.css';
|
|
11
|
-
import TOCItems from '@theme/TOCItems';
|
|
12
13
|
|
|
13
14
|
export default function TOCInline({
|
|
14
15
|
toc,
|
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React, {useMemo} from 'react';
|
|
9
|
-
import type {Props} from '@theme/TOCItems';
|
|
10
|
-
import TOCItemTree from '@theme/TOCItems/Tree';
|
|
11
9
|
import {
|
|
12
10
|
type TOCHighlightConfig,
|
|
13
11
|
useThemeConfig,
|
|
14
12
|
useTOCHighlight,
|
|
15
13
|
useFilteredAndTreeifiedTOC,
|
|
16
14
|
} from '@docusaurus/theme-common';
|
|
15
|
+
import TOCItemTree from '@theme/TOCItems/Tree';
|
|
16
|
+
import type {Props} from '@theme/TOCItems';
|
|
17
17
|
|
|
18
18
|
export default function TOCItems({
|
|
19
19
|
toc,
|
package/src/theme/Tabs/index.tsx
CHANGED
|
@@ -11,6 +11,7 @@ import React, {
|
|
|
11
11
|
isValidElement,
|
|
12
12
|
type ReactElement,
|
|
13
13
|
} from 'react';
|
|
14
|
+
import clsx from 'clsx';
|
|
14
15
|
import useIsBrowser from '@docusaurus/useIsBrowser';
|
|
15
16
|
import {
|
|
16
17
|
useScrollPositionBlocker,
|
|
@@ -20,14 +21,14 @@ import {
|
|
|
20
21
|
import type {Props} from '@theme/Tabs';
|
|
21
22
|
import type {Props as TabItemProps} from '@theme/TabItem';
|
|
22
23
|
|
|
23
|
-
import clsx from 'clsx';
|
|
24
|
-
|
|
25
24
|
import styles from './styles.module.css';
|
|
26
25
|
|
|
27
26
|
// A very rough duck type, but good enough to guard against mistakes while
|
|
28
27
|
// allowing customization
|
|
29
|
-
function isTabItem(
|
|
30
|
-
|
|
28
|
+
function isTabItem(
|
|
29
|
+
comp: ReactElement<object>,
|
|
30
|
+
): comp is ReactElement<TabItemProps> {
|
|
31
|
+
return 'value' in comp.props;
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
function TabsComponent(props: Props): JSX.Element {
|
|
@@ -74,7 +75,7 @@ function TabsComponent(props: Props): JSX.Element {
|
|
|
74
75
|
? defaultValueProp
|
|
75
76
|
: defaultValueProp ??
|
|
76
77
|
children.find((child) => child.props.default)?.props.value ??
|
|
77
|
-
children[0]
|
|
78
|
+
children[0]!.props.value;
|
|
78
79
|
if (defaultValue !== null && !values.some((a) => a.value === defaultValue)) {
|
|
79
80
|
throw new Error(
|
|
80
81
|
`Docusaurus error: The <Tabs> has a defaultValue "${defaultValue}" but none of its children has the corresponding value. Available values are: ${values
|
|
@@ -114,7 +115,7 @@ function TabsComponent(props: Props): JSX.Element {
|
|
|
114
115
|
setSelectedValue(newTabValue);
|
|
115
116
|
|
|
116
117
|
if (groupId != null) {
|
|
117
|
-
setTabGroupChoices(groupId, newTabValue);
|
|
118
|
+
setTabGroupChoices(groupId, String(newTabValue));
|
|
118
119
|
}
|
|
119
120
|
}
|
|
120
121
|
};
|
|
@@ -125,12 +126,12 @@ function TabsComponent(props: Props): JSX.Element {
|
|
|
125
126
|
switch (event.key) {
|
|
126
127
|
case 'ArrowRight': {
|
|
127
128
|
const nextTab = tabRefs.indexOf(event.currentTarget) + 1;
|
|
128
|
-
focusElement = tabRefs[nextTab]
|
|
129
|
+
focusElement = tabRefs[nextTab] ?? tabRefs[0]!;
|
|
129
130
|
break;
|
|
130
131
|
}
|
|
131
132
|
case 'ArrowLeft': {
|
|
132
133
|
const prevTab = tabRefs.indexOf(event.currentTarget) - 1;
|
|
133
|
-
focusElement = tabRefs[prevTab]
|
|
134
|
+
focusElement = tabRefs[prevTab] ?? tabRefs[tabRefs.length - 1]!;
|
|
134
135
|
break;
|
|
135
136
|
}
|
|
136
137
|
default:
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
|
+
import {listTagsByLetters, type TagLetterEntry} from '@docusaurus/theme-common';
|
|
9
10
|
import Tag from '@theme/Tag';
|
|
10
11
|
import type {Props} from '@theme/TagsListByLetter';
|
|
11
|
-
import {listTagsByLetters, type TagLetterEntry} from '@docusaurus/theme-common';
|
|
12
12
|
|
|
13
13
|
import styles from './styles.module.css';
|
|
14
14
|
|
package/src/theme-classic.d.ts
CHANGED
|
@@ -21,12 +21,14 @@
|
|
|
21
21
|
// in their tsconfig.
|
|
22
22
|
|
|
23
23
|
declare module '@docusaurus/theme-classic' {
|
|
24
|
-
import type {LoadContext, Plugin} from '@docusaurus/types';
|
|
24
|
+
import type {LoadContext, Plugin, PluginModule} from '@docusaurus/types';
|
|
25
25
|
|
|
26
26
|
export type Options = {
|
|
27
27
|
customCss?: string | string[];
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
+
export const getSwizzleConfig: PluginModule['getSwizzleConfig'];
|
|
31
|
+
|
|
30
32
|
export default function themeClassic(
|
|
31
33
|
context: LoadContext,
|
|
32
34
|
options: Options,
|
|
@@ -775,6 +777,7 @@ declare module '@theme/Navbar/Search' {
|
|
|
775
777
|
|
|
776
778
|
export interface Props {
|
|
777
779
|
readonly children: ReactNode;
|
|
780
|
+
readonly className?: string;
|
|
778
781
|
}
|
|
779
782
|
|
|
780
783
|
export default function NavbarSearch(props: Props): JSX.Element;
|
|
@@ -806,7 +809,8 @@ declare module '@theme/NavbarItem/NavbarNavLink' {
|
|
|
806
809
|
readonly exact?: boolean;
|
|
807
810
|
readonly label?: ReactNode;
|
|
808
811
|
readonly html?: string;
|
|
809
|
-
readonly prependBaseUrlToHref?:
|
|
812
|
+
readonly prependBaseUrlToHref?: boolean;
|
|
813
|
+
readonly isDropdownLink?: boolean;
|
|
810
814
|
}
|
|
811
815
|
|
|
812
816
|
export default function NavbarNavLink(props: Props): JSX.Element;
|
|
@@ -814,7 +818,6 @@ declare module '@theme/NavbarItem/NavbarNavLink' {
|
|
|
814
818
|
|
|
815
819
|
declare module '@theme/NavbarItem/DropdownNavbarItem' {
|
|
816
820
|
import type {Props as NavbarNavLinkProps} from '@theme/NavbarItem/NavbarNavLink';
|
|
817
|
-
|
|
818
821
|
import type {LinkLikeNavbarItemProps} from '@theme/NavbarItem';
|
|
819
822
|
|
|
820
823
|
export type DesktopOrMobileNavBarItemProps = NavbarNavLinkProps & {
|
|
@@ -833,6 +836,7 @@ declare module '@theme/NavbarItem/DropdownNavbarItem' {
|
|
|
833
836
|
declare module '@theme/NavbarItem/SearchNavbarItem' {
|
|
834
837
|
export interface Props {
|
|
835
838
|
readonly mobile?: boolean;
|
|
839
|
+
readonly className?: string;
|
|
836
840
|
}
|
|
837
841
|
|
|
838
842
|
export default function SearchNavbarItem(props: Props): JSX.Element;
|
|
@@ -974,22 +978,11 @@ declare module '@theme/NavbarItem' {
|
|
|
974
978
|
} & SearchNavbarItemProps)
|
|
975
979
|
);
|
|
976
980
|
|
|
977
|
-
export type
|
|
981
|
+
export type NavbarItemType = Props['type'];
|
|
978
982
|
|
|
979
983
|
export default function NavbarItem(props: Props): JSX.Element;
|
|
980
984
|
}
|
|
981
985
|
|
|
982
|
-
declare module '@theme/NavbarItem/utils' {
|
|
983
|
-
/**
|
|
984
|
-
* On desktop and mobile, we would apply different class names for dropdown
|
|
985
|
-
* items.
|
|
986
|
-
* @see https://github.com/facebook/docusaurus/pull/5431
|
|
987
|
-
*/
|
|
988
|
-
export function getInfimaActiveClassName(
|
|
989
|
-
mobile?: boolean,
|
|
990
|
-
): `${'menu' | 'navbar'}__link--active`;
|
|
991
|
-
}
|
|
992
|
-
|
|
993
986
|
declare module '@theme/PaginatorNavLink' {
|
|
994
987
|
import type {ReactNode} from 'react';
|
|
995
988
|
import type {PropNavigationLink} from '@docusaurus/plugin-content-docs';
|