fumadocs-core 16.0.6 → 16.0.8
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.
- package/dist/breadcrumb.js +3 -3
- package/dist/chunk-A4G5V4FQ.js +47 -0
- package/dist/chunk-ADBHPKXG.js +78 -0
- package/dist/chunk-CH7YHH7V.js +222 -0
- package/dist/chunk-EFVXL2PP.js +144 -0
- package/dist/chunk-FUUVPEA5.js +29 -0
- package/dist/chunk-GLRQBLGN.js +59 -0
- package/dist/{chunk-QMATWJ5F.js → chunk-HNZEUF6C.js} +4 -11
- package/dist/chunk-JOXPHQ2R.js +73 -0
- package/dist/chunk-ONG4RVCR.js +8 -0
- package/dist/chunk-SLIKY7GW.js +111 -0
- package/dist/chunk-TWIDBWFG.js +84 -0
- package/dist/chunk-VW3XKOZZ.js +214 -0
- package/dist/chunk-X2HFD5QJ.js +275 -0
- package/dist/chunk-XJ6ZQNEX.js +91 -0
- package/dist/content/github.d.ts +7 -1
- package/dist/content/github.js +2 -1
- package/dist/content/toc.js +2 -1
- package/dist/mdx-plugins/codeblock-utils.d.ts +29 -0
- package/dist/mdx-plugins/codeblock-utils.js +9 -0
- package/dist/mdx-plugins/index.d.ts +18 -241
- package/dist/mdx-plugins/index.js +42 -1313
- package/dist/mdx-plugins/rehype-code.d.ts +55 -0
- package/dist/mdx-plugins/rehype-code.js +15 -0
- package/dist/mdx-plugins/rehype-toc.d.ts +14 -0
- package/dist/mdx-plugins/rehype-toc.js +7 -0
- package/dist/mdx-plugins/remark-admonition.d.ts +18 -0
- package/dist/mdx-plugins/remark-admonition.js +8 -0
- package/dist/mdx-plugins/remark-code-tab.d.ts +30 -0
- package/dist/mdx-plugins/remark-code-tab.js +8 -0
- package/dist/mdx-plugins/remark-gfm.d.ts +1 -0
- package/dist/mdx-plugins/remark-gfm.js +7 -0
- package/dist/mdx-plugins/remark-heading.d.ts +31 -0
- package/dist/mdx-plugins/remark-heading.js +8 -0
- package/dist/mdx-plugins/remark-image.d.ts +57 -0
- package/dist/mdx-plugins/remark-image.js +7 -0
- package/dist/mdx-plugins/remark-mdx-files.d.ts +40 -0
- package/dist/mdx-plugins/remark-mdx-files.js +7 -0
- package/dist/mdx-plugins/remark-mdx-mermaid.d.ts +15 -0
- package/dist/mdx-plugins/remark-mdx-mermaid.js +7 -0
- package/dist/mdx-plugins/remark-npm.d.ts +31 -0
- package/dist/mdx-plugins/remark-npm.js +8 -0
- package/dist/mdx-plugins/remark-steps.d.ts +23 -0
- package/dist/mdx-plugins/remark-steps.js +7 -0
- package/dist/{remark-structure-DkCXCzpD.d.ts → mdx-plugins/remark-structure.d.ts} +10 -5
- package/dist/mdx-plugins/remark-structure.js +10 -0
- package/dist/search/algolia.d.ts +1 -1
- package/dist/search/client.d.ts +1 -1
- package/dist/search/orama-cloud.d.ts +3 -2
- package/dist/search/server.d.ts +1 -1
- package/dist/search/server.js +3 -3
- package/dist/source/index.js +3 -3
- package/package.json +12 -7
- package/dist/remark-code-tab-DmyIyi6m.d.ts +0 -57
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Root } from 'hast';
|
|
2
|
+
import { RehypeShikiOptions } from '@shikijs/rehype';
|
|
3
|
+
import { Processor, Transformer } from 'unified';
|
|
4
|
+
import { ShikiTransformer } from 'shiki';
|
|
5
|
+
|
|
6
|
+
type CodeBlockIcon = {
|
|
7
|
+
viewBox: string;
|
|
8
|
+
fill: string;
|
|
9
|
+
d: string;
|
|
10
|
+
} | string;
|
|
11
|
+
interface IconOptions {
|
|
12
|
+
shortcuts?: Record<string, string>;
|
|
13
|
+
extend?: Record<string, CodeBlockIcon>;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Inject icons to `icon` property (as HTML)
|
|
17
|
+
*/
|
|
18
|
+
declare function transformerIcon(options?: IconOptions): ShikiTransformer;
|
|
19
|
+
|
|
20
|
+
declare const rehypeCodeDefaultOptions: RehypeCodeOptions;
|
|
21
|
+
type DistributiveOmit<T, K extends keyof T> = T extends unknown ? Omit<T, K> : never;
|
|
22
|
+
type RehypeCodeOptions = DistributiveOmit<RehypeShikiOptions, 'lazy'> & {
|
|
23
|
+
/**
|
|
24
|
+
* Load languages and themes on-demand.
|
|
25
|
+
* @defaultValue true
|
|
26
|
+
*/
|
|
27
|
+
lazy?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* The regex engine to use.
|
|
30
|
+
*
|
|
31
|
+
* @defaultValue 'js'
|
|
32
|
+
*/
|
|
33
|
+
engine?: 'js' | 'oniguruma';
|
|
34
|
+
/**
|
|
35
|
+
* Filter meta string before processing
|
|
36
|
+
*/
|
|
37
|
+
filterMetaString?: (metaString: string) => string;
|
|
38
|
+
/**
|
|
39
|
+
* Add icon to code blocks
|
|
40
|
+
*/
|
|
41
|
+
icon?: IconOptions | false;
|
|
42
|
+
/**
|
|
43
|
+
* Wrap code blocks in `<Tab>` component when "tab" meta string presents
|
|
44
|
+
*
|
|
45
|
+
* @defaultValue true
|
|
46
|
+
*/
|
|
47
|
+
tab?: boolean;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Handle codeblocks
|
|
51
|
+
*/
|
|
52
|
+
declare function rehypeCode(this: Processor, _options?: Partial<RehypeCodeOptions>): Transformer<Root, Root>;
|
|
53
|
+
declare function transformerTab(): ShikiTransformer;
|
|
54
|
+
|
|
55
|
+
export { type CodeBlockIcon, type RehypeCodeOptions, rehypeCode, rehypeCodeDefaultOptions, transformerIcon, transformerTab };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
rehypeCode,
|
|
3
|
+
rehypeCodeDefaultOptions,
|
|
4
|
+
transformerIcon,
|
|
5
|
+
transformerTab
|
|
6
|
+
} from "../chunk-X2HFD5QJ.js";
|
|
7
|
+
import "../chunk-TWIDBWFG.js";
|
|
8
|
+
import "../chunk-XN2LKXFZ.js";
|
|
9
|
+
import "../chunk-U67V476Y.js";
|
|
10
|
+
export {
|
|
11
|
+
rehypeCode,
|
|
12
|
+
rehypeCodeDefaultOptions,
|
|
13
|
+
transformerIcon,
|
|
14
|
+
transformerTab
|
|
15
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Processor, Transformer } from 'unified';
|
|
2
|
+
import { Root } from 'hast';
|
|
3
|
+
|
|
4
|
+
interface RehypeTocOptions {
|
|
5
|
+
/**
|
|
6
|
+
* Export generated toc as a variable
|
|
7
|
+
*
|
|
8
|
+
* @defaultValue true
|
|
9
|
+
*/
|
|
10
|
+
exportToc?: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare function rehypeToc(this: Processor, { exportToc }?: RehypeTocOptions): Transformer<Root, Root>;
|
|
13
|
+
|
|
14
|
+
export { type RehypeTocOptions, rehypeToc };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Transformer } from 'unified';
|
|
2
|
+
import { Root } from 'mdast';
|
|
3
|
+
|
|
4
|
+
interface RemarkAdmonitionOptions {
|
|
5
|
+
tag?: string;
|
|
6
|
+
/**
|
|
7
|
+
* Map type to another type
|
|
8
|
+
*/
|
|
9
|
+
typeMap?: Record<string, string>;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Remark Plugin to support Admonition syntax
|
|
13
|
+
*
|
|
14
|
+
* Useful when Migrating from Docusaurus
|
|
15
|
+
*/
|
|
16
|
+
declare function remarkAdmonition(options?: RemarkAdmonitionOptions): Transformer<Root, Root>;
|
|
17
|
+
|
|
18
|
+
export { type RemarkAdmonitionOptions, remarkAdmonition };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Processor, Transformer } from 'unified';
|
|
2
|
+
import { Code, Root } from 'mdast';
|
|
3
|
+
import { MdxJsxFlowElement } from 'mdast-util-mdx-jsx';
|
|
4
|
+
|
|
5
|
+
type TabType = keyof typeof Types;
|
|
6
|
+
interface RemarkCodeTabOptions {
|
|
7
|
+
Tabs?: TabType;
|
|
8
|
+
/**
|
|
9
|
+
* Parse MDX in tab values
|
|
10
|
+
*
|
|
11
|
+
* @defaultValue false
|
|
12
|
+
*/
|
|
13
|
+
parseMdx?: boolean;
|
|
14
|
+
}
|
|
15
|
+
declare module 'mdast' {
|
|
16
|
+
interface CodeData {
|
|
17
|
+
tab?: string;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
declare const Types: {
|
|
21
|
+
CodeBlockTabs: {
|
|
22
|
+
convert(processor: Processor, nodes: Code[], withMdx?: boolean, withParent?: boolean): MdxJsxFlowElement;
|
|
23
|
+
};
|
|
24
|
+
Tabs: {
|
|
25
|
+
convert(processor: Processor, nodes: Code[], withMdx?: boolean, withParent?: boolean): MdxJsxFlowElement;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
declare function remarkCodeTab(this: Processor, options?: RemarkCodeTabOptions): Transformer<Root, Root>;
|
|
29
|
+
|
|
30
|
+
export { type RemarkCodeTabOptions, remarkCodeTab };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Options as RemarkGfmOptions, default as remarkGfm } from 'remark-gfm';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Root, Heading } from 'mdast';
|
|
2
|
+
import { Transformer } from 'unified';
|
|
3
|
+
|
|
4
|
+
declare module 'mdast' {
|
|
5
|
+
interface HeadingData extends Data {
|
|
6
|
+
hProperties?: {
|
|
7
|
+
id?: string;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
interface RemarkHeadingOptions {
|
|
12
|
+
slug?: (root: Root, heading: Heading, text: string) => string;
|
|
13
|
+
/**
|
|
14
|
+
* Allow custom headings ids
|
|
15
|
+
*
|
|
16
|
+
* @defaultValue true
|
|
17
|
+
*/
|
|
18
|
+
customId?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Attach an array of `TOCItemType` to `file.data.toc`
|
|
21
|
+
*
|
|
22
|
+
* @defaultValue true
|
|
23
|
+
*/
|
|
24
|
+
generateToc?: boolean;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Add heading ids and extract TOC
|
|
28
|
+
*/
|
|
29
|
+
declare function remarkHeading({ slug: defaultSlug, customId, generateToc, }?: RemarkHeadingOptions): Transformer<Root, Root>;
|
|
30
|
+
|
|
31
|
+
export { type RemarkHeadingOptions, remarkHeading };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { Root } from 'mdast';
|
|
2
|
+
import { Transformer } from 'unified';
|
|
3
|
+
|
|
4
|
+
type ExternalImageOptions = {
|
|
5
|
+
/**
|
|
6
|
+
* timeout for fetching remote images (in milliseconds)
|
|
7
|
+
*/
|
|
8
|
+
timeout?: number;
|
|
9
|
+
} | boolean;
|
|
10
|
+
interface RemarkImageOptions {
|
|
11
|
+
/**
|
|
12
|
+
* Directory or base URL to resolve absolute image paths
|
|
13
|
+
*/
|
|
14
|
+
publicDir?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Preferred placeholder type, only available with `useImport` + local images.
|
|
17
|
+
*
|
|
18
|
+
* @defaultValue 'blur'
|
|
19
|
+
*/
|
|
20
|
+
placeholder?: 'blur' | 'none';
|
|
21
|
+
/**
|
|
22
|
+
* Define how to handle errors when fetching image size.
|
|
23
|
+
*
|
|
24
|
+
* - `error` (default): throw an error.
|
|
25
|
+
* - `ignore`: do absolutely nothing (Next.js Image component may complain).
|
|
26
|
+
* - `hide`: remove that image element.
|
|
27
|
+
*
|
|
28
|
+
* @defaultValue 'error'
|
|
29
|
+
*/
|
|
30
|
+
onError?: 'error' | 'hide' | 'ignore' | ((error: Error) => void);
|
|
31
|
+
/**
|
|
32
|
+
* Import images in the file, and let bundlers handle it.
|
|
33
|
+
*
|
|
34
|
+
* ```tsx
|
|
35
|
+
* import MyImage from "./public/img.png";
|
|
36
|
+
*
|
|
37
|
+
* <img src={MyImage} />
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
40
|
+
* When disabled, `placeholder` will be ignored.
|
|
41
|
+
*
|
|
42
|
+
* @defaultValue true
|
|
43
|
+
*/
|
|
44
|
+
useImport?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Fetch image size of external URLs
|
|
47
|
+
*
|
|
48
|
+
* @defaultValue true
|
|
49
|
+
*/
|
|
50
|
+
external?: ExternalImageOptions;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Turn images into Next.js Image compatible usage.
|
|
54
|
+
*/
|
|
55
|
+
declare function remarkImage({ placeholder, external, useImport, onError, publicDir, }?: RemarkImageOptions): Transformer<Root, Root>;
|
|
56
|
+
|
|
57
|
+
export { type RemarkImageOptions, remarkImage };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Root } from 'mdast';
|
|
2
|
+
import { Transformer } from 'unified';
|
|
3
|
+
import { MdxJsxFlowElement } from 'mdast-util-mdx-jsx';
|
|
4
|
+
|
|
5
|
+
interface FileNode {
|
|
6
|
+
depth: number;
|
|
7
|
+
type: 'file';
|
|
8
|
+
name: string;
|
|
9
|
+
}
|
|
10
|
+
interface FolderNode {
|
|
11
|
+
depth: number;
|
|
12
|
+
type: 'folder';
|
|
13
|
+
name: string;
|
|
14
|
+
children: Node[];
|
|
15
|
+
}
|
|
16
|
+
type Node = FileNode | FolderNode;
|
|
17
|
+
interface RemarkMdxFilesOptions {
|
|
18
|
+
/**
|
|
19
|
+
* @defaultValue files
|
|
20
|
+
*/
|
|
21
|
+
lang?: string;
|
|
22
|
+
toMdx?: (node: Node) => MdxJsxFlowElement;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Convert codeblocks with `files` as lang, like:
|
|
26
|
+
*
|
|
27
|
+
* ```files
|
|
28
|
+
* project
|
|
29
|
+
* ├── src
|
|
30
|
+
* │ ├── index.js
|
|
31
|
+
* │ └── utils
|
|
32
|
+
* │ └── helper.js
|
|
33
|
+
* ├── package.json
|
|
34
|
+
* ```
|
|
35
|
+
*
|
|
36
|
+
* into MDX `<Files />` component
|
|
37
|
+
*/
|
|
38
|
+
declare function remarkMdxFiles(options?: RemarkMdxFilesOptions): Transformer<Root, Root>;
|
|
39
|
+
|
|
40
|
+
export { type RemarkMdxFilesOptions, remarkMdxFiles };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Transformer } from 'unified';
|
|
2
|
+
import { Root } from 'mdast';
|
|
3
|
+
|
|
4
|
+
interface RemarkMdxMermaidOptions {
|
|
5
|
+
/**
|
|
6
|
+
* @defaultValue mermaid
|
|
7
|
+
*/
|
|
8
|
+
lang?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Convert `mermaid` codeblocks into `<Mermaid />` MDX component
|
|
12
|
+
*/
|
|
13
|
+
declare function remarkMdxMermaid(options?: RemarkMdxMermaidOptions): Transformer<Root, Root>;
|
|
14
|
+
|
|
15
|
+
export { type RemarkMdxMermaidOptions, remarkMdxMermaid };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Root } from 'mdast';
|
|
2
|
+
import { Transformer } from 'unified';
|
|
3
|
+
|
|
4
|
+
interface PackageManager {
|
|
5
|
+
name: string;
|
|
6
|
+
/**
|
|
7
|
+
* Default to `name`
|
|
8
|
+
*/
|
|
9
|
+
value?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Convert from npm to another package manager
|
|
12
|
+
*/
|
|
13
|
+
command: (command: string) => string | undefined;
|
|
14
|
+
}
|
|
15
|
+
interface RemarkNpmOptions {
|
|
16
|
+
/**
|
|
17
|
+
* Persist Tab value (Fumadocs UI only)
|
|
18
|
+
*
|
|
19
|
+
* @defaultValue false
|
|
20
|
+
*/
|
|
21
|
+
persist?: {
|
|
22
|
+
id: string;
|
|
23
|
+
} | false;
|
|
24
|
+
packageManagers?: PackageManager[];
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* It generates multiple tabs of codeblocks for different package managers from a npm command codeblock.
|
|
28
|
+
*/
|
|
29
|
+
declare function remarkNpm({ persist, packageManagers, }?: RemarkNpmOptions): Transformer<Root, Root>;
|
|
30
|
+
|
|
31
|
+
export { type RemarkNpmOptions, remarkNpm };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Transformer } from 'unified';
|
|
2
|
+
import { Root } from 'mdast';
|
|
3
|
+
|
|
4
|
+
interface RemarkStepsOptions {
|
|
5
|
+
/**
|
|
6
|
+
* Class name for steps container
|
|
7
|
+
*
|
|
8
|
+
* @defaultValue fd-steps
|
|
9
|
+
*/
|
|
10
|
+
steps?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Class name for step container
|
|
13
|
+
*
|
|
14
|
+
* @defaultValue fd-step
|
|
15
|
+
*/
|
|
16
|
+
step?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Convert headings in the format of `1. Hello World` into steps.
|
|
20
|
+
*/
|
|
21
|
+
declare function remarkSteps({ steps, step, }?: RemarkStepsOptions): Transformer<Root, Root>;
|
|
22
|
+
|
|
23
|
+
export { type RemarkStepsOptions, remarkSteps };
|
|
@@ -31,29 +31,34 @@ interface StructureOptions {
|
|
|
31
31
|
* - a function that determines if attribute should be indexed.
|
|
32
32
|
*/
|
|
33
33
|
allowedMdxAttributes?: string[] | ((node: MdxJsxFlowElement, attribute: MdxJsxAttribute | MdxJsxExpressionAttribute) => boolean);
|
|
34
|
+
/**
|
|
35
|
+
* export as `structuredData` or specified variable name.
|
|
36
|
+
*/
|
|
37
|
+
exportAs?: string | boolean;
|
|
34
38
|
}
|
|
35
39
|
declare module 'mdast' {
|
|
36
40
|
interface Data {
|
|
37
41
|
/**
|
|
38
|
-
* Get content of unserializable element
|
|
39
|
-
*
|
|
40
|
-
* Needed for `remarkStructure` to generate search index
|
|
42
|
+
* [Fumadocs] Get content of unserializable element, `remarkStructure` uses it to generate search index.
|
|
41
43
|
*/
|
|
42
44
|
_string?: string[];
|
|
43
45
|
}
|
|
44
46
|
}
|
|
45
47
|
declare module 'vfile' {
|
|
46
48
|
interface DataMap {
|
|
49
|
+
/**
|
|
50
|
+
* [Fumadocs] injected by `remarkStructure`
|
|
51
|
+
*/
|
|
47
52
|
structuredData: StructuredData;
|
|
48
53
|
}
|
|
49
54
|
}
|
|
50
55
|
/**
|
|
51
56
|
* Attach structured data to VFile, you can access via `vfile.data.structuredData`.
|
|
52
57
|
*/
|
|
53
|
-
declare function remarkStructure({ types, allowedMdxAttributes, }?: StructureOptions): Transformer<Root, Root>;
|
|
58
|
+
declare function remarkStructure({ types, allowedMdxAttributes, exportAs, }?: StructureOptions): Transformer<Root, Root>;
|
|
54
59
|
/**
|
|
55
60
|
* Extract data from markdown/mdx content
|
|
56
61
|
*/
|
|
57
62
|
declare function structure(content: string, remarkPlugins?: PluggableList, options?: StructureOptions): StructuredData;
|
|
58
63
|
|
|
59
|
-
export { type
|
|
64
|
+
export { type StructureOptions, type StructuredData, remarkStructure, structure };
|
package/dist/search/algolia.d.ts
CHANGED
package/dist/search/client.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AnyOrama } from '@orama/orama';
|
|
2
|
-
import '../remark-structure
|
|
2
|
+
import '../mdx-plugins/remark-structure.js';
|
|
3
3
|
import { BaseIndex } from './algolia.js';
|
|
4
4
|
import { LiteClient, SearchResponse } from 'algoliasearch/lite';
|
|
5
5
|
import { OramaCloud, OramaCloudSearchParams } from '@orama/core';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import '../remark-
|
|
1
|
+
import { StructuredData } from '../mdx-plugins/remark-structure.js';
|
|
2
|
+
import '../mdx-plugins/remark-heading.js';
|
|
3
|
+
import '../mdx-plugins/remark-code-tab.js';
|
|
3
4
|
import { OramaCloud } from '@orama/core';
|
|
4
5
|
import 'mdast';
|
|
5
6
|
import 'unified';
|
package/dist/search/server.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TypedDocument, Orama, Language, RawData, create, SearchParams } from '@orama/orama';
|
|
2
|
-
import {
|
|
2
|
+
import { StructuredData } from '../mdx-plugins/remark-structure.js';
|
|
3
3
|
import { SortedResult } from './index.js';
|
|
4
4
|
export { HighlightedText, ReactSortedResult, createContentHighlighter } from './index.js';
|
|
5
5
|
import { I18nConfig } from '../i18n/index.js';
|
package/dist/search/server.js
CHANGED
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
searchSimple
|
|
4
4
|
} from "../chunk-XOFXGHS4.js";
|
|
5
5
|
import "../chunk-ZMWYLUDP.js";
|
|
6
|
+
import {
|
|
7
|
+
createContentHighlighter
|
|
8
|
+
} from "../chunk-OTD7MV33.js";
|
|
6
9
|
import {
|
|
7
10
|
basename,
|
|
8
11
|
extname
|
|
9
12
|
} from "../chunk-XZSI7AHE.js";
|
|
10
|
-
import {
|
|
11
|
-
createContentHighlighter
|
|
12
|
-
} from "../chunk-OTD7MV33.js";
|
|
13
13
|
import {
|
|
14
14
|
findPath
|
|
15
15
|
} from "../chunk-IZPLHEX4.js";
|
package/dist/source/index.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
iconPlugin
|
|
3
|
+
} from "../chunk-FAEPKD7U.js";
|
|
1
4
|
import {
|
|
2
5
|
basename,
|
|
3
6
|
dirname,
|
|
@@ -7,9 +10,6 @@ import {
|
|
|
7
10
|
slash,
|
|
8
11
|
splitPath
|
|
9
12
|
} from "../chunk-XZSI7AHE.js";
|
|
10
|
-
import {
|
|
11
|
-
iconPlugin
|
|
12
|
-
} from "../chunk-FAEPKD7U.js";
|
|
13
13
|
import {
|
|
14
14
|
normalizeUrl
|
|
15
15
|
} from "../chunk-PFNP6PEB.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fumadocs-core",
|
|
3
|
-
"version": "16.0.
|
|
3
|
+
"version": "16.0.8",
|
|
4
4
|
"description": "The library for building a documentation website in any React.js framework",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Fumadocs",
|
|
@@ -72,6 +72,10 @@
|
|
|
72
72
|
"import": "./dist/mdx-plugins/index.js",
|
|
73
73
|
"types": "./dist/mdx-plugins/index.d.ts"
|
|
74
74
|
},
|
|
75
|
+
"./mdx-plugins/*": {
|
|
76
|
+
"import": "./dist/mdx-plugins/*.js",
|
|
77
|
+
"types": "./dist/mdx-plugins/*.d.ts"
|
|
78
|
+
},
|
|
75
79
|
"./i18n": {
|
|
76
80
|
"import": "./dist/i18n/index.js",
|
|
77
81
|
"types": "./dist/i18n/index.d.ts"
|
|
@@ -105,6 +109,7 @@
|
|
|
105
109
|
"@orama/orama": "^3.1.16",
|
|
106
110
|
"@shikijs/rehype": "^3.14.0",
|
|
107
111
|
"@shikijs/transformers": "^3.14.0",
|
|
112
|
+
"estree-util-value-to-estree": "^3.5.0",
|
|
108
113
|
"github-slugger": "^2.0.0",
|
|
109
114
|
"hast-util-to-estree": "^3.1.3",
|
|
110
115
|
"hast-util-to-jsx-runtime": "^2.3.6",
|
|
@@ -121,22 +126,22 @@
|
|
|
121
126
|
},
|
|
122
127
|
"devDependencies": {
|
|
123
128
|
"@mdx-js/mdx": "^3.1.1",
|
|
124
|
-
"@mixedbread/sdk": "^0.
|
|
129
|
+
"@mixedbread/sdk": "^0.38.0",
|
|
125
130
|
"@orama/core": "^1.2.13",
|
|
126
|
-
"@tanstack/react-router": "^1.
|
|
131
|
+
"@tanstack/react-router": "^1.134.12",
|
|
127
132
|
"@types/estree-jsx": "^1.0.5",
|
|
128
133
|
"@types/hast": "^3.0.4",
|
|
129
134
|
"@types/mdast": "^4.0.4",
|
|
130
135
|
"@types/negotiator": "^0.6.4",
|
|
131
|
-
"@types/node": "24.
|
|
136
|
+
"@types/node": "24.10.0",
|
|
132
137
|
"@types/react": "^19.2.2",
|
|
133
138
|
"@types/react-dom": "^19.2.2",
|
|
134
|
-
"algoliasearch": "5.
|
|
135
|
-
"lucide-react": "^0.
|
|
139
|
+
"algoliasearch": "5.42.0",
|
|
140
|
+
"lucide-react": "^0.552.0",
|
|
136
141
|
"mdast-util-mdx-jsx": "^3.2.0",
|
|
137
142
|
"mdast-util-mdxjs-esm": "^2.0.1",
|
|
138
143
|
"next": "16.0.1",
|
|
139
|
-
"react-router": "^7.9.
|
|
144
|
+
"react-router": "^7.9.5",
|
|
140
145
|
"remark-mdx": "^3.1.1",
|
|
141
146
|
"remove-markdown": "^0.6.2",
|
|
142
147
|
"typescript": "^5.9.3",
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { Root, Heading, Code } from 'mdast';
|
|
2
|
-
import { Transformer, Processor } from 'unified';
|
|
3
|
-
import { MdxJsxFlowElement } from 'mdast-util-mdx-jsx';
|
|
4
|
-
|
|
5
|
-
declare module 'mdast' {
|
|
6
|
-
interface HeadingData extends Data {
|
|
7
|
-
hProperties?: {
|
|
8
|
-
id?: string;
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
interface RemarkHeadingOptions {
|
|
13
|
-
slug?: (root: Root, heading: Heading, text: string) => string;
|
|
14
|
-
/**
|
|
15
|
-
* Allow custom headings ids
|
|
16
|
-
*
|
|
17
|
-
* @defaultValue true
|
|
18
|
-
*/
|
|
19
|
-
customId?: boolean;
|
|
20
|
-
/**
|
|
21
|
-
* Attach an array of `TOCItemType` to `file.data.toc`
|
|
22
|
-
*
|
|
23
|
-
* @defaultValue true
|
|
24
|
-
*/
|
|
25
|
-
generateToc?: boolean;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Add heading ids and extract TOC
|
|
29
|
-
*/
|
|
30
|
-
declare function remarkHeading({ slug: defaultSlug, customId, generateToc, }?: RemarkHeadingOptions): Transformer<Root, Root>;
|
|
31
|
-
|
|
32
|
-
type TabType = keyof typeof Types;
|
|
33
|
-
interface RemarkCodeTabOptions {
|
|
34
|
-
Tabs?: TabType;
|
|
35
|
-
/**
|
|
36
|
-
* Parse MDX in tab values
|
|
37
|
-
*
|
|
38
|
-
* @defaultValue false
|
|
39
|
-
*/
|
|
40
|
-
parseMdx?: boolean;
|
|
41
|
-
}
|
|
42
|
-
declare module 'mdast' {
|
|
43
|
-
interface CodeData {
|
|
44
|
-
tab?: string;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
declare const Types: {
|
|
48
|
-
CodeBlockTabs: {
|
|
49
|
-
convert(processor: Processor, nodes: Code[], withMdx?: boolean, withParent?: boolean): MdxJsxFlowElement;
|
|
50
|
-
};
|
|
51
|
-
Tabs: {
|
|
52
|
-
convert(processor: Processor, nodes: Code[], withMdx?: boolean, withParent?: boolean): MdxJsxFlowElement;
|
|
53
|
-
};
|
|
54
|
-
};
|
|
55
|
-
declare function remarkCodeTab(this: Processor, options?: RemarkCodeTabOptions): Transformer<Root, Root>;
|
|
56
|
-
|
|
57
|
-
export { type RemarkHeadingOptions as R, type RemarkCodeTabOptions as a, remarkCodeTab as b, remarkHeading as r };
|