Skip to main content

fresh/widgets/
mod.rs

1//! Plugin widget runtime.
2//!
3//! Plugins describe panels as a [`WidgetSpec`](fresh_core::api::WidgetSpec)
4//! tree. The runtime in this module owns the panel registry, runs the
5//! reconciler against the previous spec, renders the resulting tree
6//! into [`TextPropertyEntry`]s, and (in later phases) routes events
7//! back through the hook system.
8//!
9//! v1 supports the `Row` / `Col` / `HintBar` / `Raw` widget kinds.
10//! Additional kinds (`Toggle`, `Button`, `TextInput`, `List`, `Tree`,
11//! `Layer`, `Transient`, `Table`) plug into the `render` dispatch
12//! without changing the IPC shape.
13//!
14//! See `docs/internal/plugin-widget-library-design.md` for the full
15//! design.
16
17mod actions;
18mod registry;
19mod render;
20
21pub use actions::{
22    append_tree_nodes_in_spec, find_widget_by_key, set_list_items_in_spec, set_raw_entries_in_spec,
23    set_toggle_checked_in_spec, set_tree_checked_keys_in_spec, set_tree_nodes_in_spec,
24    tree_parent_index,
25};
26pub use registry::{HitArea, PanelId, WidgetInstanceState, WidgetPanelState, WidgetRegistry};
27pub use render::{
28    render_spec, render_spec_no_autofocus, EmbedRect, FocusCursor, OverlayRow, RenderOutput,
29    ScrollRegion,
30};