@vezham/docs-core 1.0.1

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 (201) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +5 -0
  3. package/dist/advanced-Ct13khZr.js +79 -0
  4. package/dist/algolia-C0E5qQhM.d.ts +66 -0
  5. package/dist/breadcrumb.d.ts +46 -0
  6. package/dist/breadcrumb.js +59 -0
  7. package/dist/build-doc-4OvfjVN2.js +85 -0
  8. package/dist/client-kQ39Ub0-.d.ts +247 -0
  9. package/dist/codeblock-utils-CyP8qsYv.d.ts +29 -0
  10. package/dist/content/github.d.ts +41 -0
  11. package/dist/content/github.js +28 -0
  12. package/dist/content/md/frontmatter.d.ts +15 -0
  13. package/dist/content/md/frontmatter.js +24 -0
  14. package/dist/content/md.d.ts +24 -0
  15. package/dist/content/md.js +43 -0
  16. package/dist/content/mdx/preset-bundler.d.ts +29 -0
  17. package/dist/content/mdx/preset-bundler.js +39 -0
  18. package/dist/content/mdx/preset-runtime.d.ts +26 -0
  19. package/dist/content/mdx/preset-runtime.js +36 -0
  20. package/dist/content/toc.d.ts +19 -0
  21. package/dist/content/toc.js +14 -0
  22. package/dist/definitions-CFOhwE1k.d.ts +72 -0
  23. package/dist/dynamic-CTsodhTH.js +905 -0
  24. package/dist/dynamic-link.d.ts +12 -0
  25. package/dist/dynamic-link.js +31 -0
  26. package/dist/endpoint-MyoBU5IC.js +28 -0
  27. package/dist/framework/astro.d.ts +21 -0
  28. package/dist/framework/astro.js +52 -0
  29. package/dist/framework/index.d.ts +40 -0
  30. package/dist/framework/index.js +66 -0
  31. package/dist/framework/next.d.ts +10 -0
  32. package/dist/framework/next.js +19 -0
  33. package/dist/framework/react-router.d.ts +10 -0
  34. package/dist/framework/react-router.js +43 -0
  35. package/dist/framework/tanstack.d.ts +13 -0
  36. package/dist/framework/tanstack.js +54 -0
  37. package/dist/framework/waku.d.ts +10 -0
  38. package/dist/framework/waku.js +46 -0
  39. package/dist/highlight/client.d.ts +11 -0
  40. package/dist/highlight/client.js +15 -0
  41. package/dist/highlight/index.d.ts +31 -0
  42. package/dist/highlight/index.js +30 -0
  43. package/dist/highlight/shiki/full.d.ts +7 -0
  44. package/dist/highlight/shiki/full.js +23 -0
  45. package/dist/highlight/shiki/index.d.ts +2 -0
  46. package/dist/highlight/shiki/index.js +27 -0
  47. package/dist/highlight/shiki/react.d.ts +23 -0
  48. package/dist/highlight/shiki/react.js +50 -0
  49. package/dist/i18n/index.d.ts +2 -0
  50. package/dist/i18n/index.js +63 -0
  51. package/dist/i18n/middleware.d.ts +34 -0
  52. package/dist/i18n/middleware.js +3855 -0
  53. package/dist/icon-BILaoXeg.js +17 -0
  54. package/dist/index-B-0R0VbS.d.ts +18 -0
  55. package/dist/index-BM36H-xw.d.ts +36 -0
  56. package/dist/index-BMEUQz-F.d.ts +21 -0
  57. package/dist/index-DAYtLGbx.d.ts +16 -0
  58. package/dist/index-DIwKCYOz.d.ts +513 -0
  59. package/dist/index-DydiXvgS.d.ts +90 -0
  60. package/dist/index-E8Qh_yQs.d.ts +49 -0
  61. package/dist/is-equal-LdLqRs0o.js +8 -0
  62. package/dist/link.d.ts +17 -0
  63. package/dist/link.js +23 -0
  64. package/dist/mdx-plugins/codeblock-utils.d.ts +2 -0
  65. package/dist/mdx-plugins/codeblock-utils.js +68 -0
  66. package/dist/mdx-plugins/index.d.ts +20 -0
  67. package/dist/mdx-plugins/index.js +18 -0
  68. package/dist/mdx-plugins/rehype-code.core.d.ts +3 -0
  69. package/dist/mdx-plugins/rehype-code.core.js +3 -0
  70. package/dist/mdx-plugins/rehype-code.d.ts +4 -0
  71. package/dist/mdx-plugins/rehype-code.js +24 -0
  72. package/dist/mdx-plugins/rehype-toc.d.ts +2 -0
  73. package/dist/mdx-plugins/rehype-toc.js +139 -0
  74. package/dist/mdx-plugins/remark-admonition.d.ts +2 -0
  75. package/dist/mdx-plugins/remark-admonition.js +71 -0
  76. package/dist/mdx-plugins/remark-block-id.d.ts +37 -0
  77. package/dist/mdx-plugins/remark-block-id.js +41 -0
  78. package/dist/mdx-plugins/remark-code-tab.d.ts +2 -0
  79. package/dist/mdx-plugins/remark-code-tab.js +190 -0
  80. package/dist/mdx-plugins/remark-directive-admonition.d.ts +2 -0
  81. package/dist/mdx-plugins/remark-directive-admonition.js +57 -0
  82. package/dist/mdx-plugins/remark-feedback-block.d.ts +2 -0
  83. package/dist/mdx-plugins/remark-feedback-block.js +54 -0
  84. package/dist/mdx-plugins/remark-gfm.d.ts +2 -0
  85. package/dist/mdx-plugins/remark-gfm.js +2 -0
  86. package/dist/mdx-plugins/remark-heading.d.ts +2 -0
  87. package/dist/mdx-plugins/remark-heading.js +46 -0
  88. package/dist/mdx-plugins/remark-image.d.ts +2 -0
  89. package/dist/mdx-plugins/remark-image.js +167 -0
  90. package/dist/mdx-plugins/remark-llms.d.ts +2 -0
  91. package/dist/mdx-plugins/remark-llms.js +338 -0
  92. package/dist/mdx-plugins/remark-llms.runtime.d.ts +10 -0
  93. package/dist/mdx-plugins/remark-llms.runtime.js +24 -0
  94. package/dist/mdx-plugins/remark-mdx-files.d.ts +2 -0
  95. package/dist/mdx-plugins/remark-mdx-files.js +182 -0
  96. package/dist/mdx-plugins/remark-mdx-mermaid.d.ts +2 -0
  97. package/dist/mdx-plugins/remark-mdx-mermaid.js +28 -0
  98. package/dist/mdx-plugins/remark-npm.d.ts +2 -0
  99. package/dist/mdx-plugins/remark-npm.js +76 -0
  100. package/dist/mdx-plugins/remark-steps.d.ts +2 -0
  101. package/dist/mdx-plugins/remark-steps.js +93 -0
  102. package/dist/mdx-plugins/remark-structure.d.ts +2 -0
  103. package/dist/mdx-plugins/remark-structure.js +118 -0
  104. package/dist/mdx-plugins/stringifier.d.ts +2 -0
  105. package/dist/mdx-plugins/stringifier.js +91 -0
  106. package/dist/mdx-plugins/transformer-icon.d.ts +2 -0
  107. package/dist/mdx-plugins/transformer-icon.js +145 -0
  108. package/dist/negotiation/index.d.ts +17 -0
  109. package/dist/negotiation/index.js +378 -0
  110. package/dist/page-tree/index.d.ts +3 -0
  111. package/dist/page-tree/index.js +2 -0
  112. package/dist/path-1H5VzYiT.js +75 -0
  113. package/dist/rehype-code-D-RFJb9W.d.ts +14 -0
  114. package/dist/rehype-code.core-BUwNuchP.js +548 -0
  115. package/dist/rehype-code.core-BjH1uHWj.d.ts +115 -0
  116. package/dist/rehype-toc-K51AGb5U.d.ts +43 -0
  117. package/dist/remark-admonition-BwTcmI_S.d.ts +20 -0
  118. package/dist/remark-code-tab-DE_4bdnu.d.ts +34 -0
  119. package/dist/remark-directive-admonition-BLiJ5l43.d.ts +27 -0
  120. package/dist/remark-feedback-block-BxtINXN-.d.ts +45 -0
  121. package/dist/remark-gfm-DpVfAX1x.d.ts +2 -0
  122. package/dist/remark-heading-DEIzTkU5.d.ts +33 -0
  123. package/dist/remark-image-BI2S9LOb.d.ts +57 -0
  124. package/dist/remark-llms-bD3WvU2V.d.ts +73 -0
  125. package/dist/remark-mdx-files-Buvxc-sa.d.ts +54 -0
  126. package/dist/remark-mdx-mermaid-C1bCHHc6.d.ts +15 -0
  127. package/dist/remark-npm-BbpvkJaT.d.ts +31 -0
  128. package/dist/remark-steps-DqVEo0iq.d.ts +23 -0
  129. package/dist/remark-structure-CnHwvNZr.d.ts +87 -0
  130. package/dist/remove-markdown-DfKNMl9w.js +40 -0
  131. package/dist/remove-undefined-CzMSKybq.js +24 -0
  132. package/dist/rolldown-runtime-DC62tzP2.js +33 -0
  133. package/dist/search/algolia.d.ts +2 -0
  134. package/dist/search/algolia.js +75 -0
  135. package/dist/search/client/algolia.d.ts +2 -0
  136. package/dist/search/client/algolia.js +53 -0
  137. package/dist/search/client/fetch.d.ts +2 -0
  138. package/dist/search/client/fetch.js +28 -0
  139. package/dist/search/client/flexsearch-static.d.ts +2 -0
  140. package/dist/search/client/flexsearch-static.js +42 -0
  141. package/dist/search/client/mixedbread.d.ts +2 -0
  142. package/dist/search/client/mixedbread.js +65 -0
  143. package/dist/search/client/orama-cloud-legacy.d.ts +2 -0
  144. package/dist/search/client/orama-cloud-legacy.js +84 -0
  145. package/dist/search/client/orama-cloud.d.ts +2 -0
  146. package/dist/search/client/orama-cloud.js +86 -0
  147. package/dist/search/client/orama-static.d.ts +2 -0
  148. package/dist/search/client/orama-static.js +75 -0
  149. package/dist/search/client.d.ts +2 -0
  150. package/dist/search/client.js +97 -0
  151. package/dist/search/flexsearch.d.ts +56 -0
  152. package/dist/search/flexsearch.js +128 -0
  153. package/dist/search/index.d.ts +2 -0
  154. package/dist/search/index.js +74 -0
  155. package/dist/search/mixedbread.d.ts +49 -0
  156. package/dist/search/mixedbread.js +77 -0
  157. package/dist/search/orama-cloud-legacy.d.ts +75 -0
  158. package/dist/search/orama-cloud-legacy.js +48 -0
  159. package/dist/search/orama-cloud.d.ts +75 -0
  160. package/dist/search/orama-cloud.js +50 -0
  161. package/dist/search/server.d.ts +2 -0
  162. package/dist/search/server.js +237 -0
  163. package/dist/server-CCqACwlF.d.ts +165 -0
  164. package/dist/server.browser.d.ts +13 -0
  165. package/dist/server.browser.js +22 -0
  166. package/dist/server.d.ts +42 -0
  167. package/dist/server.js +398 -0
  168. package/dist/source/client/index.d.ts +2 -0
  169. package/dist/source/client/index.js +37 -0
  170. package/dist/source/dynamic.d.ts +2 -0
  171. package/dist/source/dynamic.js +2 -0
  172. package/dist/source/index.d.ts +2 -0
  173. package/dist/source/index.js +5 -0
  174. package/dist/source/llms.d.ts +2 -0
  175. package/dist/source/llms.js +74 -0
  176. package/dist/source/plugins/lucide-icons.d.ts +11 -0
  177. package/dist/source/plugins/lucide-icons.js +21 -0
  178. package/dist/source/plugins/slugs.d.ts +2 -0
  179. package/dist/source/plugins/slugs.js +75 -0
  180. package/dist/source/plugins/status-badges.d.ts +50 -0
  181. package/dist/source/plugins/status-badges.js +52 -0
  182. package/dist/source/schema.d.ts +30 -0
  183. package/dist/source/schema.js +28 -0
  184. package/dist/stringifier-B_QUcUyo.d.ts +63 -0
  185. package/dist/toc-CtW5lwA1.d.ts +64 -0
  186. package/dist/toc.d.ts +2 -0
  187. package/dist/toc.js +245 -0
  188. package/dist/transformer-icon-DlrneIS3.d.ts +17 -0
  189. package/dist/types-D89QoQR-.d.ts +4 -0
  190. package/dist/url-BVHvi3_K.js +29 -0
  191. package/dist/util-BDsqOxh3.d.ts +6 -0
  192. package/dist/util-DjBr9b3w.js +8 -0
  193. package/dist/utils/use-media-query.d.ts +4 -0
  194. package/dist/utils/use-media-query.js +20 -0
  195. package/dist/utils/use-on-change.d.ts +9 -0
  196. package/dist/utils/use-on-change.js +17 -0
  197. package/dist/utils-Bvy3V-fv.js +59 -0
  198. package/dist/utils-Cgs-6U-z.js +39 -0
  199. package/dist/utils-DEVq3cEC.js +151 -0
  200. package/dist/utils-Yx0IL9eW.js +48 -0
  201. package/package.json +251 -0
