DocShell.Presentation.Renderer.Capabilities (DocShell v0.5.0)

Copy Markdown View Source

Declares a renderer's portable identity and supported feature states.

The declaration uses a closed set of output modes, capability states, and served-runtime requirements. It contains no module names or executable callbacks, so DocShell can validate it before rendering and include the same identity in a static manifest or hosted conformance report.

Summary

Types

t()

The complete declaration returned by a renderer.

Functions

Returns the capability schema identifier.

Validates renderer identity, version, modes and every feature.

Types

t()

@type t() :: %DocShell.Presentation.Renderer.Capabilities{
  features: %{
    required(String.t()) => DocShell.Presentation.Renderer.Capability.t()
  },
  output_modes: [:hosted | :static],
  renderer_id: String.t(),
  renderer_version: String.t(),
  schema_version: String.t()
}

The complete declaration returned by a renderer.

Functions

schema_version()

@spec schema_version() :: String.t()

Returns the capability schema identifier.

validate(capabilities)

@spec validate(t()) :: :ok | {:error, term()}

Validates renderer identity, version, modes and every feature.