# `Athanor.AutoEditorForm`
[🔗](https://github.com/Arsenalist/athanor/blob/v0.1.0-beta.7/lib/athanor/auto_editor_form.ex#L1)

Auto-generated editor form for components that declare `fields/0`.

Mounted by `Athanor.Renderer` when a component's `fields/0` is
non-empty. Wraps `Athanor.Components.EditorFormShell` with two tabs
(Component + Formatting). The Component tab is filled by
`Athanor.Fields.render/1`; the Formatting tab is the shared formatting
surface.

Owns the LC state every editor form needs:
- `active_tab`        — "component" | "formatting"
- `open_sections`     — MapSet of expanded formatting collapsibles
- `formatting_form`   — Phoenix form for the formatting tab
- `props`             — current component prop map

Single replacement for the hand-written `*.EditorForm` LCs of
Step 4. After Phase 5-7, `Heading.EditorForm`, `Button.EditorForm`,
and `Divider.EditorForm` are deleted; their components declare
`fields/0` and this LC handles them all.

# `apply_resolve_data`

Calls `module.resolve_data(old, new)` if the module exports it,
otherwise returns `new` unchanged. Exposed publicly so tests can
verify the cascade without socket plumbing.

# `coerce`

Type coercion with access to the field's previous value.

Used for `:asset`, whose paste-a-URL fallback wraps a bare URL string into
an asset descriptor map while preserving opaque extras (`alt`, dimensions,
…) when the URL is unchanged. All other types ignore `old` and delegate to
`coerce/2`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
