# `DialectoInContext.Store`
[🔗](https://github.com/dialecto-eu/dialecto-phoenix/blob/v0.1.0/lib/dialecto_in_context/store.ex#L1)

The dev server's in-context state, in a protected ETS table this process
owns: whether marking is on (spec-0017 §1.3) and the saved drafts the
overlay sent (§1.2). Every gettext lookup reads it, so reads go straight to
ETS; writes are serialized through the process.

Marking lasts `marking_ttl_ms/0` after the last `set_marking(true)` — the
overlay heartbeats while the editor is open, so a closed tab or a crashed
overlay can't leave markers on for good.

# `override`

```elixir
@type override() :: %{optional(:to) =&gt; String.t(), optional(:forms) =&gt; [String.t()]}
```

A saved draft: one text, or one text per plural form.

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `marking?`

```elixir
@spec marking?() :: boolean()
```

True while marking is on.

# `marking_ttl_ms`

```elixir
@spec marking_ttl_ms() :: pos_integer()
```

How long marking stays on after the overlay last asked for it.

# `override`

```elixir
@spec override(String.t(), String.t(), String.t()) :: override() | nil
```

The draft for `{domain, key, locale}`, or nil.

# `replace_overrides`

```elixir
@spec replace_overrides([{String.t(), String.t(), String.t(), override()}]) :: :ok
```

Replaces every draft with `edits` (`{domain, key, locale, override}`
tuples) — the overlay always sends the full set, so an empty list restores
the catalogs. Unchanged drafts never disappear mid-swap.

# `set_marking`

```elixir
@spec set_marking(boolean(), non_neg_integer()) :: boolean()
```

Turns marking on (for `ttl_ms`, default `marking_ttl_ms/0`) or off.

# `state`

```elixir
@spec state() :: {boolean(), boolean()}
```

`{marking?, any_overrides?}` — the lookup's fast path reads only this.

---

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