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

The fixture sets the components run macaw_component's kit over (spec/01 §10;
macaw_component spec/04 §3): one fixture for each distinct declaration shape of the
Frame — a layer kind, a coordinate model, a backend, an interaction set and a bound
parameter — each with its deliveries, its resolved bindings and its schemas, and a
pair with equal settings and different deliveries for the kit's `:token` check.

Each fixture is a map of the kit's keys (`name`, `settings`, `deliveries`, `bindings`,
`schemas`, `events`): `frame/0` is the Frame's set, and `fixture/1` one of it by name;
`sparkline/0` is the Sparkline's (spec/01 §6): one per kind, `x` type and mark, a
design with its furniture to strip, and the `:token` pair; `legend/0` the shared
Legend's (spec/01 §7): declared values, one hidden, and a derived source twice.
Each delivery is built in place from rows (a static source standing in until a captured
one lands, macaw_data#308). It names no schema version: the kit's `:bindings` check
renames a slot's schema and keeps the delivery's version, which would read as another
version of the schema (§3.3); the version check is the Frame's own tests'.

    iex> Enum.map(Macaw.Frame.Fixtures.frame(), & &1.name) |> Enum.take(2)
    ["line", "line other data"]

# `catalog`

```elixir
@spec catalog() :: [map()]
```

The catalog fixtures (spec/14 §1): one per catalog fragment of `Macaw.Frame.Package`
(spec/13), in the package's order, each its fragment's first fixture placed at a use
site (`Macaw.Frame.Catalog.place/3`) with the fixture's parameters, its slots' schemas,
its bindings and a delivery per slot. Each also holds `catalog` (the fragment's id),
`site` (the use site) and `cost` (`:light`, or `:heavy` for a fixture whose purpose is
to be expensive, spec/12 §5.3).

# `catalog_fixture`

```elixir
@spec catalog_fixture(module(), non_neg_integer()) :: map()
```

A catalog fragment's fixture as a kit fixture: its fixture at `index` placed.

# `catalog_kit`

```elixir
@spec catalog_kit() :: [map()]
```

The catalog fixtures the component kit runs over (spec/14 §8.2): `catalog/0` and the
`:token` check's pair, `charts.line`'s fixture again with other data.

# `fixture`

```elixir
@spec fixture(String.t()) :: {:ok, map()} | :error
```

A fixture of `frame/0` by name, or `:error`.

# `frame`

```elixir
@spec frame() :: [map(), ...]
```

The Frame's fixture set, in order.

# `get`

```elixir
@spec get(term()) :: {:ok, map()} | :error
```

A catalog fixture by name: `{:ok, fixture}`, or `:error`.

# `legend`

```elixir
@spec legend() :: [map(), ...]
```

The shared Legend's fixture set, in order (spec/01 §7): a field whose schema declares
its values, names and colors, the same with one value hidden, and a derived source of
one row per entry, twice with equal settings and other rows for the `:token` check.

# `names`

```elixir
@spec names() :: [String.t()]
```

The catalog fixtures' names, one per catalog fragment (spec/14 §1).

# `sparkline`

```elixir
@spec sparkline() :: [map(), ...]
```

The Sparkline's fixture set, in order (spec/01 §6).

---

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