fumadocs-typescript 3.0.3 → 3.0.4

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.
@@ -1,4 +1,4 @@
1
- import { Project, ExportedDeclarations, Type, Symbol } from 'ts-morph';
1
+ import { Project, Type, ExportedDeclarations, Symbol } from 'ts-morph';
2
2
 
3
3
  interface TypescriptConfig {
4
4
  files?: string[];
@@ -18,6 +18,7 @@ interface DocEntry {
18
18
  description: string;
19
19
  type: string;
20
20
  tags: Record<string, string>;
21
+ required: boolean;
21
22
  }
22
23
  interface EntryContext {
23
24
  program: Project;
@@ -125,7 +125,8 @@ function getDocEntry(prop, context) {
125
125
  )
126
126
  ),
127
127
  tags,
128
- type: typeName
128
+ type: typeName,
129
+ required: !prop.isOptional()
129
130
  };
130
131
  transform == null ? void 0 : transform.call(context, entry, subType, prop);
131
132
  return entry;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { G as GenerateDocumentationOptions, a as GeneratedDoc, D as DocEntry } from './base-BltLCalB.js';
2
- export { b as GenerateOptions, d as generate, c as generateDocumentation, g as getProject } from './base-BltLCalB.js';
1
+ import { G as GenerateDocumentationOptions, a as GeneratedDoc, D as DocEntry } from './base-BaB_XiY6.js';
2
+ export { b as GenerateOptions, d as generate, c as generateDocumentation, g as getProject } from './base-BaB_XiY6.js';
3
3
  import fg from 'fast-glob';
4
4
  import { Nodes } from 'hast';
5
5
  import 'ts-morph';
package/dist/index.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  generateDocumentation,
8
8
  getProject,
9
9
  renderMarkdownToHast
10
- } from "./chunk-2L4CMRDQ.js";
10
+ } from "./chunk-PRWE5YDY.js";
11
11
 
12
12
  // src/generate/mdx.ts
13
13
  import * as path from "node:path";
@@ -1,4 +1,4 @@
1
- import { G as GenerateDocumentationOptions } from '../base-BltLCalB.js';
1
+ import { G as GenerateDocumentationOptions } from '../base-BaB_XiY6.js';
2
2
  import 'ts-morph';
3
3
 
4
4
  interface AutoTypeTableProps {
package/dist/ui/index.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  generateDocumentation,
6
6
  getProject,
7
7
  renderMarkdownToHast
8
- } from "../chunk-2L4CMRDQ.js";
8
+ } from "../chunk-PRWE5YDY.js";
9
9
 
10
10
  // src/ui/auto-type-table.tsx
11
11
  import fs from "node:fs/promises";
@@ -34,7 +34,7 @@ function AutoTypeTable(_0) {
34
34
  let typeName = name;
35
35
  let content = "";
36
36
  if (path) {
37
- content = yield fs.readFile(path).then((res) => res.toString());
37
+ content = (yield fs.readFile(path)).toString();
38
38
  }
39
39
  if (type && type.split("\n").length > 1) {
40
40
  content += `
@@ -60,7 +60,8 @@ export type ${typeName} = ${type}`;
60
60
  {
61
61
  type: entry.type,
62
62
  description: yield renderMarkdown(entry.description),
63
- default: entry.tags.default || entry.tags.defaultValue
63
+ default: entry.tags.default || entry.tags.defaultValue,
64
+ required: entry.required
64
65
  }
65
66
  ];
66
67
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fumadocs-typescript",
3
- "version": "3.0.3",
3
+ "version": "3.0.4",
4
4
  "description": "Typescript Integration for Fumadocs",
5
5
  "keywords": [
6
6
  "NextJs",
@@ -29,23 +29,23 @@
29
29
  ],
30
30
  "dependencies": {
31
31
  "fast-glob": "^3.3.3",
32
- "hast-util-to-jsx-runtime": "^2.3.2",
32
+ "hast-util-to-jsx-runtime": "^2.3.3",
33
33
  "mdast-util-from-markdown": "^2.0.2",
34
- "mdast-util-gfm": "^3.0.0",
34
+ "mdast-util-gfm": "^3.1.0",
35
35
  "mdast-util-to-hast": "^13.2.0",
36
- "shiki": "^2.0.3",
37
- "ts-morph": "^25.0.0"
36
+ "shiki": "^3.0.0",
37
+ "ts-morph": "^25.0.1"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@types/estree": "^1.0.6",
41
41
  "@types/hast": "^3.0.4",
42
42
  "@types/mdast": "^4.0.3",
43
- "@types/node": "22.10.7",
44
- "@types/react": "19.0.7",
45
- "@types/react-dom": "19.0.3",
43
+ "@types/node": "22.13.4",
44
+ "@types/react": "19.0.10",
45
+ "@types/react-dom": "19.0.4",
46
46
  "typescript": "^5.7.3",
47
47
  "eslint-config-custom": "0.0.0",
48
- "fumadocs-ui": "14.7.6",
48
+ "fumadocs-ui": "15.0.13",
49
49
  "tsconfig": "0.0.0"
50
50
  },
51
51
  "peerDependencies": {