Skip to main content

Crate dockview_dioxus

Crate dockview_dioxus 

Source
Expand description

dockview_dioxus — a packed-grid tiling layout for Dioxus.

Tiles have a fixed starting size, snap to a step grid, never overlap, and leave whitespace below (InsilicoTerminal’s look, docs/refs/insilico/). A pure data model (model) lives in one Signal; a declarative render (render) is derived from it.

Two render layers, both positioned from the model’s integer grid rects (no DOM measuring):

  • a skeleton of absolutely-positioned tile frames (content-free, safe to remount),
  • a flat, id-keyed content overlay — what keeps panel component instances (and their JS state) alive across layout restructuring.

Tiles reposition by drag: pick up a titlebar or tear a tab, and a cloned drop previews the result live (other tiles settling, a shadow over the landing cell) before commit.

Re-exports§

pub use config::Breakpoint;
pub use config::Config;
pub use config::Keybind;
pub use config::Keybinds;
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 panel::DockPanel;
pub use render::packed::PackedApi;
pub use render::packed::PackedArea;
pub use render::packed::PackedArea;

Modules§

config
Host-supplied configuration for PackedArea. Today just keybinds; passed once as a prop. Binds match the produced character (KeyboardEvent.key()), so they follow the user’s keyboard layout instead of a hardcoded QWERTY physical position.
math
Pure geometry primitives.
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.
panel
The consumer-facing content seam. Equivalent of dockview-core/src/framwork.ts
persist
Layout persistence to localStorage. wasm-only: the pure model/api compile everywhere, but touching window is gated so cargo check stays green natively. Pairs with crate::model::serial for the actual encoding.
render
The Dioxus render layer — everything DOM. Dockview’s per-class this.element ownership is replaced by declarative rsx! derived from the model Signal.