@docusaurus/theme-classic 3.10.1-canary-6655 → 3.10.2
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/nprogress.css +1 -2
- package/lib/theme/Admonition/index.js +0 -1
- package/lib/theme/AnnouncementBar/Content/index.js +1 -0
- package/lib/theme/AnnouncementBar/styles.module.css +1 -1
- package/lib/theme/BlogPostItem/Header/Title/styles.module.css +1 -1
- package/lib/theme/BlogSidebar/Desktop/styles.module.css +1 -1
- package/lib/theme/CodeBlock/Content/index.js +4 -3
- package/lib/theme/ContentVisibility/Unlisted/index.js +1 -8
- package/lib/theme/DocCard/index.js +1 -1
- package/lib/theme/DocCategoryGeneratedIndexPage/styles.module.css +1 -1
- package/lib/theme/DocItem/Layout/styles.module.css +1 -1
- package/lib/theme/DocItem/TOC/Mobile/styles.module.css +1 -1
- package/lib/theme/DocRoot/Layout/Main/styles.module.css +1 -1
- package/lib/theme/DocRoot/Layout/Sidebar/ExpandButton/styles.module.css +1 -1
- package/lib/theme/DocRoot/Layout/Sidebar/styles.module.css +1 -1
- package/lib/theme/DocSidebar/Desktop/CollapseButton/styles.module.css +1 -1
- package/lib/theme/DocSidebar/Desktop/Content/styles.module.css +1 -2
- package/lib/theme/DocSidebar/Desktop/styles.module.css +1 -1
- package/lib/theme/DocSidebarItem/Category/index.js +1 -3
- package/lib/theme/DocSidebarItem/Html/index.js +1 -0
- package/lib/theme/DocSidebarItem/Html/styles.module.css +1 -1
- package/lib/theme/EditMetaRow/styles.module.css +1 -1
- package/lib/theme/ErrorPageContent.js +17 -7
- package/lib/theme/Footer/Copyright/index.js +1 -0
- package/lib/theme/Footer/Links/MultiColumn/index.js +1 -0
- package/lib/theme/Footer/Links/Simple/index.js +1 -0
- package/lib/theme/Mermaid.js +1 -1
- package/lib/theme/Navbar/Content/styles.module.css +1 -1
- package/lib/theme/Navbar/MobileSidebar/Layout/index.js +13 -2
- package/lib/theme/Navbar/Search/styles.module.css +2 -2
- package/lib/theme/SearchBar.js +1 -1
- package/lib/theme/TOC/styles.module.css +1 -1
- package/lib/theme/prism-include-languages.js +24 -22
- package/package.json +25 -24
- package/src/nprogress.css +1 -2
- package/src/options.ts +2 -2
- package/src/theme/Admonition/index.tsx +0 -1
- package/src/theme/AnnouncementBar/Content/index.tsx +1 -0
- package/src/theme/AnnouncementBar/styles.module.css +1 -1
- package/src/theme/BlogPostItem/Header/Title/styles.module.css +1 -1
- package/src/theme/BlogSidebar/Desktop/styles.module.css +1 -1
- package/src/theme/CodeBlock/Content/index.tsx +14 -11
- package/src/theme/ContentVisibility/Unlisted/index.tsx +1 -9
- package/src/theme/DocCard/index.tsx +1 -1
- package/src/theme/DocCategoryGeneratedIndexPage/styles.module.css +1 -1
- package/src/theme/DocItem/Layout/styles.module.css +1 -1
- package/src/theme/DocItem/TOC/Mobile/styles.module.css +1 -1
- package/src/theme/DocRoot/Layout/Main/styles.module.css +1 -1
- package/src/theme/DocRoot/Layout/Sidebar/ExpandButton/styles.module.css +1 -1
- package/src/theme/DocRoot/Layout/Sidebar/styles.module.css +1 -1
- package/src/theme/DocSidebar/Desktop/CollapseButton/styles.module.css +1 -1
- package/src/theme/DocSidebar/Desktop/Content/styles.module.css +1 -2
- package/src/theme/DocSidebar/Desktop/styles.module.css +1 -1
- package/src/theme/DocSidebarItem/Category/index.tsx +1 -3
- package/src/theme/DocSidebarItem/Html/index.tsx +1 -0
- package/src/theme/DocSidebarItem/Html/styles.module.css +1 -1
- package/src/theme/EditMetaRow/styles.module.css +1 -1
- package/src/theme/Footer/Copyright/index.tsx +1 -0
- package/src/theme/Footer/Links/MultiColumn/index.tsx +1 -0
- package/src/theme/Footer/Links/Simple/index.tsx +1 -0
- package/src/theme/Navbar/Content/styles.module.css +1 -1
- package/src/theme/Navbar/MobileSidebar/Layout/index.tsx +14 -2
- package/src/theme/Navbar/Search/styles.module.css +2 -2
- package/src/theme/TOC/styles.module.css +1 -1
- package/src/theme/prism-include-languages.ts +2 -2
- package/src/theme-classic.d.ts +8 -1
package/lib/nprogress.css
CHANGED
|
@@ -34,8 +34,7 @@
|
|
|
34
34
|
right: 0;
|
|
35
35
|
width: 100px;
|
|
36
36
|
height: 100%;
|
|
37
|
-
box-shadow:
|
|
38
|
-
0 0 10px var(--docusaurus-progress-bar-color),
|
|
37
|
+
box-shadow: 0 0 10px var(--docusaurus-progress-bar-color),
|
|
39
38
|
0 0 5px var(--docusaurus-progress-bar-color);
|
|
40
39
|
opacity: 1;
|
|
41
40
|
transform: rotate(3deg) translate(0, -4px);
|
|
@@ -20,6 +20,5 @@ function getAdmonitionTypeComponent(type) {
|
|
|
20
20
|
export default function Admonition(unprocessedProps) {
|
|
21
21
|
const props = processAdmonitionProps(unprocessedProps);
|
|
22
22
|
const AdmonitionTypeComponent = getAdmonitionTypeComponent(props.type);
|
|
23
|
-
// eslint-disable-next-line react-hooks/static-components
|
|
24
23
|
return <AdmonitionTypeComponent {...props} />;
|
|
25
24
|
}
|
|
@@ -16,6 +16,7 @@ export default function AnnouncementBarContent(props) {
|
|
|
16
16
|
{...props}
|
|
17
17
|
className={clsx(styles.content, props.className)}
|
|
18
18
|
// Developer provided the HTML, so assume it's safe.
|
|
19
|
+
// eslint-disable-next-line react/no-danger
|
|
19
20
|
dangerouslySetInnerHTML={{__html: content}}
|
|
20
21
|
/>
|
|
21
22
|
);
|
|
@@ -11,17 +11,18 @@ import {usePrismTheme} from '@docusaurus/theme-common';
|
|
|
11
11
|
import {Highlight} from 'prism-react-renderer';
|
|
12
12
|
import Line from '@theme/CodeBlock/Line';
|
|
13
13
|
import styles from './styles.module.css';
|
|
14
|
-
|
|
14
|
+
// TODO Docusaurus v4: remove useless forwardRef
|
|
15
|
+
const Pre = React.forwardRef((props, ref) => {
|
|
15
16
|
return (
|
|
16
17
|
<pre
|
|
17
18
|
ref={ref}
|
|
18
19
|
/* eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex */
|
|
19
20
|
tabIndex={0}
|
|
20
21
|
{...props}
|
|
21
|
-
className={clsx(className, styles.codeBlock, 'thin-scrollbar')}
|
|
22
|
+
className={clsx(props.className, styles.codeBlock, 'thin-scrollbar')}
|
|
22
23
|
/>
|
|
23
24
|
);
|
|
24
|
-
}
|
|
25
|
+
});
|
|
25
26
|
function Code(props) {
|
|
26
27
|
const {metadata} = useCodeBlockContext();
|
|
27
28
|
return (
|
|
@@ -6,20 +6,13 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import clsx from 'clsx';
|
|
9
|
-
import Head from '@docusaurus/Head';
|
|
10
9
|
import {
|
|
11
10
|
ThemeClassNames,
|
|
12
11
|
UnlistedBannerTitle,
|
|
13
12
|
UnlistedBannerMessage,
|
|
13
|
+
UnlistedMetadata,
|
|
14
14
|
} from '@docusaurus/theme-common';
|
|
15
15
|
import Admonition from '@theme/Admonition';
|
|
16
|
-
function UnlistedMetadata() {
|
|
17
|
-
return (
|
|
18
|
-
<Head>
|
|
19
|
-
<meta name="robots" content="noindex, nofollow" />
|
|
20
|
-
</Head>
|
|
21
|
-
);
|
|
22
|
-
}
|
|
23
16
|
function UnlistedBanner({className}) {
|
|
24
17
|
return (
|
|
25
18
|
<Admonition
|
|
@@ -17,7 +17,7 @@ import isInternalUrl from '@docusaurus/isInternalUrl';
|
|
|
17
17
|
import Layout from '@theme/DocCard/Layout';
|
|
18
18
|
function getFallbackEmojiIcon(item) {
|
|
19
19
|
if (item.type === 'category') {
|
|
20
|
-
return '
|
|
20
|
+
return '🗃';
|
|
21
21
|
}
|
|
22
22
|
return isInternalUrl(item.href) ? '📄️' : '🔗';
|
|
23
23
|
}
|
|
@@ -5,12 +5,11 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
@media (width
|
|
8
|
+
@media (min-width: 997px) {
|
|
9
9
|
.menu {
|
|
10
10
|
flex-grow: 1;
|
|
11
11
|
padding: 0.5rem;
|
|
12
12
|
}
|
|
13
|
-
|
|
14
13
|
@supports (scrollbar-gutter: stable) {
|
|
15
14
|
.menu {
|
|
16
15
|
padding: 0.5rem 0 0.5rem 0.5rem;
|
|
@@ -238,9 +238,7 @@ function DocSidebarItemCategoryCollapsible({
|
|
|
238
238
|
aria-current={isCurrentPage ? 'page' : undefined}
|
|
239
239
|
role={collapsible && !href ? 'button' : undefined}
|
|
240
240
|
aria-expanded={collapsible && !href ? !collapsed : undefined}
|
|
241
|
-
href={
|
|
242
|
-
collapsible ? (hrefWithSSRFallback ?? '#') : hrefWithSSRFallback
|
|
243
|
-
}
|
|
241
|
+
href={collapsible ? hrefWithSSRFallback ?? '#' : hrefWithSSRFallback}
|
|
244
242
|
{...props}>
|
|
245
243
|
<CategoryLinkLabel label={label} />
|
|
246
244
|
</Link>
|
|
@@ -6,25 +6,35 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import Translate from '@docusaurus/Translate';
|
|
9
|
-
import {
|
|
9
|
+
import {
|
|
10
|
+
ErrorBoundaryError,
|
|
11
|
+
ErrorBoundaryTryAgainButton,
|
|
12
|
+
} from '@docusaurus/theme-common';
|
|
10
13
|
import Heading from '@theme/Heading';
|
|
11
|
-
export default function ErrorPageContent({
|
|
12
|
-
|
|
14
|
+
export default function ErrorPageContent({error, tryAgain}) {
|
|
15
|
+
return (
|
|
16
|
+
<main className="container margin-vert--xl">
|
|
13
17
|
<div className="row">
|
|
14
18
|
<div className="col col--6 col--offset-3">
|
|
15
19
|
<Heading as="h1" className="hero__title">
|
|
16
|
-
<Translate
|
|
20
|
+
<Translate
|
|
21
|
+
id="theme.ErrorPageContent.title"
|
|
22
|
+
description="The title of the fallback page when the page crashed">
|
|
17
23
|
This page crashed.
|
|
18
24
|
</Translate>
|
|
19
25
|
</Heading>
|
|
20
26
|
<div className="margin-vert--lg">
|
|
21
|
-
<ErrorBoundaryTryAgainButton
|
|
27
|
+
<ErrorBoundaryTryAgainButton
|
|
28
|
+
onClick={tryAgain}
|
|
29
|
+
className="button button--primary shadow--lw"
|
|
30
|
+
/>
|
|
22
31
|
</div>
|
|
23
32
|
<hr />
|
|
24
33
|
<div className="margin-vert--md">
|
|
25
|
-
<ErrorBoundaryError error={error}/>
|
|
34
|
+
<ErrorBoundaryError error={error} />
|
|
26
35
|
</div>
|
|
27
36
|
</div>
|
|
28
37
|
</div>
|
|
29
|
-
</main>
|
|
38
|
+
</main>
|
|
39
|
+
);
|
|
30
40
|
}
|
|
@@ -15,6 +15,7 @@ function SimpleLinkItem({item}) {
|
|
|
15
15
|
<span
|
|
16
16
|
className={clsx('footer__link-item', item.className)}
|
|
17
17
|
// Developer provided the HTML, so assume it's safe.
|
|
18
|
+
// eslint-disable-next-line react/no-danger
|
|
18
19
|
dangerouslySetInnerHTML={{__html: item.html}}
|
|
19
20
|
/>
|
|
20
21
|
) : (
|
package/lib/theme/Mermaid.js
CHANGED
|
@@ -10,4 +10,4 @@
|
|
|
10
10
|
// Yet we declare it there so that we can register it in MDX
|
|
11
11
|
// TODO later the mermaid theme should be able to register its MDX component
|
|
12
12
|
// see https://github.com/facebook/docusaurus/pull/7490#issuecomment-1279117288
|
|
13
|
-
export {
|
|
13
|
+
export {default} from '@docusaurus/Noop';
|
|
@@ -4,10 +4,21 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
|
-
import React from 'react';
|
|
7
|
+
import React, {version} from 'react';
|
|
8
8
|
import clsx from 'clsx';
|
|
9
9
|
import {useNavbarSecondaryMenu} from '@docusaurus/theme-common/internal';
|
|
10
10
|
import {ThemeClassNames} from '@docusaurus/theme-common';
|
|
11
|
+
// TODO Docusaurus v4: remove temporary inert workaround
|
|
12
|
+
// See https://github.com/facebook/react/issues/17157
|
|
13
|
+
// See https://github.com/radix-ui/themes/pull/509
|
|
14
|
+
function inertProps(inert) {
|
|
15
|
+
const isBeforeReact19 = parseInt(version.split('.')[0], 10) < 19;
|
|
16
|
+
if (isBeforeReact19) {
|
|
17
|
+
// TODO Docusaurus v4: remove temporary inert workaround
|
|
18
|
+
return {inert: inert ? '' : undefined};
|
|
19
|
+
}
|
|
20
|
+
return {inert};
|
|
21
|
+
}
|
|
11
22
|
function NavbarMobileSidebarPanel({children, inert}) {
|
|
12
23
|
return (
|
|
13
24
|
<div
|
|
@@ -15,7 +26,7 @@ function NavbarMobileSidebarPanel({children, inert}) {
|
|
|
15
26
|
ThemeClassNames.layout.navbar.mobileSidebar.panel,
|
|
16
27
|
'navbar-sidebar__item menu',
|
|
17
28
|
)}
|
|
18
|
-
|
|
29
|
+
{...inertProps(inert)}>
|
|
19
30
|
{children}
|
|
20
31
|
</div>
|
|
21
32
|
);
|
|
@@ -13,14 +13,14 @@ See https://github.com/facebook/docusaurus/pull/9385
|
|
|
13
13
|
display: none;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
@media (width
|
|
16
|
+
@media (max-width: 996px) {
|
|
17
17
|
.navbarSearchContainer {
|
|
18
18
|
position: absolute;
|
|
19
19
|
right: var(--ifm-navbar-padding-horizontal);
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
@media (width
|
|
23
|
+
@media (min-width: 997px) {
|
|
24
24
|
.navbarSearchContainer {
|
|
25
25
|
padding: 0 var(--ifm-navbar-item-padding-horizontal);
|
|
26
26
|
}
|
package/lib/theme/SearchBar.js
CHANGED
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
// If you swizzled this, it is your responsibility to provide an implementation
|
|
9
9
|
// Tip: swizzle the SearchBar from the Algolia theme for inspiration:
|
|
10
10
|
// npm run swizzle @docusaurus/theme-search-algolia SearchBar
|
|
11
|
-
export {
|
|
11
|
+
export {default} from '@docusaurus/Noop';
|
|
@@ -6,27 +6,29 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import siteConfig from '@generated/docusaurus.config';
|
|
8
8
|
export default function prismIncludeLanguages(PrismObject) {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
require(`prismjs/components/prism-${lang}`);
|
|
26
|
-
});
|
|
27
|
-
// Clean up and eventually restore former globalThis.Prism object (if any)
|
|
28
|
-
delete globalThis.Prism;
|
|
29
|
-
if (typeof PrismBefore !== 'undefined') {
|
|
30
|
-
globalThis.Prism = PrismObject;
|
|
9
|
+
const {
|
|
10
|
+
themeConfig: {prism},
|
|
11
|
+
} = siteConfig;
|
|
12
|
+
const {additionalLanguages} = prism;
|
|
13
|
+
// Prism components work on the Prism instance on the window, while prism-
|
|
14
|
+
// react-renderer uses its own Prism instance. We temporarily mount the
|
|
15
|
+
// instance onto window, import components to enhance it, then remove it to
|
|
16
|
+
// avoid polluting global namespace.
|
|
17
|
+
// You can mutate PrismObject: registering plugins, deleting languages... As
|
|
18
|
+
// long as you don't re-assign it
|
|
19
|
+
const PrismBefore = globalThis.Prism;
|
|
20
|
+
globalThis.Prism = PrismObject;
|
|
21
|
+
additionalLanguages.forEach((lang) => {
|
|
22
|
+
if (lang === 'php') {
|
|
23
|
+
// eslint-disable-next-line global-require
|
|
24
|
+
require('prismjs/components/prism-markup-templating.js');
|
|
31
25
|
}
|
|
26
|
+
// eslint-disable-next-line global-require, import/no-dynamic-require
|
|
27
|
+
require(`prismjs/components/prism-${lang}`);
|
|
28
|
+
});
|
|
29
|
+
// Clean up and eventually restore former globalThis.Prism object (if any)
|
|
30
|
+
delete globalThis.Prism;
|
|
31
|
+
if (typeof PrismBefore !== 'undefined') {
|
|
32
|
+
globalThis.Prism = PrismObject;
|
|
33
|
+
}
|
|
32
34
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/theme-classic",
|
|
3
|
-
"version": "3.10.
|
|
3
|
+
"version": "3.10.2",
|
|
4
4
|
"description": "Classic theme for Docusaurus",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "src/theme-classic.d.ts",
|
|
@@ -14,33 +14,33 @@
|
|
|
14
14
|
},
|
|
15
15
|
"license": "MIT",
|
|
16
16
|
"scripts": {
|
|
17
|
-
"build": "tsc --build && node ../../admin/scripts/copyUntypedFiles.js &&
|
|
17
|
+
"build": "tsc --build && node ../../admin/scripts/copyUntypedFiles.js && prettier --config ../../.prettierrc --write \"lib/theme/**/*.js\"",
|
|
18
18
|
"watch": "run-p -c copy:watch build:watch",
|
|
19
19
|
"build:watch": "tsc --build --watch",
|
|
20
20
|
"copy:watch": "node ../../admin/scripts/copyUntypedFiles.js --watch"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@docusaurus/core": "3.10.
|
|
24
|
-
"@docusaurus/logger": "3.10.
|
|
25
|
-
"@docusaurus/mdx-loader": "3.10.
|
|
26
|
-
"@docusaurus/module-type-aliases": "3.10.
|
|
27
|
-
"@docusaurus/plugin-content-blog": "3.10.
|
|
28
|
-
"@docusaurus/plugin-content-docs": "3.10.
|
|
29
|
-
"@docusaurus/plugin-content-pages": "3.10.
|
|
30
|
-
"@docusaurus/theme-common": "3.10.
|
|
31
|
-
"@docusaurus/theme-translations": "3.10.
|
|
32
|
-
"@docusaurus/types": "3.10.
|
|
33
|
-
"@docusaurus/utils": "3.10.
|
|
34
|
-
"@docusaurus/utils-common": "3.10.
|
|
35
|
-
"@docusaurus/utils-validation": "3.10.
|
|
36
|
-
"@mdx-js/react": "^3.
|
|
23
|
+
"@docusaurus/core": "3.10.2",
|
|
24
|
+
"@docusaurus/logger": "3.10.2",
|
|
25
|
+
"@docusaurus/mdx-loader": "3.10.2",
|
|
26
|
+
"@docusaurus/module-type-aliases": "3.10.2",
|
|
27
|
+
"@docusaurus/plugin-content-blog": "3.10.2",
|
|
28
|
+
"@docusaurus/plugin-content-docs": "3.10.2",
|
|
29
|
+
"@docusaurus/plugin-content-pages": "3.10.2",
|
|
30
|
+
"@docusaurus/theme-common": "3.10.2",
|
|
31
|
+
"@docusaurus/theme-translations": "3.10.2",
|
|
32
|
+
"@docusaurus/types": "3.10.2",
|
|
33
|
+
"@docusaurus/utils": "3.10.2",
|
|
34
|
+
"@docusaurus/utils-common": "3.10.2",
|
|
35
|
+
"@docusaurus/utils-validation": "3.10.2",
|
|
36
|
+
"@mdx-js/react": "^3.0.0",
|
|
37
37
|
"clsx": "^2.0.0",
|
|
38
38
|
"copy-text-to-clipboard": "^3.2.0",
|
|
39
39
|
"infima": "0.2.0-alpha.45",
|
|
40
40
|
"lodash": "^4.17.21",
|
|
41
41
|
"nprogress": "^0.2.0",
|
|
42
|
-
"postcss": "^8.5.
|
|
43
|
-
"prism-react-renderer": "^2.
|
|
42
|
+
"postcss": "^8.5.4",
|
|
43
|
+
"prism-react-renderer": "^2.3.0",
|
|
44
44
|
"prismjs": "^1.29.0",
|
|
45
45
|
"react-router-dom": "^5.3.4",
|
|
46
46
|
"rtlcss": "^4.1.0",
|
|
@@ -49,16 +49,17 @@
|
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@types/nprogress": "^0.2.0",
|
|
52
|
-
"@types/prismjs": "^1.26.
|
|
52
|
+
"@types/prismjs": "^1.26.0",
|
|
53
53
|
"@types/rtlcss": "^3.5.1",
|
|
54
|
-
"fs-extra": "^11.
|
|
54
|
+
"fs-extra": "^11.1.1",
|
|
55
|
+
"utility-types": "^3.10.0"
|
|
55
56
|
},
|
|
56
57
|
"peerDependencies": {
|
|
57
|
-
"react": "^19.
|
|
58
|
-
"react-dom": "^19.
|
|
58
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
59
|
+
"react-dom": "^18.0.0 || ^19.0.0"
|
|
59
60
|
},
|
|
60
61
|
"engines": {
|
|
61
|
-
"node": ">=
|
|
62
|
+
"node": ">=20.0"
|
|
62
63
|
},
|
|
63
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "f37f9035584917a97a260b91fc2842cba4f8b94f"
|
|
64
65
|
}
|
package/src/nprogress.css
CHANGED
|
@@ -34,8 +34,7 @@
|
|
|
34
34
|
right: 0;
|
|
35
35
|
width: 100px;
|
|
36
36
|
height: 100%;
|
|
37
|
-
box-shadow:
|
|
38
|
-
0 0 10px var(--docusaurus-progress-bar-color),
|
|
37
|
+
box-shadow: 0 0 10px var(--docusaurus-progress-bar-color),
|
|
39
38
|
0 0 5px var(--docusaurus-progress-bar-color);
|
|
40
39
|
opacity: 1;
|
|
41
40
|
transform: rotate(3deg) translate(0, -4px);
|
package/src/options.ts
CHANGED
|
@@ -150,8 +150,8 @@ const itemWithType = (type: string | RegExp | undefined) => {
|
|
|
150
150
|
type instanceof RegExp
|
|
151
151
|
? Joi.string().required().regex(type)
|
|
152
152
|
: type
|
|
153
|
-
|
|
154
|
-
|
|
153
|
+
? Joi.string().required().equal(type)
|
|
154
|
+
: Joi.string().forbidden();
|
|
155
155
|
return Joi.object({
|
|
156
156
|
type: typeSchema,
|
|
157
157
|
})
|
|
@@ -24,6 +24,5 @@ function getAdmonitionTypeComponent(type: string): ComponentType<Props> {
|
|
|
24
24
|
export default function Admonition(unprocessedProps: Props): ReactNode {
|
|
25
25
|
const props = processAdmonitionProps(unprocessedProps);
|
|
26
26
|
const AdmonitionTypeComponent = getAdmonitionTypeComponent(props.type);
|
|
27
|
-
// eslint-disable-next-line react-hooks/static-components
|
|
28
27
|
return <AdmonitionTypeComponent {...props} />;
|
|
29
28
|
}
|
|
@@ -19,6 +19,7 @@ export default function AnnouncementBarContent(props: Props): ReactNode {
|
|
|
19
19
|
{...props}
|
|
20
20
|
className={clsx(styles.content, props.className)}
|
|
21
21
|
// Developer provided the HTML, so assume it's safe.
|
|
22
|
+
// eslint-disable-next-line react/no-danger
|
|
22
23
|
dangerouslySetInnerHTML={{__html: content}}
|
|
23
24
|
/>
|
|
24
25
|
);
|
|
@@ -15,17 +15,20 @@ import Line from '@theme/CodeBlock/Line';
|
|
|
15
15
|
|
|
16
16
|
import styles from './styles.module.css';
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
18
|
+
// TODO Docusaurus v4: remove useless forwardRef
|
|
19
|
+
const Pre = React.forwardRef<HTMLPreElement, ComponentProps<'pre'>>(
|
|
20
|
+
(props, ref) => {
|
|
21
|
+
return (
|
|
22
|
+
<pre
|
|
23
|
+
ref={ref}
|
|
24
|
+
/* eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex */
|
|
25
|
+
tabIndex={0}
|
|
26
|
+
{...props}
|
|
27
|
+
className={clsx(props.className, styles.codeBlock, 'thin-scrollbar')}
|
|
28
|
+
/>
|
|
29
|
+
);
|
|
30
|
+
},
|
|
31
|
+
);
|
|
29
32
|
|
|
30
33
|
function Code(props: ComponentProps<'code'>) {
|
|
31
34
|
const {metadata} = useCodeBlockContext();
|
|
@@ -7,23 +7,15 @@
|
|
|
7
7
|
|
|
8
8
|
import React, {type ReactNode} from 'react';
|
|
9
9
|
import clsx from 'clsx';
|
|
10
|
-
import Head from '@docusaurus/Head';
|
|
11
10
|
import {
|
|
12
11
|
ThemeClassNames,
|
|
13
12
|
UnlistedBannerTitle,
|
|
14
13
|
UnlistedBannerMessage,
|
|
14
|
+
UnlistedMetadata,
|
|
15
15
|
} from '@docusaurus/theme-common';
|
|
16
16
|
import Admonition from '@theme/Admonition';
|
|
17
17
|
import type {Props} from '@theme/ContentVisibility/Unlisted';
|
|
18
18
|
|
|
19
|
-
function UnlistedMetadata(): ReactNode {
|
|
20
|
-
return (
|
|
21
|
-
<Head>
|
|
22
|
-
<meta name="robots" content="noindex, nofollow" />
|
|
23
|
-
</Head>
|
|
24
|
-
);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
19
|
function UnlistedBanner({className}: Props) {
|
|
28
20
|
return (
|
|
29
21
|
<Admonition
|
|
@@ -5,12 +5,11 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
@media (width
|
|
8
|
+
@media (min-width: 997px) {
|
|
9
9
|
.menu {
|
|
10
10
|
flex-grow: 1;
|
|
11
11
|
padding: 0.5rem;
|
|
12
12
|
}
|
|
13
|
-
|
|
14
13
|
@supports (scrollbar-gutter: stable) {
|
|
15
14
|
.menu {
|
|
16
15
|
padding: 0.5rem 0 0.5rem 0.5rem;
|
|
@@ -280,9 +280,7 @@ function DocSidebarItemCategoryCollapsible({
|
|
|
280
280
|
aria-current={isCurrentPage ? 'page' : undefined}
|
|
281
281
|
role={collapsible && !href ? 'button' : undefined}
|
|
282
282
|
aria-expanded={collapsible && !href ? !collapsed : undefined}
|
|
283
|
-
href={
|
|
284
|
-
collapsible ? (hrefWithSSRFallback ?? '#') : hrefWithSSRFallback
|
|
285
|
-
}
|
|
283
|
+
href={collapsible ? hrefWithSSRFallback ?? '#' : hrefWithSSRFallback}
|
|
286
284
|
{...props}>
|
|
287
285
|
<CategoryLinkLabel label={label} />
|
|
288
286
|
</Link>
|
|
@@ -13,6 +13,7 @@ export default function FooterCopyright({copyright}: Props): ReactNode {
|
|
|
13
13
|
<div
|
|
14
14
|
className="footer__copyright"
|
|
15
15
|
// Developer provided the HTML, so assume it's safe.
|
|
16
|
+
// eslint-disable-next-line react/no-danger
|
|
16
17
|
dangerouslySetInnerHTML={{__html: copyright}}
|
|
17
18
|
/>
|
|
18
19
|
);
|
|
@@ -19,6 +19,7 @@ function ColumnLinkItem({item}: {item: ColumnItemType}) {
|
|
|
19
19
|
<li
|
|
20
20
|
className={clsx('footer__item', item.className)}
|
|
21
21
|
// Developer provided the HTML, so assume it's safe.
|
|
22
|
+
// eslint-disable-next-line react/no-danger
|
|
22
23
|
dangerouslySetInnerHTML={{__html: item.html}}
|
|
23
24
|
/>
|
|
24
25
|
) : (
|
|
@@ -19,6 +19,7 @@ function SimpleLinkItem({item}: {item: Props['links'][number]}) {
|
|
|
19
19
|
<span
|
|
20
20
|
className={clsx('footer__link-item', item.className)}
|
|
21
21
|
// Developer provided the HTML, so assume it's safe.
|
|
22
|
+
// eslint-disable-next-line react/no-danger
|
|
22
23
|
dangerouslySetInnerHTML={{__html: item.html}}
|
|
23
24
|
/>
|
|
24
25
|
) : (
|
|
@@ -5,12 +5,24 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import React, {type ReactNode} from 'react';
|
|
8
|
+
import React, {version, type ReactNode} from 'react';
|
|
9
9
|
import clsx from 'clsx';
|
|
10
10
|
import {useNavbarSecondaryMenu} from '@docusaurus/theme-common/internal';
|
|
11
11
|
import {ThemeClassNames} from '@docusaurus/theme-common';
|
|
12
12
|
import type {Props} from '@theme/Navbar/MobileSidebar/Layout';
|
|
13
13
|
|
|
14
|
+
// TODO Docusaurus v4: remove temporary inert workaround
|
|
15
|
+
// See https://github.com/facebook/react/issues/17157
|
|
16
|
+
// See https://github.com/radix-ui/themes/pull/509
|
|
17
|
+
function inertProps(inert: boolean) {
|
|
18
|
+
const isBeforeReact19 = parseInt(version!.split('.')[0]!, 10) < 19;
|
|
19
|
+
if (isBeforeReact19) {
|
|
20
|
+
// TODO Docusaurus v4: remove temporary inert workaround
|
|
21
|
+
return {inert: inert ? '' : undefined} as unknown as {inert: boolean};
|
|
22
|
+
}
|
|
23
|
+
return {inert};
|
|
24
|
+
}
|
|
25
|
+
|
|
14
26
|
function NavbarMobileSidebarPanel({
|
|
15
27
|
children,
|
|
16
28
|
inert,
|
|
@@ -24,7 +36,7 @@ function NavbarMobileSidebarPanel({
|
|
|
24
36
|
ThemeClassNames.layout.navbar.mobileSidebar.panel,
|
|
25
37
|
'navbar-sidebar__item menu',
|
|
26
38
|
)}
|
|
27
|
-
|
|
39
|
+
{...inertProps(inert)}>
|
|
28
40
|
{children}
|
|
29
41
|
</div>
|
|
30
42
|
);
|
|
@@ -13,14 +13,14 @@ See https://github.com/facebook/docusaurus/pull/9385
|
|
|
13
13
|
display: none;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
@media (width
|
|
16
|
+
@media (max-width: 996px) {
|
|
17
17
|
.navbarSearchContainer {
|
|
18
18
|
position: absolute;
|
|
19
19
|
right: var(--ifm-navbar-padding-horizontal);
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
@media (width
|
|
23
|
+
@media (min-width: 997px) {
|
|
24
24
|
.navbarSearchContainer {
|
|
25
25
|
padding: 0 var(--ifm-navbar-item-padding-horizontal);
|
|
26
26
|
}
|
|
@@ -29,10 +29,10 @@ export default function prismIncludeLanguages(
|
|
|
29
29
|
|
|
30
30
|
additionalLanguages.forEach((lang) => {
|
|
31
31
|
if (lang === 'php') {
|
|
32
|
-
// eslint-disable-next-line
|
|
32
|
+
// eslint-disable-next-line global-require
|
|
33
33
|
require('prismjs/components/prism-markup-templating.js');
|
|
34
34
|
}
|
|
35
|
-
// eslint-disable-next-line
|
|
35
|
+
// eslint-disable-next-line global-require, import/no-dynamic-require
|
|
36
36
|
require(`prismjs/components/prism-${lang}`);
|
|
37
37
|
});
|
|
38
38
|
|
package/src/theme-classic.d.ts
CHANGED
|
@@ -499,7 +499,8 @@ declare module '@theme/CodeBlock/Buttons/WordWrapButton' {
|
|
|
499
499
|
}
|
|
500
500
|
|
|
501
501
|
declare module '@theme/CodeBlock/Container' {
|
|
502
|
-
import type {ReactNode
|
|
502
|
+
import type {ReactNode} from 'react';
|
|
503
|
+
import type {ComponentProps} from 'react';
|
|
503
504
|
|
|
504
505
|
export default function CodeBlockContainer<T extends 'div' | 'pre'>({
|
|
505
506
|
as: As,
|
|
@@ -1324,6 +1325,9 @@ declare module '@theme/NavbarItem/DefaultNavbarItem' {
|
|
|
1324
1325
|
readonly position?: 'left' | 'right';
|
|
1325
1326
|
};
|
|
1326
1327
|
|
|
1328
|
+
// TODO Docusaurus v4, remove old type name
|
|
1329
|
+
export type DesktopOrMobileNavBarItemProps = DefaultNavbarItemProps;
|
|
1330
|
+
|
|
1327
1331
|
export interface Props extends DefaultNavbarItemProps {
|
|
1328
1332
|
readonly mobile?: boolean;
|
|
1329
1333
|
}
|
|
@@ -1377,6 +1381,9 @@ declare module '@theme/NavbarItem/DropdownNavbarItem' {
|
|
|
1377
1381
|
readonly className?: string;
|
|
1378
1382
|
};
|
|
1379
1383
|
|
|
1384
|
+
// TODO Docusaurus v4, remove old type name
|
|
1385
|
+
export type DesktopOrMobileNavBarItemProps = DropdownNavbarItemProps;
|
|
1386
|
+
|
|
1380
1387
|
export interface Props extends DropdownNavbarItemProps {
|
|
1381
1388
|
readonly mobile?: boolean;
|
|
1382
1389
|
}
|