# `Excessibility.Capture`
[🔗](https://github.com/lessthanseventy/excessibility/blob/v0.18.1/lib/capture.ex#L1)

Tracks capture state for auto-snapshot functionality.

When `@tag capture_snapshots: true` is used, this module tracks:
- Event sequence (counter)
- Previous snapshot name
- Test metadata
- Timeline events

# `clear_state`

Clears the capture state.

# `get_state`

Returns the current capture state, or nil if not capturing.

# `get_timeline`

Returns the timeline of all events for the current test.

# `init_capture`

Initializes capture state for a test.

# `init_default_context`

Initializes a lightweight `:default`-mode context for a test.

Unlike `init_capture/3` (`:auto` mode, used by the `capture_snapshots`
tag), this only records the test name and a per-call sequence so that
every snapshot embeds `Test:`/`Sequence:` metadata for cross-snapshot
diffing — the default `Module_line.html` filename scheme is preserved.

# `record_event`

Records a snapshot event and increments the sequence counter.
Returns metadata for the snapshot.

# `save_timeline`

Saves the timeline to a JSON file.

---

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