@docusaurus/theme-live-codeblock 3.6.3 → 3.7.0
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.
|
@@ -4,5 +4,6 @@
|
|
|
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 { type ReactNode } from 'react';
|
|
7
8
|
import type { Props } from '@theme/Playground';
|
|
8
|
-
export default function Playground({ children, transformCode, ...props }: Props):
|
|
9
|
+
export default function Playground({ children, transformCode, ...props }: Props): ReactNode;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/theme-live-codeblock",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.7.0",
|
|
4
4
|
"description": "Docusaurus live code block component.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "src/theme-live-codeblock.d.ts",
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
},
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@docusaurus/core": "3.
|
|
27
|
-
"@docusaurus/theme-common": "3.
|
|
28
|
-
"@docusaurus/theme-translations": "3.
|
|
29
|
-
"@docusaurus/utils-validation": "3.
|
|
26
|
+
"@docusaurus/core": "3.7.0",
|
|
27
|
+
"@docusaurus/theme-common": "3.7.0",
|
|
28
|
+
"@docusaurus/theme-translations": "3.7.0",
|
|
29
|
+
"@docusaurus/utils-validation": "3.7.0",
|
|
30
30
|
"@philpl/buble": "^0.19.7",
|
|
31
31
|
"clsx": "^2.0.0",
|
|
32
32
|
"fs-extra": "^11.1.1",
|
|
@@ -34,15 +34,15 @@
|
|
|
34
34
|
"tslib": "^2.6.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@docusaurus/types": "3.
|
|
37
|
+
"@docusaurus/types": "3.7.0",
|
|
38
38
|
"@types/buble": "^0.20.1"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"react": "^18.0.0",
|
|
42
|
-
"react-dom": "^18.0.0"
|
|
41
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
42
|
+
"react-dom": "^18.0.0 || ^19.0.0"
|
|
43
43
|
},
|
|
44
44
|
"engines": {
|
|
45
45
|
"node": ">=18.0"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "dd59750c16fe6908a26f18806a54d4c3dbe6db43"
|
|
48
48
|
}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import React from 'react';
|
|
8
|
+
import React, {type ReactNode} from 'react';
|
|
9
9
|
import clsx from 'clsx';
|
|
10
10
|
import useIsBrowser from '@docusaurus/useIsBrowser';
|
|
11
11
|
import {LiveProvider, LiveEditor, LiveError, LivePreview} from 'react-live';
|
|
@@ -23,7 +23,7 @@ import type {ThemeConfig} from '@docusaurus/theme-live-codeblock';
|
|
|
23
23
|
|
|
24
24
|
import styles from './styles.module.css';
|
|
25
25
|
|
|
26
|
-
function Header({children}: {children:
|
|
26
|
+
function Header({children}: {children: ReactNode}) {
|
|
27
27
|
return <div className={clsx(styles.playgroundHeader)}>{children}</div>;
|
|
28
28
|
}
|
|
29
29
|
|
|
@@ -106,7 +106,7 @@ export default function Playground({
|
|
|
106
106
|
children,
|
|
107
107
|
transformCode,
|
|
108
108
|
...props
|
|
109
|
-
}: Props):
|
|
109
|
+
}: Props): ReactNode {
|
|
110
110
|
const {
|
|
111
111
|
siteConfig: {themeConfig},
|
|
112
112
|
} = useDocusaurusContext();
|
|
@@ -17,6 +17,7 @@ declare module '@docusaurus/theme-live-codeblock' {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
declare module '@theme/Playground' {
|
|
20
|
+
import type {ReactNode} from 'react';
|
|
20
21
|
import type {Props as BaseProps} from '@theme/CodeBlock';
|
|
21
22
|
import type {LiveProvider} from 'react-live';
|
|
22
23
|
|
|
@@ -27,7 +28,7 @@ declare module '@theme/Playground' {
|
|
|
27
28
|
// Allow empty live playgrounds
|
|
28
29
|
children?: string;
|
|
29
30
|
}
|
|
30
|
-
export default function Playground(props: LiveProviderProps):
|
|
31
|
+
export default function Playground(props: LiveProviderProps): ReactNode;
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
declare module '@theme/ReactLiveScope' {
|