import type { VFile } from 'vfile'; import type { GenericNode, MessageInfo } from 'myst-common'; import type { PageFrontmatter } from 'myst-frontmatter'; export type Handler = (node: GenericNode, state: ITexParser, parent: any) => void; export type Options = { handlers?: Record; }; export type StateData = { packages: string[]; colors: Record; bibliography: string[]; macros: Record; dynamicHandlers: Record; theorems: Record; listType?: string; openGroups: string[]; ignoreNextWhitespace?: boolean; maketitle?: boolean; appendix?: boolean; algorithm_indent?: number; frontmatter: PageFrontmatter; /** This is called on `\and` in latex, e.g. in the author block */ andCallback?: () => void; lastFootnoteLabel?: string; createId?: (partialId?: string) => string; }; export interface ITexParser = StateData> { tex: string; raw: GenericNode; ast: GenericNode; data: D; options: Options; stack: GenericNode[]; currentPosition: GenericNode['position']; file: VFile; text: (value?: string, escape?: boolean) => void; renderChildren: (node: any) => void; top: () => GenericNode; pushNode: (node?: GenericNode | GenericNode[]) => void; renderBlock: (node: GenericNode, name: string, attributes?: Record) => void; renderInline: (node: GenericNode, name: string, attributes?: Record) => void; addLeaf>(name: string, attributes?: Omit): void; openNode: (name: string, attributes?: Record) => void; closeNode: (type?: string) => GenericNode; openParagraph: (attributes?: Record) => void; closeParagraph: () => void; openBlock: (attributes?: Record) => void; closeBlock: () => void; warn: (message: string, node: GenericNode, source?: string, opts?: MessageInfo) => void; error: (message: string, node: GenericNode, source?: string, opts?: MessageInfo) => void; } //# sourceMappingURL=types.d.ts.map