Minga.Extension.Panel (minga_sdk v0.1.0)

Copy Markdown View Source

Registry for extension-owned panels in the editor.

Extensions register panels with structured content blocks. Position is :bottom, :right, or :float; content is a list of blocks the frontend renders with native widgets.

This is a compile-time stub. At runtime, the real module in Minga's BEAM VM provides the implementation.

Summary

Types

content_block()

@type content_block() ::
  {:text, String.t()}
  | {:styled_text, [{String.t(), non_neg_integer(), keyword()}]}
  | {:table, map()}
  | {:key_value, [{String.t(), String.t()}]}
  | {:separator}
  | {:progress, map()}
  | {:tree, map()}

position()

@type position() :: :bottom | :right | :float

size()

@type size() :: {:percent, 1..100} | {:lines, pos_integer()}

Functions

hide(extension_name, panel_id)

@spec hide(atom(), term()) :: :ok

remove(extension_name, panel_id)

@spec remove(atom(), term()) :: :ok

remove_all(extension_name)

@spec remove_all(atom()) :: :ok

set(extension_name, panel_id, opts)

@spec set(atom(), term(), map()) :: :ok

show(extension_name, panel_id)

@spec show(atom(), term()) :: :ok