@docusaurus/theme-classic 3.10.1-canary-6650 → 3.10.1-canary-6652
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.
|
@@ -11,18 +11,17 @@ 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
|
-
|
|
15
|
-
const Pre = React.forwardRef(function Pre(props, ref) {
|
|
14
|
+
function Pre({className, ref, ...props}) {
|
|
16
15
|
return (
|
|
17
16
|
<pre
|
|
18
17
|
ref={ref}
|
|
19
18
|
/* eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex */
|
|
20
19
|
tabIndex={0}
|
|
21
20
|
{...props}
|
|
22
|
-
className={clsx(
|
|
21
|
+
className={clsx(className, styles.codeBlock, 'thin-scrollbar')}
|
|
23
22
|
/>
|
|
24
23
|
);
|
|
25
|
-
}
|
|
24
|
+
}
|
|
26
25
|
function Code(props) {
|
|
27
26
|
const {metadata} = useCodeBlockContext();
|
|
28
27
|
return (
|
|
@@ -4,21 +4,10 @@
|
|
|
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
|
|
7
|
+
import React 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
|
-
}
|
|
22
11
|
function NavbarMobileSidebarPanel({children, inert}) {
|
|
23
12
|
return (
|
|
24
13
|
<div
|
|
@@ -26,7 +15,7 @@ function NavbarMobileSidebarPanel({children, inert}) {
|
|
|
26
15
|
ThemeClassNames.layout.navbar.mobileSidebar.panel,
|
|
27
16
|
'navbar-sidebar__item menu',
|
|
28
17
|
)}
|
|
29
|
-
{
|
|
18
|
+
inert={inert}>
|
|
30
19
|
{children}
|
|
31
20
|
</div>
|
|
32
21
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/theme-classic",
|
|
3
|
-
"version": "3.10.1-canary-
|
|
3
|
+
"version": "3.10.1-canary-6652",
|
|
4
4
|
"description": "Classic theme for Docusaurus",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "src/theme-classic.d.ts",
|
|
@@ -20,19 +20,19 @@
|
|
|
20
20
|
"copy:watch": "node ../../admin/scripts/copyUntypedFiles.js --watch"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@docusaurus/core": "3.10.1-canary-
|
|
24
|
-
"@docusaurus/logger": "3.10.1-canary-
|
|
25
|
-
"@docusaurus/mdx-loader": "3.10.1-canary-
|
|
26
|
-
"@docusaurus/module-type-aliases": "3.10.1-canary-
|
|
27
|
-
"@docusaurus/plugin-content-blog": "3.10.1-canary-
|
|
28
|
-
"@docusaurus/plugin-content-docs": "3.10.1-canary-
|
|
29
|
-
"@docusaurus/plugin-content-pages": "3.10.1-canary-
|
|
30
|
-
"@docusaurus/theme-common": "3.10.1-canary-
|
|
31
|
-
"@docusaurus/theme-translations": "3.10.1-canary-
|
|
32
|
-
"@docusaurus/types": "3.10.1-canary-
|
|
33
|
-
"@docusaurus/utils": "3.10.1-canary-
|
|
34
|
-
"@docusaurus/utils-common": "3.10.1-canary-
|
|
35
|
-
"@docusaurus/utils-validation": "3.10.1-canary-
|
|
23
|
+
"@docusaurus/core": "3.10.1-canary-6652",
|
|
24
|
+
"@docusaurus/logger": "3.10.1-canary-6652",
|
|
25
|
+
"@docusaurus/mdx-loader": "3.10.1-canary-6652",
|
|
26
|
+
"@docusaurus/module-type-aliases": "3.10.1-canary-6652",
|
|
27
|
+
"@docusaurus/plugin-content-blog": "3.10.1-canary-6652",
|
|
28
|
+
"@docusaurus/plugin-content-docs": "3.10.1-canary-6652",
|
|
29
|
+
"@docusaurus/plugin-content-pages": "3.10.1-canary-6652",
|
|
30
|
+
"@docusaurus/theme-common": "3.10.1-canary-6652",
|
|
31
|
+
"@docusaurus/theme-translations": "3.10.1-canary-6652",
|
|
32
|
+
"@docusaurus/types": "3.10.1-canary-6652",
|
|
33
|
+
"@docusaurus/utils": "3.10.1-canary-6652",
|
|
34
|
+
"@docusaurus/utils-common": "3.10.1-canary-6652",
|
|
35
|
+
"@docusaurus/utils-validation": "3.10.1-canary-6652",
|
|
36
36
|
"@mdx-js/react": "^3.1.1",
|
|
37
37
|
"clsx": "^2.0.0",
|
|
38
38
|
"copy-text-to-clipboard": "^3.2.0",
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"engines": {
|
|
61
61
|
"node": ">=24.14"
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "245bbe936b433afe1952ad71ab1e9a1b4e519cc8"
|
|
64
64
|
}
|
|
@@ -15,20 +15,17 @@ 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
|
-
|
|
29
|
-
);
|
|
30
|
-
},
|
|
31
|
-
);
|
|
18
|
+
function Pre({className, ref, ...props}: ComponentProps<'pre'>) {
|
|
19
|
+
return (
|
|
20
|
+
<pre
|
|
21
|
+
ref={ref}
|
|
22
|
+
/* eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex */
|
|
23
|
+
tabIndex={0}
|
|
24
|
+
{...props}
|
|
25
|
+
className={clsx(className, styles.codeBlock, 'thin-scrollbar')}
|
|
26
|
+
/>
|
|
27
|
+
);
|
|
28
|
+
}
|
|
32
29
|
|
|
33
30
|
function Code(props: ComponentProps<'code'>) {
|
|
34
31
|
const {metadata} = useCodeBlockContext();
|
|
@@ -5,24 +5,12 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import React, {
|
|
8
|
+
import React, {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
|
-
|
|
26
14
|
function NavbarMobileSidebarPanel({
|
|
27
15
|
children,
|
|
28
16
|
inert,
|
|
@@ -36,7 +24,7 @@ function NavbarMobileSidebarPanel({
|
|
|
36
24
|
ThemeClassNames.layout.navbar.mobileSidebar.panel,
|
|
37
25
|
'navbar-sidebar__item menu',
|
|
38
26
|
)}
|
|
39
|
-
{
|
|
27
|
+
inert={inert}>
|
|
40
28
|
{children}
|
|
41
29
|
</div>
|
|
42
30
|
);
|
package/src/theme-classic.d.ts
CHANGED
|
@@ -1324,9 +1324,6 @@ declare module '@theme/NavbarItem/DefaultNavbarItem' {
|
|
|
1324
1324
|
readonly position?: 'left' | 'right';
|
|
1325
1325
|
};
|
|
1326
1326
|
|
|
1327
|
-
// TODO Docusaurus v4, remove old type name
|
|
1328
|
-
export type DesktopOrMobileNavBarItemProps = DefaultNavbarItemProps;
|
|
1329
|
-
|
|
1330
1327
|
export interface Props extends DefaultNavbarItemProps {
|
|
1331
1328
|
readonly mobile?: boolean;
|
|
1332
1329
|
}
|
|
@@ -1380,9 +1377,6 @@ declare module '@theme/NavbarItem/DropdownNavbarItem' {
|
|
|
1380
1377
|
readonly className?: string;
|
|
1381
1378
|
};
|
|
1382
1379
|
|
|
1383
|
-
// TODO Docusaurus v4, remove old type name
|
|
1384
|
-
export type DesktopOrMobileNavBarItemProps = DropdownNavbarItemProps;
|
|
1385
|
-
|
|
1386
1380
|
export interface Props extends DropdownNavbarItemProps {
|
|
1387
1381
|
readonly mobile?: boolean;
|
|
1388
1382
|
}
|