fumadocs-core 16.11.1 → 16.11.3

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 (102) hide show
  1. package/dist/{algolia-CfRm9dj6.d.ts → algolia-C0E5qQhM.d.ts} +1 -2
  2. package/dist/breadcrumb.d.ts +1 -2
  3. package/dist/{client-_lCIIcPk.d.ts → client-CFte63Ws.d.ts} +3 -9
  4. package/dist/{codeblock-utils-B92t2Hm-.d.ts → codeblock-utils-CyP8qsYv.d.ts} +1 -8
  5. package/dist/content/github.d.ts +1 -10
  6. package/dist/content/md.d.ts +1 -6
  7. package/dist/content/mdx/preset-bundler.d.ts +10 -9
  8. package/dist/content/mdx/preset-runtime.d.ts +8 -8
  9. package/dist/content/toc.d.ts +1 -2
  10. package/dist/{definitions-DsPo5rZj.d.ts → definitions-D8-KI7Uy.d.ts} +0 -1
  11. package/dist/dynamic-link.d.ts +1 -6
  12. package/dist/framework/astro.d.ts +21 -0
  13. package/dist/framework/astro.js +51 -0
  14. package/dist/framework/index.d.ts +1 -9
  15. package/dist/framework/next.d.ts +1 -6
  16. package/dist/framework/react-router.d.ts +1 -6
  17. package/dist/framework/tanstack.d.ts +1 -6
  18. package/dist/framework/waku.d.ts +1 -6
  19. package/dist/highlight/client.d.ts +0 -1
  20. package/dist/highlight/index.d.ts +0 -1
  21. package/dist/highlight/shiki/full.d.ts +1 -2
  22. package/dist/highlight/shiki/index.d.ts +1 -1
  23. package/dist/highlight/shiki/react.d.ts +1 -2
  24. package/dist/i18n/index.d.ts +1 -1
  25. package/dist/i18n/middleware.d.ts +2 -9
  26. package/dist/{index-CS7BaeTa.d.ts → index-BM36H-xw.d.ts} +0 -1
  27. package/dist/{index-CrF56b4C.d.ts → index-BMEUQz-F.d.ts} +0 -1
  28. package/dist/{index-BLKQLw5Y.d.ts → index-CdZGMKDG.d.ts} +3 -2
  29. package/dist/{index-aTQav1VD.d.ts → index-DZN5OrTa.d.ts} +1 -2
  30. package/dist/index-DdWT_FjJ.d.ts +16 -0
  31. package/dist/{index-4jhCnMTa2.d.ts → index-DmFlQQrd2.d.ts} +16 -12
  32. package/dist/{index-B799MJOL.d.ts → index-DydiXvgS.d.ts} +6 -4
  33. package/dist/link.d.ts +1 -9
  34. package/dist/mdx-plugins/codeblock-utils.d.ts +1 -1
  35. package/dist/mdx-plugins/index.d.ts +18 -17
  36. package/dist/mdx-plugins/rehype-code.core.d.ts +2 -2
  37. package/dist/mdx-plugins/rehype-code.d.ts +3 -3
  38. package/dist/mdx-plugins/rehype-toc.d.ts +1 -1
  39. package/dist/mdx-plugins/remark-admonition.d.ts +1 -1
  40. package/dist/mdx-plugins/remark-block-id.d.ts +1 -6
  41. package/dist/mdx-plugins/remark-code-tab.d.ts +1 -1
  42. package/dist/mdx-plugins/remark-directive-admonition.d.ts +1 -1
  43. package/dist/mdx-plugins/remark-feedback-block.d.ts +1 -1
  44. package/dist/mdx-plugins/remark-heading.d.ts +1 -1
  45. package/dist/mdx-plugins/remark-image.d.ts +1 -1
  46. package/dist/mdx-plugins/remark-llms.d.ts +1 -1
  47. package/dist/mdx-plugins/remark-llms.runtime.d.ts +0 -1
  48. package/dist/mdx-plugins/remark-mdx-files.d.ts +1 -1
  49. package/dist/mdx-plugins/remark-mdx-mermaid.d.ts +1 -1
  50. package/dist/mdx-plugins/remark-npm.d.ts +1 -1
  51. package/dist/mdx-plugins/remark-steps.d.ts +1 -1
  52. package/dist/mdx-plugins/remark-structure.d.ts +1 -1
  53. package/dist/mdx-plugins/stringifier.d.ts +1 -1
  54. package/dist/mdx-plugins/transformer-icon.d.ts +1 -1
  55. package/dist/negotiation/index.d.ts +0 -1
  56. package/dist/page-tree/index.d.ts +2 -2
  57. package/dist/{rehype-code-D3QFMPaV.d.ts → rehype-code-D-RFJb9W.d.ts} +1 -2
  58. package/dist/{rehype-code.core-DPdd_Lza.d.ts → rehype-code.core-BjH1uHWj.d.ts} +2 -3
  59. package/dist/{rehype-toc-Buwh9Bkg.d.ts → rehype-toc-K51AGb5U.d.ts} +1 -4
  60. package/dist/{remark-admonition-B6b741tI.d.ts → remark-admonition-BwTcmI_S.d.ts} +0 -1
  61. package/dist/{remark-code-tab-C_xwrYzr.d.ts → remark-code-tab-DE_4bdnu.d.ts} +0 -1
  62. package/dist/{remark-directive-admonition-D6bcy8ye.d.ts → remark-directive-admonition-BLiJ5l43.d.ts} +1 -9
  63. package/dist/{remark-feedback-block-DlbKlNCS.d.ts → remark-feedback-block-BxtINXN-.d.ts} +1 -7
  64. package/dist/{remark-heading-DkG12uAs.d.ts → remark-heading-BcV2W1fM.d.ts} +2 -7
  65. package/dist/{remark-image-DGq11tUk.d.ts → remark-image-BI2S9LOb.d.ts} +1 -8
  66. package/dist/{remark-llms-CDadKewV.d.ts → remark-llms-BF5SHW_O.d.ts} +2 -9
  67. package/dist/{remark-mdx-files-D1GnBf_K.d.ts → remark-mdx-files-Buvxc-sa.d.ts} +0 -1
  68. package/dist/{remark-mdx-mermaid-B-Vm8iOc.d.ts → remark-mdx-mermaid-C1bCHHc6.d.ts} +0 -1
  69. package/dist/{remark-npm-DWgfdohc.d.ts → remark-npm-BbpvkJaT.d.ts} +1 -5
  70. package/dist/{remark-steps-DVaztRzR.d.ts → remark-steps-DqVEo0iq.d.ts} +1 -5
  71. package/dist/{remark-structure-DmVL5OkT.d.ts → remark-structure-CnHwvNZr.d.ts} +2 -9
  72. package/dist/search/algolia.d.ts +1 -1
  73. package/dist/search/client/algolia.d.ts +1 -1
  74. package/dist/search/client/fetch.d.ts +1 -1
  75. package/dist/search/client/flexsearch-static.d.ts +1 -1
  76. package/dist/search/client/mixedbread.d.ts +1 -1
  77. package/dist/search/client/orama-cloud-legacy.d.ts +1 -1
  78. package/dist/search/client/orama-cloud.d.ts +1 -1
  79. package/dist/search/client/orama-static.d.ts +1 -1
  80. package/dist/search/client.d.ts +1 -1
  81. package/dist/search/flexsearch.d.ts +4 -4
  82. package/dist/search/index.d.ts +1 -1
  83. package/dist/search/mixedbread.d.ts +2 -3
  84. package/dist/search/orama-cloud-legacy.d.ts +2 -2
  85. package/dist/search/orama-cloud.d.ts +2 -2
  86. package/dist/search/server.d.ts +1 -1
  87. package/dist/{server-BhiVa9kn.d.ts → server-B7xEII-W.d.ts} +5 -6
  88. package/dist/source/client/index.d.ts +1 -1
  89. package/dist/source/dynamic.d.ts +1 -1
  90. package/dist/source/index.d.ts +1 -1
  91. package/dist/source/llms.d.ts +1 -1
  92. package/dist/source/plugins/lucide-icons.d.ts +1 -2
  93. package/dist/source/plugins/slugs.d.ts +1 -1
  94. package/dist/source/plugins/status-badges.d.ts +2 -3
  95. package/dist/source/schema.d.ts +0 -1
  96. package/dist/{stringifier-D5Bi8lxA.d.ts → stringifier-B_QUcUyo.d.ts} +0 -1
  97. package/dist/{toc-HGr2QC6x.d.ts → toc-17DPqBrN.d.ts} +3 -15
  98. package/dist/toc.d.ts +1 -1
  99. package/dist/{transformer-icon-6kKIDVYa.d.ts → transformer-icon-DlrneIS3.d.ts} +0 -1
  100. package/dist/{util-BiDGK90k.d.ts → util-BDsqOxh3.d.ts} +0 -1
  101. package/package.json +6 -5
  102. package/dist/index-BVVgDSdq.d.ts +0 -1
