fumadocs-core 14.2.0 → 14.2.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.
@@ -11,6 +11,6 @@ type TableOfContents = TOCItemType[];
11
11
  *
12
12
  * @param content - Markdown content
13
13
  */
14
- declare function getTableOfContents(content: string): Promise<TableOfContents>;
14
+ declare function getTableOfContents(content: string): TableOfContents;
15
15
 
16
16
  export { type TableOfContents as T, type TOCItemType as a, getTableOfContents as g };
@@ -1,11 +1,11 @@
1
- import {
2
- flattenNode,
3
- remarkHeading
4
- } from "../chunk-4MNUWZIW.js";
5
1
  import {
6
2
  resolvePath,
7
3
  slash
8
4
  } from "../chunk-SHGL6VBO.js";
5
+ import {
6
+ flattenNode,
7
+ remarkHeading
8
+ } from "../chunk-4MNUWZIW.js";
9
9
  import {
10
10
  createStyleTransformer,
11
11
  defaultThemes
@@ -1,4 +1,4 @@
1
- export { a as TOCItemType, T as TableOfContents, g as getTableOfContents } from '../get-toc-CM4X3hbw.js';
1
+ export { a as TOCItemType, T as TableOfContents, g as getTableOfContents } from '../get-toc-Dm1yr2Gr.js';
2
2
  import { N as Node, I as Item, R as Root } from '../page-tree-r8qjoUla.js';
3
3
  export { p as PageTree } from '../page-tree-r8qjoUla.js';
4
4
  export { S as SortedResult } from '../types-Ch8gnVgO.js';
@@ -10,8 +10,8 @@ import "../chunk-MLKGABMK.js";
10
10
 
11
11
  // src/server/get-toc.ts
12
12
  import { remark } from "remark";
13
- async function getTableOfContents(content) {
14
- const result = await remark().use(remarkHeading).process(content);
13
+ function getTableOfContents(content) {
14
+ const result = remark().use(remarkHeading).processSync(content);
15
15
  if ("toc" in result.data) return result.data.toc;
16
16
  return [];
17
17
  }
package/dist/toc.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode, RefObject, AnchorHTMLAttributes } from 'react';
3
- import { T as TableOfContents } from './get-toc-CM4X3hbw.js';
3
+ import { T as TableOfContents } from './get-toc-Dm1yr2Gr.js';
4
4
 
5
5
  /**
6
6
  * The estimated active heading ID
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fumadocs-core",
3
- "version": "14.2.0",
3
+ "version": "14.2.1",
4
4
  "description": "The library for building a documentation website in Next.js",
5
5
  "keywords": [
6
6
  "NextJs",
@@ -91,18 +91,18 @@
91
91
  "devDependencies": {
92
92
  "@algolia/client-search": "4.24.0",
93
93
  "@mdx-js/mdx": "^3.1.0",
94
- "@oramacloud/client": "^1.3.18",
94
+ "@oramacloud/client": "^1.3.19",
95
95
  "@types/estree-jsx": "^1.0.5",
96
96
  "@types/hast": "^3.0.4",
97
97
  "@types/mdast": "^4.0.3",
98
98
  "@types/negotiator": "^0.6.3",
99
- "@types/node": "22.8.1",
99
+ "@types/node": "22.8.6",
100
100
  "@types/react": "^18.3.12",
101
101
  "@types/react-dom": "^18.3.1",
102
102
  "algoliasearch": "4.24.0",
103
103
  "mdast-util-mdx-jsx": "^3.1.3",
104
104
  "mdast-util-mdxjs-esm": "^2.0.1",
105
- "next": "^15.0.0",
105
+ "next": "^15.0.2",
106
106
  "remark-mdx": "^3.1.0",
107
107
  "remark-rehype": "^11.1.1",
108
108
  "shiki-transformers": "^1.0.0",
@@ -111,8 +111,8 @@
111
111
  "tsconfig": "0.0.0"
112
112
  },
113
113
  "peerDependencies": {
114
- "algoliasearch": "4.24.0",
115
114
  "@oramacloud/client": "1.x.x",
115
+ "algoliasearch": "4.24.0",
116
116
  "next": "14.x.x || 15.x.x",
117
117
  "react": ">= 18",
118
118
  "react-dom": ">= 18"