TermUI.Dev.StateInspector (TermUI v0.2.0)

View Source

State Inspector panel for development mode.

Shows detailed component state in a side panel with expandable tree view. Toggle with Ctrl+Shift+S when dev mode is enabled.

Features

  • Tree view of component state
  • Expand/collapse nested values
  • State change highlighting
  • Type information display

Summary

Functions

Compares two states and returns paths that changed.

Renders the state inspector panel.

Renders state as a tree of lines.

Functions

diff_states(old_state, new_state)

@spec diff_states(term(), term()) :: [list()]

Compares two states and returns paths that changed.

render(component_info, area)

@spec render(map() | nil, map()) :: term()

Renders the state inspector panel.

Returns render nodes for the side panel with state tree.

render_state_tree(value, depth)

@spec render_state_tree(term(), integer()) :: [String.t()]

Renders state as a tree of lines.