import { AnyBindingExpression, IDOM, IInterpolationExpression, INode } from '@aurelia/runtime'; import { AttrSyntax } from './ast'; import { BindingCommandInstance } from './binding-command'; import { AttrInfo, BindableInfo, ElementInfo } from './resource-model'; export declare const enum SymbolFlags { type = 511, isTemplateController = 1, isReplacePart = 2, isCustomAttribute = 4, isPlainAttribute = 8, isCustomElement = 16, isLetElement = 32, isPlainElement = 64, isText = 128, isBinding = 256, hasMarker = 512, hasTemplate = 1024, hasAttributes = 2048, hasBindings = 4096, hasChildNodes = 8192, hasParts = 16384 } export declare type AnySymbol = (CustomAttributeSymbol | CustomElementSymbol | LetElementSymbol | PlainAttributeSymbol | PlainElementSymbol | ReplacePartSymbol | TemplateControllerSymbol | TextSymbol); export declare type AttributeSymbol = (CustomAttributeSymbol | PlainAttributeSymbol); export declare type SymbolWithBindings = (CustomAttributeSymbol | CustomElementSymbol | LetElementSymbol | TemplateControllerSymbol); export declare type ResourceAttributeSymbol = (CustomAttributeSymbol | TemplateControllerSymbol); export declare type NodeSymbol = (CustomElementSymbol | LetElementSymbol | PlainElementSymbol | ReplacePartSymbol | TemplateControllerSymbol | TextSymbol); export declare type ParentNodeSymbol = (CustomElementSymbol | PlainElementSymbol | TemplateControllerSymbol); export declare type ElementSymbol = (CustomElementSymbol | PlainElementSymbol); export declare type SymbolWithTemplate = (ReplacePartSymbol | TemplateControllerSymbol); export declare type SymbolWithMarker = (CustomElementSymbol | LetElementSymbol | TemplateControllerSymbol | TextSymbol); /** * A html attribute that is associated with a registered resource, specifically a template controller. */ export declare class TemplateControllerSymbol { syntax: AttrSyntax; info: AttrInfo; res: string; flags: SymbolFlags; partName: string | null; physicalNode: TElement | null; template: ParentNodeSymbol | null; templateController: TemplateControllerSymbol | null; marker: TMarker; private _bindings; get bindings(): BindingSymbol[]; private _parts; get parts(): ReplacePartSymbol[]; constructor(dom: IDOM, syntax: AttrSyntax, info: AttrInfo, partName: string | null, res?: string); } /** * Wrapper for an element (with all of its attributes, regardless of the order in which they are declared) * that has a replace attribute on it. * * This element will be lifted from the DOM just like a template controller. */ export declare class ReplacePartSymbol { name: string; physicalNode: TElement | null; parent: ParentNodeSymbol | null; template: ParentNodeSymbol | null; flags: SymbolFlags; constructor(name: string, physicalNode?: TElement | null, parent?: ParentNodeSymbol | null, template?: ParentNodeSymbol | null); } /** * A html attribute that is associated with a registered resource, but not a template controller. */ export declare class CustomAttributeSymbol { syntax: AttrSyntax; info: AttrInfo; res: string; flags: SymbolFlags; private _bindings; get bindings(): BindingSymbol[]; constructor(syntax: AttrSyntax, info: AttrInfo, res?: string); } /** * An attribute, with either a binding command or an interpolation, whose target is the html * attribute of the element. * * This will never target a bindable property of a custom attribute or element; */ export declare class PlainAttributeSymbol { syntax: AttrSyntax; command: BindingCommandInstance | null; expression: AnyBindingExpression | null; flags: SymbolFlags; constructor(syntax: AttrSyntax, command: BindingCommandInstance | null, expression: AnyBindingExpression | null); } /** * Either an attribute on an custom element that maps to a declared bindable property of that element, * a single-value bound custom attribute, or one of several bindables that were extracted from the attribute * value of a custom attribute with multiple bindings usage. * * This will always target a bindable property of a custom attribute or element; */ export declare class BindingSymbol { command: BindingCommandInstance | null; bindable: BindableInfo; expression: AnyBindingExpression | null; rawValue: string; target: string; flags: SymbolFlags; constructor(command: BindingCommandInstance | null, bindable: BindableInfo, expression: AnyBindingExpression | null, rawValue: string, target: string); } /** * A html element that is associated with a registered resource either via its (lowerCase) `nodeName` * or the value of its `as-element` attribute. */ export declare class CustomElementSymbol { physicalNode: TElement; info: ElementInfo; res: string; bindables: Record; flags: SymbolFlags; isTarget: true; templateController: TemplateControllerSymbol | null; isContainerless: boolean; marker: TMarker; private _customAttributes; get customAttributes(): CustomAttributeSymbol[]; private _plainAttributes; get plainAttributes(): PlainAttributeSymbol[]; private _bindings; get bindings(): BindingSymbol[]; private _childNodes; get childNodes(): NodeSymbol[]; private _parts; get parts(): ReplacePartSymbol[]; constructor(dom: IDOM, physicalNode: TElement, info: ElementInfo, res?: string, bindables?: Record); } export declare class LetElementSymbol { physicalNode: TElement; marker: TMarker; flags: SymbolFlags; toBindingContext: boolean; private _bindings; get bindings(): BindingSymbol[]; constructor(dom: IDOM, physicalNode: TElement, marker?: TMarker); } /** * A normal html element that may or may not have attribute behaviors and/or child node behaviors. * * It is possible for a PlainElementSymbol to not yield any instructions during compilation. */ export declare class PlainElementSymbol { physicalNode: TElement; flags: SymbolFlags; isTarget: boolean; templateController: TemplateControllerSymbol | null; hasSlots: boolean; private _customAttributes; get customAttributes(): CustomAttributeSymbol[]; private _plainAttributes; get plainAttributes(): PlainAttributeSymbol[]; private _childNodes; get childNodes(): NodeSymbol[]; constructor(dom: IDOM, physicalNode: TElement); } /** * A standalone text node that has an interpolation. */ export declare class TextSymbol { physicalNode: TText; interpolation: IInterpolationExpression; marker: TMarker; flags: SymbolFlags; constructor(dom: IDOM, physicalNode: TText, interpolation: IInterpolationExpression, marker?: TMarker); } //# sourceMappingURL=semantic-model.d.ts.map