@rspress/plugin-api-docgen 1.9.2 → 1.10.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.
package/dist/index.d.ts
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@rspress/plugin-api-docgen",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.10.0",
|
4
4
|
"description": "A plugin for rspress to generate api doc.",
|
5
5
|
"bugs": "https://github.com/web-infra-dev/rspress/issues",
|
6
6
|
"repository": {
|
@@ -20,7 +20,7 @@
|
|
20
20
|
"dist/"
|
21
21
|
],
|
22
22
|
"dependencies": {
|
23
|
-
"@modern-js/utils": "2.
|
23
|
+
"@modern-js/utils": "2.46.0",
|
24
24
|
"react-markdown": "8.0.7",
|
25
25
|
"react-docgen-typescript": "2.2.2",
|
26
26
|
"documentation": "14.0.2",
|
@@ -32,14 +32,14 @@
|
|
32
32
|
"@types/react": "^18",
|
33
33
|
"@types/react-dom": "^18",
|
34
34
|
"mdast-util-mdxjs-esm": "^1.3.0",
|
35
|
-
"
|
35
|
+
"@biomejs/biome": "1.5.2",
|
36
36
|
"react": "^18",
|
37
37
|
"react-dom": "^18",
|
38
38
|
"react-router-dom": "^6.8.1",
|
39
39
|
"typescript": "^5",
|
40
40
|
"unified": "^10.1.2",
|
41
41
|
"unist-util-visit": "^4.1.1",
|
42
|
-
"@rspress/shared": "1.
|
42
|
+
"@rspress/shared": "1.10.0"
|
43
43
|
},
|
44
44
|
"peerDependencies": {
|
45
45
|
"react": ">=17",
|
@@ -10,7 +10,9 @@ export default (props: { moduleName: string }) => {
|
|
10
10
|
const { moduleName } = props;
|
11
11
|
// some api doc have two languages.
|
12
12
|
const apiDocMap = page.apiDocMap as Record<string, string>;
|
13
|
-
|
13
|
+
// avoid error when no page data
|
14
|
+
const apiDoc =
|
15
|
+
apiDocMap?.[moduleName] || apiDocMap?.[`${moduleName}-${lang}`];
|
14
16
|
return (
|
15
17
|
<ReactMarkdown
|
16
18
|
remarkPlugins={[[remarkGfm]]}
|