4-layer config cascade resolution.
Resolves the effective configuration for each attribute in a block by merging configs from all layers:
- Attribute — structural defaults (data_config, ui_config)
- ASA — semantic overrides for this set
- ASD — per-instance overrides
- Runtime — transforms, enrichments
Usage
# Get resolved attribute metadata for a block type
attrs_meta = AttrEngine.Cascade.resolve_attrs_meta(block_type_handle)
# Apply ASD ui_config overrides on top
final_meta = AttrEngine.Cascade.apply_asd_overrides(attrs_meta, asd_ui_config)
# Get the full rendering context (data + ui keys flattened)
context = AttrEngine.Cascade.build_context(attrs_meta, data, locale)
Summary
Functions
Applies ASD (per-instance) ui_config overrides on top of resolved attrs_meta.
Builds a flat rendering context from resolved attrs_meta and data.
Resolves the full attribute metadata for a block type, including cascaded configs.
Functions
Applies ASD (per-instance) ui_config overrides on top of resolved attrs_meta.
asd_ui is keyed by attribute handle:
%{"title" => %{"classes" => "text-center", "append" => true}}If "append" is true, string values are concatenated. Otherwise, replaced.
Builds a flat rendering context from resolved attrs_meta and data.
Returns a map with:
- Data values keyed by handle
- UI keys prefixed:
{handle}_tag,{handle}_class, etc. - Block-level UI keys from the AttributeSet:
block_tag,block_class, etc.
Resolves the full attribute metadata for a block type, including cascaded configs.
Returns a list of maps:
[
%{
handle: "title",
type: :string,
localized: true,
data_config: %{...}, # merged: Attribute → ASA
ui_config: %{...} # merged: Attribute → ASA
},
...
]Ordered by ASA.sort.