# `MingaEditor.Renderer.TextInteractionIndex`
[🔗](https://github.com/jsmestad/minga/blob/main/lib/minga_editor/renderer/text_interaction_index.ex#L1)

Renderer-owned immutable index for direct text-pointer resolution.

# `current_root`

```elixir
@type current_root() :: {pid(), root_ref()}
```

# `root_ref`

```elixir
@type root_ref() :: reference()
```

# `t`

```elixir
@type t() :: %MingaEditor.Renderer.TextInteractionIndex{
  current_roots: %{optional(pos_integer()) =&gt; current_root()},
  last_publication_nodes: non_neg_integer(),
  table: :ets.table()
}
```

# `activate`

```elixir
@spec activate(t(), pos_integer(), pos_integer()) :: :ok | {:error, :unknown}
```

Makes one already-published candidate active.

# `discard`

```elixir
@spec discard(t(), MingaEditor.Renderer.TextPresentation.t()) :: t()
```

Removes exact lease metadata before releasing its immutable graph pin.

# `drop_buffer`

```elixir
@spec drop_buffer(t(), pid()) :: t()
```

Drops current roots owned by a terminated buffer.

# `last_publication_nodes`

```elixir
@spec last_publication_nodes(t()) :: non_neg_integer()
```

# `new`

```elixir
@spec new() :: t()
```

# `publish`

```elixir
@spec publish(t(), MingaEditor.Renderer.TextPresentation.t()) :: t()
```

Publishes one complete candidate graph and pins its lease and current root.

# `reader`

```elixir
@spec reader(t()) :: MingaEditor.Renderer.TextInteractionIndex.Reader.t()
```

# `reset`

```elixir
@spec reset(t()) :: t()
```

Clears every lease, active record, graph node, and root pin for a new connection.

# `retain_current_windows`

```elixir
@spec retain_current_windows(t(), MapSet.t(pos_integer())) :: t()
```

Drops current graph roots for windows absent from the acknowledged output.

---

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