fumadocs-typescript 4.0.12 → 4.0.14
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.
|
@@ -52,10 +52,10 @@ var __async = (__this, __arguments, generator) => {
|
|
|
52
52
|
|
|
53
53
|
// src/markdown.ts
|
|
54
54
|
import { remark } from "remark";
|
|
55
|
+
import { remarkGfm } from "fumadocs-core/mdx-plugins/remark-gfm";
|
|
55
56
|
import {
|
|
56
|
-
rehypeCode
|
|
57
|
-
|
|
58
|
-
} from "fumadocs-core/mdx-plugins";
|
|
57
|
+
rehypeCode
|
|
58
|
+
} from "fumadocs-core/mdx-plugins/rehype-code";
|
|
59
59
|
import remarkRehype from "remark-rehype";
|
|
60
60
|
import { highlightHast } from "fumadocs-core/highlight";
|
|
61
61
|
var shikiOptions = {
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
parseTags,
|
|
7
7
|
renderMarkdownToHast,
|
|
8
8
|
renderTypeToHast
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-REUDVA2G.js";
|
|
10
10
|
|
|
11
11
|
// src/lib/base.ts
|
|
12
12
|
import {
|
|
@@ -216,7 +216,7 @@ function generate(program, name, declaration, { allowInternal = false, transform
|
|
|
216
216
|
};
|
|
217
217
|
}
|
|
218
218
|
function getDocEntry(prop, context) {
|
|
219
|
-
var _a;
|
|
219
|
+
var _a, _b;
|
|
220
220
|
const { transform, program } = context;
|
|
221
221
|
if (context.type.isClass() && prop.getName().startsWith("#")) {
|
|
222
222
|
return;
|
|
@@ -229,16 +229,26 @@ function getDocEntry(prop, context) {
|
|
|
229
229
|
text: ts2.displayPartsToString(tag.getText())
|
|
230
230
|
})
|
|
231
231
|
);
|
|
232
|
+
let type = subType.getText(
|
|
233
|
+
context.declaration,
|
|
234
|
+
ts2.TypeFormatFlags.UseAliasDefinedOutsideCurrentScope | ts2.TypeFormatFlags.NoTruncation
|
|
235
|
+
);
|
|
232
236
|
let simplifiedType = getSimpleForm(
|
|
233
237
|
subType,
|
|
234
238
|
program.getTypeChecker(),
|
|
235
239
|
isOptional,
|
|
236
240
|
context.declaration
|
|
237
241
|
);
|
|
238
|
-
const
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
+
for (const tag of tags) {
|
|
243
|
+
if (tag.name === "fumadocsType") {
|
|
244
|
+
const match = (_a = new RegExp("`(?<name>.+)`$").exec(tag.text)) == null ? void 0 : _a[1];
|
|
245
|
+
if (match) type = match;
|
|
246
|
+
continue;
|
|
247
|
+
}
|
|
248
|
+
if (tag.name === "remarks") {
|
|
249
|
+
const match = (_b = new RegExp("^`(?<name>.+)`").exec(tag.text)) == null ? void 0 : _b[1];
|
|
250
|
+
if (match) simplifiedType = match;
|
|
251
|
+
}
|
|
242
252
|
}
|
|
243
253
|
const entry = {
|
|
244
254
|
name: prop.getName(),
|
|
@@ -248,10 +258,7 @@ function getDocEntry(prop, context) {
|
|
|
248
258
|
)
|
|
249
259
|
),
|
|
250
260
|
tags,
|
|
251
|
-
type
|
|
252
|
-
context.declaration,
|
|
253
|
-
ts2.TypeFormatFlags.UseAliasDefinedOutsideCurrentScope | ts2.TypeFormatFlags.NoTruncation
|
|
254
|
-
),
|
|
261
|
+
type,
|
|
255
262
|
simplifiedType,
|
|
256
263
|
required: !isOptional,
|
|
257
264
|
deprecated: tags.some((tag) => tag.name === "deprecated")
|
package/dist/ui/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fumadocs-typescript",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.14",
|
|
4
4
|
"description": "Typescript Integration for Fumadocs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"NextJs",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"dist/*"
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"estree-util-value-to-estree": "^3.
|
|
31
|
+
"estree-util-value-to-estree": "^3.5.0",
|
|
32
32
|
"hast-util-to-estree": "^3.1.3",
|
|
33
33
|
"hast-util-to-jsx-runtime": "^2.3.6",
|
|
34
34
|
"remark": "^15.0.1",
|
|
@@ -42,14 +42,14 @@
|
|
|
42
42
|
"@types/estree": "^1.0.8",
|
|
43
43
|
"@types/hast": "^3.0.4",
|
|
44
44
|
"@types/mdast": "^4.0.4",
|
|
45
|
-
"@types/node": "24.
|
|
46
|
-
"@types/react": "^19.2.
|
|
47
|
-
"@types/react-dom": "^19.2.
|
|
45
|
+
"@types/node": "24.10.2",
|
|
46
|
+
"@types/react": "^19.2.7",
|
|
47
|
+
"@types/react-dom": "^19.2.3",
|
|
48
48
|
"typescript": "^5.9.3",
|
|
49
49
|
"unified": "^11.0.5",
|
|
50
50
|
"eslint-config-custom": "0.0.0",
|
|
51
|
-
"fumadocs-core": "16.
|
|
52
|
-
"fumadocs-ui": "16.
|
|
51
|
+
"fumadocs-core": "16.2.4",
|
|
52
|
+
"fumadocs-ui": "16.2.4",
|
|
53
53
|
"tsconfig": "0.0.0"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|