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

The `sequence` step (spec/04 §5.2, §7.2): a sequence diagram's participants as lanes
across and its events down, laid out by `Macaw.Draw.Layout.Sequence` (macaw_draw spec/08 §12) in
the plot (`needs: [:frame]`), for the `lane`, `edge` and `node` kinds.

Its input is the **events**, one a row in order: `fields: [from, to]` (`["from", "to"]`),
`label`, and `kind`: a message's `sync`, `async` or `reply`, or a note's `note`
(over `from`, or over `from` and `to`), `note_left` or `note_right` (beside `from`).
`activate` (`"target"` or `"source"`) opens an activation bar on that end of a message,
`deactivate` closes one. The participants are the rows of the `nodes` slot (`id`,
`label`), else the lanes the events name in order of first appearance; a header is
`header` (`32`) tall and as wide as its label by the text estimate at `font_size` with
`padding`. `participant_sep` (`40`) and `message_sep` (`16`) reach the layout.

Outputs, each centered across the plot where it fits:

- `"participants"`: `id`, `label`, `x` (the lifeline), the header box `x0`, `x1`, `y0`,
  `header_y1`, and `y1` the lifeline's end: what a vertical `lane` draws;
- `"messages"`: the event rows that are messages, with `path`, `label_x`, `label_y`,
  each end's place and bearing, and the marker and line their kind draws (`head`:
  `arrow` for a call or a reply, `open` for an async one; `line`: `dashed` for a reply);
- `"notes"`: the note rows with `x`, `y`, `width`, `height` and `shape` `note`;
- `"activations"`: `lane`, `depth`, `x`, `y`, `width`, `height` and an empty `label`.

A message naming no participant is `{"fields", {:unknown_participant, id}}`; a
`deactivate` with no open bar `{"op", :no_activation}`.

# `phrase`

```elixir
@spec phrase() :: String.t()
```

What the frame is called when a data layer's rows are laid out by this step (spec/11 §2.2).

---

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