# llimphi-widget-navigator **Data-agnostic** node navigator in two switchable modes: **tree** (`tree`) and **graph** (`nodegraph`). It was born so `pata` could show nouser's **Monads** and their files in a sidebar, but the widget knows nothing about nouser: it receives a forest of `NavNode`s (opaque id + label + `NavKind` + children) and emits `Msg`s on interaction. The caller maps each `id` to whatever it means (a `MonadId`, a path) and decides what to do on select/open. Like the rest of the Llimphi widgets it is **render-only and stateless**: the state (which nodes are expanded, which one is selected, which mode it is in) lives in the App's `Model`; the widget only paints and notifies. - **Tree** — reuses `llimphi_widget_tree`. The navigator flattens the forest honouring `is_expanded`, draws an icon per `NavKind` between the chevron and the label, and wires toggle / select / context per row. - **Graph** — reuses `llimphi_widget_nodegraph`. It places the visible nodes in columns by depth, with **containment** wires (parent→child). The selected node is highlighted; dragging a node selects it; right-click opens the context menu. ```ignore navigator_view( NavSpec { roots: &model.nodes, mode: model.mode, selected: model.selected, palette, guides: true }, |id| model.expanded.contains(&id), Msg::Toggle, Msg::Select, Some(Msg::Open), ) ``` --- Part of **llimphi** — see [llimphi](../../README.md).