@@ -1,6 +1,5 @@
1
- import { i as StructuredData } from "./remark-structure-DmVL5OkT.js";
1
+ import { i as StructuredData } from "./remark-structure-CnHwvNZr.js";
2
2
  import { Algoliasearch } from "algoliasearch";
3
-
4
3
  //#region src/search/algolia.d.ts
5
4
  interface DocumentRecord {
6
5
  /**
@@ -1,6 +1,5 @@
1
- import { i as Root, r as Node, t as Folder } from "./definitions-DsPo5rZj.js";
1
+ import { i as Root, r as Node, t as Folder } from "./definitions-D8-KI7Uy.js";
2
2
  import { ReactNode } from "react";
3
-
4
3
  //#region src/breadcrumb.d.ts
5
4
  interface BreadcrumbItem {
6
5
  name: ReactNode;
@@ -1,13 +1,12 @@
1
1
  import { t as Awaitable } from "./types-D89QoQR-.js";
2
- import { t as BaseIndex } from "./algolia-CfRm9dj6.js";
3
- import { r as SortedResult } from "./index-CS7BaeTa.js";
2
+ import { t as BaseIndex } from "./algolia-C0E5qQhM.js";
3
+ import { r as SortedResult } from "./index-BM36H-xw.js";
4
4
  import { DependencyList } from "react";
5
5
  import { AnyOrama, Orama, SearchParams } from "@orama/orama";
6
6
  import { LiteClient, SearchResponse } from "algoliasearch/lite";
7
7
  import { OramaCloud, OramaCloudSearchParams } from "@orama/core";
8
8
  import { ClientSearchParams, OramaClient } from "@oramacloud/client";
9
9
  import Mixedbread from "@mixedbread/sdk";
10
-
11
10
  //#region src/search/client/fetch.d.ts
12
11
  interface FetchOptions {
13
12
  /**
@@ -26,12 +25,7 @@ interface FetchOptions {
26
25
  locale?: string;
27
26
  cache?: Map<string, SortedResult[]>;
28
27
  }
29
- declare function fetchClient({
30
- api,
31
- locale,
32
- tag,
33
- cache
34
- }?: FetchOptions): SearchClient;
28
+ declare function fetchClient({ api, locale, tag, cache }?: FetchOptions): SearchClient;
35
29
  //#endregion
36
30
  //#region src/search/client/orama-static.d.ts
37
31
  interface StaticOptions {
@@ -1,6 +1,5 @@
1
1
  import { MdxJsxAttribute, MdxJsxFlowElement } from "mdast-util-mdx";
2
2
  import { BlockContent, Text } from "mdast";
3
-
4
3
  //#region src/mdx-plugins/codeblock-utils.d.ts
5
4
  interface CodeBlockTabsOptions {
6
5
  attributes?: MdxJsxAttribute[];
@@ -17,13 +16,7 @@ interface CodeBlockTabsOptions {
17
16
  children: BlockContent[];
18
17
  }[];
19
18
  }
20
- declare function generateCodeBlockTabs({
21
- persist,
22
- defaultValue,
23
- triggers,
24
- tabs,
25
- ...options
26
- }: CodeBlockTabsOptions): MdxJsxFlowElement;
19
+ declare function generateCodeBlockTabs({ persist, defaultValue, triggers, tabs, ...options }: CodeBlockTabsOptions): MdxJsxFlowElement;
27
20
  interface CodeBlockAttributes<Name extends string = string> {
28
21
  attributes: Partial<Record<Name, string | number | null>>;
29
22
  rest: string;
@@ -36,15 +36,6 @@ interface GetGithubLastCommitOptions {
36
36
  * By default, this will cache the result forever.
37
37
  * Set `options.next.revalidate` to customize this.
38
38
  */
39
- declare function getGithubLastEdit({
40
- repo,
41
- token,
42
- owner,
43
- path,
44
- sha,
45
- baseUrl,
46
- options,
47
- params: customParams
48
- }: GetGithubLastCommitOptions): Promise<Date | null>;
39
+ declare function getGithubLastEdit({ repo, token, owner, path, sha, baseUrl, options, params: customParams }: GetGithubLastCommitOptions): Promise<Date | null>;
49
40
  //#endregion
50
41
  export { GetGithubLastCommitOptions, getGithubLastEdit };
@@ -3,7 +3,6 @@ import { Options } from "remark-rehype";
3
3
  import { Compatible } from "vfile";
4
4
  import { Components } from "hast-util-to-jsx-runtime";
5
5
  import { PluggableList } from "unified";
6
-
7
6
  //#region src/content/md.d.ts
8
7
  interface MarkdownRendererOptions {
9
8
  remarkPlugins?: PluggableList;
@@ -19,11 +18,7 @@ interface MarkdownProps {
19
18
  components?: Components;
20
19
  children: Compatible;
21
20
  }
22
- declare function createMarkdownRenderer({
23
- rehypePlugins,
24
- remarkPlugins,
25
- remarkRehypeOptions
26
- }?: MarkdownRendererOptions): MarkdownRenderer;
21
+ declare function createMarkdownRenderer({ rehypePlugins, remarkPlugins, remarkRehypeOptions }?: MarkdownRendererOptions): MarkdownRenderer;
27
22
  declare function Markdown(props: MarkdownProps & MarkdownRendererOptions): import("react").ReactNode | Promise<import("react").ReactNode>;
28
23
  //#endregion
29
24
  export { Markdown, MarkdownProps, MarkdownRenderer, MarkdownRendererOptions, createMarkdownRenderer };
@@ -1,17 +1,18 @@
1
- import { t as RehypeCodeOptions } from "../../rehype-code-D3QFMPaV.js";
2
- import { t as RemarkImageOptions } from "../../remark-image-DGq11tUk.js";
3
- import { r as StructureOptions } from "../../remark-structure-DmVL5OkT.js";
4
- import { t as RemarkHeadingOptions } from "../../remark-heading-DkG12uAs.js";
5
- import { t as RemarkCodeTabOptions } from "../../remark-code-tab-C_xwrYzr.js";
6
- import { t as RemarkNpmOptions } from "../../remark-npm-DWgfdohc.js";
7
- import { t as ResolvePlugins } from "../../util-BiDGK90k.js";
1
+ import { t as RehypeCodeOptions } from "../../rehype-code-D-RFJb9W.js";
2
+ import { t as RemarkImageOptions } from "../../remark-image-BI2S9LOb.js";
3
+ import { r as StructureOptions } from "../../remark-structure-CnHwvNZr.js";
4
+ import { t as RemarkHeadingOptions } from "../../remark-heading-BcV2W1fM.js";
5
+ import { t as RemarkCodeTabOptions } from "../../remark-code-tab-DE_4bdnu.js";
6
+ import { t as RemarkNpmOptions } from "../../remark-npm-BbpvkJaT.js";
7
+ import "../../index-DdWT_FjJ.js";
8
+ import { t as ResolvePlugins } from "../../util-BDsqOxh3.js";
8
9
  import { Pluggable } from "unified";
9
10
  import { ProcessorOptions } from "@mdx-js/mdx";
10
-
11
11
  //#region src/content/mdx/preset-bundler.d.ts
12
12
  type MDXBundlerPresetOptions = Omit<NonNullable<ProcessorOptions>, 'rehypePlugins' | 'remarkPlugins'> & {
13
13
  rehypePlugins?: ResolvePlugins;
14
- remarkPlugins?: ResolvePlugins; /** @private for `remark-include` */
14
+ remarkPlugins?: ResolvePlugins;
15
+ /** @private for `remark-include` */
15
16
  _include?: Pluggable;
16
17
  remarkStructureOptions?: StructureOptions | false;
17
18
  remarkHeadingOptions?: RemarkHeadingOptions | false;
@@ -1,12 +1,12 @@
1
- import { t as RehypeCodeOptions } from "../../rehype-code-D3QFMPaV.js";
2
- import { t as RemarkImageOptions } from "../../remark-image-DGq11tUk.js";
3
- import { r as StructureOptions } from "../../remark-structure-DmVL5OkT.js";
4
- import { t as RemarkHeadingOptions } from "../../remark-heading-DkG12uAs.js";
5
- import { t as RemarkCodeTabOptions } from "../../remark-code-tab-C_xwrYzr.js";
6
- import { t as RemarkNpmOptions } from "../../remark-npm-DWgfdohc.js";
7
- import { t as ResolvePlugins } from "../../util-BiDGK90k.js";
1
+ import { t as RehypeCodeOptions } from "../../rehype-code-D-RFJb9W.js";
2
+ import { t as RemarkImageOptions } from "../../remark-image-BI2S9LOb.js";
3
+ import { r as StructureOptions } from "../../remark-structure-CnHwvNZr.js";
4
+ import { t as RemarkHeadingOptions } from "../../remark-heading-BcV2W1fM.js";
5
+ import { t as RemarkCodeTabOptions } from "../../remark-code-tab-DE_4bdnu.js";
6
+ import { t as RemarkNpmOptions } from "../../remark-npm-BbpvkJaT.js";
7
+ import "../../index-DdWT_FjJ.js";
8
+ import { t as ResolvePlugins } from "../../util-BDsqOxh3.js";
8
9
  import { ProcessorOptions } from "@mdx-js/mdx";
9
-
10
10
  //#region src/content/mdx/preset-runtime.d.ts
11
11
  type MDXRuntimePresetOptions = Omit<NonNullable<ProcessorOptions>, 'rehypePlugins' | 'remarkPlugins'> & {
12
12
  rehypePlugins?: ResolvePlugins;
@@ -1,7 +1,6 @@
1
- import { c as TOCItemType } from "../toc-HGr2QC6x.js";
1
+ import { c as TOCItemType } from "../toc-17DPqBrN.js";
2
2
  import { Compatible } from "vfile";
3
3
  import { PluggableList } from "unified";
4
-
5
4
  //#region src/content/toc.d.ts
6
5
  /**
7
6
  * Get Table of Contents from markdown/mdx document (using remark)
@@ -1,5 +1,4 @@
1
1
  import { ReactNode } from "react";
2
-
3
2
  //#region src/page-tree/definitions.d.ts
4
3
  interface ID {
5
4
  /**
@@ -1,5 +1,4 @@
1
1
  import { LinkProps } from "./link.js";
2
-
3
2
  //#region src/dynamic-link.d.ts
4
3
  type DynamicLinkProps = LinkProps;
5
4
  /**
@@ -7,11 +6,7 @@ type DynamicLinkProps = LinkProps;
7
6
  *
8
7
  * It supports dynamic hrefs, which means you can use `/[lang]/my-page` with `dynamicHrefs` enabled
9
8
  */
10
- declare function DynamicLink({
11
- href,
12
- ref,
13
- ...props
14
- }: DynamicLinkProps): import("react").JSX.Element;
9
+ declare function DynamicLink({ href, ref, ...props }: DynamicLinkProps): import("react").JSX.Element;
15
10
  declare function updateHref(href: string, params: Record<string, string | string[]>): string;
16
11
  //#endregion
17
12
  export { DynamicLink, DynamicLink as default, DynamicLinkProps, updateHref };
@@ -0,0 +1,21 @@
1
+ import { Framework } from "./index.js";
2
+ import { ReactNode } from "react";
3
+ //#region src/framework/astro.d.ts
4
+ type AstroParams = Record<string, string | string[] | undefined>;
5
+ interface AstroProviderProps {
6
+ children: ReactNode;
7
+ pathname: string;
8
+ params?: AstroParams;
9
+ navigate?: (url: string) => void | Promise<void>;
10
+ Link?: Framework['Link'];
11
+ Image?: Framework['Image'];
12
+ }
13
+ /**
14
+ * Fumadocs adapter for Astro with React islands.
15
+ *
16
+ * Pass `pathname` and `params` from `Astro.url.pathname` and `Astro.params`.
17
+ * You can pass `navigate` from `astro:transitions/client` to preserve client navigation.
18
+ */
19
+ declare function AstroProvider({ children, pathname, params, navigate, Link, Image }: AstroProviderProps): import("react").JSX.Element;
20
+ //#endregion
21
+ export { AstroProvider, AstroProviderProps };
@@ -0,0 +1,51 @@
1
+ "use client";
2
+ import { FrameworkProvider } from "./index.js";
3
+ import { useMemo } from "react";
4
+ import { jsx } from "react/jsx-runtime";
5
+ //#region src/framework/astro.tsx
6
+ function normalizeParams(params = {}) {
7
+ const out = {};
8
+ for (const [key, value] of Object.entries(params)) if (value !== void 0) out[key] = value;
9
+ return out;
10
+ }
11
+ /**
12
+ * Fumadocs adapter for Astro with React islands.
13
+ *
14
+ * Pass `pathname` and `params` from `Astro.url.pathname` and `Astro.params`.
15
+ * You can pass `navigate` from `astro:transitions/client` to preserve client navigation.
16
+ */
17
+ function AstroProvider({ children, pathname, params, navigate, Link, Image }) {
18
+ const resolvedParams = useMemo(() => normalizeParams(params), [params]);
19
+ return /* @__PURE__ */ jsx(FrameworkProvider, {
20
+ ...useMemo(() => ({
21
+ usePathname() {
22
+ return pathname;
23
+ },
24
+ useParams() {
25
+ return resolvedParams;
26
+ },
27
+ useRouter() {
28
+ return {
29
+ push(url) {
30
+ if (navigate) return navigate(url);
31
+ window.location.assign(url);
32
+ },
33
+ refresh() {
34
+ window.location.reload();
35
+ }
36
+ };
37
+ },
38
+ Link,
39
+ Image
40
+ }), [
41
+ Image,
42
+ Link,
43
+ navigate,
44
+ pathname,
45
+ resolvedParams
46
+ ]),
47
+ children
48
+ });
49
+ }
50
+ //#endregion
51
+ export { AstroProvider };
@@ -1,6 +1,5 @@
1
1
  import { ComponentProps, FC, ReactNode } from "react";
2
2
  import { StaticImport } from "next/dist/shared/lib/get-img-props.js";
3
-
4
3
  //#region src/framework/index.d.ts
5
4
  interface ImageProps extends Omit<ComponentProps<'img'>, 'src'> {
6
5
  sizes?: string;
@@ -29,14 +28,7 @@ interface Framework {
29
28
  }>;
30
29
  Image?: FC<ImageProps>;
31
30
  }
32
- declare function FrameworkProvider({
33
- Link,
34
- useRouter,
35
- useParams,
36
- usePathname,
37
- Image,
38
- children
39
- }: Framework & {
31
+ declare function FrameworkProvider({ Link, useRouter, useParams, usePathname, Image, children }: Framework & {
40
32
  children: ReactNode;
41
33
  }): import("react").JSX.Element;
42
34
  declare function usePathname(): string;
@@ -1,12 +1,7 @@
1
1
  import { Framework } from "./index.js";
2
2
  import { ReactNode } from "react";
3
-
4
3
  //#region src/framework/next.d.ts
5
- declare function NextProvider({
6
- children,
7
- Link: CustomLink,
8
- Image: CustomImage
9
- }: {
4
+ declare function NextProvider({ children, Link: CustomLink, Image: CustomImage }: {
10
5
  children: ReactNode;
11
6
  Link?: Framework['Link'];
12
7
  Image?: Framework['Image'];
@@ -1,12 +1,7 @@
1
1
  import { Framework } from "./index.js";
2
2
  import { ReactNode } from "react";
3
-
4
3
  //#region src/framework/react-router.d.ts
5
- declare function ReactRouterProvider({
6
- children,
7
- Link: CustomLink,
8
- Image: CustomImage
9
- }: {
4
+ declare function ReactRouterProvider({ children, Link: CustomLink, Image: CustomImage }: {
10
5
  children: ReactNode;
11
6
  Link?: Framework['Link'];
12
7
  Image?: Framework['Image'];
@@ -1,15 +1,10 @@
1
1
  import { Framework } from "./index.js";
2
2
  import { ReactNode } from "react";
3
-
4
3
  //#region src/framework/tanstack.d.ts
5
4
  /**
6
5
  * Fumadocs adapter for Tanstack Router/Start
7
6
  */
8
- declare function TanstackProvider({
9
- children,
10
- Link: CustomLink,
11
- Image: CustomImage
12
- }: {
7
+ declare function TanstackProvider({ children, Link: CustomLink, Image: CustomImage }: {
13
8
  children: ReactNode;
14
9
  Link?: Framework['Link'];
15
10
  Image?: Framework['Image'];
@@ -1,12 +1,7 @@
1
1
  import { Framework } from "./index.js";
2
2
  import { ReactNode } from "react";
3
-
4
3
  //#region src/framework/waku.d.ts
5
- declare function WakuProvider({
6
- children,
7
- Link: CustomLink,
8
- Image: CustomImage
9
- }: {
4
+ declare function WakuProvider({ children, Link: CustomLink, Image: CustomImage }: {
10
5
  children: ReactNode;
11
6
  Link?: Framework['Link'];
12
7
  Image?: Framework['Image'];
@@ -1,6 +1,5 @@
1
1
  import { HighlightOptions } from "./index.js";
2
2
  import { DependencyList, ReactNode } from "react";
3
-
4
3
  //#region src/highlight/client.d.ts
5
4
  /**
6
5
  * get highlighted results, should be used with React Suspense API.
@@ -2,7 +2,6 @@ import { ReactNode } from "react";
2
2
  import { Components } from "hast-util-to-jsx-runtime";
3
3
  import { Root } from "hast";
4
4
  import { BundledLanguage, BundledTheme, CodeOptionsMeta, CodeOptionsThemes, CodeToHastOptionsCommon, LanguageRegistration, ThemeRegistrationAny } from "shiki";
5
-
6
5
  //#region src/highlight/index.d.ts
7
6
  type HighlightOptions = HighlightHastOptions & {
8
7
  components?: Partial<Components>;
@@ -1,5 +1,4 @@
1
- import { n as ShikiFactory } from "../../index-CrF56b4C.js";
2
-
1
+ import { n as ShikiFactory } from "../../index-BMEUQz-F.js";
3
2
  //#region src/highlight/shiki/full.d.ts
4
3
  declare const defaultShikiFactory: ShikiFactory;
5
4
  /** factory using the WASM powered Regex engine */
@@ -1,2 +1,2 @@
1
- import { i as highlightHast, n as ShikiFactory, r as createShikiFactory, t as HighlightHastOptions } from "../../index-CrF56b4C.js";
1
+ import { i as highlightHast, n as ShikiFactory, r as createShikiFactory, t as HighlightHastOptions } from "../../index-BMEUQz-F.js";
2
2
  export { HighlightHastOptions, ShikiFactory, createShikiFactory, highlightHast };
@@ -1,9 +1,8 @@
1
1
  import { t as Awaitable } from "../../types-D89QoQR-.js";
2
- import { t as HighlightHastOptions } from "../../index-CrF56b4C.js";
2
+ import { t as HighlightHastOptions } from "../../index-BMEUQz-F.js";
3
3
  import { DependencyList, ReactNode } from "react";
4
4
  import { Components } from "hast-util-to-jsx-runtime";
5
5
  import { HighlighterCore } from "shiki";
6
-
7
6
  //#region src/highlight/shiki/react.d.ts
8
7
  type UseShikiOptions = HighlightHastOptions & {
9
8
  components?: Partial<Components>;
@@ -1,2 +1,2 @@
1
- import { a as TranslationPreset, c as defineTranslations, i as TranslationExtension, n as I18nConfig, o as TranslationsAPI, r as SingularTranslationsAPI, s as defineI18n, t as I18nAPI } from "../index-B799MJOL.js";
1
+ import { a as TranslationPreset, c as defineTranslations, i as TranslationExtension, n as I18nConfig, o as TranslationsAPI, r as SingularTranslationsAPI, s as defineI18n, t as I18nAPI } from "../index-DydiXvgS.js";
2
2
  export { I18nAPI, I18nConfig, SingularTranslationsAPI, TranslationExtension, TranslationPreset, TranslationsAPI, defineI18n, defineTranslations };
@@ -1,7 +1,6 @@
1
- import { n as I18nConfig } from "../index-B799MJOL.js";
1
+ import { n as I18nConfig } from "../index-DydiXvgS.js";
2
2
  import { NextProxy } from "next/server.js";
3
3
  import { NextURL } from "next/dist/server/web/next-url.js";
4
-
5
4
  //#region src/i18n/middleware.d.ts
6
5
  interface MiddlewareOptions extends I18nConfig {
7
6
  /**
@@ -30,12 +29,6 @@ interface URLFormatter {
30
29
  remove: (url: NextURL) => URL;
31
30
  }
32
31
  declare const DefaultFormatter: URLFormatter;
33
- declare function createI18nMiddleware({
34
- languages,
35
- defaultLanguage,
36
- format,
37
- cookieName,
38
- hideLocale
39
- }: MiddlewareOptions): NextProxy;
32
+ declare function createI18nMiddleware({ languages, defaultLanguage, format, cookieName, hideLocale }: MiddlewareOptions): NextProxy;
40
33
  //#endregion
41
34
  export { DefaultFormatter, URLFormatter, createI18nMiddleware };
@@ -1,5 +1,4 @@
1
1
  import { ReactNode } from "react";
2
-
3
2
  //#region src/search/index.d.ts
4
3
  interface SortedResult<Content = string> {
5
4
  id: string;
@@ -1,7 +1,6 @@
1
1
  import { t as Awaitable } from "./types-D89QoQR-.js";
2
2
  import { Root } from "hast";
3
3
  import { BundledLanguage, BundledTheme, CodeOptionsMeta, CodeOptionsThemes, CodeToHastOptionsCommon, HighlighterCore } from "shiki";
4
-
5
4
  //#region src/highlight/shiki/index.d.ts
6
5
  interface InitOptions {
7
6
  langAlias?: Record<string, string>;
@@ -1,10 +1,11 @@
1
- import { i as Root } from "./definitions-DsPo5rZj.js";
1
+ import { i as Root } from "./definitions-D8-KI7Uy.js";
2
+ import "./index-DZN5OrTa.js";
2
3
  //#region src/source/client/index.d.ts
3
4
  interface SerializedPageTree {
4
5
  $fumadocs_loader: 'page-tree';
5
6
  data: object;
6
7
  }
7
- type Serialized<Data> = { [K in keyof Data]: Data[K] extends SerializedPageTree ? Root : Data[K] };
8
+ type Serialized<Data> = { [K in keyof Data]: Data[K] extends SerializedPageTree ? Root : Data[K]; };
8
9
  declare function deserializePageTree(serialized: SerializedPageTree): Root;
9
10
  /**
10
11
  * Deserialize loader data that is serialized by the server-side Fumadocs `loader()`, supported:
@@ -1,5 +1,4 @@
1
- import { i as Root, n as Item, r as Node, t as Folder } from "./definitions-DsPo5rZj.js";
2
-
1
+ import { i as Root, n as Item, r as Node, t as Folder } from "./definitions-D8-KI7Uy.js";
3
2
  //#region src/page-tree/utils.d.ts
4
3
  /**
5
4
  * Flatten tree to an array of page nodes
@@ -0,0 +1,16 @@
1
+ import "./remark-gfm-DpVfAX1x.js";
2
+ import "./rehype-code-D-RFJb9W.js";
3
+ import "./remark-image-BI2S9LOb.js";
4
+ import "./remark-structure-CnHwvNZr.js";
5
+ import "./remark-heading-BcV2W1fM.js";
6
+ import "./remark-admonition-BwTcmI_S.js";
7
+ import "./remark-directive-admonition-BLiJ5l43.js";
8
+ import "./rehype-toc-K51AGb5U.js";
9
+ import "./remark-code-tab-DE_4bdnu.js";
10
+ import "./remark-steps-DqVEo0iq.js";
11
+ import "./remark-npm-BbpvkJaT.js";
12
+ import "./codeblock-utils-CyP8qsYv.js";
13
+ import "./remark-mdx-files-Buvxc-sa.js";
14
+ import "./remark-mdx-mermaid-C1bCHHc6.js";
15
+ import "./remark-feedback-block-BxtINXN-.js";
16
+ import "./remark-llms-BF5SHW_O.js";
@@ -1,10 +1,11 @@
1
- import { a as Separator, i as Root, n as Item, r as Node, t as Folder } from "./definitions-DsPo5rZj.js";
1
+ import { a as Separator, i as Root, n as Item, r as Node, t as Folder } from "./definitions-D8-KI7Uy.js";
2
2
  import { t as Awaitable } from "./types-D89QoQR-.js";
3
- import { i as StructuredData } from "./remark-structure-DmVL5OkT.js";
4
- import { n as I18nConfig } from "./index-B799MJOL.js";
5
- import { n as SerializedPageTree } from "./index-BLKQLw5Y.js";
3
+ import { i as StructuredData } from "./remark-structure-CnHwvNZr.js";
4
+ import "./index-DdWT_FjJ.js";
5
+ import { n as I18nConfig } from "./index-DydiXvgS.js";
6
+ import "./index-DZN5OrTa.js";
7
+ import { n as SerializedPageTree } from "./index-CdZGMKDG.js";
6
8
  import { ReactNode } from "react";
7
-
8
9
  //#region src/source/storage/file-system.d.ts
9
10
  /**
10
11
  * In memory file system.
@@ -32,7 +33,9 @@ declare class FileSystem<File> {
32
33
  //#endregion
33
34
  //#region src/source/storage/content.d.ts
34
35
  type ContentStorage<P extends ContentStoragePageFile = ContentStoragePageFile, M extends ContentStorageMetaFile = ContentStorageMetaFile> = FileSystem<P | M> & {
35
- /** always `undefined`, for inferring types only */$inferPage: P; /** always `undefined`, for inferring types only */
36
+ /** always `undefined`, for inferring types only */
37
+ $inferPage: P;
38
+ /** always `undefined`, for inferring types only */
36
39
  $inferMeta: M;
37
40
  };
38
41
  /** @internal */
@@ -93,7 +96,8 @@ interface PageTreeOptions<S extends ContentStorage = ContentStorage> {
93
96
  context?: Record<string, unknown>;
94
97
  /** customize the default sorting behaviour (`localeCompare`) */
95
98
  sort?: {
96
- /** @default 'path' */by?: 'name' | 'path';
99
+ /** @default 'path' */
100
+ by?: 'name' | 'path';
97
101
  locales?: Intl.LocalesArgument;
98
102
  options?: Intl.CollatorOptions;
99
103
  };
@@ -129,10 +133,10 @@ declare namespace types_d_exports {
129
133
  export { AnyInput, GenerateMeta, GenerateMetaFile, GeneratePage, GeneratePageFile, GenerateStorage };
130
134
  }
131
135
  type AnyInput = SourceUnion | Record<string, SourceUnion>;
132
- type GeneratePage<T extends AnyInput> = T extends Record<infer K extends string, SourceUnion> ? { [k in K]: T[k] extends SourceUnion<infer D> ? Page<k, D['pageData']> : never }[K] : T extends SourceUnion<infer D> ? Page<undefined, D['pageData']> : never;
133
- type GenerateMeta<T extends AnyInput> = T extends Record<infer K extends string, SourceUnion> ? { [k in K]: T[k] extends SourceUnion<infer D> ? Meta<k, D['metaData']> : never }[K] : T extends SourceUnion<infer D> ? Meta<undefined, D['metaData']> : never;
134
- type GeneratePageFile<T extends AnyInput> = T extends Record<infer K extends string, SourceUnion> ? { [k in K]: T[k] extends SourceUnion<infer D> ? ContentStoragePageFile<k, D['pageData']> : never }[K] : T extends SourceUnion<infer D> ? ContentStoragePageFile<undefined, D['pageData']> : never;
135
- type GenerateMetaFile<T extends AnyInput> = T extends Record<infer K extends string, SourceUnion> ? { [k in K]: T[k] extends SourceUnion<infer D> ? ContentStorageMetaFile<k, D['metaData']> : never }[K] : T extends SourceUnion<infer D> ? ContentStorageMetaFile<undefined, D['metaData']> : never;
136
+ type GeneratePage<T extends AnyInput> = T extends Record<infer K extends string, SourceUnion> ? { [k in K]: T[k] extends SourceUnion<infer D> ? Page<k, D['pageData']> : never; }[K] : T extends SourceUnion<infer D> ? Page<undefined, D['pageData']> : never;
137
+ type GenerateMeta<T extends AnyInput> = T extends Record<infer K extends string, SourceUnion> ? { [k in K]: T[k] extends SourceUnion<infer D> ? Meta<k, D['metaData']> : never; }[K] : T extends SourceUnion<infer D> ? Meta<undefined, D['metaData']> : never;
138
+ type GeneratePageFile<T extends AnyInput> = T extends Record<infer K extends string, SourceUnion> ? { [k in K]: T[k] extends SourceUnion<infer D> ? ContentStoragePageFile<k, D['pageData']> : never; }[K] : T extends SourceUnion<infer D> ? ContentStoragePageFile<undefined, D['pageData']> : never;
139
+ type GenerateMetaFile<T extends AnyInput> = T extends Record<infer K extends string, SourceUnion> ? { [k in K]: T[k] extends SourceUnion<infer D> ? ContentStorageMetaFile<k, D['metaData']> : never; }[K] : T extends SourceUnion<infer D> ? ContentStorageMetaFile<undefined, D['metaData']> : never;
136
140
  type GenerateStorage<T extends AnyInput> = ContentStorage<GeneratePageFile<T>, GenerateMetaFile<T>>;
137
141
  //#endregion
138
142
  //#region src/source/loader.d.ts
@@ -380,7 +384,7 @@ declare function multiple<T extends Record<string, StaticSource>>(sources: T): T
380
384
  pageData: C['pageData'] & {
381
385
  type: k;
382
386
  };
383
- }> : never } : never;
387
+ }> : never; } : never;
384
388
  declare function source<Page extends PageData, Meta extends MetaData>(config: {
385
389
  pages: VirtualPage<Page>[];
386
390
  metas: VirtualMeta<Meta>[];
@@ -55,11 +55,12 @@ interface TranslationsAPI<Languages extends string = string, Keys extends string
55
55
  /** register allowed translation keys */
56
56
  extend<const NewKeys extends string>(extension: TranslationExtension<NewKeys>): TranslationsAPI<Languages, Keys | NewKeys>;
57
57
  /** add translations */
58
- add(overrides: { [Lang in Languages]?: Partial<Record<Keys, string>> }): TranslationsAPI<Languages, Keys>;
58
+ add(overrides: { [Lang in Languages]?: Partial<Record<Keys, string>>; }): TranslationsAPI<Languages, Keys>;
59
59
  /** @deprecated the namespace parameter is now unnecessary */
60
60
  add(unused: string, overrides: { [Lang in Languages]?: Partial<Record<Keys, string>> & {
61
- /** @deprecated the label is no longer used */[key: string]: string;
62
- } }): TranslationsAPI<Languages, Keys>;
61
+ /** @deprecated the label is no longer used */
62
+ [key: string]: string;
63
+ }; }): TranslationsAPI<Languages, Keys>;
63
64
  /** add language pack */
64
65
  preset: (lang: Languages, preset: TranslationPreset<Keys>) => TranslationsAPI<Languages, Keys>;
65
66
  }
@@ -76,7 +77,8 @@ interface SingularTranslationsAPI<Keys extends string = string> {
76
77
  add(overrides: Partial<Record<Keys, string>>): SingularTranslationsAPI<Keys>;
77
78
  /** @deprecated the namespace parameter is now unnecessary */
78
79
  add(unused: string, overrides: Partial<Record<Keys, string>> & {
79
- /** @deprecated the label is no longer used */[key: string]: string;
80
+ /** @deprecated the label is no longer used */
81
+ [key: string]: string;
80
82
  }): SingularTranslationsAPI<Keys>;
81
83
  /** add language pack */
82
84
  preset: (preset: TranslationPreset<Keys>) => SingularTranslationsAPI<Keys>;
package/dist/link.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { ComponentProps } from "react";
2
-
3
2
  //#region src/link.d.ts
4
3
  interface LinkProps extends ComponentProps<'a'> {
5
4
  /**
@@ -13,13 +12,6 @@ interface LinkProps extends ComponentProps<'a'> {
13
12
  */
14
13
  prefetch?: boolean;
15
14
  }
16
- declare function Link({
17
- ref,
18
- href,
19
- external,
20
- prefetch,
21
- children,
22
- ...props
23
- }: LinkProps): import("react").JSX.Element;
15
+ declare function Link({ ref, href, external, prefetch, children, ...props }: LinkProps): import("react").JSX.Element;
24
16
  //#endregion
25
17
  export { Link, Link as default, LinkProps };
@@ -1,2 +1,2 @@
1
- import { i as parseCodeBlockAttributes, n as CodeBlockTabsOptions, r as generateCodeBlockTabs, t as CodeBlockAttributes } from "../codeblock-utils-B92t2Hm-.js";
1
+ import { i as parseCodeBlockAttributes, n as CodeBlockTabsOptions, r as generateCodeBlockTabs, t as CodeBlockAttributes } from "../codeblock-utils-CyP8qsYv.js";
2
2
  export { CodeBlockAttributes, CodeBlockTabsOptions, generateCodeBlockTabs, parseCodeBlockAttributes };