import type { Component } from 'svelte'; import type { Marked } from 'marked'; export interface MarkdownExtension { name: string; level: 'block' | 'inline'; component: Component; start(src: string): number | undefined; tokenizer(src: string): any; } export interface MarkdownExtensionSet { extensions: MarkdownExtension[]; } export declare class MarkpageOptions { private components; private extensionComponents; private markedExtensions; private markedInstance?; private markedFactory?; /** * Add a custom component that can be used as a tag in markdown */ addCustomComponent(name: string, component: Component): this; /** * Extend markdown with custom token extensions that include components */ extendMarkdown(extensions: MarkdownExtensionSet | MarkdownExtensionSet[]): this; /** * Override a built-in markdown token with a custom component */ overrideBuiltinToken(name: string, component: Component): this; /** * Use a specific Marked instance */ useMarkedInstance(instance: Marked): this; /** * Use a factory function to create Marked instances */ useMarkedFactory(factory: () => Marked): this; /** * Get the components map for custom component tags */ getComponents(): Map; /** * Get the extension components map for custom tokens */ getExtensionComponents(): Map; /** * Get the configured Marked instance or create one using the factory */ getMarked(): Marked; /** * Get all registered extensions for applying to a Marked instance */ getExtensions(): MarkdownExtensionSet[]; }