@rspress/plugin-api-docgen 1.43.0 → 2.0.0-alpha.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.js +26 -12
- package/package.json +5 -5
package/dist/index.js
CHANGED
@@ -15,12 +15,8 @@ function __webpack_require__(moduleId) {
|
|
15
15
|
return module.exports;
|
16
16
|
}
|
17
17
|
(()=>{
|
18
|
-
__webpack_require__.n =
|
19
|
-
var getter = module && module.__esModule ?
|
20
|
-
return module['default'];
|
21
|
-
} : function() {
|
22
|
-
return module;
|
23
|
-
};
|
18
|
+
__webpack_require__.n = (module)=>{
|
19
|
+
var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
|
24
20
|
__webpack_require__.d(getter, {
|
25
21
|
a: getter
|
26
22
|
});
|
@@ -28,7 +24,7 @@ function __webpack_require__(moduleId) {
|
|
28
24
|
};
|
29
25
|
})();
|
30
26
|
(()=>{
|
31
|
-
__webpack_require__.d =
|
27
|
+
__webpack_require__.d = (exports1, definition)=>{
|
32
28
|
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
33
29
|
enumerable: true,
|
34
30
|
get: definition[key]
|
@@ -36,9 +32,7 @@ function __webpack_require__(moduleId) {
|
|
36
32
|
};
|
37
33
|
})();
|
38
34
|
(()=>{
|
39
|
-
__webpack_require__.o =
|
40
|
-
return Object.prototype.hasOwnProperty.call(obj, prop);
|
41
|
-
};
|
35
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
42
36
|
})();
|
43
37
|
(()=>{
|
44
38
|
__webpack_require__.r = function(exports1) {
|
@@ -99,6 +93,22 @@ var __webpack_exports__ = {};
|
|
99
93
|
type: 'Type',
|
100
94
|
defaultValue: 'Default Value',
|
101
95
|
overview: 'Overview'
|
96
|
+
},
|
97
|
+
ru: {
|
98
|
+
copy: 'Копировать',
|
99
|
+
copied: 'Скопировано успешно',
|
100
|
+
expand: 'Развернуть код',
|
101
|
+
collapse: 'Свернуть код',
|
102
|
+
className: 'Имя класса узла',
|
103
|
+
style: 'Стиль узла',
|
104
|
+
children: 'Дочерние элементы',
|
105
|
+
disabled: 'Отключено',
|
106
|
+
required: 'Обязательно',
|
107
|
+
property: 'Свойство',
|
108
|
+
description: 'Описание',
|
109
|
+
type: 'Тип',
|
110
|
+
defaultValue: 'Значение по умолчанию',
|
111
|
+
overview: 'Обзор'
|
102
112
|
}
|
103
113
|
};
|
104
114
|
const isToolEntries = (obj)=>!!obj.documentation || !!obj["react-docgen-typescript"];
|
@@ -257,8 +267,12 @@ var __webpack_exports__ = {};
|
|
257
267
|
async beforeBuild (config, isProd) {
|
258
268
|
var _config_themeConfig_locales, _config_themeConfig, _config_locales;
|
259
269
|
const languages = ((null === (_config_themeConfig = config.themeConfig) || void 0 === _config_themeConfig ? void 0 : null === (_config_themeConfig_locales = _config_themeConfig.locales) || void 0 === _config_themeConfig_locales ? void 0 : _config_themeConfig_locales.map((locale)=>locale.lang)) || (null === (_config_locales = config.locales) || void 0 === _config_locales ? void 0 : _config_locales.map((locale)=>locale.lang)) || [
|
260
|
-
config.lang
|
261
|
-
]).filter((lang)=>
|
270
|
+
config.lang || 'en'
|
271
|
+
]).filter((lang)=>[
|
272
|
+
'zh',
|
273
|
+
'en',
|
274
|
+
'ru'
|
275
|
+
].includes(lang));
|
262
276
|
await docgen({
|
263
277
|
entries,
|
264
278
|
apiParseTool,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@rspress/plugin-api-docgen",
|
3
|
-
"version": "
|
3
|
+
"version": "2.0.0-alpha.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": {
|
@@ -23,11 +23,11 @@
|
|
23
23
|
"react-docgen-typescript": "2.2.2",
|
24
24
|
"react-markdown": "8.0.7",
|
25
25
|
"remark-gfm": "3.0.1",
|
26
|
-
"@rspress/shared": "
|
26
|
+
"@rspress/shared": "2.0.0-alpha.0"
|
27
27
|
},
|
28
28
|
"devDependencies": {
|
29
|
-
"@microsoft/api-extractor": "^7.
|
30
|
-
"@rslib/core": "0.5.
|
29
|
+
"@microsoft/api-extractor": "^7.51.1",
|
30
|
+
"@rslib/core": "0.5.3",
|
31
31
|
"@types/mdast": "^3.0.15",
|
32
32
|
"@types/node": "^18.11.17",
|
33
33
|
"@types/react": "^18.3.18",
|
@@ -40,7 +40,7 @@
|
|
40
40
|
"unist-util-visit": "^4.1.2"
|
41
41
|
},
|
42
42
|
"peerDependencies": {
|
43
|
-
"@rspress/core": "^
|
43
|
+
"@rspress/core": "^2.0.0-alpha.0",
|
44
44
|
"react": ">=17.0.0",
|
45
45
|
"react-router-dom": "^6.8.1",
|
46
46
|
"typescript": "^5.5.3"
|