@docusaurus/theme-classic 0.0.0-5145 → 0.0.0-5150
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/theme/AnnouncementBar/index.js +2 -1
- package/lib/theme/BackToTopButton/index.js +2 -1
- package/lib/theme/CodeBlock/Container/index.js +2 -5
- package/lib/theme/CodeBlock/Content/String.js +2 -3
- package/lib/theme/DocBreadcrumbs/index.js +2 -2
- package/lib/theme/DocCard/index.js +4 -1
- package/lib/theme/DocCardList/index.js +1 -1
- package/lib/theme/DocItem/Content/index.js +2 -1
- package/lib/theme/DocItem/Footer/index.js +2 -1
- package/lib/theme/DocItem/Layout/index.js +2 -1
- package/lib/theme/DocItem/Metadata/index.js +2 -1
- package/lib/theme/DocItem/Paginator/index.js +1 -1
- package/lib/theme/DocItem/TOC/Desktop/index.js +2 -1
- package/lib/theme/DocItem/TOC/Mobile/index.js +2 -1
- package/lib/theme/DocItem/index.js +2 -1
- package/lib/theme/DocPage/Layout/Main/index.js +1 -1
- package/lib/theme/DocPage/Layout/Sidebar/index.js +2 -1
- package/lib/theme/DocPage/Layout/index.js +1 -1
- package/lib/theme/DocPage/index.js +2 -3
- package/lib/theme/DocSidebar/Desktop/Content/index.js +2 -2
- package/lib/theme/DocSidebar/Mobile/index.js +1 -1
- package/lib/theme/DocSidebarItem/Category/index.js +6 -4
- package/lib/theme/DocSidebarItem/Link/index.js +2 -1
- package/lib/theme/DocSidebarItems/index.js +1 -1
- package/lib/theme/DocVersionBadge/index.js +2 -1
- package/lib/theme/DocVersionBanner/index.js +2 -2
- package/lib/theme/Footer/Logo/index.js +3 -1
- package/lib/theme/Layout/index.js +2 -5
- package/lib/theme/LayoutProviders/index.js +1 -1
- package/lib/theme/Logo/index.js +34 -22
- package/lib/theme/Navbar/Content/index.js +2 -2
- package/lib/theme/Navbar/Layout/index.js +2 -2
- package/lib/theme/Navbar/MobileSidebar/Header/index.js +1 -1
- package/lib/theme/Navbar/MobileSidebar/Layout/index.js +1 -1
- package/lib/theme/Navbar/MobileSidebar/PrimaryMenu/index.js +2 -1
- package/lib/theme/Navbar/MobileSidebar/SecondaryMenu/index.js +2 -1
- package/lib/theme/Navbar/MobileSidebar/Toggle/index.js +1 -1
- package/lib/theme/Navbar/MobileSidebar/index.js +1 -1
- package/lib/theme/NavbarItem/DocNavbarItem.js +1 -1
- package/lib/theme/NavbarItem/DocSidebarNavbarItem.js +1 -1
- package/lib/theme/NavbarItem/DocsVersionDropdownNavbarItem.js +1 -1
- package/lib/theme/NavbarItem/DocsVersionNavbarItem.js +1 -1
- package/lib/theme/NavbarItem/DropdownNavbarItem.js +2 -3
- package/lib/theme/NavbarItem/LocaleDropdownNavbarItem/index.js +1 -1
- package/lib/theme/SiteMetadata/index.js +2 -3
- package/lib/theme/SkipToContent/index.js +1 -1
- package/lib/theme/TOCItems/index.js +2 -2
- package/lib/theme/Tabs/index.js +2 -2
- package/lib/validateThemeConfig.js +13 -19
- package/package.json +14 -14
- package/src/theme/AnnouncementBar/index.tsx +2 -1
- package/src/theme/BackToTopButton/index.tsx +2 -1
- package/src/theme/CodeBlock/Container/index.tsx +2 -5
- package/src/theme/CodeBlock/Content/String.tsx +2 -3
- package/src/theme/DocBreadcrumbs/index.tsx +2 -2
- package/src/theme/DocCard/index.tsx +4 -1
- package/src/theme/DocCardList/index.tsx +1 -1
- package/src/theme/DocItem/Content/index.tsx +2 -1
- package/src/theme/DocItem/Footer/index.tsx +2 -5
- package/src/theme/DocItem/Layout/index.tsx +2 -1
- package/src/theme/DocItem/Metadata/index.tsx +2 -1
- package/src/theme/DocItem/Paginator/index.tsx +1 -1
- package/src/theme/DocItem/TOC/Desktop/index.tsx +2 -1
- package/src/theme/DocItem/TOC/Mobile/index.tsx +3 -1
- package/src/theme/DocItem/index.tsx +2 -1
- package/src/theme/DocPage/Layout/Main/index.tsx +1 -1
- package/src/theme/DocPage/Layout/Sidebar/index.tsx +2 -1
- package/src/theme/DocPage/Layout/index.tsx +1 -1
- package/src/theme/DocPage/index.tsx +2 -3
- package/src/theme/DocSidebar/Desktop/Content/index.tsx +2 -2
- package/src/theme/DocSidebar/Mobile/index.tsx +1 -1
- package/src/theme/DocSidebarItem/Category/index.tsx +6 -4
- package/src/theme/DocSidebarItem/Link/index.tsx +2 -1
- package/src/theme/DocSidebarItems/index.tsx +1 -1
- package/src/theme/DocVersionBadge/index.tsx +2 -1
- package/src/theme/DocVersionBanner/index.tsx +2 -3
- package/src/theme/Footer/Logo/index.tsx +3 -1
- package/src/theme/Layout/index.tsx +2 -5
- package/src/theme/LayoutProviders/index.tsx +1 -1
- package/src/theme/Logo/index.tsx +45 -24
- package/src/theme/Navbar/Content/index.tsx +2 -2
- 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 +2 -1
- package/src/theme/Navbar/MobileSidebar/SecondaryMenu/index.tsx +2 -1
- package/src/theme/Navbar/MobileSidebar/Toggle/index.tsx +1 -1
- package/src/theme/Navbar/MobileSidebar/index.tsx +1 -1
- package/src/theme/NavbarItem/DocNavbarItem.tsx +1 -1
- package/src/theme/NavbarItem/DocSidebarNavbarItem.tsx +1 -1
- package/src/theme/NavbarItem/DocsVersionDropdownNavbarItem.tsx +1 -1
- package/src/theme/NavbarItem/DocsVersionNavbarItem.tsx +1 -1
- package/src/theme/NavbarItem/DropdownNavbarItem.tsx +2 -3
- package/src/theme/NavbarItem/LocaleDropdownNavbarItem/index.tsx +1 -1
- package/src/theme/SiteMetadata/index.tsx +2 -3
- package/src/theme/SkipToContent/index.tsx +1 -1
- package/src/theme/TOCItems/index.tsx +3 -3
- package/src/theme/Tabs/index.tsx +2 -2
- package/src/theme-classic.d.ts +1 -1
- package/src/validateThemeConfig.ts +14 -19
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
|
-
import {useNavbarMobileSidebar} from '@docusaurus/theme-common';
|
|
9
|
+
import {useNavbarMobileSidebar} from '@docusaurus/theme-common/internal';
|
|
10
10
|
import NavbarColorModeToggle from '@theme/Navbar/ColorModeToggle';
|
|
11
11
|
import IconClose from '@theme/IconClose';
|
|
12
12
|
import NavbarLogo from '@theme/Navbar/Logo';
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import clsx from 'clsx';
|
|
10
|
-
import {useNavbarSecondaryMenu} from '@docusaurus/theme-common';
|
|
10
|
+
import {useNavbarSecondaryMenu} from '@docusaurus/theme-common/internal';
|
|
11
11
|
import type {Props} from '@theme/Navbar/MobileSidebar/Layout';
|
|
12
12
|
|
|
13
13
|
export default function NavbarMobileSidebarLayout({
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
|
-
import {
|
|
9
|
+
import {useThemeConfig} from '@docusaurus/theme-common';
|
|
10
|
+
import {useNavbarMobileSidebar} from '@docusaurus/theme-common/internal';
|
|
10
11
|
import NavbarItem, {type Props as NavbarItemConfig} from '@theme/NavbarItem';
|
|
11
12
|
|
|
12
13
|
function useNavbarItems() {
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React, {type ComponentProps} from 'react';
|
|
9
|
-
import {
|
|
9
|
+
import {useThemeConfig} from '@docusaurus/theme-common';
|
|
10
|
+
import {useNavbarSecondaryMenu} from '@docusaurus/theme-common/internal';
|
|
10
11
|
import Translate from '@docusaurus/Translate';
|
|
11
12
|
|
|
12
13
|
function SecondaryMenuBackButton(props: ComponentProps<'button'>) {
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
|
-
import {useNavbarMobileSidebar} from '@docusaurus/theme-common';
|
|
9
|
+
import {useNavbarMobileSidebar} from '@docusaurus/theme-common/internal';
|
|
10
10
|
import IconMenu from '@theme/IconMenu';
|
|
11
11
|
|
|
12
12
|
export default function MobileSidebarToggle(): JSX.Element {
|
|
@@ -9,7 +9,7 @@ import React from 'react';
|
|
|
9
9
|
import {
|
|
10
10
|
useLockBodyScroll,
|
|
11
11
|
useNavbarMobileSidebar,
|
|
12
|
-
} from '@docusaurus/theme-common';
|
|
12
|
+
} from '@docusaurus/theme-common/internal';
|
|
13
13
|
import NavbarMobileSidebarLayout from '@theme/Navbar/MobileSidebar/Layout';
|
|
14
14
|
import NavbarMobileSidebarHeader from '@theme/Navbar/MobileSidebar/Header';
|
|
15
15
|
import NavbarMobileSidebarPrimaryMenu from '@theme/Navbar/MobileSidebar/PrimaryMenu';
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import {useActiveDocContext} from '@docusaurus/plugin-content-docs/client';
|
|
10
|
-
import {useLayoutDoc} from '@docusaurus/theme-common';
|
|
10
|
+
import {useLayoutDoc} from '@docusaurus/theme-common/internal';
|
|
11
11
|
import DefaultNavbarItem from '@theme/NavbarItem/DefaultNavbarItem';
|
|
12
12
|
import type {Props} from '@theme/NavbarItem/DocNavbarItem';
|
|
13
13
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import {useActiveDocContext} from '@docusaurus/plugin-content-docs/client';
|
|
10
|
-
import {useLayoutDocsSidebar} from '@docusaurus/theme-common';
|
|
10
|
+
import {useLayoutDocsSidebar} from '@docusaurus/theme-common/internal';
|
|
11
11
|
import DefaultNavbarItem from '@theme/NavbarItem/DefaultNavbarItem';
|
|
12
12
|
import type {Props} from '@theme/NavbarItem/DocSidebarNavbarItem';
|
|
13
13
|
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
import {
|
|
14
14
|
useDocsPreferredVersion,
|
|
15
15
|
useDocsVersionCandidates,
|
|
16
|
-
} from '@docusaurus/theme-common';
|
|
16
|
+
} from '@docusaurus/theme-common/internal';
|
|
17
17
|
import {translate} from '@docusaurus/Translate';
|
|
18
18
|
import DefaultNavbarItem from '@theme/NavbarItem/DefaultNavbarItem';
|
|
19
19
|
import DropdownNavbarItem from '@theme/NavbarItem/DropdownNavbarItem';
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
|
-
import {useDocsVersionCandidates} from '@docusaurus/theme-common';
|
|
9
|
+
import {useDocsVersionCandidates} from '@docusaurus/theme-common/internal';
|
|
10
10
|
import DefaultNavbarItem from '@theme/NavbarItem/DefaultNavbarItem';
|
|
11
11
|
import type {Props} from '@theme/NavbarItem/DocsVersionNavbarItem';
|
|
12
12
|
import type {GlobalVersion} from '@docusaurus/plugin-content-docs/client';
|
|
@@ -8,12 +8,11 @@
|
|
|
8
8
|
import React, {useState, useRef, useEffect} from 'react';
|
|
9
9
|
import clsx from 'clsx';
|
|
10
10
|
import {
|
|
11
|
-
|
|
11
|
+
isRegexpStringMatch,
|
|
12
12
|
useCollapsible,
|
|
13
13
|
Collapsible,
|
|
14
|
-
isRegexpStringMatch,
|
|
15
|
-
useLocalPathname,
|
|
16
14
|
} from '@docusaurus/theme-common';
|
|
15
|
+
import {isSamePath, useLocalPathname} from '@docusaurus/theme-common/internal';
|
|
17
16
|
import NavbarNavLink from '@theme/NavbarItem/NavbarNavLink';
|
|
18
17
|
import NavbarItem, {type LinkLikeNavbarItemProps} from '@theme/NavbarItem';
|
|
19
18
|
import type {
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
|
10
|
-
import {useAlternatePageUtils} from '@docusaurus/theme-common';
|
|
10
|
+
import {useAlternatePageUtils} from '@docusaurus/theme-common/internal';
|
|
11
11
|
import {translate} from '@docusaurus/Translate';
|
|
12
12
|
import DropdownNavbarItem from '@theme/NavbarItem/DropdownNavbarItem';
|
|
13
13
|
import IconLanguage from '@theme/IconLanguage';
|
|
@@ -9,13 +9,12 @@ 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 {PageMetadata, useThemeConfig} from '@docusaurus/theme-common';
|
|
12
13
|
import {
|
|
13
|
-
PageMetadata,
|
|
14
14
|
DEFAULT_SEARCH_TAG,
|
|
15
15
|
useAlternatePageUtils,
|
|
16
|
-
useThemeConfig,
|
|
17
16
|
keyboardFocusedClassName,
|
|
18
|
-
} from '@docusaurus/theme-common';
|
|
17
|
+
} from '@docusaurus/theme-common/internal';
|
|
19
18
|
import {useLocation} from '@docusaurus/router';
|
|
20
19
|
import SearchMetadata from '@theme/SearchMetadata';
|
|
21
20
|
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React, {useMemo} from 'react';
|
|
9
|
+
import {useThemeConfig} from '@docusaurus/theme-common';
|
|
9
10
|
import {
|
|
10
|
-
type TOCHighlightConfig,
|
|
11
|
-
useThemeConfig,
|
|
12
11
|
useTOCHighlight,
|
|
13
12
|
useFilteredAndTreeifiedTOC,
|
|
14
|
-
|
|
13
|
+
type TOCHighlightConfig,
|
|
14
|
+
} from '@docusaurus/theme-common/internal';
|
|
15
15
|
import TOCItemTree from '@theme/TOCItems/Tree';
|
|
16
16
|
import type {Props} from '@theme/TOCItems';
|
|
17
17
|
|
package/src/theme/Tabs/index.tsx
CHANGED
|
@@ -13,11 +13,11 @@ import React, {
|
|
|
13
13
|
} from 'react';
|
|
14
14
|
import clsx from 'clsx';
|
|
15
15
|
import useIsBrowser from '@docusaurus/useIsBrowser';
|
|
16
|
+
import {duplicates} from '@docusaurus/theme-common';
|
|
16
17
|
import {
|
|
17
18
|
useScrollPositionBlocker,
|
|
18
|
-
duplicates,
|
|
19
19
|
useTabGroupChoice,
|
|
20
|
-
} from '@docusaurus/theme-common';
|
|
20
|
+
} from '@docusaurus/theme-common/internal';
|
|
21
21
|
import type {Props} from '@theme/Tabs';
|
|
22
22
|
import type {Props as TabItemProps} from '@theme/TabItem';
|
|
23
23
|
|
package/src/theme-classic.d.ts
CHANGED
|
@@ -1103,7 +1103,7 @@ declare module '@theme/TOCItems' {
|
|
|
1103
1103
|
}
|
|
1104
1104
|
|
|
1105
1105
|
declare module '@theme/TOCItems/Tree' {
|
|
1106
|
-
import type {TOCTreeNode} from '@docusaurus/theme-common';
|
|
1106
|
+
import type {TOCTreeNode} from '@docusaurus/theme-common/internal';
|
|
1107
1107
|
|
|
1108
1108
|
export interface Props {
|
|
1109
1109
|
readonly toc: readonly TOCTreeNode[];
|
|
@@ -300,6 +300,18 @@ const CustomCssSchema = Joi.alternatives()
|
|
|
300
300
|
.try(Joi.array().items(Joi.string().required()), Joi.string().required())
|
|
301
301
|
.optional();
|
|
302
302
|
|
|
303
|
+
const LogoSchema = Joi.object({
|
|
304
|
+
alt: Joi.string().allow(''),
|
|
305
|
+
src: Joi.string().required(),
|
|
306
|
+
srcDark: Joi.string(),
|
|
307
|
+
width: Joi.alternatives().try(Joi.string(), Joi.number()),
|
|
308
|
+
height: Joi.alternatives().try(Joi.string(), Joi.number()),
|
|
309
|
+
href: Joi.string(),
|
|
310
|
+
target: Joi.string(),
|
|
311
|
+
style: Joi.object(),
|
|
312
|
+
className: Joi.string(),
|
|
313
|
+
});
|
|
314
|
+
|
|
303
315
|
export const ThemeConfigSchema = Joi.object<ThemeConfig>({
|
|
304
316
|
// TODO temporary (@alpha-58)
|
|
305
317
|
// @ts-expect-error: forbidden
|
|
@@ -344,28 +356,11 @@ export const ThemeConfigSchema = Joi.object<ThemeConfig>({
|
|
|
344
356
|
.items(NavbarItemSchema)
|
|
345
357
|
.default(DEFAULT_CONFIG.navbar.items),
|
|
346
358
|
title: Joi.string().allow('', null),
|
|
347
|
-
logo:
|
|
348
|
-
alt: Joi.string().allow(''),
|
|
349
|
-
src: Joi.string().required(),
|
|
350
|
-
srcDark: Joi.string(),
|
|
351
|
-
width: Joi.alternatives().try(Joi.string(), Joi.number()),
|
|
352
|
-
height: Joi.alternatives().try(Joi.string(), Joi.number()),
|
|
353
|
-
href: Joi.string(),
|
|
354
|
-
target: Joi.string(),
|
|
355
|
-
}),
|
|
359
|
+
logo: LogoSchema,
|
|
356
360
|
}).default(DEFAULT_CONFIG.navbar),
|
|
357
361
|
footer: Joi.object({
|
|
358
362
|
style: Joi.string().equal('dark', 'light').default('light'),
|
|
359
|
-
logo:
|
|
360
|
-
alt: Joi.string().allow(''),
|
|
361
|
-
src: Joi.string().required(),
|
|
362
|
-
srcDark: Joi.string(),
|
|
363
|
-
// TODO infer this from reading the image
|
|
364
|
-
width: Joi.alternatives().try(Joi.string(), Joi.number()),
|
|
365
|
-
height: Joi.alternatives().try(Joi.string(), Joi.number()),
|
|
366
|
-
href: Joi.string(),
|
|
367
|
-
target: Joi.string(),
|
|
368
|
-
}),
|
|
363
|
+
logo: LogoSchema,
|
|
369
364
|
copyright: Joi.string(),
|
|
370
365
|
links: Joi.alternatives(
|
|
371
366
|
Joi.array().items(
|