/**
 * High-performance SAX XML parser
 *
 * Minimal implementation optimized for Excel XML parsing.
 * Supports: opentag, text, closetag, error events.
 * Zero external dependencies.
 *
 * Based on XML 1.0 specification with optimizations for common Excel XML patterns.
 */
export interface SaxEvent {
    eventType: "opentag" | "text" | "closetag";
    value: any;
}
export interface SaxesTagPlain {
    name: string;
    attributes: Record<string, string>;
    isSelfClosing: boolean;
}
export interface SaxesOptions {
    xmlns?: boolean;
    position?: boolean;
    fileName?: string;
    fragment?: boolean;
}
type TextHandler = (text: string) => void;
type OpenTagHandler = (tag: SaxesTagPlain) => void;
type CloseTagHandler = (tag: SaxesTagPlain) => void;
type ErrorHandler = (err: Error) => void;
export declare class SaxesParser {
    private trackPosition;
    private fileName?;
    private fragment;
    private state;
    private chunk;
    private i;
    private prevI;
    private text;
    private name;
    private q;
    private tags;
    private tag;
    private attribList;
    private entity;
    private entityReturnState;
    private openWakaBang;
    private sawRoot;
    private closedRoot;
    private carriedFromPrevious?;
    private _closed;
    private reportedTextBeforeRoot;
    private reportedTextAfterRoot;
    line: number;
    column: number;
    private positionAtNewLine;
    private chunkPosition;
    ENTITIES: Record<string, string>;
    private textHandler?;
    private openTagHandler?;
    private closeTagHandler?;
    private errorHandler?;
    constructor(opt?: SaxesOptions);
    get closed(): boolean;
    get position(): number;
    private _init;
    on(name: "text", handler: TextHandler): void;
    on(name: "opentag", handler: OpenTagHandler): void;
    on(name: "closetag", handler: CloseTagHandler): void;
    on(name: "error", handler: ErrorHandler): void;
    off(name: string): void;
    private makeError;
    fail(message: string): this;
    write(chunk: string | null): this;
    close(): this;
    private getCode;
    private unget;
    private processState;
    private sText;
    private handleTextInRoot;
    private handleTextOutsideRoot;
    private sOpenWaka;
    private sOpenWakaBang;
    private sOpenTag;
    private sOpenTagSlash;
    private sAttrib;
    private sAttribName;
    private sAttribNameSawWhite;
    private sAttribValue;
    private sAttribValueQuoted;
    private sAttribValueClosed;
    private sCloseTag;
    private sCloseTagSawWhite;
    private sComment;
    private sCommentEnding;
    private sCommentEnded;
    private sCData;
    private sCDataEnding;
    private sCDataEnding2;
    private sPI;
    private sPIEnding;
    private sDoctype;
    private sDoctypeQuote;
    private sDoctypeDTD;
    private sDoctypeDTDQuoted;
    private sEntity;
    private parseEntity;
    private skipSpaces;
    private openTag;
    private openSelfClosingTag;
    private closeTag;
    private end;
}
declare function parseSax(iterable: any): AsyncGenerator<SaxEvent[]>;
export { parseSax };
