fumadocs-core 16.6.7 → 16.6.9

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 (61) hide show
  1. package/dist/{advanced-ZOIuXvBJ.js → advanced-D8-Cn2tE.js} +1 -1
  2. package/dist/breadcrumb.d.ts +1 -1
  3. package/dist/content/mdx/preset-bundler.d.ts +2 -2
  4. package/dist/content/mdx/preset-bundler.js +1 -1
  5. package/dist/content/mdx/preset-runtime.d.ts +2 -2
  6. package/dist/content/mdx/preset-runtime.js +1 -1
  7. package/dist/content/toc.js +1 -1
  8. package/dist/{create-i18n-DxSvCSv-.d.ts → create-i18n-7AVERQc8.d.ts} +2 -2
  9. package/dist/highlight/config.d.ts +1 -1
  10. package/dist/highlight/core/client.d.ts +1 -1
  11. package/dist/highlight/core/index.d.ts +1 -1
  12. package/dist/highlight/index.d.ts +1 -1
  13. package/dist/{mdast-utils-gJMY143g.js → mdast-utils-hhRcKfZf.js} +5 -3
  14. package/dist/mdx-plugins/index.d.ts +3 -3
  15. package/dist/mdx-plugins/index.js +1 -1
  16. package/dist/mdx-plugins/rehype-code.core.d.ts +2 -2
  17. package/dist/mdx-plugins/rehype-code.d.ts +1 -1
  18. package/dist/mdx-plugins/rehype-toc.d.ts +33 -5
  19. package/dist/mdx-plugins/rehype-toc.js +99 -108
  20. package/dist/mdx-plugins/remark-admonition.js +1 -1
  21. package/dist/mdx-plugins/remark-feedback-block.js +1 -1
  22. package/dist/mdx-plugins/remark-heading.d.ts +10 -1
  23. package/dist/mdx-plugins/remark-heading.js +9 -5
  24. package/dist/mdx-plugins/remark-structure.js +1 -1
  25. package/dist/{mixedbread-TBJmV3co.js → mixedbread-BewwCSYr.js} +1 -1
  26. package/dist/{orama-cloud-cgTJNLo0.js → orama-cloud-EXSXD2UK.js} +1 -1
  27. package/dist/{orama-cloud-legacy-Caf8mcU9.js → orama-cloud-legacy-BD43H--x.js} +1 -1
  28. package/dist/page-tree/index.d.ts +2 -2
  29. package/dist/{path-CDjb5iUO.d.ts → path-B8CdvN3q.d.ts} +1 -1
  30. package/dist/search/client.d.ts +4 -4
  31. package/dist/search/client.js +6 -6
  32. package/dist/search/mixedbread.d.ts +4 -4
  33. package/dist/search/mixedbread.js +2 -2
  34. package/dist/search/orama-cloud-legacy.d.ts +1 -1
  35. package/dist/search/orama-cloud.d.ts +1 -1
  36. package/dist/search/server.d.ts +4 -4
  37. package/dist/search/server.js +47 -40
  38. package/dist/source/client/index.d.ts +2 -2
  39. package/dist/source/index.d.ts +3 -3
  40. package/dist/source/index.js +2 -2
  41. package/dist/source/plugins/lucide-icons.d.ts +3 -3
  42. package/dist/source/plugins/lucide-icons.js +1 -1
  43. package/dist/source/plugins/slugs.d.ts +3 -3
  44. package/dist/source/plugins/slugs.js +1 -1
  45. package/dist/source/plugins/status-badges.d.ts +3 -3
  46. package/dist/{static-BUXJwBmr.js → static-dXiDJ_Bs.js} +1 -1
  47. package/dist/{utils-5HX-8dF3.d.ts → utils-DWLhAKwM.d.ts} +1 -1
  48. package/package.json +8 -8
  49. package/dist/hast-utils-BmGqqmvo.js +0 -15
  50. /package/dist/{algolia-CfKKhsrI.js → algolia-y2iOKbWu.js} +0 -0
  51. /package/dist/{create-endpoint-9PZc4Cmz.js → create-endpoint-ErPy6bli.js} +0 -0
  52. /package/dist/{definitions-Cw2aM1Af.d.ts → definitions-VpSOvVeD.d.ts} +0 -0
  53. /package/dist/{fetch-D_OY-eAB.js → fetch-CqH9lOHV.js} +0 -0
  54. /package/dist/{icon-CGDZIqYj.js → icon-DzOeXioY.js} +0 -0
  55. /package/dist/{path-CfJghBXy.js → path-CX1URXrl.js} +0 -0
  56. /package/dist/{remove-markdown-CnXcUR-e.js → remove-markdown-CpjkP9z4.js} +0 -0
  57. /package/dist/{remove-undefined-B_oBVupY.js → remove-undefined-CM-o9RdZ.js} +0 -0
  58. /package/dist/{transformer-icon-C8MUuI2T.d.ts → transformer-icon-BtBormWx.d.ts} +0 -0
  59. /package/dist/{types-Bt4vrwsT.d.ts → types-BKxquRYN.d.ts} +0 -0
  60. /package/dist/{util-C7X6g0ql.d.ts → util-DJ5AvEKK.d.ts} +0 -0
  61. /package/dist/{util-bgCahl6-.js → util-DLLyljU4.js} +0 -0
@@ -1,5 +1,5 @@
1
1
  import { createContentHighlighter } from "./search/index.js";
2
- import { t as removeUndefined } from "./remove-undefined-B_oBVupY.js";
2
+ import { t as removeUndefined } from "./remove-undefined-CM-o9RdZ.js";
3
3
  import { getByID, search } from "@orama/orama";
4
4
 
5
5
  //#region src/search/orama/search/simple.ts
@@ -1,4 +1,4 @@
1
- import { i as Root, r as Node } from "./definitions-Cw2aM1Af.js";
1
+ import { i as Root, r as Node } from "./definitions-VpSOvVeD.js";
2
2
  import { ReactNode } from "react";
3
3
 
4
4
  //#region src/breadcrumb.d.ts
@@ -1,4 +1,4 @@
1
- import "../../transformer-icon-C8MUuI2T.js";
1
+ import "../../transformer-icon-BtBormWx.js";
2
2
  import { RehypeCodeOptions } from "../../mdx-plugins/rehype-code.js";
3
3
  import { RemarkImageOptions } from "../../mdx-plugins/remark-image.js";
4
4
  import { StructureOptions } from "../../mdx-plugins/remark-structure.js";
@@ -6,7 +6,7 @@ import { RemarkHeadingOptions } from "../../mdx-plugins/remark-heading.js";
6
6
  import { RemarkCodeTabOptions } from "../../mdx-plugins/remark-code-tab.js";
7
7
  import { RemarkNpmOptions } from "../../mdx-plugins/remark-npm.js";
8
8
  import "../../mdx-plugins/index.js";
