import type { Plugin } from '@tabnas/parser'; import { GrammarModel, RailroadNode, Item, RailroadError, Terminal, NonTerminal, Comment, Skip, Sequence, Choice, Optional, OneOrMore, ZeroOrMore, Diagram, toText } from './model'; import { extractGrammar, ExtractOptions } from './extract'; import { modelToSvg, renderNodeSvg, SvgOptions } from './svg'; import { modelToAscii, renderNodeAscii, AsciiOptions } from './ascii'; export type RailroadApi = ((opts?: ExtractOptions) => GrammarModel) & { toJson: (opts?: ExtractOptions) => GrammarModel; extract: (opts?: ExtractOptions) => GrammarModel; toSvg: (opts?: SvgOptions & ExtractOptions) => string; toAscii: (opts?: AsciiOptions & ExtractOptions) => string; renderNode: (node: Item, opts?: SvgOptions) => string; renderNodeAscii: (node: Item, opts?: AsciiOptions) => string; renderNodeText: (node: Item) => string; Diagram: typeof Diagram; seq: typeof Sequence; choice: typeof Choice; opt: typeof Optional; plus: typeof OneOrMore; star: typeof ZeroOrMore; t: typeof Terminal; n: typeof NonTerminal; comment: typeof Comment; skip: typeof Skip; }; declare const railroad: Plugin; declare const VERSION = "0.3.12"; export { VERSION, railroad, extractGrammar, modelToSvg, modelToAscii, renderNodeSvg, renderNodeAscii, toText, Diagram, Sequence, Choice, Optional, OneOrMore, ZeroOrMore, Terminal, NonTerminal, Comment, Skip, RailroadError, }; export type { RailroadNode, GrammarModel };