fumadocs-typescript 5.5.0 → 5.5.1

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.
Files changed (2) hide show
  1. package/dist/index.js +9 -8
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -7,7 +7,7 @@ import fs$1 from "node:fs";
7
7
  import { valueToEstree } from "estree-util-value-to-estree";
8
8
  import { toEstree } from "hast-util-to-estree";
9
9
  import { tableRowToStructuredData } from "fumadocs-core/search";
10
- import { replaceSource } from "fumadocs-core/mdx-plugins/stringifier";
10
+ import { markdownTable, replaceSource } from "fumadocs-core/mdx-plugins/stringifier";
11
11
  //#region src/lib/type-table.ts
12
12
  async function getTypeTableOutput(gen, { name, type, ...props }, options) {
13
13
  const file = props.path && options?.basePath ? path.join(options.basePath, props.path) : props.path;
@@ -33,7 +33,7 @@ function generateHash(str) {
33
33
  }
34
34
  //#endregion
35
35
  //#region package.json
36
- var version = "5.5.0";
36
+ var version = "5.5.1";
37
37
  //#endregion
38
38
  //#region src/lib/get-simple-form.ts
39
39
  function getSimpleForm(type, checker, location, options = {}) {
@@ -372,12 +372,13 @@ function typeTableToStructuredData(id, entries) {
372
372
  function typeTableToMarkdown(doc) {
373
373
  let out = `### ${doc.name}\n\n`;
374
374
  if (doc.description) out += `${doc.description.trim()}\n\n`;
375
- out += "| Prop | Type | Description |\n| --- | --- | --- |";
376
- for (const entry of doc.entries) {
377
- out += "\n|";
378
- for (const cell of typeTableRow(entry)) out += ` ${cell.replace(/\s*\n\s*/g, " ").replaceAll("|", "\\|")} |`;
379
- }
380
- return out;
375
+ const rows = [[
376
+ "Prop",
377
+ "Type",
378
+ "Description"
379
+ ]];
380
+ for (const entry of doc.entries) rows.push(typeTableRow(entry));
381
+ return out + markdownTable(rows);
381
382
  }
382
383
  function typeTableRow(entry) {
383
384
  const tags = parseTags(entry.tags);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fumadocs-typescript",
3
- "version": "5.5.0",
3
+ "version": "5.5.1",
4
4
  "description": "Typescript Integration for Fumadocs",
5
5
  "keywords": [
6
6
  "Docs",
@@ -51,8 +51,8 @@
51
51
  "@types/node": "26.6.4",
52
52
  "@types/react": "^19.3.0",
53
53
  "@types/react-dom": "^19.3.0",
54
- "fumadocs-core": "16.17.0",
55
- "fumadocs-ui": "npm:@fumadocs/base-ui@16.17.0",
54
+ "fumadocs-core": "16.17.1",
55
+ "fumadocs-ui": "npm:@fumadocs/base-ui@16.17.1",
56
56
  "mdast-util-mdx": "^3.0.0",
57
57
  "tsconfig": "0.0.0",
58
58
  "tsdown": "0.23.0",
@@ -63,7 +63,7 @@
63
63
  "@types/hast": "*",
64
64
  "@types/mdast": "*",
65
65
  "@types/react": "*",
66
- "fumadocs-core": "^16.17.0",
66
+ "fumadocs-core": "^16.17.1",
67
67
  "fumadocs-ui": "^16.7.0",
68
68
  "react": "^19.2.0",
69
69
  "react-dom": "^19.2.0"