fumadocs-core 16.15.6 → 16.15.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,10 @@
1
- import { t as RehypeCodeOptions } from "../../rehype-code-D-RFJb9W.js";
1
+ import { t as RehypeCodeOptions } from "../../rehype-code-BgS9oBmJ.js";
2
2
  import { t as RemarkImageOptions } from "../../remark-image-BI2S9LOb.js";
3
3
  import { r as StructureOptions } from "../../remark-structure-CnHwvNZr.js";
4
4
  import { t as RemarkHeadingOptions } from "../../remark-heading-DEIzTkU5.js";
5
5
  import { t as RemarkCodeTabOptions } from "../../remark-code-tab-DE_4bdnu.js";
6
6
  import { t as RemarkNpmOptions } from "../../remark-npm-BbpvkJaT.js";
7
- import "../../index-BhgPrb5p.js";
7
+ import "../../index-BhCV0aBx.js";
8
8
  import { t as ResolvePlugins } from "../../util-BDsqOxh3.js";
9
9
  import { Pluggable } from "unified";
10
10
  import { ProcessorOptions } from "@mdx-js/mdx";
@@ -1,10 +1,10 @@
1
- import { t as RehypeCodeOptions } from "../../rehype-code-D-RFJb9W.js";
1
+ import { t as RehypeCodeOptions } from "../../rehype-code-BgS9oBmJ.js";
2
2
  import { t as RemarkImageOptions } from "../../remark-image-BI2S9LOb.js";
3
3
  import { r as StructureOptions } from "../../remark-structure-CnHwvNZr.js";
4
4
  import { t as RemarkHeadingOptions } from "../../remark-heading-DEIzTkU5.js";
5
5
  import { t as RemarkCodeTabOptions } from "../../remark-code-tab-DE_4bdnu.js";
6
6
  import { t as RemarkNpmOptions } from "../../remark-npm-BbpvkJaT.js";
7
- import "../../index-BhgPrb5p.js";
7
+ import "../../index-BhCV0aBx.js";
8
8
  import { t as ResolvePlugins } from "../../util-BDsqOxh3.js";
9
9
  import { ProcessorOptions } from "@mdx-js/mdx";
10
10
  //#region src/content/mdx/preset-runtime.d.ts
@@ -1,7 +1,7 @@
1
1
  import { a as Separator, i as Root, n as Item, r as Node, t as Folder } from "./definitions-CFOhwE1k.js";
2
2
  import { t as Awaitable } from "./types-D89QoQR-.js";
3
3
  import { i as StructuredData } from "./remark-structure-CnHwvNZr.js";
4
- import "./index-BhgPrb5p.js";
4
+ import "./index-BhCV0aBx.js";
5
5
  import { n as I18nConfig } from "./index-DydiXvgS.js";
6
6
  import "./index-E8Qh_yQs.js";
7
7
  import { n as SerializedPageTree } from "./index-B-0R0VbS.js";
@@ -1,5 +1,5 @@
1
1
  import "./remark-gfm-DpVfAX1x.js";
2
- import "./rehype-code-D-RFJb9W.js";
2
+ import "./rehype-code-BgS9oBmJ.js";
3
3
  import "./remark-image-BI2S9LOb.js";
4
4
  import "./remark-structure-CnHwvNZr.js";
5
5
  import "./remark-heading-DEIzTkU5.js";
@@ -1,7 +1,7 @@
1
1
  import { n as remarkGfm, t as RemarkGfmOptions } from "../remark-gfm-DpVfAX1x.js";
2
- import { i as transformerTab } from "../rehype-code.core-BjH1uHWj.js";
2
+ import { i as transformerTab } from "../rehype-code.core-DiSTr8bK.js";
3
3
  import { r as transformerIcon, t as CodeBlockIcon } from "../transformer-icon-DlrneIS3.js";
