UNPKG

svelte-markdown-pages

Version:

Build and render markdown-based content with distributed navigation for Svelte projects

27 lines (24 loc) 1.18 kB
import { ContentProcessorOptional } from '../types.js'; import 'zod'; declare class ContentLoader { private content; private processor?; constructor(content: Record<string, string>, processor?: ContentProcessorOptional); loadContent(path: string): string | undefined; loadAndProcess(path: string): string | undefined; processContent(content: string): string; hasContent(path: string): boolean; getAvailablePaths(): string[]; getContentSize(path: string): number; getTotalContentSize(): number; } declare function loadContent(path: string, contentBundle: Record<string, string>, processor?: ContentProcessorOptional): Promise<string | undefined>; declare function createContentLoader(contentBundle: Record<string, string>, processor?: ContentProcessorOptional): ContentLoader; declare function extractHeadings(content: string): Array<{ level: number; text: string; id: string; }>; declare function extractTableOfContents(content: string): string; declare function addTableOfContents(content: string): string; export { ContentLoader, addTableOfContents, createContentLoader, extractHeadings, extractTableOfContents, loadContent };