/**
 * Notion Blocks ↔ Markdown Converter
 *
 * Bidirectional converter between markdown text and Notion block format.
 * Internal module with no external dependencies.
 *
 * Supported conversions:
 * - Paragraphs ↔ paragraph blocks
 * - Headings (# ## ###) ↔ heading_1, heading_2, heading_3 blocks
 * - Bulleted lists (- or *) ↔ bulleted_list_item blocks
 * - Numbered lists (1. 2. 3.) ↔ numbered_list_item blocks
 * - Code blocks (```) ↔ code blocks (with language annotation)
 * - Blockquotes (>) ↔ quote blocks
 * - Checkboxes (- [ ] / - [x]) ↔ to_do blocks
 * - Rich text: **bold**, *italic*, `inline code`, [links](url)
 */
import type { NotionBlock, NotionRichText } from './notion-types.js';
/**
 * Maximum length for a single rich_text element's text.content in the Notion API.
 * @see https://developers.notion.com/reference/block
 */
export declare const NOTION_MAX_TEXT_LENGTH = 2000;
/**
 * Maximum number of elements in a single rich_text array in the Notion API.
 * When a block's rich_text array exceeds this limit, the block must be split
 * into multiple blocks of the same type.
 * @see https://developers.notion.com/reference/block
 */
export declare const NOTION_MAX_RICH_TEXT_ARRAY_LENGTH = 100;
/**
 * Split a plain text string into multiple NotionRichText elements,
 * each with text.content at most `maxLength` characters.
 * Splits at word boundaries when possible.
 */
export declare function chunkRichText(text: string, maxLength?: number): NotionRichText[];
/**
 * Convert markdown text to an array of Notion blocks.
 *
 * Parses markdown line-by-line, recognizing headings, lists, code blocks,
 * blockquotes, checkboxes, and paragraphs. Rich text formatting (bold,
 * italic, inline code, links) is preserved within each block.
 */
export declare function markdownToNotionBlocks(markdown: string): NotionBlock[];
/**
 * Convert Notion blocks back to a markdown string.
 *
 * Handles all supported block types. Unsupported block types produce
 * a fallback `[Unsupported: {type}]` text.
 */
export declare function notionBlocksToMarkdown(blocks: readonly NotionBlock[]): string;
/**
 * Check whether a URL string is valid for use in a Notion link block.
 * Notion only accepts absolute http: or https: URLs. Relative paths,
 * fragment-only references (#section), workspace element IDs (el-xxxx),
 * empty strings, and malformed URLs are all rejected.
 */
export declare function isValidNotionUrl(url: string): boolean;
/**
 * Parse inline markdown formatting into an array of NotionRichText objects.
 *
 * Supports:
 * - **bold** or __bold__
 * - *italic* or _italic_
 * - `inline code`
 * - [link text](url)
 * - Combinations thereof
 */
export declare function parseInlineMarkdown(text: string): NotionRichText[];
/**
 * Convert an array of Notion rich text objects back to inline markdown.
 */
export declare function richTextToMarkdown(richTexts: readonly NotionRichText[]): string;
/**
 * The complete set of language identifiers accepted by the Notion API
 * for code blocks. Any language not in this set will be rejected.
 * @see https://developers.notion.com/reference/block#code
 */
export declare const NOTION_LANGUAGES: Set<string>;
/**
 * Map common code fence language aliases to their Notion-accepted equivalents.
 * These cover short names, file extensions, and alternate spellings that
 * markdown authors commonly use but Notion does not recognize.
 */
export declare const LANGUAGE_ALIASES: Record<string, string>;
/**
 * Map a code fence language identifier to a Notion-accepted language value.
 *
 * 1. If the lowercased input is already in NOTION_LANGUAGES, return it.
 * 2. If it matches a known alias, return the mapped value.
 * 3. Otherwise, fall back to 'plain text' (always accepted by Notion).
 */
export declare function mapLanguageToNotion(lang: string): string;
//# sourceMappingURL=notion-blocks.d.ts.map