import { AnalysisImpl as Analysis, Block, ElementAnalysis, ResolvedConfiguration as CSSBlocksConfiguration } from "@css-blocks/core"; import { AST } from "@glimmer/syntax"; import { TemplateTypes } from "@opticss/template-api"; import { AnalyzableNode, AnalyzableProperty } from "./utils"; export declare type TernaryExpression = AST.Expression | AST.MustacheStatement | null; export declare type StringExpression = AST.MustacheStatement | AST.ConcatStatement | AST.SubExpression | AST.PathExpression | null; export declare type BooleanExpression = AST.Expression | AST.MustacheStatement; export declare type TemplateElement = ElementAnalysis; export declare type AttrRewriteMap = { [key: string]: TemplateElement; }; export declare function isStyleOfHelper(node: AnalyzableNode): node is AST.MustacheStatement | AST.SubExpression; export declare function isAnalyzedHelper(node: AnalyzableNode): node is AST.MustacheStatement | AST.BlockStatement; interface AnalyzableScope { type: "scope"; namespace: string; property: AnalyzableProperty; } interface AnalyzableClass { type: "class"; namespace: string; property: Exclude; } interface AnalyzableState { type: "state"; namespace: string; name: string; property: AnalyzableProperty; } declare type AnalyzableAttribute = AnalyzableScope | AnalyzableClass | AnalyzableState; export declare class ElementAnalyzer { analysis: Analysis; block: Block; template: TemplateTypes[TemplateType] & { identifier: string; path?: string; relativePath?: string; fullPath?: string; }; cssBlocksOpts: CSSBlocksConfiguration; reservedClassNames: Set; templatePath: string; constructor(analysis: Analysis, cssBlocksOpts: CSSBlocksConfiguration); analyze(node: AnalyzableNode, atRootElement: boolean, forbidNonBlockAttributes?: boolean): AttrRewriteMap; reanalyze(node: AnalyzableNode, atRootElement: boolean): AttrRewriteMap; analyzeForRewrite(node: AnalyzableNode, atRootElement: boolean, forbidNonBlockAttributes?: boolean): AttrRewriteMap; private debugAnalysis; private debugTemplateLocation; private debugBlockPath; private newElement; private finishElement; isAttributeAnalyzed(attributeName: string): [string, string] | [null, null]; private _assertClassAttributeValue; private _getAnalyzableAttributeName; eachAnalyzedAttribute(node: AnalyzableNode, forbidNonBlockAttributes?: boolean): Iterable; private _analyze; private lookupClasses; private lookupBlock; private lookupClass; /** * Adds blocks and block classes to the current node from the class attribute. * As class is not allowed to be positional it will never be a PathExpression * so we exclude that from the node type */ private processClass; private processScope; /** * Adds states to the current node. */ private processState; } export {}; //# sourceMappingURL=ElementAnalyzer.d.ts.map