@@ -0,0 +1,20 @@
1
+ import { Transformer } from "unified";
2
+ import { Root } from "mdast";
3
+ //#region src/mdx-plugins/remark-admonition.d.ts
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
+ * @deprecated Use `remarkDirectiveAdmonition` with `remark-directive` configured instead.
17
+ */
18
+ declare function remarkAdmonition(options?: RemarkAdmonitionOptions): Transformer<Root, Root>;
19
+ //#endregion
20
+ export { remarkAdmonition as n, RemarkAdmonitionOptions as t };
@@ -0,0 +1,34 @@
1
+ import { Processor, Transformer } from "unified";
2
+ import { Root } from "mdast";
3
+ //#region src/mdx-plugins/remark-code-tab.d.ts
4
+ type TabType = 'CodeBlockTabs' | 'Tabs';
5
+ interface RemarkCodeTabOptions {
6
+ Tabs?: TabType;
7
+ /**
8
+ * Parse MDX in tab values
9
+ *
10
+ * @defaultValue false
11
+ */
12
+ parseMdx?: boolean;
13
+ }
14
+ declare module 'mdast' {
15
+ interface CodeData {
16
+ /**
17
+ * [Fumadocs: remark-code-tab] the associated tab value
18
+ */
19
+ tab?: string;
20
+ /**
21
+ * [Fumadocs: remark-code-tab] the associated tab group ID
22
+ */
23
+ tabGroup?: string;
24
+ }
25
+ interface Data {
26
+ /**
27
+ * [Fumadocs: remark-code-tab] internal
28
+ */
29
+ _code_tab_visited?: true;
30
+ }
31
+ }
32
+ declare function remarkCodeTab(this: Processor, options?: RemarkCodeTabOptions): Transformer<Root, Root>;
33
+ //#endregion
34
+ export { remarkCodeTab as n, RemarkCodeTabOptions as t };
@@ -0,0 +1,27 @@
1
+ import { Transformer } from "unified";
2
+ import { Root } from "mdast";
3
+ //#region src/mdx-plugins/remark-directive-admonition.d.ts
4
+ interface RemarkDirectiveAdmonitionOptions {
5
+ /**
6
+ * the tag names of Callout component.
7
+ */
8
+ tags?: {
9
+ CalloutContainer?: string;
10
+ CalloutTitle?: string;
11
+ CalloutDescription?: string;
12
+ };
13
+ /**
14
+ * All supported admonition types and their linked Callout type.
15
+ *
16
+ * When specified, all defaults will be cleared.
17
+ */
18
+ types?: Record<string, string>;
19
+ }
20
+ /**
21
+ * Remark Plugin to support Admonition syntax in Docusaurus, useful for migrating from Docusaurus.
22
+ *
23
+ * Requires [`remark-directive`](https://github.com/remarkjs/remark-directive) to be configured.
24
+ */
25
+ declare function remarkDirectiveAdmonition({ tags: { CalloutContainer, CalloutTitle, CalloutDescription }, types }?: RemarkDirectiveAdmonitionOptions): Transformer<Root, Root>;
26
+ //#endregion
27
+ export { remarkDirectiveAdmonition as n, RemarkDirectiveAdmonitionOptions as t };
@@ -0,0 +1,45 @@
1
+ import { Transformer } from "unified";
2
+ import { Root, RootContent } from "mdast";
3
+ //#region src/mdx-plugins/remark-feedback-block.d.ts
4
+ interface RemarkFeedbackBlockOptions {
5
+ /**
6
+ * generate block ID, default to using MD5.
7
+ */
8
+ generateHash?: (ctx: {
9
+ body: string;
10
+ }) => string;
11
+ /**
12
+ * @defaultValue FeedbackBlock
13
+ */
14
+ tagName?: string;
15
+ /**
16
+ * determine how the node should be resolved into a feedback block.
17
+ *
18
+ * default: skip MDX elements, convert paragraph, list item, and image nodes.
19
+ *
20
+ * @returns
21
+ * - `true`: convert the node into a feedback block.
22
+ * - `false`: skip the current node and look into its children.
23
+ * - `skip`: skip the current node and its children.
24
+ */
25
+ resolve?: (node: RootContent) => boolean | 'skip';
26
+ /**
27
+ * generate & include the block body to `<FeedbackBlock body="..." />` as string
28
+ *
29
+ * @defaultValue true
30
+ */
31
+ generateBody?: boolean;
32
+ }
33
+ interface FeedbackBlockProps {
34
+ id: string;
35
+ /** the text body of block, only exists when `generateBody` is enabled. */
36
+ body?: string;
37
+ }
38
+ /**
39
+ * Generate MDX `<FeedbackBlock />` elements with an unique `id` for every block-like element.
40
+ *
41
+ * Note: the uniqueness is only guaranteed per MDX file/page.
42
+ */
43
+ declare function remarkFeedbackBlock({ generateHash, tagName, resolve, generateBody }?: RemarkFeedbackBlockOptions): Transformer<Root, Root>;
44
+ //#endregion
45
+ export { RemarkFeedbackBlockOptions as n, remarkFeedbackBlock as r, FeedbackBlockProps as t };
@@ -0,0 +1,2 @@
1
+ import remarkGfm$1, { Options as RemarkGfmOptions } from "remark-gfm";
2
+ export { remarkGfm$1 as n, RemarkGfmOptions as t };
@@ -0,0 +1,33 @@
1
+ import { c as TOCItemType } from "./toc-CtW5lwA1.js";
2
+ import { Transformer } from "unified";
3
+ import { Heading, Root } from "mdast";
4
+ //#region src/mdx-plugins/remark-heading.d.ts
5
+ interface RemarkHeadingOptions {
6
+ slug?: (root: Root, heading: Heading, text: string) => string;
7
+ /**
8
+ * Allow custom headings ids
9
+ *
10
+ * @defaultValue true
11
+ */
12
+ customId?: boolean;
13
+ /**
14
+ * Attach an array of `TOCItemType` to `file.data.toc`
15
+ *
16
+ * @defaultValue true
17
+ */
18
+ generateToc?: boolean;
19
+ }
20
+ declare module 'vfile' {
21
+ interface DataMap {
22
+ /**
23
+ * [Fumadocs: remark-heading] output data.
24
+ */
25
+ toc?: TOCItemType[];
26
+ }
27
+ }
28
+ /**
29
+ * Add heading ids and extract TOC
30
+ */
31
+ declare function remarkHeading({ slug, customId, generateToc }?: RemarkHeadingOptions): Transformer<Root, Root>;
32
+ //#endregion
33
+ export { remarkHeading as n, RemarkHeadingOptions as t };
@@ -0,0 +1,57 @@
1
+ import { Transformer } from "unified";
2
+ import { Root } from "mdast";
3
+ //#region src/mdx-plugins/remark-image.d.ts
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 'none'
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
+ //#endregion
57
+ export { remarkImage as n, RemarkImageOptions as t };
@@ -0,0 +1,73 @@
1
+ import { n as StringifyOptions } from "./stringifier-B_QUcUyo.js";
2
+ import { MdxJsxFlowElement, MdxJsxTextElement } from "mdast-util-mdx";
3
+ import { Info, State } from "mdast-util-to-markdown";
4
+ import { Processor, Transformer } from "unified";
5
+ import { Parents, Root } from "mdast";
6
+ //#region src/mdx-plugins/remark-llms.d.ts
7
+ interface LLMsOptions extends StringifyOptions {
8
+ /**
9
+ * export name for output Markdown.
10
+ *
11
+ * @default _markdown
12
+ */
13
+ as?: string;
14
+ /**
15
+ * Explicit heading IDs in output.
16
+ *
17
+ * @default true
18
+ */
19
+ headingIds?: boolean;
20
+ /**
21
+ * Filter the elements to be included in the output:
22
+ *
23
+ * - `true`: include element & its children.
24
+ * - `children-only`: exclude element but keep its children.
25
+ * - `false`: exclude element & its children.
26
+ *
27
+ * Default:
28
+ *
29
+ * ```ts
30
+ * filterElement = (node) => {
31
+ * switch (node.type) {
32
+ * case 'mdxjsEsm':
33
+ * return false;
34
+ * default:
35
+ * return true;
36
+ * }
37
+ * },
38
+ * ```
39
+ */
40
+ filterElement?: StringifyOptions['filterElement'];
41
+ /**
42
+ * Tag names of MDX components to be stringified as `placeholder()`, you can also use `placeholder()` directly in `stringify` callback.
43
+ *
44
+ * Ignored with `output: 'function'`.
45
+ */
46
+ mdxAsPlaceholder?: string[];
47
+ /**
48
+ * Form of the export:
49
+ *
50
+ * - `string`: the output Markdown.
51
+ * - `function`: a component: Markdown content is still stringified at compile time, while JSX
52
+ * elements are kept as JSX, receiving their original props and resolving from `props.components`.
53
+ * Render it with `renderToMarkdown` from `@vezham/docs-core/server`, where a component
54
+ * can call `asMarkdown()` to define its own Markdown form.
55
+ *
56
+ * @default string
57
+ */
58
+ output?: 'function' | 'string';
59
+ /**
60
+ * @private output in file data, unavailable with `output: 'function'`
61
+ */
62
+ _data?: boolean;
63
+ }
64
+ /**
65
+ * generate `llms.txt` for markdown.
66
+ */
67
+ declare function remarkLLMs(this: Processor, { as, headingIds, _data, mdxAsPlaceholder, output, ...rest }?: LLMsOptions): Transformer<Root, Root>;
68
+ /**
69
+ * Preserve AST data to render the MDX component at runtime, use `renderPlaceholder()` to render the placeholders.
70
+ */
71
+ declare function placeholder(node: MdxJsxTextElement | MdxJsxFlowElement, _parent: Parents | undefined, state: State, info: Info): string;
72
+ //#endregion
73
+ export { placeholder as n, remarkLLMs as r, LLMsOptions as t };
@@ -0,0 +1,54 @@
1
+ import { MdxJsxFlowElement } from "mdast-util-mdx";
2
+ import { Transformer } from "unified";
3
+ import { Root } from "mdast";
4
+ //#region src/mdx-plugins/remark-mdx-files.d.ts
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
+ interface ToMdxOptions {
17
+ defaultOpenAll: boolean;
18
+ }
19
+ type Node = FileNode | FolderNode;
20
+ interface RemarkMdxFilesOptions {
21
+ /**
22
+ * @defaultValue files
23
+ */
24
+ lang?: string;
25
+ toMdx?: (node: Node, options: ToMdxOptions) => MdxJsxFlowElement;
26
+ }
27
+ /**
28
+ *
29
+ * **Files CodeBlock:**
30
+ *
31
+ * Convert codeblocks with `files` as lang, like:
32
+ *
33
+ * ```files
34
+ * project
35
+ * ├── src
36
+ * │ ├── index.js
37
+ * │ └── utils
38
+ * │ └── helper.js
39
+ * ├── package.json
40
+ * ```
41
+ *
42
+ * into MDX `<Files />` component.
43
+ *
44
+ * **Auto Files:**
45
+ *
46
+ * Generates MDX `<Files />` component from file system.
47
+ *
48
+ * ```mdx
49
+ * <auto-files dir="scripts" pattern="my-dir/*" defaultOpenAll />
50
+ * ```
51
+ */
52
+ declare function remarkMdxFiles(options?: RemarkMdxFilesOptions): Transformer<Root, Root>;
53
+ //#endregion
54
+ export { remarkMdxFiles as a, ToMdxOptions as i, FolderNode as n, RemarkMdxFilesOptions as r, FileNode as t };
@@ -0,0 +1,15 @@
1
+ import { Transformer } from "unified";
2
+ import { Root } from "mdast";
3
+ //#region src/mdx-plugins/remark-mdx-mermaid.d.ts
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
+ //#endregion
15
+ export { remarkMdxMermaid as n, RemarkMdxMermaidOptions as t };
@@ -0,0 +1,31 @@
1
+ import { Transformer } from "unified";
2
+ import { Root } from "mdast";
3
+ //#region src/mdx-plugins/remark-npm.d.ts
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
+ //#endregion
31
+ export { remarkNpm as n, RemarkNpmOptions as t };
@@ -0,0 +1,23 @@
1
+ import { Transformer } from "unified";
2
+ import { Root } from "mdast";
3
+ //#region src/mdx-plugins/remark-steps.d.ts
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
+ //#endregion
23
+ export { remarkSteps as n, RemarkStepsOptions as t };
@@ -0,0 +1,87 @@
1
+ import { n as StringifyOptions$1, t as Stringifier$1 } from "./stringifier-B_QUcUyo.js";
2
+ import { MdxJsxAttribute, MdxJsxExpressionAttribute, MdxJsxFlowElement, MdxJsxTextElement } from "mdast-util-mdx";
3
+ import { PluggableList, Processor, Transformer } from "unified";
4
+ import { Nodes, Root } from "mdast";
5
+ //#region src/mdx-plugins/remark-structure.d.ts
6
+ interface StructuredDataHeading {
7
+ id: string;
8
+ content: string;
9
+ }
10
+ interface StructuredDataContent {
11
+ heading: string | undefined;
12
+ content: string;
13
+ }
14
+ interface StructuredData {
15
+ headings: StructuredDataHeading[];
16
+ /**
17
+ * Refer to paragraphs, a heading may contain multiple contents as well
18
+ */
19
+ contents: StructuredDataContent[];
20
+ }
21
+ interface StructureOptions {
22
+ /**
23
+ * MDAST node types to be scanned as a content block.
24
+ *
25
+ * If a node's type is listed in this array, it will be converted into a single content block.
26
+ *
27
+ * @defaultValue ['heading', 'paragraph', 'blockquote', 'tableCell', 'mdxJsxFlowElement']
28
+ */
29
+ types?: string[] | ((node: Nodes) => boolean);
30
+ /**
31
+ * stringify text content from a MDAST node.
32
+ */
33
+ stringify?: Stringifier | StringifyOptions;
34
+ /**
35
+ * Whether the MDX element should be treated as a single content block, only effective if `types` has `mdxJsxFlowElement`.
36
+ *
37
+ * Default: return `true` if the element is a leaf node, otherwise `false`.
38
+ */
39
+ mdxTypes?: (node: MdxJsxFlowElement | MdxJsxTextElement) => boolean;
40
+ /** @deprecated use `stringify.filterMdxAttributes` instead */
41
+ allowedMdxAttributes?: string[] | ((node: MdxJsxFlowElement | MdxJsxTextElement, attribute: MdxJsxAttribute | MdxJsxExpressionAttribute) => boolean);
42
+ /**
43
+ * export as `structuredData` (if true) or specified variable name.
44
+ */
45
+ exportAs?: string | boolean;
46
+ }
47
+ declare module 'mdast' {
48
+ interface Data {
49
+ /**
50
+ * [Fumadocs: remark-structure] Items to add to the structured data.
51
+ */
52
+ structuredData?: {
53
+ contents: StructuredDataContent[];
54
+ };
55
+ }
56
+ }
57
+ declare module 'vfile' {
58
+ interface DataMap {
59
+ /**
60
+ * [Fumadocs: remark-structure] output data.
61
+ */
62
+ structuredData: StructuredData;
63
+ }
64
+ }
65
+ declare const remarkStructureDefaultOptions: {
66
+ types: string[];
67
+ mdxTypes(node: MdxJsxFlowElement | MdxJsxTextElement): boolean;
68
+ exportAs: false;
69
+ };
70
+ /**
71
+ * Extract content into structured data.
72
+ *
73
+ * By default, the output is stored into VFile (`vfile.data.structuredData`), you can specify `exportAs` to export it.
74
+ */
75
+ declare function remarkStructure(this: Processor, { types, mdxTypes, stringify: stringifyOptions, allowedMdxAttributes, exportAs }?: StructureOptions): Transformer<Root, Root>;
76
+ /**
77
+ * Extract data from markdown/mdx content
78
+ */
79
+ declare function structure(content: string, remarkPlugins?: PluggableList, options?: StructureOptions): StructuredData;
80
+ interface StringifierContext {
81
+ addContent: (...content: StructuredDataContent[]) => void;
82
+ }
83
+ type Stringifier = Stringifier$1<StringifierContext>;
84
+ type StringifyOptions = StringifyOptions$1<StringifierContext>;
85
+ declare function defaultStringifier(config: StringifyOptions): Stringifier;
86
+ //#endregion
87
+ 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 };
@@ -0,0 +1,40 @@
1
+ import { t as __commonJSMin } from "./rolldown-runtime-DC62tzP2.js";
2
+ //#region ../../node_modules/.pnpm/remove-markdown@0.6.4/node_modules/remove-markdown/index.js
3
+ var require_remove_markdown = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4
+ module.exports = function(md, options) {
5
+ options = options || {};
6
+ options.listUnicodeChar = options.hasOwnProperty("listUnicodeChar") ? options.listUnicodeChar : false;
7
+ options.stripListLeaders = options.hasOwnProperty("stripListLeaders") ? options.stripListLeaders : true;
8
+ options.gfm = options.hasOwnProperty("gfm") ? options.gfm : true;
9
+ options.useImgAltText = options.hasOwnProperty("useImgAltText") ? options.useImgAltText : true;
10
+ options.abbr = options.hasOwnProperty("abbr") ? options.abbr : false;
11
+ options.replaceLinksWithURL = options.hasOwnProperty("replaceLinksWithURL") ? options.replaceLinksWithURL : false;
12
+ options.separateLinksAndTexts = options.hasOwnProperty("separateLinksAndTexts") ? options.separateLinksAndTexts : null;
13
+ options.htmlTagsToSkip = options.hasOwnProperty("htmlTagsToSkip") ? options.htmlTagsToSkip : [];
14
+ options.throwError = options.hasOwnProperty("throwError") ? options.throwError : false;
15
+ var output = md || "";
16
+ output = output.replace(/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/gm, "");
17
+ try {
18
+ if (options.stripListLeaders) {
19
+ if (options.listUnicodeChar) output = output.replace(/^([\s\t]*)([\*\-\+]|\d+\.)\s+/gm, options.listUnicodeChar + " $1");
20
+ else output = output.replace(/^([\s\t]*)([\*\-\+]|\d+\.)\s+/gm, "$1");
21
+ }
22
+ if (options.gfm) output = output.replace(/\n={2,}/g, "\n").replace(/~{3}.*\n/g, "").replace(/~~/g, "").replace(/```(?:.*)\n([\s\S]*?)```/g, (_, code) => code.trim());
23
+ if (options.abbr) output = output.replace(/\*\[.*\]:.*\n/, "");
24
+ let htmlReplaceRegex = /<[^>]*>/g;
25
+ if (options.htmlTagsToSkip && options.htmlTagsToSkip.length > 0) {
26
+ const joinedHtmlTagsToSkip = options.htmlTagsToSkip.join("|");
27
+ htmlReplaceRegex = new RegExp(`<(?!\/?(${joinedHtmlTagsToSkip})(?=>|\s[^>]*>))[^>]*>`, "g");
28
+ }
29
+ if (options.separateLinksAndTexts) output = output.replace(/\[([^\]]+)\]\(([^)]+)\)/g, "$1" + options.separateLinksAndTexts + "$2");
30
+ output = output.replace(htmlReplaceRegex, "").replace(/^[=\-]{2,}\s*$/g, "").replace(/\[\^.+?\](\: .*?$)?/g, "").replace(/\s{0,2}\[.*?\]: .*?$/g, "").replace(/\!\[(.*?)\][\[\(].*?[\]\)]/g, options.useImgAltText ? "$1" : "").replace(/\[([\s\S]*?)\]\s*[\(\[](.*?)[\)\]]/g, options.replaceLinksWithURL ? "$2" : "$1").replace(/^(\n)?\s{0,3}>\s?/gm, "$1").replace(/^\s{1,2}\[(.*?)\]: (\S+)( ".*?")?\s*$/g, "").replace(/^(\n)?\s{0,}#{1,6}\s*( (.+))? +#+$|^(\n)?\s{0,}#{1,6}\s*( (.+))?$/gm, "$1$3$4$6").replace(/([\*]+)(\S)(.*?\S)??\1/g, "$2$3").replace(/(^|\W)([_]+)(\S)(.*?\S)??\2($|\W)/g, "$1$3$4$5").replace(/(`{3,})(.*?)\1/gm, "$2").replace(/`(.+?)`/g, "$1").replace(/~(.*?)~/g, "$1");
31
+ } catch (e) {
32
+ if (options.throwError) throw e;
33
+ console.error("remove-markdown encountered error: %s", e);
34
+ return md;
35
+ }
36
+ return output;
37
+ };
38
+ }));
39
+ //#endregion
40
+ export { require_remove_markdown as t };
@@ -0,0 +1,24 @@
1
+ //#region src/utils/remove-undefined.ts
2
+ function removeUndefined(value, deep = false) {
3
+ const obj = value;
4
+ for (const key in obj) {
5
+ if (obj[key] === void 0) delete obj[key];
6
+ if (!deep) continue;
7
+ const entry = obj[key];
8
+ if (isPlainObject(entry)) {
9
+ removeUndefined(entry, deep);
10
+ continue;
11
+ }
12
+ if (Array.isArray(entry)) {
13
+ for (const item of entry) if (isPlainObject(item)) removeUndefined(item, deep);
14
+ }
15
+ }
16
+ return value;
17
+ }
18
+ function isPlainObject(value) {
19
+ if (typeof value !== "object" || value === null) return false;
20
+ const prototype = Object.getPrototypeOf(value);
21
+ return prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null;
22
+ }
23
+ //#endregion
24
+ export { removeUndefined as t };
@@ -0,0 +1,33 @@
1
+ //#region \0rolldown/runtime.js
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
9
+ var __exportAll = (all, no_symbols) => {
10
+ let target = {};
11
+ for (var name in all) __defProp(target, name, {
12
+ get: all[name],
13
+ enumerable: true
14
+ });
15
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
16
+ return target;
17
+ };
18
+ var __copyProps = (to, from, except, desc) => {
19
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
20
+ key = keys[i];
21
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
22
+ get: ((k) => from[k]).bind(null, key),
23
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
24
+ });
25
+ }
26
+ return to;
27
+ };
28
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
29
+ value: mod,
30
+ enumerable: true
31
+ }) : target, mod));
32
+ //#endregion
33
+ export { __exportAll as n, __toESM as r, __commonJSMin as t };
@@ -0,0 +1,2 @@
1
+ import { a as sync, i as setIndexSettings, n as DocumentRecord, o as updateDocuments, r as SyncOptions, t as BaseIndex } from "../algolia-C0E5qQhM.js";
2
+ export { BaseIndex, DocumentRecord, SyncOptions, setIndexSettings, sync, updateDocuments };