import type { CompletionItem, Position } from "vscode-languageserver"; import { Range } from "vscode-languageserver"; import type { DiagramUpdateResult } from "../diagramImplementation.js"; import { DiagramImplementation } from "../diagramImplementation.js"; import type { SharedDiagramUtils } from "../../sharedDiagramUtils.js"; import type { DiagramConfig, Root } from "@hylimo/diagram-common"; /** * Local implementation of a diagram. */ export declare class LocalDiagramImplementation extends DiagramImplementation { private readonly utils; /** * Result of the last call to updateDiagram */ private layoutResult?; /** * Parsed version of the source provided to updateDiagram */ private document?; /** * Creates a new LocalDiagramImplementation * * @param utils required for parsing, interpreting and layouting of the diagram */ constructor(utils: SharedDiagramUtils); updateDiagram(source: string, config: DiagramConfig): Promise; /** * Converts a lexer error to a diagnostic item * * @param error the lexer error to convert * @returns the created diagnostic item */ private convertLexerError; /** * Converts a parser error to a diagnostic item * * @param error the parser error to convert * @returns the created diagnostic item */ private convertParserError; /** * Converts an interpretation error to a diagnostic item * * @param error the interpretation error to convert * @returns the created diagnostic item */ private convertInterpretationError; /** * Converts a layout error to a diagnostic item * * @param error the layout error to convert * @returns the created diagnostic item */ private convertLayoutError; generateCompletionItems(source: string, config: DiagramConfig, position: Position): Promise; getSourceRange(element: string): Promise; /** * Converts an AST range to a LSP range * * @param range the range to convert * @returns the converted range */ private convertRange; renderPredictionDiagram(source: string, config: DiagramConfig): Promise; } //# sourceMappingURL=localDiagramImplementation.d.ts.map