fumadocs-core 16.6.16 → 16.6.17

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 (77) hide show
  1. package/dist/{algolia-CwyuBbIb.d.ts → algolia-BcNfAtYC.d.ts} +1 -1
  2. package/dist/breadcrumb.js +5 -5
  3. package/dist/{client-DS68wTeB.d.ts → client-9fKBmECY.d.ts} +2 -2
  4. package/dist/content/mdx/preset-bundler.d.ts +8 -6
  5. package/dist/content/mdx/preset-bundler.js +2 -1
  6. package/dist/content/mdx/preset-runtime.d.ts +5 -5
  7. package/dist/content/toc.d.ts +1 -1
  8. package/dist/highlight/core/client.d.ts +1 -1
  9. package/dist/highlight/core/index.d.ts +1 -1
  10. package/dist/highlight/core/index.js +2 -5
  11. package/dist/highlight/index.d.ts +1 -1
  12. package/dist/i18n/index.d.ts +1 -1
  13. package/dist/i18n/middleware.d.ts +1 -1
  14. package/dist/{index-_S7CzA5M.d.ts → index-C5QIKZDy.d.ts} +2 -2
  15. package/dist/mdx-plugins/codeblock-utils.d.ts +1 -1
  16. package/dist/mdx-plugins/index.d.ts +13 -13
  17. package/dist/mdx-plugins/rehype-toc.d.ts +1 -1
  18. package/dist/mdx-plugins/remark-admonition.d.ts +1 -1
  19. package/dist/mdx-plugins/remark-code-tab.d.ts +1 -1
  20. package/dist/mdx-plugins/remark-directive-admonition.d.ts +1 -1
  21. package/dist/mdx-plugins/remark-feedback-block.d.ts +1 -1
  22. package/dist/mdx-plugins/remark-feedback-block.js +1 -0
  23. package/dist/mdx-plugins/remark-heading.d.ts +1 -1
  24. package/dist/mdx-plugins/remark-llms.d.ts +50 -0
  25. package/dist/mdx-plugins/remark-llms.js +30 -0
  26. package/dist/mdx-plugins/remark-mdx-files.d.ts +1 -1
  27. package/dist/mdx-plugins/remark-mdx-mermaid.d.ts +1 -1
  28. package/dist/mdx-plugins/remark-npm.d.ts +1 -1
  29. package/dist/mdx-plugins/remark-steps.d.ts +1 -1
  30. package/dist/mdx-plugins/remark-structure.d.ts +2 -2
  31. package/dist/mdx-plugins/remark-structure.js +19 -82
  32. package/dist/mdx-plugins/stringifier.d.ts +2 -0
  33. package/dist/mdx-plugins/stringifier.js +86 -0
  34. package/dist/page-tree/index.d.ts +1 -1
  35. package/dist/{remark-heading-2666MLQD.d.ts → remark-heading-DR_pmcPV.d.ts} +1 -1
  36. package/dist/{remark-structure-w0J2HdSr.d.ts → remark-structure-CILz6H_T.d.ts} +8 -46
  37. package/dist/search/algolia.d.ts +1 -1
  38. package/dist/search/client/algolia.d.ts +1 -1
  39. package/dist/search/client/fetch.d.ts +1 -1
  40. package/dist/search/client/flexsearch-static.d.ts +1 -1
  41. package/dist/search/client/mixedbread.d.ts +1 -1
  42. package/dist/search/client/orama-cloud-legacy.d.ts +1 -1
  43. package/dist/search/client/orama-cloud.d.ts +1 -1
  44. package/dist/search/client/orama-static.d.ts +1 -1
  45. package/dist/search/client.d.ts +1 -1
  46. package/dist/search/flexsearch.d.ts +3 -3
  47. package/dist/search/index.d.ts +1 -1
  48. package/dist/search/mixedbread.d.ts +2 -2
  49. package/dist/search/orama-cloud-legacy.d.ts +1 -1
  50. package/dist/search/orama-cloud.d.ts +1 -1
  51. package/dist/search/server.d.ts +1 -1
  52. package/dist/{server-C0aEeWdv.d.ts → server-BVKBFI75.d.ts} +4 -4
  53. package/dist/source/client/index.d.ts +1 -1
  54. package/dist/source/index.d.ts +1 -1
  55. package/dist/source/plugins/lucide-icons.d.ts +1 -1
  56. package/dist/source/plugins/slugs.d.ts +1 -1
  57. package/dist/source/plugins/status-badges.d.ts +1 -1
  58. package/dist/stringifier-CugaOXsb.d.ts +64 -0
  59. package/dist/toc.d.ts +1 -1
  60. package/package.json +3 -3
  61. /package/dist/{codeblock-utils-BWp9N5oU.d.ts → codeblock-utils-DBm7VMdU.d.ts} +0 -0
  62. /package/dist/{index-DZ_vpLwy.d.ts → index-BDymJpj4.d.ts} +0 -0
  63. /package/dist/{index-CTt-rhJo.d.ts → index-Ch9QIdT6.d.ts} +0 -0
  64. /package/dist/{index-Dq8ULFjO.d.ts → index-Cq7hKKw4.d.ts} +0 -0
  65. /package/dist/{index-CNf0Q1pt.d.ts → index-CsYVANvj.d.ts} +0 -0
  66. /package/dist/{index-D1s9JoIZ.d.ts → index-DSpA1JO4.d.ts} +0 -0
  67. /package/dist/{rehype-toc-DkpBLGXj.d.ts → rehype-toc-BLsqqf_o.d.ts} +0 -0
  68. /package/dist/{remark-admonition-tbZwgvRc.d.ts → remark-admonition-DNKm8XsG.d.ts} +0 -0
  69. /package/dist/{remark-code-tab-Bmp3b54I.d.ts → remark-code-tab-G7U6TydN.d.ts} +0 -0
  70. /package/dist/{remark-directive-admonition-Cm-X9mJI.d.ts → remark-directive-admonition-gkHghBYa.d.ts} +0 -0
  71. /package/dist/{remark-feedback-block-T3jAXI9K.d.ts → remark-feedback-block-90yTnyTC.d.ts} +0 -0
  72. /package/dist/{remark-mdx-files-CCvCHI3_.d.ts → remark-mdx-files-C7gYD1Bn.d.ts} +0 -0
  73. /package/dist/{remark-mdx-mermaid-jSvwEQqX.d.ts → remark-mdx-mermaid-CeZ2Fepw.d.ts} +0 -0
  74. /package/dist/{remark-npm-C8phdFJT.d.ts → remark-npm-BMre-WzD.d.ts} +0 -0
  75. /package/dist/{remark-steps-BuqnOJKp.d.ts → remark-steps-9ooYFxUA.d.ts} +0 -0
  76. /package/dist/{toc-CwccnCch.d.ts → toc-DmllTzmG.d.ts} +0 -0
  77. /package/dist/{util-DgsRYeQC.d.ts → util-D_kBfbUQ.d.ts} +0 -0
@@ -1,4 +1,4 @@
1
- import { r as StructuredData } from "./remark-structure-w0J2HdSr.js";
1
+ import { i as StructuredData } from "./remark-structure-CILz6H_T.js";
2
2
  import { Algoliasearch } from "algoliasearch";
3
3
 
4
4
  //#region src/search/algolia.d.ts
@@ -25,8 +25,12 @@ function getBreadcrumbItemsFromPath(tree, path, options) {
25
25
  });
26
26
  break;
27
27
  case "folder":
