Unified render dispatch over an Athanor.Tree.
Iterates tree["content"]. For each node:
- Resolves the component module via
Athanor.Registry.lookup/1. - If the module exports
render/3(newAthanor.Componentpath), callsmodule.render(:live, node, ctx). - Otherwise dispatches via the configured
:legacy_adapter— seeApplication.put_env(:athanor, :legacy_adapter, {Mod, :fun}). The adapter receives(component_module, assigns)and returns renderable HEEx, which is embedded inline. - For legacy modules implementing
has_required_props?/1, the node is SKIPPED entirely (no output) whenedit_mode=falseand required props are missing — matching the storefront's pre-Athanor behaviour. - If the type cannot be resolved at all, renders an inline developer placeholder. Does NOT crash the parent LiveView.
Both editor-canvas and storefront-page call sites converge here, so a per-component cutover only needs to change the component module — the dispatch logic is shared.
Summary
Functions
Render a single node. Named node_component to avoid colliding with
Kernel.node/1.
Render every root node in the tree.
Functions
Render a single node. Named node_component to avoid colliding with
Kernel.node/1.
Attributes
node(:map) (required)ctx(Athanor.Ctx) (required)edit_mode(:boolean) - Defaults tofalse.show_config(:boolean) - Defaults tofalse.selected_component_id(:string) - Defaults tonil.
Render every root node in the tree.
Output mirrors the pre-Athanor storefront renderer layout: a single
flex flex-col gap-4 wrapper, with each node's rendered output directly
inside (no per-node wrapping div).
Attributes
tree(:map) (required) - AnAthanor.Tree-shaped map: %{"content" => [...]}.ctx(Athanor.Ctx) (required)edit_mode(:boolean) - Defaults tofalse.show_config(:boolean) - Defaults tofalse.selected_component_id(:string) - Defaults tonil.