/**
 * @file GFM emphasis/strong 定界符处理（CommonMark 两阶段模型）
 * @module transformer/gfm/inline/emphasisProcess
 */
import { MarkdownNode } from "../../../transformer/core/MarkdownNode.js";
import type { InlineParseContext } from "../../../transformer/core/context/InlineParseContext.js";
export interface ScannedPart {
    start: number;
    end: number;
    node: MarkdownNode;
}
/** 将 src 拆分为 text / 强打断行内节点，供 emphasis 定界符匹配使用 */
export declare function buildEmphasisLexParts(src: string, ctx: InlineParseContext): ScannedPart[];
export interface EmphasisMatch {
    openPos: number;
    closePos: number;
    useDelims: 1 | 2;
    openOrig: number;
    closeOrig: number;
}
export declare function openConsumeStart(m: EmphasisMatch, allMatches: readonly EmphasisMatch[]): number;
export declare function collectEmphasisMatches(src: string, parts: ScannedPart[]): EmphasisMatch[];
export declare function applyEmphasis(parts: ScannedPart[], src: string, parseInline: (text: string) => MarkdownNode[]): MarkdownNode[];
/** 定界符 run 起点（index 可能落在 run 中部） */
export declare function delimiterRunStart(src: string, index: number): number;
/** 在 openIndex（实际消耗起点）处构建 emphasis/strong 节点 */
export declare function parseEmphasisAt(src: string, openIndex: number, parts: ScannedPart[], parseInline: (text: string) => MarkdownNode[]): {
    node: MarkdownNode;
    nextIndex: number;
} | null;
/** opener run 内、消耗起点之前的字面量长度；无匹配则为 0 */
export declare function literalOpenerPrefixLen(src: string, index: number, parts: ScannedPart[]): number;
//# sourceMappingURL=emphasisProcess.d.ts.map