# `Macaw.Frame.Document.Schema.Frame`
[🔗](https://github.com/dcoai/macaw_frame/blob/v0.1.0/lib/macaw/frame/document/schema/frame.ex#L1)

The frame's node kinds of the frame document (spec/02 §4): the frame, its margin,
scales, axes and their ticks and measures, legend, the model-specific nodes and the
transition node.

`Macaw.Frame.Document.Schema` builds the tables once, at compile time; read them
through it. A model-specific node (`:projection`, `:fit`, `:layout`, `:facet`,
`:viewport`) is its model's, validated by the model ([03-coordinates]); the table here
is what spec/02 §4.6 gives of it.

# `describe`

```elixir
@spec describe(term()) :: [Macaw.Frame.Document.Schema.Spec.t()] | {:error, list()}
```

The key specs of a frame-level node kind, in the order of its table in spec/02;
`{:error, [{[], {:enum, kinds}}]}` for a kind this module does not describe.

    iex> Enum.map(Macaw.Frame.Document.Schema.Frame.describe(:margin), & &1.key)
    [:top, :right, :bottom, :left]

# `kinds`

```elixir
@spec kinds() :: [atom(), ...]
```

The node kinds this module describes, in spec/02 §1.2's order.

# `margin`

```elixir
@spec margin() :: %{top: 20, right: 20, bottom: 30, left: 40}
```

The margin a frame draws with when it gives none (§4.1).

# `scale_kinds`

```elixir
@spec scale_kinds() :: [atom(), ...]
```

The scale kinds of macaw_draw spec/06 a `:scale` node names (§4.3).

---

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