# `Cite.Source`
[🔗](https://github.com/mdepolli/cite/blob/v0.2.0/lib/cite/source.ex#L1)

The document as the caller's list of passages. Built by `Cite.source/2`,
which documents `as` and `show`. Only the meta keys `show` names reach the
model. The rest of `meta` stays with the caller.

Shown meta goes on the wire, so its values must be JSON: `nil`, booleans,
atoms, numbers, UTF-8 binaries, and lists and plain maps of these, with
atom or binary keys. A map may not hold a key as both an atom and a
string (`:k` and `"k"`): on the wire they are one key.

# `t`

```elixir
@type t() :: %Cite.Source{
  as: String.t(),
  passages: [Cite.Passage.t()],
  show: [atom() | String.t()]
}
```

# `new`

```elixir
@spec new([String.t() | map()], keyword()) :: t()
```

Builds a source from units, each a text or `%{text: text}` with optional
`:id` and `:meta`. Text is kept byte for byte. A unit without an id gets
one from its position in the list: `P000`, `P001`, and so on. Raises
`ArgumentError` on a unit, id, text, shown meta value, or option it
cannot use.

---

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