9
- import { t as ResolvePlugins } from "../../util-C7X6g0ql.js";
9
+ import { t as ResolvePlugins } from "../../util-DJ5AvEKK.js";
10
10
  import { ProcessorOptions } from "@mdx-js/mdx";
11
11
 
12
12
  //#region src/content/mdx/preset-bundler.d.ts
@@ -1,4 +1,4 @@
1
- import { t as resolvePlugins } from "../../util-bgCahl6-.js";
1
+ import { t as resolvePlugins } from "../../util-DLLyljU4.js";
2
2
 
3
3
  //#region src/content/mdx/preset-bundler.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import "../../transformer-icon-C8MUuI2T.js";
1
+ import "../../transformer-icon-BtBormWx.js";
2
2
  import { RehypeCodeOptions } from "../../mdx-plugins/rehype-code.js";
3
3
  import { RemarkImageOptions } from "../../mdx-plugins/remark-image.js";
4
4
  import { StructureOptions } from "../../mdx-plugins/remark-structure.js";
@@ -6,7 +6,7 @@ import { RemarkHeadingOptions } from "../../mdx-plugins/remark-heading.js";
6
6
  import { RemarkCodeTabOptions } from "../../mdx-plugins/remark-code-tab.js";
7
7
  import { RemarkNpmOptions } from "../../mdx-plugins/remark-npm.js";
8
8
  import "../../mdx-plugins/index.js";
9
- import { t as ResolvePlugins } from "../../util-C7X6g0ql.js";
9
+ import { t as ResolvePlugins } from "../../util-DJ5AvEKK.js";
10
10
  import { ProcessorOptions } from "@mdx-js/mdx";
11
11
 
12
12
  //#region src/content/mdx/preset-runtime.d.ts
@@ -1,4 +1,4 @@
1
- import { t as resolvePlugins } from "../../util-bgCahl6-.js";
1
+ import { t as resolvePlugins } from "../../util-DLLyljU4.js";
2
2
 
3
3
  //#region src/content/mdx/preset-runtime.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import "../mdast-utils-gJMY143g.js";
1
+ import "../mdast-utils-hhRcKfZf.js";
2
2
  import { remarkHeading } from "../mdx-plugins/remark-heading.js";
3
3
  import { remark } from "remark";
4
4
 
@@ -1,6 +1,6 @@
1
- import { t as Awaitable } from "./types-Bt4vrwsT.js";
1
+ import { t as Awaitable } from "./types-BKxquRYN.js";
2
2
  import { I18nConfig } from "./i18n/index.js";
3
- import { i as LoaderConfig, o as LoaderOutput, u as Page } from "./path-CDjb5iUO.js";
3
+ import { i as LoaderConfig, o as LoaderOutput, u as Page } from "./path-B8CdvN3q.js";
4
4
  import { AdvancedIndex, AdvancedOptions, Dynamic, Index, SearchAPI, SimpleOptions } from "./search/server.js";
5
5
  import { Language, Orama, TypedDocument } from "@orama/orama";
6
6
 
@@ -1,4 +1,4 @@
1
- import { t as Awaitable } from "../types-Bt4vrwsT.js";
1
+ import { t as Awaitable } from "../types-BKxquRYN.js";
2
2
  import { BundledTheme, CodeOptionsThemes, HighlighterCore } from "shiki";
3
3
 
4
4
  //#region src/highlight/config.d.ts
@@ -1,4 +1,4 @@
1
- import { r as MakeOptional } from "../../types-Bt4vrwsT.js";
1
+ import { r as MakeOptional } from "../../types-BKxquRYN.js";
2
2
  import { ResolvedShikiConfig } from "../config.js";
3
3
  import { CoreHighlightOptions } from "./index.js";
4
4
  import { DependencyList, ReactNode } from "react";
@@ -1,4 +1,4 @@
1
- import { n as DistributiveOmit } from "../../types-Bt4vrwsT.js";
1
+ import { n as DistributiveOmit } from "../../types-BKxquRYN.js";
2
2
  import { ResolvedShikiConfig } from "../config.js";
3
3
  import { ReactNode } from "react";
4
4
  import { Components } from "hast-util-to-jsx-runtime";
@@ -1,4 +1,4 @@
1
- import { n as DistributiveOmit } from "../types-Bt4vrwsT.js";
1
+ import { n as DistributiveOmit } from "../types-BKxquRYN.js";
2
2
  import { ResolvedShikiConfig } from "./config.js";
3
3
  import { CoreHighlightOptions } from "./core/index.js";
4
4
  import { ReactNode } from "react";
@@ -7,6 +7,9 @@ function flattenNode(node) {
7
7
  return "";
8
8
  }
9
9
  function toMdxExport(name, value) {
10
+ return toMdxExportRaw(name, valueToEstree(value));
11
+ }
12
+ function toMdxExportRaw(name, expression) {
10
13
  return {
11
14
  type: "mdxjsEsm",
12
15
  value: "",
@@ -17,7 +20,6 @@ function toMdxExport(name, value) {
17
20
  type: "ExportNamedDeclaration",
18
21
  attributes: [],
19
22
  specifiers: [],
20
- source: null,
21
23
  declaration: {
22
24
  type: "VariableDeclaration",
23
25
  kind: "let",
@@ -27,7 +29,7 @@ function toMdxExport(name, value) {
27
29
  type: "Identifier",
28
30
  name
29
31
  },
30
- init: valueToEstree(value)
32
+ init: expression
31
33
  }]
32
34
  }
33
35
  }]
@@ -36,4 +38,4 @@ function toMdxExport(name, value) {
36
38
  }
37
39
 
38
40
  //#endregion
39
- export { toMdxExport as n, flattenNode as t };
41
+ export { toMdxExport as n, toMdxExportRaw as r, flattenNode as t };
@@ -1,5 +1,5 @@
1
1
  import { RemarkGfmOptions, remarkGfm } from "./remark-gfm.js";
2
- import { r as transformerIcon, t as CodeBlockIcon } from "../transformer-icon-C8MUuI2T.js";
2
+ import { r as transformerIcon, t as CodeBlockIcon } from "../transformer-icon-BtBormWx.js";
3
3
  import { transformerTab } from "./rehype-code.core.js";
4
4
  import { RehypeCodeOptions, rehypeCode, rehypeCodeDefaultOptions } from "./rehype-code.js";
5
5
  import { RemarkImageOptions, remarkImage } from "./remark-image.js";
