All the classes on this element, by block.
All the static styles including styles implied by the explicitly specified styles.
attributes set dynamically or depending on a dynamic class
classes declared explicitly and found in at least one dynamic class expression.
blocks/classes set conditionally
an opaque id assigned from the analyzer for later retrieval
where the element starts and ends
static styles explicitly declared on this element
The name of the tag these styles are applied -- if known.
whether all styles have been added and the styles can be analyzed now.
Adds an AttrValue that is toggled on and off at runtime.
the AttrValue that is dynamic.
The AST node(s) representing this boolean expression.
Adds BlockClasses that are set based on a conditional. This is modeled as a ternary (if/else) expression.
Nested ternaries are not supported at this time.
Adds a group of AttrValues that are toggled between at runtime.
The class or block root to which the AttrValues belong.
The AttrValues that are to be chosen from. All must be children of the same group -- they can be from different blocks if they inherit.
Whether a missing value is expected or should be a runtime error.
This is used to add any static AttrValue even if it is part of an attribute group. The AttrValue is added as dynamic and conditional on its class if that class is dynamic.
Adds a AttrValue parent (BlockClass) that is always set on this element.
Iterate over all static and dynamic Attributes explicitly set on this element. The analysis must be sealed to call this method.
Get a list of all possible block objects for the given block on this element that can be used a parent for an attribute.
This can be called before or after being sealed.
iterate over all static and dynamic blocks and classes explicitly set on this element.
the analysis must be sealed to call this method.
Compute an OptiCSS element description and a map of class names back to the block objects for use in re-writing.
This mapping of classname to block object is stable and the keys can be assumed to be unique per Style across all blocks -- so these maps can be merged safely.
Checks if the given class or block is set on this element of if it is implied by one of the other styles on this element.
This can be called before or after being sealed.
this maps the class and all the classes that the explicit class implies to all the blocks those classes belong to via inheritance.
These classes become valid containers for AttrValues even if they are not explicitly set on the element.
Because of the possibility for classes to inherit and imply other classes, we need to convert any dynamic class that is static because of another static class to be static This ensures that otherwise static AttrValues won't get hoisted into dynamic expressions because of a class dependency.
This method indicates that all styles have been added and can be analyzed and validated.
Get a simple object with no circular references that is possible to emit and restore as JSON.
a map of block objects to a number that represents it in the template analysis serialization.
Generated using TypeDoc
This class is used to track the styles and dynamic expressions on an element and produce a runtime class expression in conjunction with a style mapping.
This class tracks dependencies between attributes and classes and the runtime expression causes attributes to be removed if the parent class is not present at runtime.
With some syntaxes, if an element has different classes on it at runtime from the same block, the attributes in use become ambiguous. To manage this, the caller must ensure that the attribute names used exist for all possible classes and produce an error if not. Then add the attributes for each possible class with multiple calls to add(Static|Dynamic)(Attribute|Attribute-Group). If the AST can't handle multiple references pointing at the expression node, the caller must clone it -- This won't result in multiple expression invocations unless multiple classes from the same block are applied at the same time -- which would be illegal.