@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
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import clsx from 'clsx';
|
|
10
|
-
import IconArrow from '@theme/IconArrow';
|
|
11
10
|
import {translate} from '@docusaurus/Translate';
|
|
11
|
+
import IconArrow from '@theme/IconArrow';
|
|
12
12
|
import type {Props} from '@theme/DocSidebar/Desktop/CollapseButton';
|
|
13
13
|
|
|
14
14
|
import styles from './styles.module.css';
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import {useWindowSize} from '@docusaurus/theme-common';
|
|
10
|
-
import type {Props} from '@theme/DocSidebar';
|
|
11
10
|
import DocSidebarDesktop from '@theme/DocSidebar/Desktop';
|
|
12
11
|
import DocSidebarMobile from '@theme/DocSidebar/Mobile';
|
|
12
|
+
import type {Props} from '@theme/DocSidebar';
|
|
13
13
|
|
|
14
14
|
export default function DocSidebar(props: Props): JSX.Element {
|
|
15
15
|
const windowSize = useWindowSize();
|
|
@@ -20,30 +20,28 @@ import {
|
|
|
20
20
|
} from '@docusaurus/theme-common';
|
|
21
21
|
import Link from '@docusaurus/Link';
|
|
22
22
|
import {translate} from '@docusaurus/Translate';
|
|
23
|
-
|
|
23
|
+
import useIsBrowser from '@docusaurus/useIsBrowser';
|
|
24
24
|
import DocSidebarItems from '@theme/DocSidebarItems';
|
|
25
25
|
import type {Props} from '@theme/DocSidebarItem/Category';
|
|
26
26
|
|
|
27
|
-
import useIsBrowser from '@docusaurus/useIsBrowser';
|
|
28
|
-
|
|
29
27
|
// If we navigate to a category and it becomes active, it should automatically
|
|
30
28
|
// expand itself
|
|
31
29
|
function useAutoExpandActiveCategory({
|
|
32
30
|
isActive,
|
|
33
31
|
collapsed,
|
|
34
|
-
|
|
32
|
+
updateCollapsed,
|
|
35
33
|
}: {
|
|
36
34
|
isActive: boolean;
|
|
37
35
|
collapsed: boolean;
|
|
38
|
-
|
|
36
|
+
updateCollapsed: (b: boolean) => void;
|
|
39
37
|
}) {
|
|
40
38
|
const wasActive = usePrevious(isActive);
|
|
41
39
|
useEffect(() => {
|
|
42
40
|
const justBecameActive = isActive && !wasActive;
|
|
43
41
|
if (justBecameActive && collapsed) {
|
|
44
|
-
|
|
42
|
+
updateCollapsed(false);
|
|
45
43
|
}
|
|
46
|
-
}, [isActive, wasActive, collapsed,
|
|
44
|
+
}, [isActive, wasActive, collapsed, updateCollapsed]);
|
|
47
45
|
}
|
|
48
46
|
|
|
49
47
|
/**
|
|
@@ -105,6 +103,11 @@ export default function DocSidebarItemCategory({
|
|
|
105
103
|
...props
|
|
106
104
|
}: Props): JSX.Element {
|
|
107
105
|
const {items, label, collapsible, className, href} = item;
|
|
106
|
+
const {
|
|
107
|
+
docs: {
|
|
108
|
+
sidebar: {autoCollapseCategories},
|
|
109
|
+
},
|
|
110
|
+
} = useThemeConfig();
|
|
108
111
|
const hrefWithSSRFallback = useCategoryHrefWithSSRFallback(item);
|
|
109
112
|
|
|
110
113
|
const isActive = isActiveSidebarItem(item, activePath);
|
|
@@ -121,17 +124,13 @@ export default function DocSidebarItemCategory({
|
|
|
121
124
|
},
|
|
122
125
|
});
|
|
123
126
|
|
|
124
|
-
useAutoExpandActiveCategory({isActive, collapsed, setCollapsed});
|
|
125
127
|
const {expandedItem, setExpandedItem} = useDocSidebarItemsExpandedState();
|
|
126
|
-
|
|
128
|
+
// Use this instead of `setCollapsed`, because it is also reactive
|
|
129
|
+
const updateCollapsed = (toCollapsed: boolean = !collapsed) => {
|
|
127
130
|
setExpandedItem(toCollapsed ? null : index);
|
|
128
131
|
setCollapsed(toCollapsed);
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
docs: {
|
|
132
|
-
sidebar: {autoCollapseCategories},
|
|
133
|
-
},
|
|
134
|
-
} = useThemeConfig();
|
|
132
|
+
};
|
|
133
|
+
useAutoExpandActiveCategory({isActive, collapsed, updateCollapsed});
|
|
135
134
|
useEffect(() => {
|
|
136
135
|
if (
|
|
137
136
|
collapsible &&
|
|
@@ -10,7 +10,7 @@ import clsx from 'clsx';
|
|
|
10
10
|
import {ThemeClassNames} from '@docusaurus/theme-common';
|
|
11
11
|
import type {Props} from '@theme/DocSidebarItem/Html';
|
|
12
12
|
|
|
13
|
-
import styles from './
|
|
13
|
+
import styles from './styles.module.css';
|
|
14
14
|
|
|
15
15
|
export default function DocSidebarItemHtml({
|
|
16
16
|
item,
|
|
@@ -23,7 +23,7 @@ export default function DocSidebarItemHtml({
|
|
|
23
23
|
className={clsx(
|
|
24
24
|
ThemeClassNames.docs.docSidebarItemLink,
|
|
25
25
|
ThemeClassNames.docs.docSidebarItemLinkLevel(level),
|
|
26
|
-
defaultStyle &&
|
|
26
|
+
defaultStyle && [styles.menuHtmlItem, 'menu__list-item'],
|
|
27
27
|
className,
|
|
28
28
|
)}
|
|
29
29
|
key={index}
|
|
File without changes
|
|
@@ -11,10 +11,9 @@ import {isActiveSidebarItem, ThemeClassNames} from '@docusaurus/theme-common';
|
|
|
11
11
|
import Link from '@docusaurus/Link';
|
|
12
12
|
import isInternalUrl from '@docusaurus/isInternalUrl';
|
|
13
13
|
import IconExternalLink from '@theme/IconExternalLink';
|
|
14
|
-
|
|
15
14
|
import type {Props} from '@theme/DocSidebarItem/Link';
|
|
16
15
|
|
|
17
|
-
import styles from './
|
|
16
|
+
import styles from './styles.module.css';
|
|
18
17
|
|
|
19
18
|
export default function DocSidebarItemLink({
|
|
20
19
|
item,
|
|
File without changes
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React, {memo} from 'react';
|
|
9
|
-
import DocSidebarItem from '@theme/DocSidebarItem';
|
|
10
9
|
import {DocSidebarItemsExpandedStateProvider} from '@docusaurus/theme-common';
|
|
10
|
+
import DocSidebarItem from '@theme/DocSidebarItem';
|
|
11
11
|
|
|
12
12
|
import type {Props} from '@theme/DocSidebarItems';
|
|
13
13
|
|
|
@@ -6,8 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
|
-
|
|
10
|
-
import Layout from '@theme/Layout';
|
|
9
|
+
import clsx from 'clsx';
|
|
11
10
|
import Link from '@docusaurus/Link';
|
|
12
11
|
import {
|
|
13
12
|
PageMetadata,
|
|
@@ -16,9 +15,9 @@ import {
|
|
|
16
15
|
usePluralForm,
|
|
17
16
|
} from '@docusaurus/theme-common';
|
|
18
17
|
import Translate, {translate} from '@docusaurus/Translate';
|
|
19
|
-
import
|
|
18
|
+
import Layout from '@theme/Layout';
|
|
20
19
|
import SearchMetadata from '@theme/SearchMetadata';
|
|
21
|
-
import
|
|
20
|
+
import type {Props} from '@theme/DocTagDocListPage';
|
|
22
21
|
|
|
23
22
|
// Very simple pluralization: probably good enough for now
|
|
24
23
|
function useNDocsTaggedPlural() {
|
|
@@ -6,18 +6,17 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
|
-
|
|
10
|
-
import Layout from '@theme/Layout';
|
|
9
|
+
import clsx from 'clsx';
|
|
11
10
|
import {
|
|
12
11
|
PageMetadata,
|
|
13
12
|
HtmlClassNameProvider,
|
|
14
13
|
ThemeClassNames,
|
|
15
14
|
translateTagsPageTitle,
|
|
16
15
|
} from '@docusaurus/theme-common';
|
|
16
|
+
import Layout from '@theme/Layout';
|
|
17
17
|
import TagsListByLetter from '@theme/TagsListByLetter';
|
|
18
|
-
import type {Props} from '@theme/DocTagsListPage';
|
|
19
18
|
import SearchMetadata from '@theme/SearchMetadata';
|
|
20
|
-
import
|
|
19
|
+
import type {Props} from '@theme/DocTagsListPage';
|
|
21
20
|
|
|
22
21
|
export default function DocTagsListPage({tags}: Props): JSX.Element {
|
|
23
22
|
const title = translateTagsPageTitle();
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
|
+
import clsx from 'clsx';
|
|
9
10
|
import Translate from '@docusaurus/Translate';
|
|
10
11
|
import {ThemeClassNames, useDocsVersion} from '@docusaurus/theme-common';
|
|
11
|
-
import clsx from 'clsx';
|
|
12
12
|
import type {Props} from '@theme/DocVersionBadge';
|
|
13
13
|
|
|
14
14
|
export default function DocVersionBadge({
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React, {type ComponentType} from 'react';
|
|
9
|
+
import clsx from 'clsx';
|
|
9
10
|
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
|
10
11
|
import Link from '@docusaurus/Link';
|
|
11
12
|
import Translate from '@docusaurus/Translate';
|
|
@@ -21,7 +22,6 @@ import {
|
|
|
21
22
|
} from '@docusaurus/theme-common';
|
|
22
23
|
|
|
23
24
|
import type {Props} from '@theme/DocVersionBanner';
|
|
24
|
-
import clsx from 'clsx';
|
|
25
25
|
import type {
|
|
26
26
|
VersionBanner,
|
|
27
27
|
PropVersionMetadata,
|
|
@@ -7,10 +7,9 @@
|
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import Translate from '@docusaurus/Translate';
|
|
10
|
-
|
|
11
|
-
import type {Props} from '@theme/EditThisPage';
|
|
12
|
-
import IconEdit from '@theme/IconEdit';
|
|
13
10
|
import {ThemeClassNames} from '@docusaurus/theme-common';
|
|
11
|
+
import IconEdit from '@theme/IconEdit';
|
|
12
|
+
import type {Props} from '@theme/EditThisPage';
|
|
14
13
|
|
|
15
14
|
export default function EditThisPage({editUrl}: Props): JSX.Element {
|
|
16
15
|
return (
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
|
-
import type {Props} from '@theme/Footer/Links/MultiColumn';
|
|
10
9
|
import LinkItem from '@theme/Footer/LinkItem';
|
|
10
|
+
import type {Props} from '@theme/Footer/Links/MultiColumn';
|
|
11
11
|
|
|
12
12
|
type ColumnType = Props['columns'][number];
|
|
13
13
|
type ColumnItemType = ColumnType['items'][number];
|
|
@@ -21,7 +21,7 @@ function ColumnLinkItem({item}: {item: ColumnItemType}) {
|
|
|
21
21
|
dangerouslySetInnerHTML={{__html: item.html}}
|
|
22
22
|
/>
|
|
23
23
|
) : (
|
|
24
|
-
<li key={item.href
|
|
24
|
+
<li key={item.href ?? item.to} className="footer__item">
|
|
25
25
|
<LinkItem item={item} />
|
|
26
26
|
</li>
|
|
27
27
|
);
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
|
-
import type {Props} from '@theme/Footer/Links/Simple';
|
|
10
9
|
import LinkItem from '@theme/Footer/LinkItem';
|
|
10
|
+
import type {Props} from '@theme/Footer/Links/Simple';
|
|
11
11
|
|
|
12
12
|
function Separator() {
|
|
13
13
|
return <span className="footer__link-separator">·</span>;
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
|
|
10
10
|
import {isMultiColumnFooterLinks} from '@docusaurus/theme-common';
|
|
11
|
-
import type {Props} from '@theme/Footer/Links';
|
|
12
11
|
import FooterLinksMultiColumn from '@theme/Footer/Links/MultiColumn';
|
|
13
12
|
import FooterLinksSimple from '@theme/Footer/Links/Simple';
|
|
13
|
+
import type {Props} from '@theme/Footer/Links';
|
|
14
14
|
|
|
15
15
|
export default function FooterLinks({links}: Props): JSX.Element {
|
|
16
16
|
return isMultiColumnFooterLinks(links) ? (
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
|
-
|
|
10
9
|
import Link from '@docusaurus/Link';
|
|
11
10
|
import {useBaseUrlUtils} from '@docusaurus/useBaseUrl';
|
|
12
|
-
import styles from './styles.module.css';
|
|
13
11
|
import ThemedImage from '@theme/ThemedImage';
|
|
14
12
|
import type {Props} from '@theme/Footer/Logo';
|
|
15
13
|
|
|
14
|
+
import styles from './styles.module.css';
|
|
15
|
+
|
|
16
16
|
function LogoImage({logo}: Props) {
|
|
17
17
|
const {withBaseUrl} = useBaseUrlUtils();
|
|
18
18
|
const sources = {
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import clsx from 'clsx';
|
|
10
|
-
import type {Props} from '@theme/Heading';
|
|
11
10
|
import {translate} from '@docusaurus/Translate';
|
|
12
11
|
import {useThemeConfig} from '@docusaurus/theme-common';
|
|
12
|
+
import type {Props} from '@theme/Heading';
|
|
13
13
|
|
|
14
14
|
import styles from './styles.module.css';
|
|
15
15
|
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import Translate from '@docusaurus/Translate';
|
|
10
|
-
import type {Props} from '@theme/LastUpdated';
|
|
11
10
|
import {ThemeClassNames} from '@docusaurus/theme-common';
|
|
11
|
+
import type {Props} from '@theme/LastUpdated';
|
|
12
12
|
|
|
13
13
|
function LastUpdatedAtDate({
|
|
14
14
|
lastUpdatedAt,
|
|
@@ -8,19 +8,19 @@
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import clsx from 'clsx';
|
|
10
10
|
import ErrorBoundary from '@docusaurus/ErrorBoundary';
|
|
11
|
-
import SkipToContent from '@theme/SkipToContent';
|
|
12
|
-
import AnnouncementBar from '@theme/AnnouncementBar';
|
|
13
|
-
import Navbar from '@theme/Navbar';
|
|
14
|
-
import Footer from '@theme/Footer';
|
|
15
|
-
import LayoutProviders from '@theme/LayoutProviders';
|
|
16
|
-
import type {Props} from '@theme/Layout';
|
|
17
11
|
import {
|
|
18
12
|
PageMetadata,
|
|
19
13
|
ThemeClassNames,
|
|
20
14
|
useKeyboardNavigation,
|
|
21
15
|
} from '@docusaurus/theme-common';
|
|
16
|
+
import SkipToContent from '@theme/SkipToContent';
|
|
17
|
+
import AnnouncementBar from '@theme/AnnouncementBar';
|
|
18
|
+
import Navbar from '@theme/Navbar';
|
|
19
|
+
import Footer from '@theme/Footer';
|
|
20
|
+
import LayoutProviders from '@theme/LayoutProviders';
|
|
22
21
|
import ErrorPageContent from '@theme/ErrorPageContent';
|
|
23
22
|
import './styles.css';
|
|
23
|
+
import type {Props} from '@theme/Layout';
|
|
24
24
|
|
|
25
25
|
export default function Layout(props: Props): JSX.Element {
|
|
26
26
|
const {
|
|
@@ -45,7 +45,9 @@ export default function Layout(props: Props): JSX.Element {
|
|
|
45
45
|
<Navbar />
|
|
46
46
|
|
|
47
47
|
<div className={clsx(ThemeClassNames.wrapper.main, wrapperClassName)}>
|
|
48
|
-
<ErrorBoundary fallback={ErrorPageContent
|
|
48
|
+
<ErrorBoundary fallback={(params) => <ErrorPageContent {...params} />}>
|
|
49
|
+
{children}
|
|
50
|
+
</ErrorBoundary>
|
|
49
51
|
</div>
|
|
50
52
|
|
|
51
53
|
{!noFooter && <Footer />}
|
package/src/theme/Logo/index.tsx
CHANGED
|
@@ -6,13 +6,12 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
|
-
import type {Props} from '@theme/Logo';
|
|
10
|
-
|
|
11
9
|
import Link from '@docusaurus/Link';
|
|
12
|
-
import ThemedImage from '@theme/ThemedImage';
|
|
13
10
|
import useBaseUrl from '@docusaurus/useBaseUrl';
|
|
14
11
|
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
|
15
12
|
import {useThemeConfig} from '@docusaurus/theme-common';
|
|
13
|
+
import ThemedImage from '@theme/ThemedImage';
|
|
14
|
+
import type {Props} from '@theme/Logo';
|
|
16
15
|
|
|
17
16
|
export default function Logo(props: Props): JSX.Element {
|
|
18
17
|
const {
|
|
@@ -10,11 +10,13 @@ import Details from '@theme/Details';
|
|
|
10
10
|
import type {Props} from '@theme/MDXComponents/Details';
|
|
11
11
|
|
|
12
12
|
export default function MDXDetails(props: Props): JSX.Element {
|
|
13
|
-
const items = React.Children.toArray(props.children)
|
|
13
|
+
const items = React.Children.toArray(props.children);
|
|
14
14
|
// Split summary item from the rest to pass it as a separate prop to the
|
|
15
15
|
// Details theme component
|
|
16
|
-
const summary
|
|
17
|
-
|
|
16
|
+
const summary = items.find(
|
|
17
|
+
(item): item is ReactElement<ComponentProps<'summary'>> =>
|
|
18
|
+
React.isValidElement(item) && item.props?.mdxType === 'summary',
|
|
19
|
+
);
|
|
18
20
|
const children = <>{items.filter((item) => item !== summary)}</>;
|
|
19
21
|
|
|
20
22
|
return (
|
|
@@ -11,8 +11,10 @@ import type {Props} from '@theme/MDXComponents/Head';
|
|
|
11
11
|
|
|
12
12
|
// MDX elements are wrapped through the MDX pragma. In some cases (notably usage
|
|
13
13
|
// with Head/Helmet) we need to unwrap those elements.
|
|
14
|
-
function unwrapMDXElement(
|
|
15
|
-
|
|
14
|
+
function unwrapMDXElement(
|
|
15
|
+
element: ReactElement<{mdxType?: string; originalType?: string} | undefined>,
|
|
16
|
+
) {
|
|
17
|
+
if (element.props?.mdxType && element.props.originalType) {
|
|
16
18
|
const {mdxType, originalType, ...newProps} = element.props;
|
|
17
19
|
return React.createElement(element.props.originalType, newProps);
|
|
18
20
|
}
|
|
@@ -21,7 +23,7 @@ function unwrapMDXElement(element: ReactElement) {
|
|
|
21
23
|
|
|
22
24
|
export default function MDXHead(props: Props): JSX.Element {
|
|
23
25
|
const unwrappedChildren = React.Children.map(props.children, (child) =>
|
|
24
|
-
unwrapMDXElement(child
|
|
26
|
+
React.isValidElement(child) ? unwrapMDXElement(child) : child,
|
|
25
27
|
);
|
|
26
28
|
return (
|
|
27
29
|
<Head {...(props as ComponentProps<typeof Head>)}>{unwrappedChildren}</Head>
|
|
@@ -6,9 +6,10 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
|
-
import type {Props} from '@theme/MDXComponents/Img';
|
|
10
|
-
import styles from './Img.module.css';
|
|
11
9
|
import clsx from 'clsx';
|
|
10
|
+
import type {Props} from '@theme/MDXComponents/Img';
|
|
11
|
+
|
|
12
|
+
import styles from './styles.module.css';
|
|
12
13
|
|
|
13
14
|
function transformImgClassName(className?: string): string {
|
|
14
15
|
return clsx(className, styles.img);
|
|
File without changes
|
|
@@ -14,8 +14,8 @@ export default function MDXPre(props: Props): JSX.Element {
|
|
|
14
14
|
<CodeBlock
|
|
15
15
|
// If this pre is created by a ``` fenced codeblock, unwrap the children
|
|
16
16
|
{...(isValidElement(props.children) &&
|
|
17
|
-
props.children.props
|
|
18
|
-
? props.children
|
|
17
|
+
props.children.props?.originalType === 'code'
|
|
18
|
+
? props.children.props
|
|
19
19
|
: {...props})}
|
|
20
20
|
/>
|
|
21
21
|
);
|
|
@@ -9,13 +9,15 @@ import React from 'react';
|
|
|
9
9
|
import clsx from 'clsx';
|
|
10
10
|
import type {Props} from '@theme/MDXComponents/Ul';
|
|
11
11
|
|
|
12
|
+
import styles from './styles.module.css';
|
|
13
|
+
|
|
12
14
|
function transformUlClassName(className?: string): string {
|
|
13
15
|
return clsx(
|
|
14
16
|
className,
|
|
15
|
-
// This class is set globally by GitHub/MDX
|
|
16
|
-
//
|
|
17
|
+
// This class is set globally by GitHub/MDX. We keep the global class, and
|
|
18
|
+
// add another class to get a task list without the default ul styling
|
|
17
19
|
// See https://github.com/syntax-tree/mdast-util-to-hast/issues/28
|
|
18
|
-
className?.includes('contains-task-list') &&
|
|
20
|
+
className?.includes('contains-task-list') && styles.containsTaskList,
|
|
19
21
|
);
|
|
20
22
|
}
|
|
21
23
|
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
.containsTaskList {
|
|
9
|
+
list-style: none;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
:not(.containsTaskList > li) > .containsTaskList {
|
|
13
|
+
padding-left: 0;
|
|
14
|
+
}
|
|
@@ -7,15 +7,15 @@
|
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import clsx from 'clsx';
|
|
10
|
-
import Layout from '@theme/Layout';
|
|
11
|
-
import MDXContent from '@theme/MDXContent';
|
|
12
|
-
import type {Props} from '@theme/MDXPage';
|
|
13
|
-
import TOC from '@theme/TOC';
|
|
14
10
|
import {
|
|
15
11
|
PageMetadata,
|
|
16
12
|
HtmlClassNameProvider,
|
|
17
13
|
ThemeClassNames,
|
|
18
14
|
} from '@docusaurus/theme-common';
|
|
15
|
+
import Layout from '@theme/Layout';
|
|
16
|
+
import MDXContent from '@theme/MDXContent';
|
|
17
|
+
import TOC from '@theme/TOC';
|
|
18
|
+
import type {Props} from '@theme/MDXPage';
|
|
19
19
|
|
|
20
20
|
import styles from './styles.module.css';
|
|
21
21
|
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
import React from 'react';
|
|
8
9
|
import {useColorMode, useThemeConfig} from '@docusaurus/theme-common';
|
|
9
10
|
import ColorModeToggle from '@theme/ColorModeToggle';
|
|
10
11
|
import type {Props} from '@theme/Navbar/ColorModeToggle';
|
|
11
|
-
import React from 'react';
|
|
12
12
|
|
|
13
13
|
export default function NavbarColorModeToggle({
|
|
14
14
|
className,
|
|
@@ -6,18 +6,18 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React, {type ReactNode} from 'react';
|
|
9
|
-
import type {Props as NavbarItemConfig} from '@theme/NavbarItem';
|
|
10
|
-
import NavbarItem from '@theme/NavbarItem';
|
|
11
|
-
import NavbarColorModeToggle from '@theme/Navbar/ColorModeToggle';
|
|
12
|
-
import SearchBar from '@theme/SearchBar';
|
|
13
9
|
import {
|
|
14
10
|
splitNavbarItems,
|
|
15
11
|
useNavbarMobileSidebar,
|
|
16
12
|
useThemeConfig,
|
|
17
13
|
} from '@docusaurus/theme-common';
|
|
14
|
+
import NavbarItem, {type Props as NavbarItemConfig} from '@theme/NavbarItem';
|
|
15
|
+
import NavbarColorModeToggle from '@theme/Navbar/ColorModeToggle';
|
|
16
|
+
import SearchBar from '@theme/SearchBar';
|
|
18
17
|
import NavbarMobileSidebarToggle from '@theme/Navbar/MobileSidebar/Toggle';
|
|
19
18
|
import NavbarLogo from '@theme/Navbar/Logo';
|
|
20
19
|
import NavbarSearch from '@theme/Navbar/Search';
|
|
20
|
+
|
|
21
21
|
import styles from './styles.module.css';
|
|
22
22
|
|
|
23
23
|
function useNavbarItems() {
|
|
@@ -56,7 +56,7 @@ export default function NavbarContent(): JSX.Element {
|
|
|
56
56
|
const items = useNavbarItems();
|
|
57
57
|
const [leftItems, rightItems] = splitNavbarItems(items);
|
|
58
58
|
|
|
59
|
-
const
|
|
59
|
+
const searchBarItem = items.find((item) => item.type === 'search');
|
|
60
60
|
|
|
61
61
|
return (
|
|
62
62
|
<NavbarContentLayout
|
|
@@ -74,7 +74,7 @@ export default function NavbarContent(): JSX.Element {
|
|
|
74
74
|
<>
|
|
75
75
|
<NavbarItems items={rightItems} />
|
|
76
76
|
<NavbarColorModeToggle className={styles.colorModeToggle} />
|
|
77
|
-
{
|
|
77
|
+
{!searchBarItem && (
|
|
78
78
|
<NavbarSearch>
|
|
79
79
|
<SearchBar />
|
|
80
80
|
</NavbarSearch>
|
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
|
|
8
8
|
import React, {type ComponentProps} from 'react';
|
|
9
9
|
import clsx from 'clsx';
|
|
10
|
-
import NavbarMobileSidebar from '@theme/Navbar/MobileSidebar';
|
|
11
|
-
import type {Props} from '@theme/Navbar/Layout';
|
|
12
10
|
import {
|
|
13
11
|
useThemeConfig,
|
|
14
12
|
useHideableNavbar,
|
|
15
13
|
useNavbarMobileSidebar,
|
|
16
14
|
} from '@docusaurus/theme-common';
|
|
15
|
+
import NavbarMobileSidebar from '@theme/Navbar/MobileSidebar';
|
|
16
|
+
import type {Props} from '@theme/Navbar/Layout';
|
|
17
17
|
|
|
18
18
|
import styles from './styles.module.css';
|
|
19
19
|
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
|
+
import {useNavbarMobileSidebar} from '@docusaurus/theme-common';
|
|
9
10
|
import NavbarColorModeToggle from '@theme/Navbar/ColorModeToggle';
|
|
10
11
|
import IconClose from '@theme/IconClose';
|
|
11
12
|
import NavbarLogo from '@theme/Navbar/Logo';
|
|
12
|
-
import {useNavbarMobileSidebar} from '@docusaurus/theme-common';
|
|
13
13
|
|
|
14
14
|
function CloseButton() {
|
|
15
15
|
const mobileSidebar = useNavbarMobileSidebar();
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import clsx from 'clsx';
|
|
10
|
-
import type {Props} from '@theme/Navbar/MobileSidebar/Layout';
|
|
11
10
|
import {useNavbarSecondaryMenu} from '@docusaurus/theme-common';
|
|
11
|
+
import type {Props} from '@theme/Navbar/MobileSidebar/Layout';
|
|
12
12
|
|
|
13
13
|
export default function NavbarMobileSidebarLayout({
|
|
14
14
|
header,
|
|
@@ -7,8 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import {useNavbarMobileSidebar, useThemeConfig} from '@docusaurus/theme-common';
|
|
10
|
-
import type
|
|
11
|
-
import NavbarItem from '../../../NavbarItem';
|
|
10
|
+
import NavbarItem, {type Props as NavbarItemConfig} from '@theme/NavbarItem';
|
|
12
11
|
|
|
13
12
|
function useNavbarItems() {
|
|
14
13
|
// TODO temporary casting until ThemeConfig type is improved
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
|
-
import IconMenu from '@theme/IconMenu';
|
|
10
9
|
import {useNavbarMobileSidebar} from '@docusaurus/theme-common';
|
|
10
|
+
import IconMenu from '@theme/IconMenu';
|
|
11
11
|
|
|
12
12
|
export default function MobileSidebarToggle(): JSX.Element {
|
|
13
13
|
const mobileSidebar = useNavbarMobileSidebar();
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
|
-
import NavbarMobileSidebarLayout from '@theme/Navbar/MobileSidebar/Layout';
|
|
10
|
-
import NavbarMobileSidebarHeader from '@theme/Navbar/MobileSidebar/Header';
|
|
11
9
|
import {
|
|
12
10
|
useLockBodyScroll,
|
|
13
11
|
useNavbarMobileSidebar,
|
|
14
12
|
} from '@docusaurus/theme-common';
|
|
13
|
+
import NavbarMobileSidebarLayout from '@theme/Navbar/MobileSidebar/Layout';
|
|
14
|
+
import NavbarMobileSidebarHeader from '@theme/Navbar/MobileSidebar/Header';
|
|
15
15
|
import NavbarMobileSidebarPrimaryMenu from '@theme/Navbar/MobileSidebar/PrimaryMenu';
|
|
16
16
|
import NavbarMobileSidebarSecondaryMenu from '@theme/Navbar/MobileSidebar/SecondaryMenu';
|
|
17
17
|
|