# `LivePanels.Canvas.Shared`
[🔗](https://github.com/livepanels/livepanels/blob/v0.1.0/lib/livepanels/canvas/shared.ex#L1)

Public shared-mode configuration facade.

Use this module when an application needs child specs or backend health checks for the
shared backend configured on a canvas.

# `backend`

```elixir
@type backend() :: LivePanels.Canvas.Shared.Backend.t()
```

# `backend_health_check_report`

```elixir
@type backend_health_check_report() ::
  LivePanels.Canvas.Shared.Backend.backend_health_check_report()
```

# `backend_spec`

```elixir
@type backend_spec() ::
  nil | :local | :horde | module() | {module() | atom(), keyword()} | backend()
```

# `backend_health_check`

```elixir
@spec backend_health_check(keyword()) ::
  {:ok, backend_health_check_report()} | {:error, term()}
```

Exercises a shared backend with a generated shared canvas.

# `backend_health_check!`

```elixir
@spec backend_health_check!(keyword()) :: backend_health_check_report()
```

Bang variant of `backend_health_check/1`.

# `child_specs`

```elixir
@spec child_specs(backend_spec()) :: [Supervisor.child_spec()]
```

Returns child specs for the given backend declaration.

# `default`

```elixir
@spec default() :: backend()
```

Returns the configured local backend used when no backend is supplied.

# `normalize!`

```elixir
@spec normalize!(backend_spec()) :: backend()
```

Normalizes a shared backend declaration into the runtime backend record.

# `participant_session`

```elixir
@spec participant_session(keyword() | map()) :: map()
```

Returns a LiveView session map containing shared participant metadata.

# `project_state`

```elixir
@spec project_state(LivePanels.Canvas.State.t(), String.t(), map(), map()) ::
  LivePanels.Canvas.State.t()
```

Projects canonical shared canvas state for a participant client id.

---

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