import { type AnchorId, type ImageSource, type LinkTarget } from './link.js'; import { type Style } from './style.js'; /** One span of inline content. */ export type Inline = { type: 'text'; text: string; style: Style; } | { type: 'link'; content: Inline[]; target: LinkTarget; } | { type: 'image'; alt: string; source: ImageSource; } | { type: 'anchor'; id: AnchorId; } | { type: 'noteRef'; id: string; } | { type: 'lineBreak'; }; /** Unstyled text. */ export declare function plain(text: string): Inline; /** * Flatten inlines to their text, dropping styling and links but keeping link * text and image alt text. Line breaks become newlines; anchors and note * references contribute nothing. */ export declare function inlinesToPlainText(inlines: readonly Inline[]): string; /** * True when nothing here would render as visible content: only whitespace, * empty-target links, anchors, and line breaks. An image or a note reference * always counts as content. */ export declare function inlinesAreEmpty(inlines: readonly Inline[]): boolean;