import { type PreprocessorGroup } from 'svelte/compiler'; import type { SyntaxStyler } from './syntax_styler.js'; /** * Options for `svelte_preprocess_fuz_code`. */ export interface PreprocessFuzCodeOptions { /** File patterns to exclude. */ exclude?: Array; /** Custom `SyntaxStyler` instance. @default syntax_styler_global */ syntax_styler?: SyntaxStyler; /** Enable in-memory caching. @default true */ cache?: boolean; /** * Import sources that resolve to the `Code` component. * Used to verify that `` in templates actually refers to `Code.svelte`. * * @default ['@fuzdev/fuz_code/Code.svelte'] */ component_imports?: Array; /** * How to handle errors. * @default 'throw' in CI, 'log' otherwise */ on_error?: 'log' | 'throw'; } /** * Svelte preprocessor that compiles static `Code` component content at build time, * replacing runtime syntax highlighting with pre-rendered HTML. * * @param options - `PreprocessFuzCodeOptions` configuration * @returns a Svelte preprocessor group * * @example * ```ts * // svelte.config.js * import {svelte_preprocess_fuz_code} from './svelte_preprocess_fuz_code.js'; * * export default { * preprocess: [svelte_preprocess_fuz_code(), vitePreprocess()], * }; * ``` */ export declare const svelte_preprocess_fuz_code: (options?: PreprocessFuzCodeOptions) => PreprocessorGroup; //# sourceMappingURL=svelte_preprocess_fuz_code.d.ts.map