@rspress/plugin-api-docgen 2.0.0-alpha.7 → 2.0.0-alpha.9

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.js CHANGED
@@ -311,8 +311,10 @@ var __webpack_exports__ = {};
311
311
  };
312
312
  }
313
313
  })();
314
- var __webpack_export_target__ = exports;
315
- for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
316
- if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
314
+ exports.pluginApiDocgen = __webpack_exports__.pluginApiDocgen;
315
+ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
316
+ "pluginApiDocgen"
317
+ ].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
318
+ Object.defineProperty(exports, '__esModule', {
317
319
  value: true
318
320
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspress/plugin-api-docgen",
3
- "version": "2.0.0-alpha.7",
3
+ "version": "2.0.0-alpha.9",
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": {
@@ -21,26 +21,26 @@
21
21
  "chokidar": "^3.6.0",
22
22
  "documentation": "14.0.3",
23
23
  "react-docgen-typescript": "2.2.2",
24
- "react-markdown": "8.0.7",
25
- "remark-gfm": "3.0.1",
26
- "@rspress/shared": "2.0.0-alpha.7"
24
+ "react-markdown": "^10.1.0",
25
+ "remark-gfm": "^4.0.1",
26
+ "@rspress/shared": "2.0.0-alpha.9"
27
27
  },
28
28
  "devDependencies": {
29
- "@microsoft/api-extractor": "^7.52.1",
30
- "@rslib/core": "0.5.5",
31
- "@types/mdast": "^3.0.15",
29
+ "@microsoft/api-extractor": "^7.52.3",
30
+ "@rslib/core": "0.6.1",
31
+ "@types/mdast": "^4.0.4",
32
32
  "@types/node": "^18.11.17",
33
- "@types/react": "^18.3.19",
34
- "@types/react-dom": "^18.3.5",
33
+ "@types/react": "^18.3.20",
34
+ "@types/react-dom": "^18.3.6",
35
35
  "react": "^18.3.1",
36
36
  "react-dom": "^18.3.1",
37
37
  "react-router-dom": "^6.29.0",
38
38
  "typescript": "^5.8.2",
39
- "unified": "^10.1.2",
40
- "unist-util-visit": "^4.1.2"
39
+ "unified": "^11.0.5",
40
+ "unist-util-visit": "^5.0.0"
41
41
  },
42
42
  "peerDependencies": {
43
- "@rspress/core": "^2.0.0-alpha.7",
43
+ "@rspress/core": "^2.0.0-alpha.9",
44
44
  "react": ">=17.0.0",
45
45
  "react-router-dom": "^6.8.1",
46
46
  "typescript": "^5.8.2"
@@ -16,13 +16,16 @@ export default (props: { moduleName: string }) => {
16
16
  const apiDoc =
17
17
  apiDocMap?.[moduleName] || apiDocMap?.[`${moduleName}-${lang}`] || '';
18
18
  return (
19
- <ReactMarkdown
20
- remarkPlugins={[[remarkGfm]]}
21
- components={getCustomMDXComponent() as Record<string, React.ElementType>}
22
- skipHtml={true}
23
- className="rspress-plugin-api-docgen"
24
- >
25
- {apiDoc}
26
- </ReactMarkdown>
19
+ <div className="rspress-plugin-api-docgen">
20
+ <ReactMarkdown
21
+ remarkPlugins={[[remarkGfm]]}
22
+ components={
23
+ getCustomMDXComponent() as Record<string, React.ElementType>
24
+ }
25
+ skipHtml={true}
26
+ >
27
+ {apiDoc}
28
+ </ReactMarkdown>
29
+ </div>
27
30
  );
28
31
  };