28
- if (item.root && !includeRoot) {
28
+ if (item.root) {
29
29
  items = [];
30
+ if (includeRoot) items.push({
31
+ name: tree.name,
32
+ url: typeof includeRoot === "object" ? includeRoot.url : item.index?.url
33
+ });
30
34
  break;
31
35
  }
32
36
  if (i === path.length - 1 || item.index !== path[i + 1]) items.push({
@@ -39,10 +43,6 @@ function getBreadcrumbItemsFromPath(tree, path, options) {
39
43
  break;
40
44
  }
41
45
  }
42
- if (includeRoot) items.unshift({
43
- name: tree.name,
44
- url: typeof includeRoot === "object" ? includeRoot.url : void 0
45
- });
46
46
  return items;
47
47
  }
48
48
  /**
@@ -1,6 +1,6 @@
1
1
  import { t as Awaitable } from "./types-3ccArm6T.js";
2
- import { t as BaseIndex } from "./algolia-CwyuBbIb.js";
3
- import { r as SortedResult } from "./index-CTt-rhJo.js";
2
+ import { t as BaseIndex } from "./algolia-BcNfAtYC.js";
3
+ import { r as SortedResult } from "./index-Ch9QIdT6.js";
4
4
  import { DependencyList } from "react";
5
5
  import { AnyOrama } from "@orama/orama";
6
6
  import { LiteClient, SearchResponse } from "algoliasearch/lite";
@@ -1,16 +1,18 @@
1
1
  import { t as RehypeCodeOptions } from "../../rehype-code-B-bxz1EN.js";
2
2
  import { t as RemarkImageOptions } from "../../remark-image-CP5w6VTd.js";
3
- import { n as StructureOptions } from "../../remark-structure-w0J2HdSr.js";
4
- import { t as RemarkHeadingOptions } from "../../remark-heading-2666MLQD.js";
5
- import { t as RemarkCodeTabOptions } from "../../remark-code-tab-Bmp3b54I.js";
6
- import { t as RemarkNpmOptions } from "../../remark-npm-C8phdFJT.js";
7
- import { t as ResolvePlugins } from "../../util-DgsRYeQC.js";
3
+ import { r as StructureOptions } from "../../remark-structure-CILz6H_T.js";
4
+ import { t as RemarkHeadingOptions } from "../../remark-heading-DR_pmcPV.js";
5
+ import { t as RemarkCodeTabOptions } from "../../remark-code-tab-G7U6TydN.js";
6
+ import { t as RemarkNpmOptions } from "../../remark-npm-BMre-WzD.js";
7
+ import { t as ResolvePlugins } from "../../util-D_kBfbUQ.js";
8
+ import { Pluggable } from "unified";
8
9
  import { ProcessorOptions } from "@mdx-js/mdx";
9
10
 
10
11
  //#region src/content/mdx/preset-bundler.d.ts
11
12
  type MDXBundlerPresetOptions = Omit<NonNullable<ProcessorOptions>, 'rehypePlugins' | 'remarkPlugins'> & {
12
13
  rehypePlugins?: ResolvePlugins;
13
- remarkPlugins?: ResolvePlugins;
14
+ remarkPlugins?: ResolvePlugins; /** @private for `remark-include` */
15
+ _include?: Pluggable;
14
16
  remarkStructureOptions?: StructureOptions | false;
15
17
  remarkHeadingOptions?: RemarkHeadingOptions | false;
16
18
  remarkImageOptions?: RemarkImageOptions | false;
@@ -4,13 +4,14 @@ import { t as resolvePlugins } from "../../util-CT8y1EgJ.js";
4
4
  * apply MDX processor presets
5
5
  */
6
6
  async function mdxPreset(options = {}) {
7
- const { rehypeCodeOptions, remarkImageOptions, remarkHeadingOptions, remarkStructureOptions, remarkCodeTabOptions, remarkNpmOptions, ...mdxOptions } = options;
7
+ const { rehypeCodeOptions, remarkImageOptions, remarkHeadingOptions, remarkStructureOptions, remarkCodeTabOptions, remarkNpmOptions, _include, ...mdxOptions } = options;
8
8
  const remarkPlugins = await resolvePlugins((v) => [
9
9
  import("remark-gfm").then((mod) => mod.default),
10
10
  remarkHeadingOptions !== false && import("../../mdx-plugins/remark-heading.js").then((mod) => [mod.remarkHeading, {
11
11
  generateToc: false,
12
12
  ...remarkHeadingOptions
13
13
  }]),
14
+ _include ?? false,
14
15
  remarkImageOptions !== false && import("../../mdx-plugins/remark-image.js").then((mod) => [mod.remarkImage, {
15
16
  ...remarkImageOptions,
16
17
  useImport: remarkImageOptions?.useImport ?? true
@@ -1,10 +1,10 @@
1
1
  import { t as RehypeCodeOptions } from "../../rehype-code-B-bxz1EN.js";
2
2
  import { t as RemarkImageOptions } from "../../remark-image-CP5w6VTd.js";
3
- import { n as StructureOptions } from "../../remark-structure-w0J2HdSr.js";
4
- import { t as RemarkHeadingOptions } from "../../remark-heading-2666MLQD.js";
5
- import { t as RemarkCodeTabOptions } from "../../remark-code-tab-Bmp3b54I.js";
6
- import { t as RemarkNpmOptions } from "../../remark-npm-C8phdFJT.js";
7
- import { t as ResolvePlugins } from "../../util-DgsRYeQC.js";
3
+ import { r as StructureOptions } from "../../remark-structure-CILz6H_T.js";
4
+ import { t as RemarkHeadingOptions } from "../../remark-heading-DR_pmcPV.js";
5
+ import { t as RemarkCodeTabOptions } from "../../remark-code-tab-G7U6TydN.js";
6
+ import { t as RemarkNpmOptions } from "../../remark-npm-BMre-WzD.js";
7
+ import { t as ResolvePlugins } from "../../util-D_kBfbUQ.js";
8
8
  import { ProcessorOptions } from "@mdx-js/mdx";
9
9
 
10
10
  //#region src/content/mdx/preset-runtime.d.ts
@@ -1,4 +1,4 @@
1
- import { s as TOCItemType } from "../toc-CwccnCch.js";
1
+ import { s as TOCItemType } from "../toc-DmllTzmG.js";
2
2
  import { Compatible } from "vfile";
3
3
  import { PluggableList } from "unified";
4
4
 
@@ -1,6 +1,6 @@
1
1
  import { r as MakeOptional } from "../../types-3ccArm6T.js";
2
2
  import { t as ResolvedShikiConfig } from "../../config-CsHj5oV8.js";
3
- import { t as CoreHighlightOptions } from "../../index-D1s9JoIZ.js";
3
+ import { t as CoreHighlightOptions } from "../../index-DSpA1JO4.js";
4
4
  import { DependencyList, ReactNode } from "react";
5
5
  import * as react_jsx_runtime0 from "react/jsx-runtime";
6
6
 
@@ -1,2 +1,2 @@
1
- import { i as highlightHast, n as getHighlighter, r as highlight, t as CoreHighlightOptions } from "../../index-D1s9JoIZ.js";
1
+ import { i as highlightHast, n as getHighlighter, r as highlight, t as CoreHighlightOptions } from "../../index-DSpA1JO4.js";
2
2
  export { CoreHighlightOptions, getHighlighter, highlight, highlightHast };
@@ -1,5 +1,4 @@
1
- import { Fragment } from "react";
2
- import { jsx, jsxs } from "react/jsx-runtime";
1
+ import * as JsxRuntime from "react/jsx-runtime";
3
2
  import { toJsxRuntime } from "hast-util-to-jsx-runtime";
4
3
  //#region src/highlight/core/index.ts
5
4
  async function highlightHast(code, options) {
@@ -54,10 +53,8 @@ async function getHighlighter(config, options) {
54
53
  }
55
54
  async function highlight(code, options) {
56
55
  return toJsxRuntime(await highlightHast(code, options), {
57
- jsx,
58
- jsxs,
56
+ ...JsxRuntime,
59
57
  development: false,
60
- Fragment,
61
58
  components: options.components
62
59
  });
63
60
  }
@@ -1,6 +1,6 @@
1
1
  import { n as DistributiveOmit } from "../types-3ccArm6T.js";
2
2
  import { t as ResolvedShikiConfig } from "../config-CsHj5oV8.js";
3
- import { t as CoreHighlightOptions } from "../index-D1s9JoIZ.js";
3
+ import { t as CoreHighlightOptions } from "../index-DSpA1JO4.js";
4
4
  import { ReactNode } from "react";
5
5
  import * as shiki from "shiki";
6
6
  import { BundledLanguage, BundledTheme, LanguageRegistration, ThemeRegistrationAny } from "shiki";
@@ -1,2 +1,2 @@
1
- import { n as defineI18n, t as I18nConfig } from "../index-CNf0Q1pt.js";
1
+ import { n as defineI18n, t as I18nConfig } from "../index-CsYVANvj.js";
2
2
  export { I18nConfig, defineI18n };
@@ -1,4 +1,4 @@
1
- import { t as I18nConfig } from "../index-CNf0Q1pt.js";
1
+ import { t as I18nConfig } from "../index-CsYVANvj.js";
2
2
  import { NextProxy } from "next/server";
3
3
  import { NextURL } from "next/dist/server/web/next-url";
4
4
 
@@ -1,6 +1,6 @@
1
1
  import { a as Separator, i as Root, n as Item, r as Node, t as Folder } from "./definitions-AAtMxt2w.js";
2
- import { t as I18nConfig } from "./index-CNf0Q1pt.js";
3
- import { n as SerializedPageTree } from "./index-Dq8ULFjO.js";
2
+ import { t as I18nConfig } from "./index-CsYVANvj.js";
3
+ import { n as SerializedPageTree } from "./index-Cq7hKKw4.js";
4
4
  import { ReactNode } from "react";
5
5
 
6
6
  //#region src/source/source.d.ts
@@ -1,2 +1,2 @@
1
- import { i as parseCodeBlockAttributes, n as CodeBlockTabsOptions, r as generateCodeBlockTabs, t as CodeBlockAttributes } from "../codeblock-utils-BWp9N5oU.js";
1
+ import { i as parseCodeBlockAttributes, n as CodeBlockTabsOptions, r as generateCodeBlockTabs, t as CodeBlockAttributes } from "../codeblock-utils-DBm7VMdU.js";
2
2
  export { CodeBlockAttributes, CodeBlockTabsOptions, generateCodeBlockTabs, parseCodeBlockAttributes };
@@ -2,16 +2,16 @@ import { n as remarkGfm, t as RemarkGfmOptions } from "../remark-gfm-C2GLsTxH.js
2
2
  import { a as CodeBlockIcon, i as transformerTab, o as transformerIcon } from "../rehype-code.core-Ck9MowQQ.js";
3
3
  import { n as rehypeCode, r as rehypeCodeDefaultOptions, t as RehypeCodeOptions } from "../rehype-code-B-bxz1EN.js";
4
4
  import { n as remarkImage, t as RemarkImageOptions } from "../remark-image-CP5w6VTd.js";
5
- import { a as remarkStructure, i as defaultStringifier, n as StructureOptions, o as remarkStructureDefaultOptions, r as StructuredData, s as structure, t as StringifyOptions } from "../remark-structure-w0J2HdSr.js";
6
- import { n as remarkHeading, t as RemarkHeadingOptions } from "../remark-heading-2666MLQD.js";
7
- import { n as remarkAdmonition, t as RemarkAdmonitionOptions } from "../remark-admonition-tbZwgvRc.js";
8
- import { n as remarkDirectiveAdmonition, t as RemarkDirectiveAdmonitionOptions } from "../remark-directive-admonition-Cm-X9mJI.js";
9
- import { n as RehypeTocOptions, r as rehypeToc, t as RehypeTOCItemType } from "../rehype-toc-DkpBLGXj.js";
10
- import { n as remarkCodeTab, t as RemarkCodeTabOptions } from "../remark-code-tab-Bmp3b54I.js";
11
- import { n as remarkSteps, t as RemarkStepsOptions } from "../remark-steps-BuqnOJKp.js";
12
- import { n as remarkNpm, t as RemarkNpmOptions } from "../remark-npm-C8phdFJT.js";
13
- import { i as parseCodeBlockAttributes, n as CodeBlockTabsOptions, r as generateCodeBlockTabs, t as CodeBlockAttributes } from "../codeblock-utils-BWp9N5oU.js";
14
- import { a as remarkMdxFiles, r as RemarkMdxFilesOptions } from "../remark-mdx-files-CCvCHI3_.js";
15
- import { n as remarkMdxMermaid, t as RemarkMdxMermaidOptions } from "../remark-mdx-mermaid-jSvwEQqX.js";
16
- import { n as RemarkFeedbackBlockOptions, r as remarkFeedbackBlock, t as FeedbackBlockProps } from "../remark-feedback-block-T3jAXI9K.js";
17
- 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 };
5
+ import { a as defaultStringifier, c as structure, i as StructuredData, n as StringifyOptions, o as remarkStructure, r as StructureOptions, s as remarkStructureDefaultOptions, t as Stringifier } from "../remark-structure-CILz6H_T.js";
6
+ import { n as remarkHeading, t as RemarkHeadingOptions } from "../remark-heading-DR_pmcPV.js";
7
+ import { n as remarkAdmonition, t as RemarkAdmonitionOptions } from "../remark-admonition-DNKm8XsG.js";
8
+ import { n as remarkDirectiveAdmonition, t as RemarkDirectiveAdmonitionOptions } from "../remark-directive-admonition-gkHghBYa.js";
9
+ import { n as RehypeTocOptions, r as rehypeToc, t as RehypeTOCItemType } from "../rehype-toc-BLsqqf_o.js";
10
+ import { n as remarkCodeTab, t as RemarkCodeTabOptions } from "../remark-code-tab-G7U6TydN.js";
11
+ import { n as remarkSteps, t as RemarkStepsOptions } from "../remark-steps-9ooYFxUA.js";
12
+ import { n as remarkNpm, t as RemarkNpmOptions } from "../remark-npm-BMre-WzD.js";
13
+ import { i as parseCodeBlockAttributes, n as CodeBlockTabsOptions, r as generateCodeBlockTabs, t as CodeBlockAttributes } from "../codeblock-utils-DBm7VMdU.js";
14
+ import { a as remarkMdxFiles, r as RemarkMdxFilesOptions } from "../remark-mdx-files-C7gYD1Bn.js";
15
+ import { n as remarkMdxMermaid, t as RemarkMdxMermaidOptions } from "../remark-mdx-mermaid-CeZ2Fepw.js";
16
+ import { n as RemarkFeedbackBlockOptions, r as remarkFeedbackBlock, t as FeedbackBlockProps } from "../remark-feedback-block-90yTnyTC.js";
17
+ export { CodeBlockAttributes, CodeBlockIcon, CodeBlockTabsOptions, FeedbackBlockProps, RehypeCodeOptions, RehypeTOCItemType, RehypeTocOptions, RemarkAdmonitionOptions, RemarkCodeTabOptions, RemarkDirectiveAdmonitionOptions, RemarkFeedbackBlockOptions, RemarkGfmOptions, RemarkHeadingOptions, RemarkImageOptions, type RemarkMdxFilesOptions, RemarkMdxMermaidOptions, RemarkNpmOptions, RemarkStepsOptions, Stringifier, 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,2 +1,2 @@
1
- import { n as RehypeTocOptions, r as rehypeToc, t as RehypeTOCItemType } from "../rehype-toc-DkpBLGXj.js";
1
+ import { n as RehypeTocOptions, r as rehypeToc, t as RehypeTOCItemType } from "../rehype-toc-BLsqqf_o.js";
2
2
  export { RehypeTOCItemType, RehypeTocOptions, rehypeToc };
@@ -1,2 +1,2 @@
1
- import { n as remarkAdmonition, t as RemarkAdmonitionOptions } from "../remark-admonition-tbZwgvRc.js";
1
+ import { n as remarkAdmonition, t as RemarkAdmonitionOptions } from "../remark-admonition-DNKm8XsG.js";
2
2
  export { RemarkAdmonitionOptions, remarkAdmonition };
@@ -1,2 +1,2 @@
1
- import { n as remarkCodeTab, t as RemarkCodeTabOptions } from "../remark-code-tab-Bmp3b54I.js";
1
+ import { n as remarkCodeTab, t as RemarkCodeTabOptions } from "../remark-code-tab-G7U6TydN.js";
2
2
  export { RemarkCodeTabOptions, remarkCodeTab };
@@ -1,2 +1,2 @@
1
- import { n as remarkDirectiveAdmonition, t as RemarkDirectiveAdmonitionOptions } from "../remark-directive-admonition-Cm-X9mJI.js";
1
+ import { n as remarkDirectiveAdmonition, t as RemarkDirectiveAdmonitionOptions } from "../remark-directive-admonition-gkHghBYa.js";
2
2
  export { RemarkDirectiveAdmonitionOptions, remarkDirectiveAdmonition };
@@ -1,2 +1,2 @@
1
- import { n as RemarkFeedbackBlockOptions, r as remarkFeedbackBlock, t as FeedbackBlockProps } from "../remark-feedback-block-T3jAXI9K.js";
1
+ import { n as RemarkFeedbackBlockOptions, r as remarkFeedbackBlock, t as FeedbackBlockProps } from "../remark-feedback-block-90yTnyTC.js";
2
2
  export { FeedbackBlockProps, RemarkFeedbackBlockOptions, remarkFeedbackBlock };
@@ -37,6 +37,7 @@ function remarkFeedbackBlock({ generateHash = ({ body }) => createHash("md5").up
37
37
  name: "id",
38
38
  value: id
39
39
  }],
40
+ data: { _stringify: "children-only" },
40
41
  children: [node]
41
42
  };
42
43
  if (generateBody) wrapper.attributes.push({
@@ -1,2 +1,2 @@
1
- import { n as remarkHeading, t as RemarkHeadingOptions } from "../remark-heading-2666MLQD.js";
1
+ import { n as remarkHeading, t as RemarkHeadingOptions } from "../remark-heading-DR_pmcPV.js";
2
2
  export { RemarkHeadingOptions, remarkHeading };
@@ -0,0 +1,50 @@
1
+ import { n as StringifyOptions } from "../stringifier-CugaOXsb.js";
2
+ import { Processor, Transformer } from "unified";
3
+ import { Root } from "mdast";
4
+
5
+ //#region src/mdx-plugins/remark-llms.d.ts
6
+ interface LLMsOptions extends StringifyOptions {
7
+ /**
8
+ * export name for output Markdown.
9
+ *
10
+ * @default _markdown
11
+ */
12
+ as?: string;
13
+ /**
14
+ * Explicit heading IDs in output.
15
+ *
16
+ * @default true
17
+ */
18
+ headingIds?: boolean;
19
+ /**
20
+ * Filter the elements to be included in the output:
21
+ *
22
+ * - `true`: include element & its children.
23
+ * - `children-only`: exclude element but keep its children.
24
+ * - `false`: exclude element & its children.
25
+ *
26
+ * Default:
27
+ *
28
+ * ```ts
29
+ * filterElement = (node) => {
30
+ * switch (node.type) {
31
+ * case 'mdxjsEsm':
32
+ * return false;
33
+ * default:
34
+ * return true;
35
+ * }
36
+ * },
37
+ * ```
38
+ */
39
+ filterElement?: StringifyOptions['filterElement'];
40
+ }
41
+ /**
42
+ * generate `llms.txt` for markdown.
43
+ */
44
+ declare function remarkLLMs(this: Processor, {
45
+ as,
46
+ headingIds,
47
+ ...stringify
48
+ }?: LLMsOptions): Transformer<Root, Root>;
49
+ //#endregion
50
+ export { LLMsOptions, remarkLLMs };
@@ -0,0 +1,30 @@
1
+ import { n as toMdxExport } from "../mdast-utils-9tJwoVTq.js";
2
+ import { defaultStringifier } from "./stringifier.js";
3
+ //#region src/mdx-plugins/remark-llms.ts
4
+ /**
5
+ * generate `llms.txt` for markdown.
6
+ */
7
+ function remarkLLMs({ as = "_markdown", headingIds = true, ...stringify } = {}) {
8
+ const stringifier = defaultStringifier({
9
+ ...stringify,
10
+ filterElement(node) {
11
+ switch (node.type) {
12
+ case "mdxjsEsm": return false;
13
+ default: return true;
14
+ }
15
+ },
16
+ handlers: {
17
+ heading(node, _p, state, info) {
18
+ const id = node.data?.hProperties?.id;
19
+ const content = state.containerPhrasing(node, info);
20
+ return headingIds && id ? `${content} [#${id}]` : content;
21
+ },
22
+ ...stringify.handlers
23
+ }
24
+ });
25
+ return (node) => {
26
+ node.children.unshift(toMdxExport(as, stringifier.call(this, node, void 0)));
27
+ };
28
+ }
29
+ //#endregion
30
+ export { remarkLLMs };
@@ -1,2 +1,2 @@
1
- import { a as remarkMdxFiles, i as ToMdxOptions, n as FolderNode, r as RemarkMdxFilesOptions, t as FileNode } from "../remark-mdx-files-CCvCHI3_.js";
1
+ import { a as remarkMdxFiles, i as ToMdxOptions, n as FolderNode, r as RemarkMdxFilesOptions, t as FileNode } from "../remark-mdx-files-C7gYD1Bn.js";
2
2
  export { FileNode, FolderNode, RemarkMdxFilesOptions, ToMdxOptions, remarkMdxFiles };
@@ -1,2 +1,2 @@
1
- import { n as remarkMdxMermaid, t as RemarkMdxMermaidOptions } from "../remark-mdx-mermaid-jSvwEQqX.js";
1
+ import { n as remarkMdxMermaid, t as RemarkMdxMermaidOptions } from "../remark-mdx-mermaid-CeZ2Fepw.js";
2
2
  export { RemarkMdxMermaidOptions, remarkMdxMermaid };
@@ -1,2 +1,2 @@
1
- import { n as remarkNpm, t as RemarkNpmOptions } from "../remark-npm-C8phdFJT.js";
1
+ import { n as remarkNpm, t as RemarkNpmOptions } from "../remark-npm-BMre-WzD.js";
2
2
  export { RemarkNpmOptions, remarkNpm };
@@ -1,2 +1,2 @@
1
- import { n as remarkSteps, t as RemarkStepsOptions } from "../remark-steps-BuqnOJKp.js";
1
+ import { n as remarkSteps, t as RemarkStepsOptions } from "../remark-steps-9ooYFxUA.js";
2
2
  export { RemarkStepsOptions, remarkSteps };
@@ -1,2 +1,2 @@
1
- import { a as remarkStructure, i as defaultStringifier, n as StructureOptions, o as remarkStructureDefaultOptions, r as StructuredData, s as structure, t as StringifyOptions } from "../remark-structure-w0J2HdSr.js";
2
- export { StringifyOptions, StructureOptions, StructuredData, defaultStringifier, remarkStructure, remarkStructureDefaultOptions, structure };
1
+ import { a as defaultStringifier, c as structure, i as StructuredData, n as StringifyOptions, o as remarkStructure, r as StructureOptions, s as remarkStructureDefaultOptions, t as Stringifier } from "../remark-structure-CILz6H_T.js";
2
+ export { Stringifier, StringifyOptions, StructureOptions, StructuredData, defaultStringifier, remarkStructure, remarkStructureDefaultOptions, structure };
@@ -1,10 +1,9 @@
1
1
  import { n as toMdxExport } from "../mdast-utils-9tJwoVTq.js";
2
2
  import { remarkHeading } from "./remark-heading.js";
3
+ import { defaultStringifier as defaultStringifier$1 } from "./stringifier.js";
3
4
  import { remark } from "remark";
4
5
  import { visit } from "unist-util-visit";
5
6
  import remarkGfm from "remark-gfm";
6
- import { mdxToMarkdown } from "mdast-util-mdx";
7
- import { toMarkdown } from "mdast-util-to-markdown";
8
7
  //#region src/mdx-plugins/remark-structure.ts
9
8
  const remarkStructureDefaultOptions = {
10
9
  types: [
@@ -94,88 +93,26 @@ function remarkStructure({ types = remarkStructureDefaultOptions.types, mdxTypes
94
93
  function structure(content, remarkPlugins = [], options = {}) {
95
94
  return remark().use(remarkGfm).use(remarkPlugins).use(remarkHeading).use(remarkStructure, options).processSync(content).data.structuredData;
96
95
  }
97
- function defaultStringifier(config = {}) {
98
- const { filterMdxAttributes, filterElement = (node) => {
99
- switch (node.type) {
100
- case "mdxJsxFlowElement":
101
- case "mdxJsxTextElement":
102
- switch (node.name) {
103
- case "File":
104
- case "TypeTable":
105
- case "Callout":
106
- case "Card": return true;
107
- }
108
- return "children-only";
109
- }
110
- return true;
111
- }, ...customExtension } = config;
112
- function modHandler(handler, ctx) {
113
- return function(node, parent, state, info) {
114
- if (node.data?.structuredData) ctx.addContent(...node.data.structuredData.contents);
115
- if (node.data?._string) return typeof node.data._string === "function" ? node.data._string() : node.data._string;
116
- const visibility = filterElement(node);
117
- if (visibility === false) return "";
118
- switch (node.type) {
119
- case "mdxJsxFlowElement":
120
- case "mdxJsxTextElement": {
121
- if (visibility === "children-only") return node.type === "mdxJsxTextElement" ? state.containerPhrasing(node, info) : state.containerFlow(node, info);
122
- const stringifiedAttributes = [];
123
- for (const attr of node.attributes) {
124
- if (attr.type === "mdxJsxExpressionAttribute") continue;
125
- if (filterMdxAttributes && !filterMdxAttributes(node, attr)) continue;
126
- const str = typeof attr.value === "string" ? attr.value : attr.value?.value;
127
- if (!str) continue;
128
- stringifiedAttributes.push({
129
- ...attr,
130
- value: str
131
- });
132
- }
133
- const temp = node.attributes;
134
- node.attributes = stringifiedAttributes;
135
- const s = handler(node, parent, state, info);
136
- node.attributes = temp;
137
- return s;
138
- }
139
- default:
140
- if (visibility === "children-only") return "children" in node ? state.containerFlow({
141
- type: "root",
142
- children: node.children
143
- }, info) : "";
144
- return handler(node, parent, state, info);
145
- }
146
- };
147
- }
148
- const customToMarkdown = { handlers: {
149
- link(node, _, state, info) {
150
- return state.containerPhrasing(node, info);
151
- },
152
- heading(node, _, state, info) {
153
- return state.containerPhrasing(node, info);
96
+ function defaultStringifier(config) {
97
+ return defaultStringifier$1({
98
+ ...config,
99
+ handlers: {
100
+ link(node, _, state, info) {
101
+ return state.containerPhrasing(node, info);
102
+ },
103
+ heading(node, _, state, info) {
104
+ return state.containerPhrasing(node, info);
105
+ },
106
+ image() {
107
+ return "";
108
+ },
109
+ ...config.handlers
154
110
  },
155
- image() {
156
- return "";
157
- },
158
- _custom(node, _, state, info) {
159
- const handlers = state.handlers;
160
- for (const k in handlers) handlers[k] = modHandler(handlers[k], node.ctx);
161
- return state.handle(node.root, void 0, state, info);
111
+ onStringify(node, ctx) {
112
+ if (node.data?.structuredData) ctx.addContent(...node.data.structuredData.contents);
113
+ config.onStringify?.(node, ctx);
162
114
  }
163
- } };
164
- return function(root, ctx) {
165
- return toMarkdown({
166
- type: "_custom",
167
- root,
168
- ctx
169
- }, {
170
- ...this.data("settings"),
171
- extensions: [
172
- mdxToMarkdown(),
173
- ...this.data("toMarkdownExtensions") ?? [],
174
- customToMarkdown,
175
- customExtension
176
- ]
177
- });
178
- };
115
+ });
179
116
  }
180
117
  //#endregion
181
118
  export { defaultStringifier, remarkStructure, remarkStructureDefaultOptions, structure };
@@ -0,0 +1,2 @@
1
+ import { n as StringifyOptions, r as defaultStringifier, t as Stringifier } from "../stringifier-CugaOXsb.js";
2
+ export { Stringifier, StringifyOptions, defaultStringifier };
@@ -0,0 +1,86 @@
1
+ import { mdxToMarkdown } from "mdast-util-mdx";
2
+ import { toMarkdown } from "mdast-util-to-markdown";
3
+ //#region src/mdx-plugins/stringifier.ts
4
+ function defaultStringifier(config = {}) {
5
+ const { filterMdxAttributes, filterElement = (node) => {
6
+ switch (node.type) {
7
+ case "mdxJsxFlowElement":
8
+ case "mdxJsxTextElement":
9
+ switch (node.name) {
10
+ case "File":
11
+ case "TypeTable":
12
+ case "Callout":
13
+ case "Card": return true;
14
+ }
15
+ return "children-only";
16
+ }
17
+ return true;
18
+ }, onStringify, ...customExtension } = config;
19
+ function modHandler(handler, ctx) {
20
+ return function(node, parent, state, info) {
21
+ let visibility = filterElement(node);
22
+ if (visibility === false) return "";
23
+ if (onStringify) onStringify(node, ctx);
24
+ const extraInfo = node.data?._stringify;
25
+ if (extraInfo) if (extraInfo === "children-only") visibility = "children-only";
26
+ else if ("text" in extraInfo) return extraInfo.text;
27
+ else node = extraInfo.node;
28
+ if (visibility === "children-only") {
29
+ if (!("children" in node)) return "";
30
+ switch (node.type) {
31
+ case "mdxJsxTextElement":
32
+ case "paragraph": return state.containerPhrasing(node, info);
33
+ case "mdxJsxFlowElement": return state.containerFlow(node, info);
34
+ default: return state.containerFlow({
35
+ type: "root",
36
+ children: node.children
37
+ }, info);
38
+ }
39
+ }
40
+ switch (node.type) {
41
+ case "mdxJsxFlowElement":
42
+ case "mdxJsxTextElement": {
43
+ const stringifiedAttributes = [];
44
+ for (const attr of node.attributes) {
45
+ if (attr.type === "mdxJsxExpressionAttribute") continue;
46
+ if (filterMdxAttributes && !filterMdxAttributes(node, attr)) continue;
47
+ const str = typeof attr.value === "string" ? attr.value : attr.value?.value;
48
+ if (!str) continue;
49
+ stringifiedAttributes.push({
50
+ type: "mdxJsxAttribute",
51
+ name: attr.name,
52
+ value: str
53
+ });
54
+ }
55
+ return handler({
56
+ ...node,
57
+ attributes: stringifiedAttributes
58
+ }, parent, state, info);
59
+ }
60
+ default: return handler(node, parent, state, info);
61
+ }
62
+ };
63
+ }
64
+ const customToMarkdown = { handlers: { _custom(node, _, state, info) {
65
+ const handlers = state.handlers;
66
+ for (const k in handlers) handlers[k] = modHandler(handlers[k], node.ctx);
67
+ return state.handle(node.root, void 0, state, info);
68
+ } } };
69
+ return function(root, ctx) {
70
+ return toMarkdown({
71
+ type: "_custom",
72
+ root,
73
+ ctx
74
+ }, {
75
+ ...this?.data("settings"),
76
+ extensions: [
77
+ mdxToMarkdown(),
78
+ ...this?.data("toMarkdownExtensions") ?? [],
79
+ customToMarkdown,
80
+ customExtension
81
+ ]
82
+ });
83
+ };
84
+ }
85
+ //#endregion
86
+ export { defaultStringifier };
@@ -1,3 +1,3 @@
1
1
  import { a as Separator, i as Root, n as Item, r as Node, t as Folder } from "../definitions-AAtMxt2w.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 "../index-DZ_vpLwy.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 "../index-BDymJpj4.js";
3
3
  export { Folder, Item, Node, Root, Separator, findNeighbour, findParent, findPath, findSiblings, flattenTree, getPageTreePeers, getPageTreeRoots, visit };
@@ -1,4 +1,4 @@
1
- import { s as TOCItemType } from "./toc-CwccnCch.js";
1
+ import { s as TOCItemType } from "./toc-DmllTzmG.js";
2
2
  import { Transformer } from "unified";
3
3
  import { Heading, Root } from "mdast";
4
4
 
@@ -1,5 +1,5 @@
1
+ import { n as StringifyOptions$1, t as Stringifier$1 } from "./stringifier-CugaOXsb.js";
1
2
  import { MdxJsxAttribute, MdxJsxExpressionAttribute, MdxJsxFlowElement, MdxJsxTextElement } from "mdast-util-mdx";
2
- import { Options } from "mdast-util-to-markdown";
3
3
  import { PluggableList, Processor, Transformer } from "unified";
4
4
  import { Nodes, Root } from "mdast";
5
5
 
@@ -19,45 +19,6 @@ interface StructuredData {
19
19
  */
20
20
  contents: StructuredDataContent[];
21
21
  }
22
- type Stringifier = (this: Processor, node: Nodes, ctx: StringifierContext) => string;
23
- interface StringifierContext {
24
- addContent: (...content: StructuredDataContent[]) => void;
25
- }
26
- interface StringifyOptions {
27
- /**
28
- * Filter the elements to be included in the output:
29
- *
30
- * - `true`: include element & its children.
31
- * - `children-only`: exclude element but keep its children.
32
- * - `false`: exclude element & its children.
33
- *
34
- * Default:
35
- *
36
- * ```ts
37
- * filterElement = (node) => {
38
- * switch (node.type) {
39
- * case 'mdxJsxFlowElement':
40
- * case 'mdxJsxTextElement':
41
- * switch (node.name) {
42
- * case 'File':
43
- * case 'TypeTable':
44
- * case 'Callout':
45
- * case 'Card':
46
- * return true;
47
- * }
48
- * return 'children-only';
49
- * }
50
- *
51
- * return true;
52
- * },
53
- * ```
54
- */
55
- filterElement?: (node: Nodes) => boolean | 'children-only';
56
- /**
57
- * Filter the attributes to stringify.
58
- */
59
- filterMdxAttributes?: (node: MdxJsxFlowElement | MdxJsxTextElement, attribute: MdxJsxAttribute | MdxJsxExpressionAttribute) => boolean;
60
- }
61
22
  interface StructureOptions {
62
23
  /**
63
24
  * MDAST node types to be scanned as a content block.
@@ -86,10 +47,6 @@ interface StructureOptions {
86
47
  }
87
48
  declare module 'mdast' {
88
49
  interface Data {
89
- /**
90
- * [Fumadocs: remark-structure] The stringified form of node for generating search index.
91
- */
92
- _string?: string | (() => string);
93
50
  /**
94
51
  * [Fumadocs: remark-structure] Items to add to the structured data.
95
52
  */
@@ -127,6 +84,11 @@ declare function remarkStructure(this: Processor, {
127
84
  * Extract data from markdown/mdx content
128
85
  */
129
86
  declare function structure(content: string, remarkPlugins?: PluggableList, options?: StructureOptions): StructuredData;
130
- declare function defaultStringifier(config?: Options & StringifyOptions): Stringifier;
87
+ interface StringifierContext {
88
+ addContent: (...content: StructuredDataContent[]) => void;
89
+ }
90
+ type Stringifier = Stringifier$1<StringifierContext>;
91
+ type StringifyOptions = StringifyOptions$1<StringifierContext>;
92
+ declare function defaultStringifier(config: StringifyOptions): Stringifier;
131
93
  //#endregion
132
- export { remarkStructure as a, defaultStringifier as i, StructureOptions as n, remarkStructureDefaultOptions as o, StructuredData as r, structure as s, StringifyOptions as t };
94
+ export { defaultStringifier as a, structure as c, StructuredData as i, StringifyOptions as n, remarkStructure as o, StructureOptions as r, remarkStructureDefaultOptions as s, Stringifier as t };
@@ -1,2 +1,2 @@
1
- import { a as sync, i as setIndexSettings, n as DocumentRecord, o as updateDocuments, r as SyncOptions, t as BaseIndex } from "../algolia-CwyuBbIb.js";
1
+ import { a as sync, i as setIndexSettings, n as DocumentRecord, o as updateDocuments, r as SyncOptions, t as BaseIndex } from "../algolia-BcNfAtYC.js";
2
2
  export { BaseIndex, DocumentRecord, SyncOptions, setIndexSettings, sync, updateDocuments };
@@ -1,2 +1,2 @@
1
- import { m as algoliaClient, p as AlgoliaOptions } from "../../client-DS68wTeB.js";
1
+ import { m as algoliaClient, p as AlgoliaOptions } from "../../client-9fKBmECY.js";
2
2
  export { AlgoliaOptions, algoliaClient };
@@ -1,2 +1,2 @@
1
- import { _ as FetchOptions, v as fetchClient } from "../../client-DS68wTeB.js";
1
+ import { _ as FetchOptions, v as fetchClient } from "../../client-9fKBmECY.js";
2
2
  export { FetchOptions, fetchClient };
@@ -1,2 +1,2 @@
1
- import { a as flexsearchStaticClient, i as FlexsearchStaticOptions } from "../../client-DS68wTeB.js";
1
+ import { a as flexsearchStaticClient, i as FlexsearchStaticOptions } from "../../client-9fKBmECY.js";
2
2
  export { FlexsearchStaticOptions, flexsearchStaticClient };
@@ -1,2 +1,2 @@
1
- import { c as mixedbreadClient, o as MixedbreadOptions, s as SearchMetadata } from "../../client-DS68wTeB.js";
1
+ import { c as mixedbreadClient, o as MixedbreadOptions, s as SearchMetadata } from "../../client-9fKBmECY.js";
2
2
  export { MixedbreadOptions, SearchMetadata, mixedbreadClient };
@@ -1,2 +1,2 @@
1
- import { l as OramaCloudLegacyOptions, u as oramaCloudLegacyClient } from "../../client-DS68wTeB.js";
1
+ import { l as OramaCloudLegacyOptions, u as oramaCloudLegacyClient } from "../../client-9fKBmECY.js";
2
2
  export { OramaCloudLegacyOptions, oramaCloudLegacyClient };
@@ -1,2 +1,2 @@
1
- import { d as OramaCloudOptions, f as oramaCloudClient } from "../../client-DS68wTeB.js";
1
+ import { d as OramaCloudOptions, f as oramaCloudClient } from "../../client-9fKBmECY.js";
2
2
  export { OramaCloudOptions, oramaCloudClient };
@@ -1,2 +1,2 @@
1
- import { g as oramaStaticClient, h as StaticOptions } from "../../client-DS68wTeB.js";
1
+ import { g as oramaStaticClient, h as StaticOptions } from "../../client-9fKBmECY.js";
2
2
  export { StaticOptions, oramaStaticClient };
@@ -1,2 +1,2 @@
1
- import { _ as FetchOptions, d as OramaCloudOptions, h as StaticOptions, n as SearchClient, p as AlgoliaOptions, r as useDocsSearch, t as ClientPreset } from "../client-DS68wTeB.js";
1
+ import { _ as FetchOptions, d as OramaCloudOptions, h as StaticOptions, n as SearchClient, p as AlgoliaOptions, r as useDocsSearch, t as ClientPreset } from "../client-9fKBmECY.js";
2
2
  export { AlgoliaOptions, ClientPreset, FetchOptions, OramaCloudOptions, SearchClient, StaticOptions, useDocsSearch };
@@ -1,7 +1,7 @@
1
1
  import { t as Awaitable } from "../types-3ccArm6T.js";
2
- import { t as I18nConfig } from "../index-CNf0Q1pt.js";
3
- import { m as SharedIndex, n as SearchAPI, t as QueryOptions } from "../server-C0aEeWdv.js";
4
- import { i as LoaderConfig, o as LoaderOutput, u as Page } from "../index-_S7CzA5M.js";
2
+ import { t as I18nConfig } from "../index-CsYVANvj.js";
3
+ import { m as SharedIndex, n as SearchAPI, t as QueryOptions } from "../server-BVKBFI75.js";
4
+ import { i as LoaderConfig, o as LoaderOutput, u as Page } from "../index-C5QIKZDy.js";
5
5
  import { DocumentData, DocumentOptions } from "flexsearch";
6
6
 
7
7
  //#region src/search/server/build-doc.d.ts
@@ -1,2 +1,2 @@
1
- import { i as createContentHighlighter, n as ReactSortedResult, r as SortedResult, t as HighlightedText } from "../index-CTt-rhJo.js";
1
+ import { i as createContentHighlighter, n as ReactSortedResult, r as SortedResult, t as HighlightedText } from "../index-Ch9QIdT6.js";
2
2
  export { HighlightedText, ReactSortedResult, SortedResult, createContentHighlighter };
@@ -1,5 +1,5 @@
1
- import { r as SortedResult } from "../index-CTt-rhJo.js";
2
- import { n as SearchAPI } from "../server-C0aEeWdv.js";
1
+ import { r as SortedResult } from "../index-Ch9QIdT6.js";
2
+ import { n as SearchAPI } from "../server-BVKBFI75.js";
3
3
  import Mixedbread from "@mixedbread/sdk";
4
4
  import { StoreSearchResponse } from "@mixedbread/sdk/resources/stores";
5
5
 
@@ -1,4 +1,4 @@
1
- import { r as StructuredData } from "../remark-structure-w0J2HdSr.js";
1
+ import { i as StructuredData } from "../remark-structure-CILz6H_T.js";
2
2
  import { CloudManager } from "@oramacloud/client";
3
3
 
4
4
  //#region src/search/orama-cloud-legacy.d.ts
@@ -1,4 +1,4 @@
1
- import { r as StructuredData } from "../remark-structure-w0J2HdSr.js";
1
+ import { i as StructuredData } from "../remark-structure-CILz6H_T.js";
2
2
  import { OramaCloud } from "@orama/core";
3
3
 
4
4
  //#region src/search/orama-cloud.d.ts
@@ -1,2 +1,2 @@
1
- import { a as AdvancedOptions, c as SimpleOptions, d as createSearchAPI, f as initAdvancedSearch, i as AdvancedIndex, l as createFromSource, n as SearchAPI, o as ExportedData, p as initSimpleSearch, r as SearchServer, s as Index, t as QueryOptions, u as createI18nSearchAPI } from "../server-C0aEeWdv.js";
1
+ import { a as AdvancedOptions, c as SimpleOptions, d as createSearchAPI, f as initAdvancedSearch, i as AdvancedIndex, l as createFromSource, n as SearchAPI, o as ExportedData, p as initSimpleSearch, r as SearchServer, s as Index, t as QueryOptions, u as createI18nSearchAPI } from "../server-BVKBFI75.js";
2
2
  export { AdvancedIndex, AdvancedOptions, ExportedData, Index, QueryOptions, SearchAPI, SearchServer, SimpleOptions, createFromSource, createI18nSearchAPI, createSearchAPI, initAdvancedSearch, initSimpleSearch };
@@ -1,8 +1,8 @@
1
1
  import { t as Awaitable } from "./types-3ccArm6T.js";
2
- import { r as StructuredData } from "./remark-structure-w0J2HdSr.js";
3
- import { t as I18nConfig } from "./index-CNf0Q1pt.js";
4
- import { r as SortedResult } from "./index-CTt-rhJo.js";
5
- import { i as LoaderConfig, o as LoaderOutput, u as Page } from "./index-_S7CzA5M.js";
2
+ import { i as StructuredData } from "./remark-structure-CILz6H_T.js";
3
+ import { t as I18nConfig } from "./index-CsYVANvj.js";
4
+ import { r as SortedResult } from "./index-Ch9QIdT6.js";
5
+ import { i as LoaderConfig, o as LoaderOutput, u as Page } from "./index-C5QIKZDy.js";
6
6
  import { Language, Orama, RawData, SearchParams, TypedDocument, create } from "@orama/orama";
7
7
 
8
8
  //#region src/search/orama/create-db.d.ts
@@ -1,2 +1,2 @@
1
- import { i as useFumadocsLoader, n as SerializedPageTree, r as deserializePageTree, t as Serialized } from "../../index-Dq8ULFjO.js";
1
+ import { i as useFumadocsLoader, n as SerializedPageTree, r as deserializePageTree, t as Serialized } from "../../index-Cq7hKKw4.js";
2
2
  export { Serialized, SerializedPageTree, deserializePageTree, useFumadocsLoader };
@@ -1,2 +1,2 @@
1
- import { A as PageData, C as PageTreeTransformer, D as ContentStoragePageFile, E as ContentStorageMetaFile, F as _SourceUpdate_, I as multiple, L as source, M as SourceConfig, N as VirtualFile, O as FileSystem, P as _ConfigUnion_, R as update, S as PageTreeOptions, T as ContentStorageFile, _ as getSlugs, a as LoaderOptions, b as PageTreeBuilder, c as LoaderPluginOption, d as ResolvedLoaderConfig, f as createGetUrl, h as llms, i as LoaderConfig, j as Source, k as MetaData, l as Meta, m as LLMsConfig, n as InferMetaType, o as LoaderOutput, p as loader, r as InferPageType, s as LoaderPlugin, t as path_d_exports, u as Page, w as ContentStorage, x as PageTreeBuilderContext } from "../index-_S7CzA5M.js";
1
+ import { A as PageData, C as PageTreeTransformer, D as ContentStoragePageFile, E as ContentStorageMetaFile, F as _SourceUpdate_, I as multiple, L as source, M as SourceConfig, N as VirtualFile, O as FileSystem, P as _ConfigUnion_, R as update, S as PageTreeOptions, T as ContentStorageFile, _ as getSlugs, a as LoaderOptions, b as PageTreeBuilder, c as LoaderPluginOption, d as ResolvedLoaderConfig, f as createGetUrl, h as llms, i as LoaderConfig, j as Source, k as MetaData, l as Meta, m as LLMsConfig, n as InferMetaType, o as LoaderOutput, p as loader, r as InferPageType, s as LoaderPlugin, t as path_d_exports, u as Page, w as ContentStorage, x as PageTreeBuilderContext } from "../index-C5QIKZDy.js";
2
2
  export { ContentStorage, ContentStorageFile, ContentStorageMetaFile, ContentStoragePageFile, FileSystem, InferMetaType, InferPageType, LLMsConfig, LoaderConfig, LoaderOptions, LoaderOutput, LoaderPlugin, LoaderPluginOption, Meta, MetaData, Page, PageData, PageTreeBuilder, PageTreeBuilderContext, PageTreeOptions, PageTreeTransformer, path_d_exports as PathUtils, ResolvedLoaderConfig, Source, SourceConfig, VirtualFile, _ConfigUnion_, _SourceUpdate_, createGetUrl, getSlugs, llms, loader, multiple, source, update };
@@ -1,4 +1,4 @@
1
- import { s as LoaderPlugin } from "../../index-_S7CzA5M.js";
1
+ import { s as LoaderPlugin } from "../../index-C5QIKZDy.js";
2
2
  import { icons } from "lucide-react";
3
3
 
4
4
  //#region src/source/plugins/lucide-icons.d.ts
@@ -1,2 +1,2 @@
1
- import { _ as getSlugs, g as SlugFn, v as slugsFromData, y as slugsPlugin } from "../../index-_S7CzA5M.js";
1
+ import { _ as getSlugs, g as SlugFn, v as slugsFromData, y as slugsPlugin } from "../../index-C5QIKZDy.js";
2
2
  export { SlugFn, getSlugs, slugsFromData, slugsPlugin };
@@ -1,5 +1,5 @@
1
1
  import { a as Separator$1, n as Item$1, t as Folder$1 } from "../../definitions-AAtMxt2w.js";
2
- import { s as LoaderPlugin } from "../../index-_S7CzA5M.js";
2
+ import { s as LoaderPlugin } from "../../index-C5QIKZDy.js";
3
3
  import { ReactNode } from "react";
4
4
 
5
5
  //#region src/source/plugins/status-badges.d.ts
@@ -0,0 +1,64 @@
1
+ import { MdxJsxAttribute, MdxJsxExpressionAttribute, MdxJsxFlowElement, MdxJsxTextElement } from "mdast-util-mdx";
2
+ import { Options } from "mdast-util-to-markdown";
3
+ import { Processor } from "unified";
4
+ import { Nodes } from "mdast";
5
+
6
+ //#region src/mdx-plugins/stringifier.d.ts
7
+ declare module 'mdast' {
8
+ interface Data {
9
+ /**
10
+ * [Fumadocs: stringify] Extra info for stringifying the node:
11
+ * - `children-only`: only stringify its children.
12
+ * - `{ node }`: stringify as another node.
13
+ * - `{ text }`: the stringified form of node.
14
+ */
15
+ _stringify?: 'children-only' | {
16
+ node: Nodes;
17
+ } | {
18
+ text: string;
19
+ };
20
+ }
21
+ }
22
+ type Stringifier<Context> = ((this: Processor, node: Nodes, ctx: Context) => string) | ((node: Nodes, ctx: Context) => string);
23
+ interface StringifyOptions<Context = undefined> extends Options {
24
+ /**
25
+ * Filter the elements to be included in the output:
26
+ *
27
+ * - `true`: include element & its children.
28
+ * - `children-only`: exclude element but keep its children.
29
+ * - `false`: exclude element & its children.
30
+ *
31
+ * Default:
32
+ *
33
+ * ```ts
34
+ * filterElement = (node) => {
35
+ * switch (node.type) {
36
+ * case 'mdxJsxFlowElement':
37
+ * case 'mdxJsxTextElement':
38
+ * switch (node.name) {
39
+ * case 'File':
40
+ * case 'TypeTable':
41
+ * case 'Callout':
42
+ * case 'Card':
43
+ * return true;
44
+ * }
45
+ * return 'children-only';
46
+ * }
47
+ *
48
+ * return true;
49
+ * },
50
+ * ```
51
+ */
52
+ filterElement?: (node: Nodes) => boolean | 'children-only';
53
+ /**
54
+ * Filter the attributes to stringify.
55
+ */
56
+ filterMdxAttributes?: (node: MdxJsxFlowElement | MdxJsxTextElement, attribute: MdxJsxAttribute | MdxJsxExpressionAttribute) => boolean;
57
+ /**
58
+ * run before stringifying any nodes
59
+ */
60
+ onStringify?: (node: Nodes, ctx: Context) => void;
61
+ }
62
+ declare function defaultStringifier<Context>(config?: StringifyOptions<Context>): Stringifier<Context>;
63
+ //#endregion
64
+ export { StringifyOptions as n, defaultStringifier as r, Stringifier as t };
package/dist/toc.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { a as TOCItem, c as TableOfContents, i as ScrollProviderProps, l as useActiveAnchor, n as AnchorProviderProps, o as TOCItemProps, r as ScrollProvider, s as TOCItemType, t as AnchorProvider, u as useActiveAnchors } from "./toc-CwccnCch.js";
1
+ import { a as TOCItem, c as TableOfContents, i as ScrollProviderProps, l as useActiveAnchor, n as AnchorProviderProps, o as TOCItemProps, r as ScrollProvider, s as TOCItemType, t as AnchorProvider, u as useActiveAnchors } from "./toc-DmllTzmG.js";
2
2
  export { AnchorProvider, AnchorProviderProps, ScrollProvider, ScrollProviderProps, TOCItem, TOCItemProps, TOCItemType, TableOfContents, useActiveAnchor, useActiveAnchors };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fumadocs-core",
3
- "version": "16.6.16",
3
+ "version": "16.6.17",
4
4
  "description": "The React.js library for building a documentation website",
5
5
  "keywords": [
6
6
  "Docs",
@@ -150,7 +150,7 @@
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.4.0",
153
+ "@types/node": "25.5.0",
154
154
  "@types/react": "^19.2.14",
155
155
  "@types/react-dom": "^19.2.3",
156
156
  "algoliasearch": "5.49.2",
@@ -161,7 +161,7 @@
161
161
  "remark-directive": "^4.0.0",
162
162
  "remark-mdx": "^3.1.1",
163
163
  "remove-markdown": "^0.6.3",
164
- "tsdown": "0.21.1",
164
+ "tsdown": "0.21.2",
165
165
  "typescript": "^5.9.3",
166
166
  "waku": "1.0.0-alpha.5",
167
167
  "zod": "^4.3.6",
File without changes
File without changes