import { type MdsvexOptions } from 'mdsvex'; import type { PreprocessorGroup } from 'svelte/compiler'; export interface DocsmithPreprocessOptions { /** File extensions compiled as markdown. Default: `['.md']`. */ extensions?: string[]; /** Shiki themes for the dual light/dark render. Default: github-light/github-dark. */ themes?: { light: string; dark: string; }; /** Extra Shiki languages to load on top of the defaults. */ langs?: string[]; /** * Absolute path to a custom mdsvex layout, or `false` for no layout. * Default: the packaged layout, which wraps pages in a `prose` article and * maps `pre`/`code`/`h2`/`h3` to the svelte-docsmith markdown components. * A custom layout must export a `pre` component from its module script — * code fences render through it (re-export `markdown.pre` if in doubt). */ layout?: string | false; /** Extra remark plugins, appended after docsmith's own. */ remarkPlugins?: MdsvexOptions['remarkPlugins']; /** Extra rehype plugins, appended after docsmith's own (slug, sectionize). */ rehypePlugins?: MdsvexOptions['rehypePlugins']; /** * Number every code block by default. Per-fence `showLineNumbers` / * `noLineNumbers` override it either way. Default: `false`. */ lineNumbers?: boolean; /** * Enable Twoslash on fences that ask for it with ```ts twoslash, adding real * hover types from the TypeScript compiler. Requires the optional peer * dependencies `@shikijs/twoslash`, `twoslash-svelte`, and `typescript`. * A snippet that fails to typecheck falls back to a plain highlight with a * build warning rather than failing the build. Default: `false`. */ twoslash?: boolean; } /** * Build the svelte-docsmith preprocessor: mdsvex with Shiki highlighting (via * the raw-code `highlight` hook, the correct mdsvex integration point), heading * slugs/anchor sections, and the packaged doc layout. Unknown code-fence * languages fall back to plain text instead of failing the build. */ export declare function docsmith(options?: DocsmithPreprocessOptions): PreprocessorGroup;