Vibe.Presentation.Widget (vibe v0.2.2)

Copy Markdown View Source

Renderer-neutral presentation widget shared by TUI and web surfaces.

Summary

Types

placement()

@type placement() :: :above_editor | :below_editor | :sidebar

t()

@type t() :: %Vibe.Presentation.Widget{
  id: String.t(),
  placement: placement(),
  props: map(),
  type: widget_type(),
  version: non_neg_integer()
}

widget_type()

@type widget_type() :: :lines | :markdown | :status | :panel | :progress | :list

Functions

lines(id, content, opts \\ [])

@spec lines(String.t() | atom(), [String.t()] | String.t(), keyword()) :: t()

markdown(id, content, opts \\ [])

@spec markdown(String.t() | atom(), String.t(), keyword()) :: t()

new(id, type, props \\ %{}, opts \\ [])

@spec new(String.t() | atom(), widget_type(), map(), keyword()) :: t()

normalize(widget)

@spec normalize(t() | map()) :: t()

progress(id, opts)

@spec progress(
  String.t() | atom(),
  keyword()
) :: t()