Expand description
dockviewers_core — the framework-agnostic engine behind the dockviewers packed-grid
tiling layout. No Dioxus, no Leptos: a pure data model (model), a gesture reducer
(state) over a plain PackedState struct, the built-in per-Band seed cache, and the
structural CSS. Both the Dioxus and Leptos bindings drive this same core.
Tiles have a fixed starting size, snap to a step grid, never overlap, and leave whitespace
below (InsilicoTerminal’s look). Every field the old Signal-driven renderer split across ~14
reactive cells lives here as a plain field of PackedState, so the whole gesture machine
(drag/resize/undo/fit) is unit-testable without a DOM — see tests/integration.
Re-exports§
pub use config::Band;pub use config::Breakpoint;pub use config::Config;pub use config::Keybind;pub use config::Keybinds;pub use config::Saved;pub use model::Group;pub use model::GroupId;pub use model::PanelId;pub use model::packed::MinSize;pub use model::packed::PackedGrid;pub use model::packed::Step;pub use state::ContentSlot;pub use state::Frame;pub use state::Ghost;pub use state::KeyOutcome;pub use state::PackedState;
Modules§
- config
- Host-supplied configuration for the packed layout. Keybinds plus host-registered chords;
passed once into
PackedState. Binds match the produced character (KeyboardEvent.key()), so they follow the user’s keyboard layout instead of a hardcoded QWERTY physical position. - model
- The pure layout model — no DOM, no Dioxus: just data + operations, so it is
unit-testable in isolation and
cargo checks on any target. - state
- The gesture reducer: every field the old Signal-driven renderer split across ~14 reactive
cells lives here on one
PackedStateas a plain field, and every event handler / effect is a&mut selfmethod whose inputs are already-extracted primitives (the binding does the DOM read, passes plain numbers/strings in). So the whole drag/resize/undo/fit machine is ordinary Rust — unit-testable without a DOM, and shared verbatim by the Dioxus and Leptos bindings.