import type { Config } from "@markdoc/markdoc"; /** * Describe a loaded Markdoc config with optional parts. */ interface LoadedConfig { nodes?: Config["nodes"]; tags?: Config["tags"]; variables?: Config["variables"]; functions?: Config["functions"]; } /** * Asynchronously loads Markdoc Nodes, Tags, Variables, and Functions * from Schema folders and files (e.g., 'tags.ts', 'functions/index.js') * from a specified directory. * * Supports importing from files like `nodes.ts`, `nodes.js`, `nodes/index.ts`, * and `nodes/index.js` (and similarly for `tags`, `variables`, `functions`). * * Supports both "/markdoc" and "./markdoc" formats (both treated as relative to project root). * * Cache-busting added in development mode for HMR. * * @param directory - The absolute, normalized path to the schema directory. * @returns A Promise resolving to an object with two properties: * - config: The loaded and assembled Markdoc config with optional parts. * - deps: An array of absolute file paths as dependencies for Svelte preprocessor. */ declare const loadSchemas: (directory: string) => Promise<{ config: LoadedConfig; deps: string[]; }>; export default loadSchemas;