4
- import { n as rehypeCode, r as rehypeCodeDefaultOptions, t as RehypeCodeOptions } from "../rehype-code-D-RFJb9W.js";
4
+ import { n as rehypeCode, r as rehypeCodeDefaultOptions, t as RehypeCodeOptions } from "../rehype-code-BgS9oBmJ.js";
5
5
  import { n as remarkImage, t as RemarkImageOptions } from "../remark-image-BI2S9LOb.js";
6
6
  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-CnHwvNZr.js";
7
7
  import { n as remarkHeading, t as RemarkHeadingOptions } from "../remark-heading-DEIzTkU5.js";
@@ -16,5 +16,5 @@ import { a as remarkMdxFiles, r as RemarkMdxFilesOptions } from "../remark-mdx-f
16
16
  import { n as remarkMdxMermaid, t as RemarkMdxMermaidOptions } from "../remark-mdx-mermaid-C1bCHHc6.js";
17
17
  import { n as RemarkFeedbackBlockOptions, r as remarkFeedbackBlock, t as FeedbackBlockProps } from "../remark-feedback-block-BxtINXN-.js";
18
18
  import { t as LLMsOptions } from "../remark-llms-DxglVo94.js";
19
- import "../index-BhgPrb5p.js";
19
+ import "../index-BhCV0aBx.js";
20
20
  export { CodeBlockAttributes, type CodeBlockIcon, CodeBlockTabsOptions, FeedbackBlockProps, type LLMsOptions, RehypeCodeOptions, RehypeTOCItemType, RehypeTocOptions, RemarkAdmonitionOptions, RemarkCodeTabOptions, RemarkDirectiveAdmonitionOptions, RemarkFeedbackBlockOptions, type 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,7 +1,7 @@
1
1
  import { remarkHeading } from "./remark-heading.js";
2
2
  import { generateCodeBlockTabs, parseCodeBlockAttributes } from "./codeblock-utils.js";
3
3
  import { remarkGfm } from "./remark-gfm.js";
4
- import { r as transformerTab } from "../rehype-code.core-BUwNuchP.js";
4
+ import { r as transformerTab } from "../rehype-code.core-BwKlAUQz.js";
5
5
  import { transformerIcon } from "./transformer-icon.js";
6
6
  import { rehypeCode, rehypeCodeDefaultOptions } from "./rehype-code.js";
7
7
  import { remarkImage } from "./remark-image.js";
@@ -1,3 +1,3 @@
1
- import { i as transformerTab, n as createRehypeCode, r as rehypeCodeDefaultOptions, t as RehypeCodeOptionsCommon } from "../rehype-code.core-BjH1uHWj.js";
1
+ import { i as transformerTab, n as createRehypeCode, r as rehypeCodeDefaultOptions, t as RehypeCodeOptionsCommon } from "../rehype-code.core-DiSTr8bK.js";
2
2
  import { r as transformerIcon, t as CodeBlockIcon } from "../transformer-icon-DlrneIS3.js";
3
3
  export { type CodeBlockIcon, RehypeCodeOptionsCommon, createRehypeCode, rehypeCodeDefaultOptions, transformerIcon, transformerTab };
@@ -1,3 +1,3 @@
1
- import { n as rehypeCodeDefaultOptions, r as transformerTab, t as createRehypeCode } from "../rehype-code.core-BUwNuchP.js";
1
+ import { n as rehypeCodeDefaultOptions, r as transformerTab, t as createRehypeCode } from "../rehype-code.core-BwKlAUQz.js";
2
2
  import { transformerIcon } from "./transformer-icon.js";
3
3
  export { createRehypeCode, rehypeCodeDefaultOptions, transformerIcon, transformerTab };
@@ -1,4 +1,4 @@
1
- import { i as transformerTab } from "../rehype-code.core-BjH1uHWj.js";
1
+ import { i as transformerTab } from "../rehype-code.core-DiSTr8bK.js";
2
2
  import { r as transformerIcon, t as CodeBlockIcon } from "../transformer-icon-DlrneIS3.js";
3
- import { n as rehypeCode, r as rehypeCodeDefaultOptions, t as RehypeCodeOptions } from "../rehype-code-D-RFJb9W.js";
3
+ import { n as rehypeCode, r as rehypeCodeDefaultOptions, t as RehypeCodeOptions } from "../rehype-code-BgS9oBmJ.js";
4
4
  export { type CodeBlockIcon, RehypeCodeOptions, rehypeCode, rehypeCodeDefaultOptions, transformerIcon, transformerTab };
@@ -1,5 +1,5 @@
1
1
  import { defaultShikiFactory, wasmShikiFactory } from "../highlight/shiki/full.js";
2
- import { n as rehypeCodeDefaultOptions$1, r as transformerTab, t as createRehypeCode } from "../rehype-code.core-BUwNuchP.js";
2
+ import { n as rehypeCodeDefaultOptions$1, r as transformerTab, t as createRehypeCode } from "../rehype-code.core-BwKlAUQz.js";
3
3
  import { transformerIcon } from "./transformer-icon.js";
4
4
  //#region src/mdx-plugins/rehype-code.ts
5
5
  const rehypeCodeDefaultOptions = {
@@ -1,4 +1,4 @@
1
- import { t as RehypeCodeOptionsCommon } from "./rehype-code.core-BjH1uHWj.js";
1
+ import { t as RehypeCodeOptionsCommon } from "./rehype-code.core-DiSTr8bK.js";
2
2
  //#region src/mdx-plugins/rehype-code.d.ts
3
3
  type RehypeCodeOptions = RehypeCodeOptionsCommon & {
4
4
  /**
@@ -71,6 +71,12 @@ function rehypeShikiFromHighlighter(highlighter, options) {
71
71
  }
72
72
  };
73
73
  if (stripEndNewline && code.endsWith("\n")) code = code.slice(0, -1);
74
+ const prepare = [];
75
+ for (const transformer of transformers) {
76
+ const task = transformer._fd_prepare?.(code, codeOptions);
77
+ if (task) prepare.push(task);
78
+ }
79
+ if (prepare.length > 0) await Promise.all(prepare);
74
80
  const fragment = highlighter.codeToHast(code, codeOptions);
75
81
  if (_fd_postprocess && _fd_postprocess.length > 0) {
76
82
  const ctx = { highlighter };
@@ -3,7 +3,7 @@ import { t as Awaitable } from "./types-D89QoQR-.js";
3
3
  import { n as ShikiFactory } from "./index-BMEUQz-F.js";
4
4
  import { Processor, Transformer } from "unified";
5
5
  import { Element, Root } from "hast";
6
- import { BuiltinLanguage, BuiltinTheme, CodeOptionsMeta, CodeOptionsThemes, CodeToHastOptionsCommon, HighlighterCore, LanguageInput, ShikiTransformer, TransformerOptions } from "shiki";
6
+ import { BuiltinLanguage, BuiltinTheme, CodeOptionsMeta, CodeOptionsThemes, CodeToHastOptions, CodeToHastOptionsCommon, HighlighterCore, LanguageInput, ShikiTransformer, TransformerOptions } from "shiki";
7
7
  //#region src/mdx-plugins/rehype-code/parsers.d.ts
8
8
  type InlineCodeParser = 'tailing-curly-colon';
9
9
  //#endregion
@@ -81,6 +81,10 @@ declare module 'shiki' {
81
81
  highlighter: HighlighterCore;
82
82
  }) => Promise<void>)[];
83
83
  }
84
+ interface ShikiTransformer {
85
+ /** [Fumadocs: rehype-code] run async tasks before highlighting the code block */
86
+ _fd_prepare?: (code: string, options: CodeToHastOptions) => Promise<void> | void;
87
+ }
84
88
  }
85
89
  //#endregion
86
90
  //#region src/mdx-plugins/rehype-code.core.d.ts
@@ -1,8 +1,8 @@
1
1
  import { t as Awaitable } from "../types-D89QoQR-.js";
2
2
  import { n as I18nConfig } from "../index-DydiXvgS.js";
3
3
  import "../index-BM36H-xw.js";
4
- import { m as SharedIndex, n as SearchAPI, t as QueryOptions } from "../server-Bd954Rsp.js";
5
- import { b as LoaderOutput, v as LoaderConfig } from "../index-BL0I0wLZ.js";
4
+ import { m as SharedIndex, n as SearchAPI, t as QueryOptions } from "../server-CWA0y2Az.js";
5
+ import { b as LoaderOutput, v as LoaderConfig } from "../index-BRReQe5Z.js";
6
6
  import { DocumentData, DocumentOptions } from "flexsearch";
7
7
  //#region src/search/server/build-doc.d.ts
8
8
  interface SharedDocument {
@@ -1,5 +1,5 @@
1
1
  import { r as SortedResult } from "../index-BM36H-xw.js";
2
- import { n as SearchAPI } from "../server-Bd954Rsp.js";
2
+ import { n as SearchAPI } from "../server-CWA0y2Az.js";
3
3
  import Mixedbread from "@mixedbread/sdk";
4
4
  import { StoreSearchResponse } from "@mixedbread/sdk/resources/stores";
5
5
  //#region src/search/mixedbread.d.ts
@@ -1,5 +1,5 @@
1
1
  import { i as StructuredData } from "../remark-structure-CnHwvNZr.js";
2
- import "../index-BhgPrb5p.js";
2
+ import "../index-BhCV0aBx.js";
3
3
  import { CloudManager } from "@oramacloud/client";
4
4
  //#region src/search/orama-cloud-legacy.d.ts
5
5
  interface SyncOptions {
@@ -1,5 +1,5 @@
1
1
  import { i as StructuredData } from "../remark-structure-CnHwvNZr.js";
2
- import "../index-BhgPrb5p.js";
2
+ import "../index-BhCV0aBx.js";
3
3
  import { OramaCloud } from "@orama/core";
4
4
  //#region src/search/orama-cloud.d.ts
5
5
  interface SyncOptions {
@@ -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-Bd954Rsp.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-CWA0y2Az.js";
2
2
  export { AdvancedIndex, AdvancedOptions, ExportedData, Index, QueryOptions, SearchAPI, SearchServer, SimpleOptions, createFromSource, createI18nSearchAPI, createSearchAPI, initAdvancedSearch, initSimpleSearch };
@@ -2,7 +2,7 @@ import { t as Awaitable } from "./types-D89QoQR-.js";
2
2
  import { i as StructuredData } from "./remark-structure-CnHwvNZr.js";
3
3
  import { n as I18nConfig } from "./index-DydiXvgS.js";
4
4
  import { r as SortedResult } from "./index-BM36H-xw.js";
5
- import { b as LoaderOutput, v as LoaderConfig } from "./index-BL0I0wLZ.js";
5
+ import { b as LoaderOutput, v as LoaderConfig } from "./index-BRReQe5Z.js";
6
6
  import { Language, RawData, SearchParams, TypedDocument, ZBSearch, create } from "zbsearch";
7
7
  //#region src/search/zbsearch/create-db.d.ts
8
8
  type SimpleDocument = TypedDocument<ZBSearch<typeof simpleSchema>>;
@@ -1,2 +1,2 @@
1
- import { h as dynamicLoader, m as DynamicLoaderConfig, p as DynamicLoader } from "../index-BL0I0wLZ.js";
1
+ import { h as dynamicLoader, m as DynamicLoaderConfig, p as DynamicLoader } from "../index-BRReQe5Z.js";
2
2
  export { DynamicLoader, DynamicLoaderConfig, dynamicLoader };
@@ -1,2 +1,2 @@
1
- import { B as ContentStoragePageFile, C as Meta, D as loader, E as createGetUrl, F as PageTreeBuilderContext, I as PageTreeOptions, L as PageTreeTransformer, O as types_d_exports, P as PageTreeBuilder, R as ContentStorage, S as LoaderPluginOption, T as ResolvedLoaderConfig, V as FileSystem, _ as InferPageType, a as MetaData, b as LoaderOutput, c as SourceUnion, d as multiple, f as update, g as InferMetaType, h as dynamicLoader, i as DynamicSource, j as getSlugs, l as StaticSource, m as DynamicLoaderConfig, n as llms, o as PageData, p as DynamicLoader, r as path_d_exports, s as Source, t as LLMsConfig, u as VirtualFile, v as LoaderConfig, w as Page, x as LoaderPlugin, y as LoaderOptions, z as ContentStorageMetaFile } from "../index-BL0I0wLZ.js";
1
+ import { B as ContentStoragePageFile, C as Meta, D as loader, E as createGetUrl, F as PageTreeBuilderContext, I as PageTreeOptions, L as PageTreeTransformer, O as types_d_exports, P as PageTreeBuilder, R as ContentStorage, S as LoaderPluginOption, T as ResolvedLoaderConfig, V as FileSystem, _ as InferPageType, a as MetaData, b as LoaderOutput, c as SourceUnion, d as multiple, f as update, g as InferMetaType, h as dynamicLoader, i as DynamicSource, j as getSlugs, l as StaticSource, m as DynamicLoaderConfig, n as llms, o as PageData, p as DynamicLoader, r as path_d_exports, s as Source, t as LLMsConfig, u as VirtualFile, v as LoaderConfig, w as Page, x as LoaderPlugin, y as LoaderOptions, z as ContentStorageMetaFile } from "../index-BRReQe5Z.js";
2
2
  export { type ContentStorage, type ContentStorageMetaFile, type ContentStoragePageFile, type DynamicLoader, type DynamicLoaderConfig, type DynamicSource, FileSystem, InferMetaType, InferPageType, LLMsConfig, LoaderConfig, LoaderOptions, LoaderOutput, LoaderPlugin, LoaderPluginOption, Meta, type MetaData, Page, type PageData, type PageTreeBuilder, type PageTreeBuilderContext, type PageTreeOptions, type PageTreeTransformer, path_d_exports as PathUtils, ResolvedLoaderConfig, type Source, type SourceUnion, type StaticSource, type VirtualFile, type types_d_exports as _Internal, createGetUrl, dynamicLoader, getSlugs, llms, loader, multiple, update };
@@ -1,2 +1,2 @@
1
- import { n as llms, t as LLMsConfig } from "../index-BL0I0wLZ.js";
1
+ import { n as llms, t as LLMsConfig } from "../index-BRReQe5Z.js";
2
2
  export { LLMsConfig, llms };
@@ -1,4 +1,4 @@
1
- import { x as LoaderPlugin } from "../../index-BL0I0wLZ.js";
1
+ import { x as LoaderPlugin } from "../../index-BRReQe5Z.js";
2
2
  import { icons } from "lucide-react";
3
3
  //#region src/source/plugins/lucide-icons.d.ts
4
4
  /**
@@ -1,2 +1,2 @@
1
- import { A as SlugsPluginOptions, M as slugsFromData, N as slugsPlugin, j as getSlugs, k as SlugFn } from "../../index-BL0I0wLZ.js";
1
+ import { A as SlugsPluginOptions, M as slugsFromData, N as slugsPlugin, j as getSlugs, k as SlugFn } from "../../index-BRReQe5Z.js";
2
2
  export { SlugFn, SlugsPluginOptions, getSlugs, slugsFromData, slugsPlugin };
@@ -1,5 +1,5 @@
1
1
  import { a as Separator$1, n as Item$1, t as Folder$1 } from "../../definitions-CFOhwE1k.js";
2
- import { x as LoaderPlugin } from "../../index-BL0I0wLZ.js";
2
+ import { x as LoaderPlugin } from "../../index-BRReQe5Z.js";
3
3
  import { ReactNode } from "react";
4
4
  //#region src/source/plugins/status-badges.d.ts
5
5
  interface Item extends Item$1 {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fumadocs-core",
3
- "version": "16.15.6",
3
+ "version": "16.15.7",
4
4
  "description": "The React.js library for building a documentation website",
5
5
  "keywords": [
6
6
  "Docs",