import { Block, BlockFactory, CssBlockError } from "@css-blocks/core"; import { Position, TextDocuments } from "vscode-languageserver"; import { PathTransformer } from "../pathTransformers/PathTransformer"; /** * Walks the class attribute nodes of a glimmer template ast and uses its * corresponding css block to check for errors. */ export declare function hbsErrorParser(documentText: string, block: Block): CssBlockError[]; export declare function isTemplateFile(uri: string): boolean; export declare function validateTemplates(documents: TextDocuments, factory: BlockFactory, pathTransformer: PathTransformer): Promise>; export declare const enum AttributeType { state = "state", class = "class", scope = "scope", ambiguous = "ambiguous" } interface BlockAttributeBase { attributeType: AttributeType; referencedBlock?: string; } export interface ScopeAttribute extends BlockAttributeBase { attributeType: AttributeType.scope; } export interface ClassAttribute extends BlockAttributeBase { attributeType: AttributeType.class; name?: string; } export interface StateAttribute extends BlockAttributeBase { attributeType: AttributeType.state; name: string; value?: string; } export interface AmbiguousAttribute extends BlockAttributeBase { attributeType: AttributeType.ambiguous; referencedBlock?: undefined; name: string; } export declare type BlockAttribute = ScopeAttribute | ClassAttribute | StateAttribute | AmbiguousAttribute; interface ItemAtCursor { attribute: BlockAttribute; siblingAttributes: ClassAttribute[]; } /** * Returns an object that represents the item under the cursor in the client * editor which contains metadata regarding sibling css-block classes, * referenced blocks, and the parent attribute type of the current item. The * sibling blocks are useful for making auto-completions for state attributes * more contextual. */ export declare function getItemAtCursor(text: string, position: Position): ItemAtCursor | null; export {}; //# sourceMappingURL=hbsUtils.d.ts.map