@@ -7,7 +7,7 @@ import { StringifyOptions, StructureOptions, StructuredData, defaultStringifier,
7
7
  import { RemarkHeadingOptions, remarkHeading } from "./remark-heading.js";
8
8
  import { RemarkAdmonitionOptions, remarkAdmonition } from "./remark-admonition.js";
9
9
  import { RemarkDirectiveAdmonitionOptions, remarkDirectiveAdmonition } from "./remark-directive-admonition.js";
10
- import { RehypeTocOptions, rehypeToc } from "./rehype-toc.js";
10
+ import { RehypeTOCItemType, RehypeTocOptions, rehypeToc } from "./rehype-toc.js";
11
11
  import { RemarkCodeTabOptions, remarkCodeTab } from "./remark-code-tab.js";
12
12
  import { RemarkStepsOptions, remarkSteps } from "./remark-steps.js";
13
13
  import { RemarkNpmOptions, remarkNpm } from "./remark-npm.js";
@@ -15,4 +15,4 @@ import { CodeBlockAttributes, CodeBlockTabsOptions, generateCodeBlockTabs, parse
15
15
  import { RemarkMdxFilesOptions, remarkMdxFiles } from "./remark-mdx-files.js";
16
16
  import { RemarkMdxMermaidOptions, remarkMdxMermaid } from "./remark-mdx-mermaid.js";
17
17
  import { FeedbackBlockProps, RemarkFeedbackBlockOptions, remarkFeedbackBlock } from "./remark-feedback-block.js";
18
- export { CodeBlockAttributes, CodeBlockIcon, CodeBlockTabsOptions, FeedbackBlockProps, RehypeCodeOptions, RehypeTocOptions, RemarkAdmonitionOptions, RemarkCodeTabOptions, RemarkDirectiveAdmonitionOptions, RemarkFeedbackBlockOptions, RemarkGfmOptions, RemarkHeadingOptions, RemarkImageOptions, type RemarkMdxFilesOptions, RemarkMdxMermaidOptions, RemarkNpmOptions, RemarkStepsOptions, StringifyOptions, StructureOptions, StructuredData, defaultStringifier, generateCodeBlockTabs, parseCodeBlockAttributes, rehypeCode, rehypeCodeDefaultOptions, rehypeToc, remarkAdmonition, remarkCodeTab, remarkDirectiveAdmonition, remarkFeedbackBlock, remarkGfm, remarkHeading, remarkImage, remarkMdxFiles, remarkMdxMermaid, remarkNpm, remarkSteps, remarkStructure, remarkStructureDefaultOptions, structure, transformerIcon, transformerTab };
18
+ export { CodeBlockAttributes, CodeBlockIcon, CodeBlockTabsOptions, FeedbackBlockProps, RehypeCodeOptions, RehypeTOCItemType, RehypeTocOptions, RemarkAdmonitionOptions, RemarkCodeTabOptions, RemarkDirectiveAdmonitionOptions, RemarkFeedbackBlockOptions, RemarkGfmOptions, RemarkHeadingOptions, RemarkImageOptions, type RemarkMdxFilesOptions, RemarkMdxMermaidOptions, RemarkNpmOptions, RemarkStepsOptions, StringifyOptions, StructureOptions, StructuredData, defaultStringifier, generateCodeBlockTabs, parseCodeBlockAttributes, rehypeCode, rehypeCodeDefaultOptions, rehypeToc, remarkAdmonition, remarkCodeTab, remarkDirectiveAdmonition, remarkFeedbackBlock, remarkGfm, remarkHeading, remarkImage, remarkMdxFiles, remarkMdxMermaid, remarkNpm, remarkSteps, remarkStructure, remarkStructureDefaultOptions, structure, transformerIcon, transformerTab };
@@ -1,4 +1,4 @@
1
- import "../mdast-utils-gJMY143g.js";
1
+ import "../mdast-utils-hhRcKfZf.js";
2
2
  import { remarkHeading } from "./remark-heading.js";
3
3
  import { generateCodeBlockTabs, parseCodeBlockAttributes } from "./codeblock-utils.js";
4
4
  import { remarkGfm } from "./remark-gfm.js";
@@ -1,5 +1,5 @@
1
- import { n as IconOptions, r as transformerIcon, t as CodeBlockIcon } from "../transformer-icon-C8MUuI2T.js";
2
- import { n as DistributiveOmit } from "../types-Bt4vrwsT.js";
1
+ import { n as IconOptions, r as transformerIcon, t as CodeBlockIcon } from "../transformer-icon-BtBormWx.js";
2
+ import { n as DistributiveOmit } from "../types-BKxquRYN.js";
3
3
  import { ResolvedShikiConfig } from "../highlight/config.js";
4
4
  import { ShikiTransformer } from "shiki";
5
5
  import { Processor, Transformer } from "unified";
@@ -1,4 +1,4 @@
1
- import { r as transformerIcon, t as CodeBlockIcon } from "../transformer-icon-C8MUuI2T.js";
1
+ import { r as transformerIcon, t as CodeBlockIcon } from "../transformer-icon-BtBormWx.js";
2
2
  import { RehypeCodeOptionsCommon, transformerTab } from "./rehype-code.core.js";
3
3
  import * as unified from "unified";
4
4
  import * as hast from "hast";
@@ -1,17 +1,45 @@
1
1
  import { Processor, Transformer } from "unified";
2
- import { Root } from "hast";
2
+ import { Element, Root } from "hast";
3
3
 
4
4
  //#region src/mdx-plugins/rehype-toc.d.ts
5
5
  interface RehypeTocOptions {
6
6
  /**
7
- * Export generated toc as a variable
7
+ * Export the generated toc.
8
8
  *
9
- * @defaultValue true
9
+ * - `true` (default): as an ESM export named `toc`.
10
+ * - `false`: disable the plugin.
10
11
  */
11
- exportToc?: boolean;
12
+ exportToc?: boolean | {
13
+ /**
14
+ * generate to `file.data.rehypeToc`.
15
+ */
16
+ as: 'data';
17
+ } | {
18
+ /**
19
+ * generate as an ESM export.
20
+ */
21
+ as: 'esm';
22
+ name: string;
23
+ };
24
+ }
25
+ declare module 'vfile' {
26
+ interface DataMap {
27
+ /**
28
+ * [Fumadocs: rehype-toc] output data.
29
+ */
30
+ rehypeToc?: RehypeTOCItemType[];
31
+ }
32
+ }
33
+ interface RehypeTOCItemType {
34
+ /**
35
+ * the original heading tag
36
+ */
37
+ title: Element;
38
+ url: string;
39
+ depth: number;
12
40
  }
13
41
  declare function rehypeToc(this: Processor, {
14
42
  exportToc
15
43
  }?: RehypeTocOptions): Transformer<Root, Root>;
16
44
  //#endregion
17
- export { RehypeTocOptions, rehypeToc };
45
+ export { RehypeTOCItemType, RehypeTocOptions, rehypeToc };
@@ -1,127 +1,118 @@
1
- import { t as visit } from "../hast-utils-BmGqqmvo.js";
1
+ import { r as toMdxExportRaw } from "../mdast-utils-hhRcKfZf.js";
2
+ import { visit } from "unist-util-visit";
2
3
  import { toEstree } from "hast-util-to-estree";
3
4
 
4
5
  //#region src/mdx-plugins/rehype-toc.ts
5
6
  const TocOnlyTag = "[toc]";
6
7
  const NoTocTag = "[!toc]";
8
+ const HeadingTags = new Set([
9
+ "h1",
10
+ "h2",
11
+ "h3",
12
+ "h4",
13
+ "h5",
14
+ "h6"
15
+ ]);
7
16
  function rehypeToc({ exportToc = true } = {}) {
8
- return (tree) => {
9
- const output = [];
10
- visit(tree, [
11
- "h1",
12
- "h2",
13
- "h3",
14
- "h4",
15
- "h5",
16
- "h6"
17
- ], (element) => {
17
+ if (exportToc === true) exportToc = {
18
+ as: "esm",
19
+ name: "toc"
20
+ };
21
+ if (exportToc === false) return () => void 0;
22
+ return (tree, file) => {
23
+ const items = [];
24
+ visit(tree, "element", (element, idx, parent) => {
25
+ if (!HeadingTags.has(element.tagName) || element.children.length === 0) return;
18
26
  const id = element.properties.id;
19
27
  if (typeof id !== "string") return "skip";
20
28
  let isTocOnly = false;
21
- const last = element.children.at(-1);
22
- if (last?.type === "text" && last.value.endsWith(TocOnlyTag)) {
23
- isTocOnly = true;
24
- last.value = last.value.substring(0, last.value.length - 5).trimEnd();
25
- } else if (last?.type === "text" && last.value.endsWith(NoTocTag)) {
26
- last.value = last.value.substring(0, last.value.length - 6).trimEnd();
27
- return "skip";
29
+ const last = element.children[element.children.length - 1];
30
+ if (last.type === "text") {
31
+ if (last.value.endsWith(NoTocTag)) {
32
+ last.value = last.value.substring(0, last.value.length - 6).trimEnd();
33
+ return "skip";
34
+ }
35
+ if (last.value.endsWith(TocOnlyTag)) {
36
+ isTocOnly = true;
37
+ last.value = last.value.substring(0, last.value.length - 5).trimEnd();
38
+ }
28
39
  }
29
- const estree = toEstree(element, {
30
- elementAttributeNameCase: "react",
31
- stylePropertyNameCase: "dom"
32
- });
33
- if (estree.body[0].type === "ExpressionStatement") output.push({
34
- title: estree.body[0].expression,
35
- depth: Number(element.tagName.slice(1)),
40
+ items.push({
41
+ title: element,
42
+ depth: Number(element.tagName[1]),
36
43
  url: `#${id}`
37
44
  });
38
- if (isTocOnly) Object.assign(element, {
39
- type: "comment",
40
- value: ""
41
- });
45
+ if (isTocOnly && parent && typeof idx === "number") parent.children.splice(idx, 1);
42
46
  return "skip";
43
47
  });
44
- const declaration = {
45
- type: "VariableDeclaration",
46
- kind: "const",
47
- declarations: [{
48
- type: "VariableDeclarator",
49
- id: {
50
- type: "Identifier",
51
- name: "toc"
52
- },
53
- init: {
54
- type: "ArrayExpression",
55
- elements: output.map((item) => ({
56
- type: "ObjectExpression",
57
- properties: [
58
- {
59
- type: "Property",
60
- method: false,
61
- shorthand: false,
62
- computed: false,
63
- key: {
64
- type: "Identifier",
65
- name: "depth"
66
- },
67
- value: {
68
- type: "Literal",
69
- value: item.depth
70
- },
71
- kind: "init"
48
+ if (exportToc.as === "esm") {
49
+ const esmItems = [];
50
+ for (const item of items) {
51
+ const root = toEstree(item.title, {
52
+ elementAttributeNameCase: "react",
53
+ stylePropertyNameCase: "dom"
54
+ }).body[0];
55
+ if (root.type === "ExpressionStatement" && root.expression.type === "JSXElement") esmItems.push({
56
+ ...item,
57
+ title: root.expression
58
+ });
59
+ }
60
+ tree.children.push(toMdxExportRaw(exportToc.name, {
61
+ type: "ArrayExpression",
62
+ elements: esmItems.map((item) => ({
63
+ type: "ObjectExpression",
64
+ properties: [
65
+ {
66
+ type: "Property",
67
+ method: false,
68
+ shorthand: false,
69
+ computed: false,
70
+ key: {
71
+ type: "Identifier",
72
+ name: "depth"
72
73
  },
73
- {
74
- type: "Property",
75
- method: false,
76
- shorthand: false,
77
- computed: false,
78
- key: {
79
- type: "Identifier",
80
- name: "url"
81
- },
82
- value: {
83
- type: "Literal",
84
- value: item.url
85
- },
86
- kind: "init"
74
+ value: {
75
+ type: "Literal",
76
+ value: item.depth
87
77
  },
88
- {
89
- type: "Property",
90
- method: false,
91
- shorthand: false,
92
- computed: false,
93
- key: {
94
- type: "Identifier",
95
- name: "title"
96
- },
97
- value: {
98
- type: "JSXFragment",
99
- openingFragment: { type: "JSXOpeningFragment" },
100
- closingFragment: { type: "JSXClosingFragment" },
101
- children: item.title.children
102
- },
103
- kind: "init"
104
- }
105
- ]
106
- }))
107
- }
108
- }]
109
- };
110
- tree.children.push({
111
- type: "mdxjsEsm",
112
- value: "",
113
- data: { estree: {
114
- type: "Program",
115
- body: [exportToc ? {
116
- type: "ExportNamedDeclaration",
117
- declaration,
118
- attributes: [],
119
- specifiers: []
120
- } : declaration],
121
- sourceType: "module",
122
- comments: []
123
- } }
124
- });
78
+ kind: "init"
79
+ },
80
+ {
81
+ type: "Property",
82
+ method: false,
83
+ shorthand: false,
84
+ computed: false,
85
+ key: {
86
+ type: "Identifier",
87
+ name: "url"
88
+ },
89
+ value: {
90
+ type: "Literal",
91
+ value: item.url
92
+ },
93
+ kind: "init"
94
+ },
95
+ {
96
+ type: "Property",
97
+ method: false,
98
+ shorthand: false,
99
+ computed: false,
100
+ key: {
101
+ type: "Identifier",
102
+ name: "title"
103
+ },
104
+ value: {
105
+ type: "JSXFragment",
106
+ openingFragment: { type: "JSXOpeningFragment" },
107
+ closingFragment: { type: "JSXClosingFragment" },
108
+ children: item.title.children
109
+ },
110
+ kind: "init"
111
+ }
112
+ ]
113
+ }))
114
+ }));
115
+ } else file.data.rehypeToc = items;
125
116
  };
126
117
  }
127
118
 
@@ -1,4 +1,4 @@
1
- import { t as flattenNode } from "../mdast-utils-gJMY143g.js";
1
+ import { t as flattenNode } from "../mdast-utils-hhRcKfZf.js";
2
2
  import { visit } from "unist-util-visit";
3
3
 
4
4
  //#region src/mdx-plugins/remark-admonition.ts
@@ -1,4 +1,4 @@
1
- import { t as flattenNode } from "../mdast-utils-gJMY143g.js";
1
+ import { t as flattenNode } from "../mdast-utils-hhRcKfZf.js";
2
2
  import { visit } from "unist-util-visit";
3
3
  import { createHash } from "node:crypto";
4
4
 
@@ -1,3 +1,4 @@
1
+ import { TOCItemType } from "../toc.js";
1
2
  import { Transformer } from "unified";
2
3
  import { Heading, Root } from "mdast";
3
4
 
@@ -24,11 +25,19 @@ interface RemarkHeadingOptions {
24
25
  */
25
26
  generateToc?: boolean;
26
27
  }
28
+ declare module 'vfile' {
29
+ interface DataMap {
30
+ /**
31
+ * [Fumadocs: remark-heading] output data.
32
+ */
33
+ toc?: TOCItemType[];
34
+ }
35
+ }
27
36
  /**
28
37
  * Add heading ids and extract TOC
29
38
  */
30
39
  declare function remarkHeading({
31
- slug: defaultSlug,
40
+ slug,
32
41
  customId,
33
42
  generateToc
34
43
  }?: RemarkHeadingOptions): Transformer<Root, Root>;
@@ -1,17 +1,21 @@
1
- import { t as flattenNode } from "../mdast-utils-gJMY143g.js";
1
+ import { t as flattenNode } from "../mdast-utils-hhRcKfZf.js";
2
2
  import Slugger from "github-slugger";
3
3
  import { visit } from "unist-util-visit";
4
4
 
5
5
  //#region src/mdx-plugins/remark-heading.ts
6
- const slugger = new Slugger();
7
6
  const regex = /\s*\[#(?<slug>[^]+?)]\s*$/;
8
7
  /**
9
8
  * Add heading ids and extract TOC
10
9
  */
11
- function remarkHeading({ slug: defaultSlug, customId = true, generateToc = true } = {}) {
10
+ function remarkHeading({ slug, customId = true, generateToc = true } = {}) {
11
+ let slugger;
12
+ if (!slug) {
13
+ slugger = new Slugger();
14
+ slug = (_root, _heading, text) => slugger.slug(text);
15
+ }
12
16
  return (root, file) => {
13
17
  const toc = [];
14
- slugger.reset();
18
+ slugger?.reset();
15
19
  visit(root, "heading", (heading) => {
16
20
  heading.data ||= {};
17
21
  heading.data.hProperties ||= {};
@@ -27,7 +31,7 @@ function remarkHeading({ slug: defaultSlug, customId = true, generateToc = true
27
31
  let flattened = null;
28
32
  if (!props.id) {
29
33
  flattened ??= flattenNode(heading);
30
- props.id = defaultSlug ? defaultSlug(root, heading, flattened) : slugger.slug(flattened);
34
+ props.id = slug(root, heading, flattened);
31
35
  }
32
36
  if (generateToc) toc.push({
33
37
  title: flattened ?? flattenNode(heading),
@@ -1,4 +1,4 @@
1
- import { n as toMdxExport } from "../mdast-utils-gJMY143g.js";
1
+ import { n as toMdxExport } from "../mdast-utils-hhRcKfZf.js";
2
2
  import { remarkHeading } from "./remark-heading.js";
3
3
  import { remark } from "remark";
4
4
  import { visit } from "unist-util-visit";
@@ -1,5 +1,5 @@
1
1
  import { r as __toESM } from "./chunk-CaR5F9JI.js";
2
- import { t as require_remove_markdown } from "./remove-markdown-CnXcUR-e.js";
2
+ import { t as require_remove_markdown } from "./remove-markdown-CpjkP9z4.js";
3
3
  import Slugger from "github-slugger";
4
4
 
5
5
  //#region src/search/client/mixedbread.ts
@@ -1,5 +1,5 @@
1
1
  import { createContentHighlighter } from "./search/index.js";
2
- import { t as removeUndefined } from "./remove-undefined-B_oBVupY.js";
2
+ import { t as removeUndefined } from "./remove-undefined-CM-o9RdZ.js";
3
3
 
4
4
  //#region src/search/client/orama-cloud.ts
5
5
  async function searchDocs(query, options) {
@@ -1,5 +1,5 @@
1
1
  import { createContentHighlighter } from "./search/index.js";
2
- import { t as removeUndefined } from "./remove-undefined-B_oBVupY.js";
2
+ import { t as removeUndefined } from "./remove-undefined-CM-o9RdZ.js";
3
3
 
4
4
  //#region src/search/client/orama-cloud-legacy.ts
5
5
  async function searchDocs(query, options) {
@@ -1,3 +1,3 @@
1
- import { a as Separator, i as Root, n as Item, r as Node, t as Folder } from "../definitions-Cw2aM1Af.js";
2
- import { a as flattenTree, c as visit, i as findSiblings, n as findParent, o as getPageTreePeers, r as findPath, s as getPageTreeRoots, t as findNeighbour } from "../utils-5HX-8dF3.js";
1
+ import { a as Separator, i as Root, n as Item, r as Node, t as Folder } from "../definitions-VpSOvVeD.js";
2
+ import { a as flattenTree, c as visit, i as findSiblings, n as findParent, o as getPageTreePeers, r as findPath, s as getPageTreeRoots, t as findNeighbour } from "../utils-DWLhAKwM.js";
3
3
  export { Folder, Item, Node, Root, Separator, findNeighbour, findParent, findPath, findSiblings, flattenTree, getPageTreePeers, getPageTreeRoots, visit };
@@ -1,4 +1,4 @@
1
- import { a as Separator, i as Root, n as Item, r as Node, t as Folder } from "./definitions-Cw2aM1Af.js";
1
+ import { a as Separator, i as Root, n as Item, r as Node, t as Folder } from "./definitions-VpSOvVeD.js";
2
2
  import { I18nConfig } from "./i18n/index.js";
3
3
  import { SlugFn } from "./source/plugins/slugs.js";
4
4
  import { SerializedPageTree } from "./source/client/index.js";
@@ -1,9 +1,9 @@
1
- import "../definitions-Cw2aM1Af.js";
2
- import "../utils-5HX-8dF3.js";
1
+ import "../definitions-VpSOvVeD.js";
2
+ import "../utils-DWLhAKwM.js";
3
3
  import { BaseIndex } from "./algolia.js";
4
4
  import { SortedResult } from "./index.js";
5
- import "../create-i18n-DxSvCSv-.js";
6
- import "../path-CDjb5iUO.js";
5
+ import "../create-i18n-7AVERQc8.js";
6
+ import "../path-B8CdvN3q.js";
7
7
  import "./server.js";
8
8
  import { DependencyList } from "react";
9
9
  import { AnyOrama } from "@orama/orama";
@@ -54,27 +54,27 @@ function useDocsSearch(clientOptions, deps) {
54
54
  if (debouncedValue.length === 0 && !allowEmpty) return "empty";
55
55
  switch (client.type) {
56
56
  case "fetch": {
57
- const { fetchDocs } = await import("../fetch-D_OY-eAB.js");
57
+ const { fetchDocs } = await import("../fetch-CqH9lOHV.js");
58
58
  return fetchDocs(debouncedValue, client);
59
59
  }
60
60
  case "algolia": {
61
- const { searchDocs } = await import("../algolia-CfKKhsrI.js");
61
+ const { searchDocs } = await import("../algolia-y2iOKbWu.js");
62
62
  return searchDocs(debouncedValue, client);
63
63
  }
64
64
  case "orama-cloud": {
65
- const { searchDocs } = await import("../orama-cloud-cgTJNLo0.js");
65
+ const { searchDocs } = await import("../orama-cloud-EXSXD2UK.js");
66
66
  return searchDocs(debouncedValue, client);
67
67
  }
68
68
  case "orama-cloud-legacy": {
69
- const { searchDocs } = await import("../orama-cloud-legacy-Caf8mcU9.js");
69
+ const { searchDocs } = await import("../orama-cloud-legacy-BD43H--x.js");
70
70
  return searchDocs(debouncedValue, client);
71
71
  }
72
72
  case "mixedbread": {
73
- const { search } = await import("../mixedbread-TBJmV3co.js");
73
+ const { search } = await import("../mixedbread-BewwCSYr.js");
74
74
  return search(debouncedValue, client);
75
75
  }
76
76
  case "static": {
77
- const { search } = await import("../static-BUXJwBmr.js");
77
+ const { search } = await import("../static-dXiDJ_Bs.js");
78
78
  return search(debouncedValue, client);
79
79
  }
80
80
  default: throw new Error("unknown search client");
@@ -1,8 +1,8 @@
1
- import "../definitions-Cw2aM1Af.js";
2
- import "../utils-5HX-8dF3.js";
1
+ import "../definitions-VpSOvVeD.js";
2
+ import "../utils-DWLhAKwM.js";
3
3
  import { SortedResult } from "./index.js";
4
- import "../create-i18n-DxSvCSv-.js";
5
- import "../path-CDjb5iUO.js";
4
+ import "../create-i18n-7AVERQc8.js";
5
+ import "../path-B8CdvN3q.js";
6
6
  import { SearchAPI } from "./server.js";
7
7
  import Mixedbread from "@mixedbread/sdk";
8
8
  import { StoreSearchResponse } from "@mixedbread/sdk/resources/stores";
@@ -1,6 +1,6 @@
1
1
  import { r as __toESM } from "../chunk-CaR5F9JI.js";
2
- import { t as require_remove_markdown } from "../remove-markdown-CnXcUR-e.js";
3
- import { t as createEndpoint } from "../create-endpoint-9PZc4Cmz.js";
2
+ import { t as require_remove_markdown } from "../remove-markdown-CpjkP9z4.js";
3
+ import { t as createEndpoint } from "../create-endpoint-ErPy6bli.js";
4
4
  import Slugger from "github-slugger";
5
5
 
6
6
  //#region src/search/mixedbread.ts
@@ -1,4 +1,4 @@
1
- import "../transformer-icon-C8MUuI2T.js";
1
+ import "../transformer-icon-BtBormWx.js";
2
2
  import { StructuredData } from "../mdx-plugins/remark-structure.js";
3
3
  import "../mdx-plugins/index.js";
4
4
  import { CloudManager } from "@oramacloud/client";
@@ -1,4 +1,4 @@
1
- import "../transformer-icon-C8MUuI2T.js";
1
+ import "../transformer-icon-BtBormWx.js";
2
2
  import { StructuredData } from "../mdx-plugins/remark-structure.js";
3
3
  import "../mdx-plugins/index.js";
4
4
  import { OramaCloud } from "@orama/core";
@@ -1,9 +1,9 @@
1
- import "../definitions-Cw2aM1Af.js";
1
+ import "../definitions-VpSOvVeD.js";
2
2
  import { StructuredData } from "../mdx-plugins/remark-structure.js";
3
- import "../utils-5HX-8dF3.js";
3
+ import "../utils-DWLhAKwM.js";
4
4
  import { HighlightedText, ReactSortedResult, SortedResult, createContentHighlighter } from "./index.js";
5
- import { a as advancedSchema, i as SimpleDocument, n as createFromSource, o as simpleSchema, r as AdvancedDocument, t as createI18nSearchAPI } from "../create-i18n-DxSvCSv-.js";
6
- import "../path-CDjb5iUO.js";
5
+ import { a as advancedSchema, i as SimpleDocument, n as createFromSource, o as simpleSchema, r as AdvancedDocument, t as createI18nSearchAPI } from "../create-i18n-7AVERQc8.js";
6
+ import "../path-B8CdvN3q.js";
7
7
  import { Orama, RawData, SearchParams, create } from "@orama/orama";
8
8
 
9
9
  //#region src/search/server.d.ts
@@ -1,8 +1,8 @@
1
1
  import { r as findPath } from "../utils-Bc53B3CJ.js";
2
2
  import { createContentHighlighter } from "./index.js";
3
- import { t as createEndpoint } from "../create-endpoint-9PZc4Cmz.js";
4
- import { n as searchSimple, t as searchAdvanced } from "../advanced-ZOIuXvBJ.js";
5
- import { r as extname, t as basename } from "../path-CfJghBXy.js";
3
+ import { t as createEndpoint } from "../create-endpoint-ErPy6bli.js";
4
+ import { n as searchSimple, t as searchAdvanced } from "../advanced-D8-Cn2tE.js";
5
+ import { r as extname, t as basename } from "../path-CX1URXrl.js";
6
6
  import { create, insertMultiple, save } from "@orama/orama";
7
7
 
8
8
  //#region src/search/orama/create-db.ts
@@ -100,56 +100,63 @@ async function createDBSimple({ indexes, tokenizer, ...rest }) {
100
100
 
101
101
  //#endregion
102
102
  //#region src/search/orama/create-from-source.ts
103
- function defaultBuildIndex(source) {
104
- function isBreadcrumbItem(item) {
105
- return typeof item === "string" && item.length > 0;
106
- }
107
- return async (page) => {
108
- let breadcrumbs;
109
- let structuredData;
110
- if ("structuredData" in page.data) structuredData = page.data.structuredData;
111
- else if ("load" in page.data && typeof page.data.load === "function") structuredData = (await page.data.load()).structuredData;
112
- if (!structuredData) throw new Error("Cannot find structured data from page, please define the page to index function.");
113
- const pageTree = source.getPageTree(page.locale);
114
- const path = findPath(pageTree.children, (node) => node.type === "page" && node.url === page.url);
115
- if (path) {
116
- breadcrumbs = [];
117
- path.pop();
118
- if (isBreadcrumbItem(pageTree.name)) breadcrumbs.push(pageTree.name);
119
- for (const segment of path) {
120
- if (!isBreadcrumbItem(segment.name)) continue;
121
- breadcrumbs.push(segment.name);
122
- }
123
- }
124
- return {
125
- title: page.data.title ?? basename(page.path, extname(page.path)),
126
- breadcrumbs,
127
- description: page.data.description,
128
- url: page.url,
129
- id: page.url,
130
- structuredData
131
- };
103
+ async function buildIndexDefault(page) {
104
+ let structuredData;
105
+ if ("structuredData" in page.data) structuredData = typeof page.data.structuredData === "function" ? await page.data.structuredData() : page.data.structuredData;
106
+ else if ("load" in page.data && typeof page.data.load === "function") structuredData = (await page.data.load()).structuredData;
107
+ if (!structuredData) throw new Error("Cannot find structured data from page, please define the page to index function.");
108
+ return {
109
+ title: page.data.title ?? basename(page.path, extname(page.path)),
110
+ description: page.data.description,
111
+ url: page.url,
112
+ id: page.url,
113
+ structuredData
132
114
  };
133
115
  }
116
+ function isBreadcrumbItem(item) {
117
+ return typeof item === "string" && item.length > 0;
118
+ }
119
+ function buildBreadcrumbsDefault(source, page) {
120
+ const pageTree = source.getPageTree(page.locale);
121
+ const path = findPath(pageTree.children, (node) => node.type === "page" && node.url === page.url);
122
+ if (path) {
123
+ const breadcrumbs = [];
124
+ path.pop();
125
+ if (isBreadcrumbItem(pageTree.name)) breadcrumbs.push(pageTree.name);
126
+ for (const segment of path) {
127
+ if (!isBreadcrumbItem(segment.name)) continue;
128
+ breadcrumbs.push(segment.name);
129
+ }
130
+ return breadcrumbs;
131
+ }
132
+ }
134
133
  function createFromSource(source, options = {}) {
135
- const { buildIndex = defaultBuildIndex(source) } = options;
134
+ const { buildIndex = buildIndexDefault } = options;
136
135
  if (source._i18n) return createI18nSearchAPI("advanced", {
137
136
  ...options,
138
137
  i18n: source._i18n,
139
- indexes: async () => {
138
+ async indexes() {
140
139
  const indexes = source.getLanguages().flatMap((entry) => {
141
- return entry.pages.map(async (page) => ({
142
- ...await buildIndex(page),
143
- locale: entry.language
144
- }));
140
+ return entry.pages.map(async (page) => {
141
+ const index = await buildIndex(page);
142
+ index.breadcrumbs ??= buildBreadcrumbsDefault(source, page);
143
+ return {
144
+ ...index,
145
+ locale: entry.language
146
+ };
147
+ });
145
148
  });
146
149
  return Promise.all(indexes);
147
150
  }
148
151
  });
149
152
  return createSearchAPI("advanced", {
150
153
  ...options,
151
- indexes: async () => {
152
- const indexes = source.getPages().map((page) => buildIndex(page));
154
+ async indexes() {
155
+ const indexes = source.getPages().map(async (page) => {
156
+ const index = await buildIndex(page);
157
+ index.breadcrumbs ??= buildBreadcrumbsDefault(source, page);
158
+ return index;
159
+ });
153
160
  return Promise.all(indexes);
154
161
  }
155
162
  });
@@ -1,5 +1,5 @@
1
- import { i as Root } from "../../definitions-Cw2aM1Af.js";
2
- import "../../utils-5HX-8dF3.js";
1
+ import { i as Root } from "../../definitions-VpSOvVeD.js";
2
+ import "../../utils-DWLhAKwM.js";
3
3
  import "../../page-tree/index.js";
4
4
 
5
5
  //#region src/source/client/index.d.ts
@@ -1,5 +1,5 @@
1
- import "../definitions-Cw2aM1Af.js";
2
- import "../utils-5HX-8dF3.js";
3
- import { A as _SourceUpdate_, C as FileSystem, D as SourceConfig, E as Source, M as source, N as update, O as VirtualFile, S as createContentStorageBuilder, T as PageData, _ as PageTreeTransformer, a as LoaderOptions, b as ContentStorageMetaFile, c as LoaderPluginOption, d as ResolvedLoaderConfig, f as createGetUrl, g as PageTreeOptions, h as PageTreeBuilderContext, i as LoaderConfig, j as multiple, k as _ConfigUnion_, l as Meta, m as PageTreeBuilder, n as InferMetaType, o as LoaderOutput, p as loader, r as InferPageType, s as LoaderPlugin, t as path_d_exports, u as Page, v as ContentStorage, w as MetaData, x as ContentStoragePageFile, y as ContentStorageFile } from "../path-CDjb5iUO.js";
1
+ import "../definitions-VpSOvVeD.js";
2
+ import "../utils-DWLhAKwM.js";
3
+ import { A as _SourceUpdate_, C as FileSystem, D as SourceConfig, E as Source, M as source, N as update, O as VirtualFile, S as createContentStorageBuilder, T as PageData, _ as PageTreeTransformer, a as LoaderOptions, b as ContentStorageMetaFile, c as LoaderPluginOption, d as ResolvedLoaderConfig, f as createGetUrl, g as PageTreeOptions, h as PageTreeBuilderContext, i as LoaderConfig, j as multiple, k as _ConfigUnion_, l as Meta, m as PageTreeBuilder, n as InferMetaType, o as LoaderOutput, p as loader, r as InferPageType, s as LoaderPlugin, t as path_d_exports, u as Page, v as ContentStorage, w as MetaData, x as ContentStoragePageFile, y as ContentStorageFile } from "../path-B8CdvN3q.js";
4
4
  import { getSlugs } from "./plugins/slugs.js";
5
5
  export { ContentStorage, ContentStorageFile, ContentStorageMetaFile, ContentStoragePageFile, FileSystem, InferMetaType, InferPageType, LoaderConfig, LoaderOptions, LoaderOutput, LoaderPlugin, LoaderPluginOption, Meta, MetaData, Page, PageData, type PageTreeBuilder, type PageTreeBuilderContext, type PageTreeOptions, type PageTreeTransformer, path_d_exports as PathUtils, ResolvedLoaderConfig, Source, SourceConfig, VirtualFile, _ConfigUnion_, _SourceUpdate_, createContentStorageBuilder, createGetUrl, getSlugs, loader, multiple, source, update };
@@ -1,8 +1,8 @@
1
1
  import { t as normalizeUrl } from "../normalize-url-DKBxIxO0.js";
2
2
  import { c as visit } from "../utils-Bc53B3CJ.js";
3
- import { a as path_exports, i as joinPath, n as dirname, o as slash, r as extname, s as splitPath, t as basename } from "../path-CfJghBXy.js";
3
+ import { a as path_exports, i as joinPath, n as dirname, o as slash, r as extname, s as splitPath, t as basename } from "../path-CX1URXrl.js";
4
4
  import { getSlugs, slugsPlugin } from "./plugins/slugs.js";
5
- import { t as iconPlugin } from "../icon-CGDZIqYj.js";
5
+ import { t as iconPlugin } from "../icon-DzOeXioY.js";
6
6
  import path from "node:path";
7
7
 
8
8
  //#region src/source/source.ts
@@ -1,6 +1,6 @@
1
- import "../../definitions-Cw2aM1Af.js";
2
- import "../../utils-5HX-8dF3.js";
3
- import { s as LoaderPlugin } from "../../path-CDjb5iUO.js";
1
+ import "../../definitions-VpSOvVeD.js";
2
+ import "../../utils-DWLhAKwM.js";
3
+ import { s as LoaderPlugin } from "../../path-B8CdvN3q.js";
4
4
  import "../index.js";
5
5
  import { icons } from "lucide-react";
6
6
 
@@ -1,4 +1,4 @@
1
- import { t as iconPlugin } from "../../icon-CGDZIqYj.js";
1
+ import { t as iconPlugin } from "../../icon-DzOeXioY.js";
2
2
  import { createElement } from "react";
3
3
  import { icons } from "lucide-react";
4
4
 
@@ -1,6 +1,6 @@
1
- import "../../definitions-Cw2aM1Af.js";
2
- import "../../utils-5HX-8dF3.js";
3
- import { i as LoaderConfig, s as LoaderPlugin, x as ContentStoragePageFile } from "../../path-CDjb5iUO.js";
1
+ import "../../definitions-VpSOvVeD.js";
2
+ import "../../utils-DWLhAKwM.js";
3
+ import { i as LoaderConfig, s as LoaderPlugin, x as ContentStoragePageFile } from "../../path-B8CdvN3q.js";
4
4
 
5
5
  //#region src/source/plugins/slugs.d.ts
6
6
  /**
@@ -1,4 +1,4 @@
1
- import { n as dirname, r as extname, t as basename } from "../../path-CfJghBXy.js";
1
+ import { n as dirname, r as extname, t as basename } from "../../path-CX1URXrl.js";
2
2
 
3
3
  //#region src/source/plugins/slugs.ts
4
4
  /**
@@ -1,6 +1,6 @@
1
- import { a as Separator$1, n as Item$1, t as Folder$1 } from "../../definitions-Cw2aM1Af.js";
2
- import "../../utils-5HX-8dF3.js";
3
- import { s as LoaderPlugin } from "../../path-CDjb5iUO.js";
1
+ import { a as Separator$1, n as Item$1, t as Folder$1 } from "../../definitions-VpSOvVeD.js";
2
+ import "../../utils-DWLhAKwM.js";
3
+ import { s as LoaderPlugin } from "../../path-B8CdvN3q.js";
4
4
  import { ReactNode } from "react";
5
5
 
6
6
  //#region src/source/plugins/status-badges.d.ts
@@ -1,4 +1,4 @@
1
- import { n as searchSimple, t as searchAdvanced } from "./advanced-ZOIuXvBJ.js";
1
+ import { n as searchSimple, t as searchAdvanced } from "./advanced-D8-Cn2tE.js";
2
2
  import { create, load } from "@orama/orama";
3
3
 
4
4
  //#region src/search/client/static.ts
@@ -1,4 +1,4 @@
1
- import { i as Root, n as Item, r as Node, t as Folder } from "./definitions-Cw2aM1Af.js";
1
+ import { i as Root, n as Item, r as Node, t as Folder } from "./definitions-VpSOvVeD.js";
2
2
 
3
3
  //#region src/page-tree/utils.d.ts
4
4
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fumadocs-core",
3
- "version": "16.6.7",
3
+ "version": "16.6.9",
4
4
  "description": "The React.js library for building a documentation website",
5
5
  "keywords": [
6
6
  "Docs",
@@ -118,8 +118,8 @@
118
118
  "dependencies": {
119
119
  "@formatjs/intl-localematcher": "^0.8.1",
120
120
  "@orama/orama": "^3.1.18",
121
- "@shikijs/rehype": "^3.23.0",
122
- "@shikijs/transformers": "^3.23.0",
121
+ "@shikijs/rehype": "^4.0.0",
122
+ "@shikijs/transformers": "^4.0.0",
123
123
  "estree-util-value-to-estree": "^3.5.0",
124
124
  "github-slugger": "^2.0.0",
125
125
  "hast-util-to-estree": "^3.1.3",
@@ -134,7 +134,7 @@
134
134
  "remark-gfm": "^4.0.1",
135
135
  "remark-rehype": "^11.1.2",
136
136
  "scroll-into-view-if-needed": "^3.1.0",
137
- "shiki": "^3.23.0",
137
+ "shiki": "^4.0.0",
138
138
  "tinyglobby": "^0.2.15",
139
139
  "unified": "^11.0.5",
140
140
  "unist-util-visit": "^5.1.0",
@@ -142,15 +142,15 @@
142
142
  },
143
143
  "devDependencies": {
144
144
  "@mdx-js/mdx": "^3.1.1",
145
- "@mixedbread/sdk": "^0.55.0",
145
+ "@mixedbread/sdk": "^0.56.0",
146
146
  "@orama/core": "^1.2.19",
147
147
  "@oramacloud/client": "^2.1.4",
148
- "@tanstack/react-router": "1.163.2",
148
+ "@tanstack/react-router": "1.163.3",
149
149
  "@types/estree-jsx": "^1.0.5",
150
150
  "@types/hast": "^3.0.4",
151
151
  "@types/mdast": "^4.0.4",
152
152
  "@types/negotiator": "^0.6.4",
153
- "@types/node": "25.3.1",
153
+ "@types/node": "25.3.3",
154
154
  "@types/react": "^19.2.14",
155
155
  "@types/react-dom": "^19.2.3",
156
156
  "algoliasearch": "5.49.1",
@@ -162,7 +162,7 @@
162
162
  "remove-markdown": "^0.6.3",
163
163
  "tsdown": "0.20.3",
164
164
  "typescript": "^5.9.3",
165
- "waku": "1.0.0-alpha.4",
165
+ "waku": "1.0.0-alpha.5",
166
166
  "zod": "^4.3.6",
167
167
  "eslint-config-custom": "0.0.0",
168
168
  "tsconfig": "0.0.0"
@@ -1,15 +0,0 @@
1
- //#region src/mdx-plugins/hast-utils.ts
2
- /**
3
- * Visit a node with filtered tag names
4
- */
5
- function visit(node, tagNames, handler) {
6
- if (node.type === "element" && tagNames.includes(node.tagName)) {
7
- if (handler(node) === "skip") return;
8
- }
9
- if ("children" in node) node.children.forEach((n) => {
10
- visit(n, tagNames, handler);
11
- });
12
- }
13
-
14
- //#endregion
15
- export { visit as t };
File without changes
File without changes
File without changes
File without changes
File without changes