import type { InlineNode, MarkdownParseOptions } from './types.js'; /** * Inline parser for the streaming-markdown subset: code spans, links/images * (inline + reference + shortcut), citations, emphasis (`*`/`_`), strong, * strikethrough (`~~`), hard breaks, optional autolinks. Raw HTML is not a * concept here; angle brackets are plain text. * * Two passes: tokenize into a flat list (code/link/image/citation/break/text * and emphasis delimiter runs), then match delimiter runs into a tree. The * delimiter rules are CommonMark-lite: `*` needs non-space on the inner side, * `_` additionally must not sit inside a word, `~~` only pairs as a double. */ export interface InlineContext { linkRefs: ReadonlyMap; options: MarkdownParseOptions; /** * Fired for `[label][ref]` / `[label]` candidates whose definition is not * (yet) known. The incremental parser uses this to know which settled * blocks must be invalidated when a late `[ref]: url` definition streams in. */ onUnresolvedRef?: (label: string) => void; } export declare function parseInlines(input: string, ctx: InlineContext): InlineNode[]; /** Parse citation markers of the form 【id】 (some models emit fullwidth brackets). */ export declare function tryFullwidthCitation(input: string, at: number, ctx: InlineContext): { node: InlineNode; end: number; } | null;