@docusaurus/theme-classic 3.9.2-canary-6465 → 3.9.2-canary-6499
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.js +7 -0
- package/lib/theme/Admonition/Layout/index.js +5 -4
- package/lib/theme/Navbar/MobileSidebar/Layout/index.js +1 -0
- package/package.json +15 -16
- package/src/getSwizzleConfig.ts +7 -0
- package/src/theme/Admonition/Layout/index.tsx +6 -4
- package/src/theme/Navbar/MobileSidebar/Layout/index.tsx +2 -1
- package/src/theme-classic.d.ts +4 -2
package/lib/getSwizzleConfig.js
CHANGED
|
@@ -343,6 +343,13 @@ function getSwizzleConfig() {
|
|
|
343
343
|
},
|
|
344
344
|
description: 'The component used to render <img> tags and Markdown images in MDX',
|
|
345
345
|
},
|
|
346
|
+
'MDXComponents/Li': {
|
|
347
|
+
actions: {
|
|
348
|
+
eject: 'safe',
|
|
349
|
+
wrap: 'safe',
|
|
350
|
+
},
|
|
351
|
+
description: 'The component used to render <li> tags in MDX',
|
|
352
|
+
},
|
|
346
353
|
'MDXComponents/Pre': {
|
|
347
354
|
actions: {
|
|
348
355
|
eject: 'safe',
|
|
@@ -8,7 +8,7 @@ import React from 'react';
|
|
|
8
8
|
import clsx from 'clsx';
|
|
9
9
|
import {ThemeClassNames} from '@docusaurus/theme-common';
|
|
10
10
|
import styles from './styles.module.css';
|
|
11
|
-
function AdmonitionContainer({type, className, children}) {
|
|
11
|
+
function AdmonitionContainer({type, className, children, id}) {
|
|
12
12
|
return (
|
|
13
13
|
<div
|
|
14
14
|
className={clsx(
|
|
@@ -16,7 +16,8 @@ function AdmonitionContainer({type, className, children}) {
|
|
|
16
16
|
ThemeClassNames.common.admonitionType(type),
|
|
17
17
|
styles.admonition,
|
|
18
18
|
className,
|
|
19
|
-
)}
|
|
19
|
+
)}
|
|
20
|
+
id={id}>
|
|
20
21
|
{children}
|
|
21
22
|
</div>
|
|
22
23
|
);
|
|
@@ -35,9 +36,9 @@ function AdmonitionContent({children}) {
|
|
|
35
36
|
) : null;
|
|
36
37
|
}
|
|
37
38
|
export default function AdmonitionLayout(props) {
|
|
38
|
-
const {type, icon, title, children, className} = props;
|
|
39
|
+
const {type, icon, title, children, className, id} = props;
|
|
39
40
|
return (
|
|
40
|
-
<AdmonitionContainer type={type} className={className}>
|
|
41
|
+
<AdmonitionContainer type={type} className={className} id={id}>
|
|
41
42
|
{title || icon ? <AdmonitionHeading title={title} icon={icon} /> : null}
|
|
42
43
|
<AdmonitionContent>{children}</AdmonitionContent>
|
|
43
44
|
</AdmonitionContainer>
|
|
@@ -14,6 +14,7 @@ import {ThemeClassNames} from '@docusaurus/theme-common';
|
|
|
14
14
|
function inertProps(inert) {
|
|
15
15
|
const isBeforeReact19 = parseInt(version.split('.')[0], 10) < 19;
|
|
16
16
|
if (isBeforeReact19) {
|
|
17
|
+
// TODO Docusaurus v4: remove temporary inert workaround
|
|
17
18
|
return {inert: inert ? '' : undefined};
|
|
18
19
|
}
|
|
19
20
|
return {inert};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/theme-classic",
|
|
3
|
-
"version": "3.9.2-canary-
|
|
3
|
+
"version": "3.9.2-canary-6499",
|
|
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.9.2-canary-
|
|
24
|
-
"@docusaurus/logger": "3.9.2-canary-
|
|
25
|
-
"@docusaurus/mdx-loader": "3.9.2-canary-
|
|
26
|
-
"@docusaurus/module-type-aliases": "3.9.2-canary-
|
|
27
|
-
"@docusaurus/plugin-content-blog": "3.9.2-canary-
|
|
28
|
-
"@docusaurus/plugin-content-docs": "3.9.2-canary-
|
|
29
|
-
"@docusaurus/plugin-content-pages": "3.9.2-canary-
|
|
30
|
-
"@docusaurus/theme-common": "3.9.2-canary-
|
|
31
|
-
"@docusaurus/theme-translations": "3.9.2-canary-
|
|
32
|
-
"@docusaurus/types": "3.9.2-canary-
|
|
33
|
-
"@docusaurus/utils": "3.9.2-canary-
|
|
34
|
-
"@docusaurus/utils-common": "3.9.2-canary-
|
|
35
|
-
"@docusaurus/utils-validation": "3.9.2-canary-
|
|
23
|
+
"@docusaurus/core": "3.9.2-canary-6499",
|
|
24
|
+
"@docusaurus/logger": "3.9.2-canary-6499",
|
|
25
|
+
"@docusaurus/mdx-loader": "3.9.2-canary-6499",
|
|
26
|
+
"@docusaurus/module-type-aliases": "3.9.2-canary-6499",
|
|
27
|
+
"@docusaurus/plugin-content-blog": "3.9.2-canary-6499",
|
|
28
|
+
"@docusaurus/plugin-content-docs": "3.9.2-canary-6499",
|
|
29
|
+
"@docusaurus/plugin-content-pages": "3.9.2-canary-6499",
|
|
30
|
+
"@docusaurus/theme-common": "3.9.2-canary-6499",
|
|
31
|
+
"@docusaurus/theme-translations": "3.9.2-canary-6499",
|
|
32
|
+
"@docusaurus/types": "3.9.2-canary-6499",
|
|
33
|
+
"@docusaurus/utils": "3.9.2-canary-6499",
|
|
34
|
+
"@docusaurus/utils-common": "3.9.2-canary-6499",
|
|
35
|
+
"@docusaurus/utils-validation": "3.9.2-canary-6499",
|
|
36
36
|
"@mdx-js/react": "^3.0.0",
|
|
37
37
|
"clsx": "^2.0.0",
|
|
38
38
|
"infima": "0.2.0-alpha.45",
|
|
@@ -51,7 +51,6 @@
|
|
|
51
51
|
"@types/prismjs": "^1.26.0",
|
|
52
52
|
"@types/rtlcss": "^3.5.1",
|
|
53
53
|
"fs-extra": "^11.1.1",
|
|
54
|
-
"react-test-renderer": "^18.0.0",
|
|
55
54
|
"utility-types": "^3.10.0"
|
|
56
55
|
},
|
|
57
56
|
"peerDependencies": {
|
|
@@ -61,5 +60,5 @@
|
|
|
61
60
|
"engines": {
|
|
62
61
|
"node": ">=20.0"
|
|
63
62
|
},
|
|
64
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "5ad8c2b9301411f0be8fabe95315c6a4ac7a7af4"
|
|
65
64
|
}
|
package/src/getSwizzleConfig.ts
CHANGED
|
@@ -368,6 +368,13 @@ export default function getSwizzleConfig(): SwizzleConfig {
|
|
|
368
368
|
description:
|
|
369
369
|
'The component used to render <img> tags and Markdown images in MDX',
|
|
370
370
|
},
|
|
371
|
+
'MDXComponents/Li': {
|
|
372
|
+
actions: {
|
|
373
|
+
eject: 'safe',
|
|
374
|
+
wrap: 'safe',
|
|
375
|
+
},
|
|
376
|
+
description: 'The component used to render <li> tags in MDX',
|
|
377
|
+
},
|
|
371
378
|
'MDXComponents/Pre': {
|
|
372
379
|
actions: {
|
|
373
380
|
eject: 'safe',
|
|
@@ -17,7 +17,8 @@ function AdmonitionContainer({
|
|
|
17
17
|
type,
|
|
18
18
|
className,
|
|
19
19
|
children,
|
|
20
|
-
|
|
20
|
+
id,
|
|
21
|
+
}: Pick<Props, 'type' | 'className' | 'id'> & {children: ReactNode}) {
|
|
21
22
|
return (
|
|
22
23
|
<div
|
|
23
24
|
className={clsx(
|
|
@@ -25,7 +26,8 @@ function AdmonitionContainer({
|
|
|
25
26
|
ThemeClassNames.common.admonitionType(type),
|
|
26
27
|
styles.admonition,
|
|
27
28
|
className,
|
|
28
|
-
)}
|
|
29
|
+
)}
|
|
30
|
+
id={id}>
|
|
29
31
|
{children}
|
|
30
32
|
</div>
|
|
31
33
|
);
|
|
@@ -47,9 +49,9 @@ function AdmonitionContent({children}: Pick<Props, 'children'>) {
|
|
|
47
49
|
}
|
|
48
50
|
|
|
49
51
|
export default function AdmonitionLayout(props: Props): ReactNode {
|
|
50
|
-
const {type, icon, title, children, className} = props;
|
|
52
|
+
const {type, icon, title, children, className, id} = props;
|
|
51
53
|
return (
|
|
52
|
-
<AdmonitionContainer type={type} className={className}>
|
|
54
|
+
<AdmonitionContainer type={type} className={className} id={id}>
|
|
53
55
|
{title || icon ? <AdmonitionHeading title={title} icon={icon} /> : null}
|
|
54
56
|
<AdmonitionContent>{children}</AdmonitionContent>
|
|
55
57
|
</AdmonitionContainer>
|
|
@@ -17,7 +17,8 @@ import type {Props} from '@theme/Navbar/MobileSidebar/Layout';
|
|
|
17
17
|
function inertProps(inert: boolean) {
|
|
18
18
|
const isBeforeReact19 = parseInt(version!.split('.')[0]!, 10) < 19;
|
|
19
19
|
if (isBeforeReact19) {
|
|
20
|
-
|
|
20
|
+
// TODO Docusaurus v4: remove temporary inert workaround
|
|
21
|
+
return {inert: inert ? '' : undefined} as unknown as {inert: boolean};
|
|
21
22
|
}
|
|
22
23
|
return {inert};
|
|
23
24
|
}
|
package/src/theme-classic.d.ts
CHANGED
|
@@ -48,6 +48,7 @@ declare module '@theme/Admonition' {
|
|
|
48
48
|
readonly icon?: ReactNode;
|
|
49
49
|
readonly title?: ReactNode;
|
|
50
50
|
readonly className?: string;
|
|
51
|
+
readonly id?: string;
|
|
51
52
|
}
|
|
52
53
|
|
|
53
54
|
export default function Admonition(props: Props): ReactNode;
|
|
@@ -123,6 +124,7 @@ declare module '@theme/Admonition/Layout' {
|
|
|
123
124
|
readonly icon?: ReactNode;
|
|
124
125
|
readonly title?: ReactNode;
|
|
125
126
|
readonly className?: string;
|
|
127
|
+
readonly id?: string;
|
|
126
128
|
}
|
|
127
129
|
export default function AdmonitionLayout(props: Props): ReactNode;
|
|
128
130
|
}
|
|
@@ -1743,11 +1745,11 @@ declare module '@theme/Icon/LightMode' {
|
|
|
1743
1745
|
}
|
|
1744
1746
|
|
|
1745
1747
|
declare module '@theme/Icon/SystemColorMode' {
|
|
1746
|
-
import type {ComponentProps} from 'react';
|
|
1748
|
+
import type {ComponentProps, ReactNode} from 'react';
|
|
1747
1749
|
|
|
1748
1750
|
export interface Props extends ComponentProps<'svg'> {}
|
|
1749
1751
|
|
|
1750
|
-
export default function IconSystemColorMode(props: Props):
|
|
1752
|
+
export default function IconSystemColorMode(props: Props): ReactNode;
|
|
1751
1753
|
}
|
|
1752
1754
|
|
|
1753
1755
|
declare module '@theme/Icon/Menu' {
|