MingaEditor.FileTree.Row (Minga v0.1.0)

Copy Markdown View Source

Semantic presentation row for file-tree renderers.

This Layer 2 contract keeps filesystem topology in Minga.Project.FileTree while collecting the editor-owned visual state that TUI and GUI renderers need to present the same meaning.

Summary

Functions

Builds a stable row identity for a file-tree entry.

Constructs a semantic file-tree row.

Types

t()

@type t() :: %MingaEditor.FileTree.Row{
  active?: boolean(),
  depth: non_neg_integer(),
  diagnostics: MingaEditor.FileTree.Diagnostics.t(),
  directory?: boolean(),
  dirty?: boolean(),
  editing: MingaEditor.State.FileTree.editing() | nil,
  expanded?: boolean(),
  focused?: boolean(),
  git_status: Minga.Project.FileTree.GitStatus.file_status() | nil,
  guides: [boolean()],
  id: String.t(),
  last_child?: boolean(),
  name: String.t(),
  path: String.t(),
  selected?: boolean()
}

Functions

id_for(map)

@spec id_for(Minga.Project.FileTree.entry()) :: String.t()

Builds a stable row identity for a file-tree entry.

new(attrs)

@spec new(keyword()) :: t()

Constructs a semantic file-tree row.