@docusaurus/theme-mermaid 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/Mermaid';
8
- export default function Mermaid(props: Props): JSX.Element;
9
+ export default function Mermaid(props: Props): ReactNode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docusaurus/theme-mermaid",
3
- "version": "3.6.3",
3
+ "version": "3.7.0",
4
4
  "description": "Mermaid components for Docusaurus.",
5
5
  "main": "lib/index.js",
6
6
  "types": "src/theme-mermaid.d.ts",
@@ -33,11 +33,11 @@
33
33
  "copy:watch": "node ../../admin/scripts/copyUntypedFiles.js --watch"
34
34
  },
35
35
  "dependencies": {
36
- "@docusaurus/core": "3.6.3",
37
- "@docusaurus/module-type-aliases": "3.6.3",
38
- "@docusaurus/theme-common": "3.6.3",
39
- "@docusaurus/types": "3.6.3",
40
- "@docusaurus/utils-validation": "3.6.3",
36
+ "@docusaurus/core": "3.7.0",
37
+ "@docusaurus/module-type-aliases": "3.7.0",
38
+ "@docusaurus/theme-common": "3.7.0",
39
+ "@docusaurus/types": "3.7.0",
40
+ "@docusaurus/utils-validation": "3.7.0",
41
41
  "mermaid": ">=10.4",
42
42
  "tslib": "^2.6.0"
43
43
  },
@@ -45,11 +45,11 @@
45
45
  "react-test-renderer": "^18.0.0"
46
46
  },
47
47
  "peerDependencies": {
48
- "react": "^18.0.0",
49
- "react-dom": "^18.0.0"
48
+ "react": "^18.0.0 || ^19.0.0",
49
+ "react-dom": "^18.0.0 || ^19.0.0"
50
50
  },
51
51
  "engines": {
52
52
  "node": ">=18.0"
53
53
  },
54
- "gitHead": "9c0e19c669ffcbc0972bfd8527e8b93f1f74e7d8"
54
+ "gitHead": "dd59750c16fe6908a26f18806a54d4c3dbe6db43"
55
55
  }
@@ -5,8 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- import React, {useEffect, useRef} from 'react';
9
- import type {ReactNode} from 'react';
8
+ import React, {useEffect, useRef, type ReactNode} from 'react';
10
9
  import ErrorBoundary from '@docusaurus/ErrorBoundary';
11
10
  import {ErrorBoundaryErrorMessageFallback} from '@docusaurus/theme-common';
12
11
  import {
@@ -22,7 +21,7 @@ function MermaidRenderResult({
22
21
  renderResult,
23
22
  }: {
24
23
  renderResult: RenderResult;
25
- }): JSX.Element {
24
+ }): ReactNode {
26
25
  const ref = useRef<HTMLDivElement>(null);
27
26
 
28
27
  useEffect(() => {
@@ -48,7 +47,7 @@ function MermaidRenderer({value}: Props): ReactNode {
48
47
  return <MermaidRenderResult renderResult={renderResult} />;
49
48
  }
50
49
 
51
- export default function Mermaid(props: Props): JSX.Element {
50
+ export default function Mermaid(props: Props): ReactNode {
52
51
  return (
53
52
  <ErrorBoundary
54
53
  fallback={(params) => <ErrorBoundaryErrorMessageFallback {...params} />}>
@@ -27,9 +27,11 @@ declare module '@docusaurus/theme-mermaid' {
27
27
  }
28
28
 
29
29
  declare module '@theme/Mermaid' {
30
+ import {type ReactNode} from 'react';
31
+
30
32
  export interface Props {
31
33
  value: string;
32
34
  }
33
35
 
34
- export default function Mermaid(props: Props): JSX.Element;
36
+ export default function Mermaid(props: Props): ReactNode;
35
37
  }