Expand description
dockviewers_dioxus — the Dioxus binding for the dockviewers_core packed-grid tiling
layout. A thin re-expression of the engine’s view-model getters as rsx!, plus event wiring
that reads a DOM primitive and forwards it to a core reducer method. All layout logic lives in
dockviewers_core; this crate owns only the Signal<PackedState> cell, the templates, and
the imperative PackedApi handle a host drives.
Web-only (DOM-backed). Tiles have a fixed starting size, snap to a step grid, never overlap, and leave whitespace below (InsilicoTerminal’s look). Panel content lives in a flat, id-keyed content overlay so component instances (and their JS state) survive layout restructuring.
Re-exports§
pub use panel::DockPanel;pub use view::PackedApi;pub use view::PackedArea;pub use view::PackedArea;
Modules§
- 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 touchingwindowis gated socargo checkstays green natively. Pairs withcrate::model::serialfor the actual encoding. - view
- The Dioxus view over
PackedState: one root-scopeSignal<PackedState>replacing the old ~14 separate signals, threersx!blocks (root / frame / content) rendered straight from the core view-model getters, and event handlers that each read one DOM primitive then forward it to a reducer method. No layout logic lives here — only the reactive cell, the templates, and the DOM reads the core can’t do itself.
Structs§
- Config
- Group
- The model behind a single pane’s tab strip (insilicoterminal’s
.subtitlebar). - GroupId
- Stable identity of a group (a tab-strip leaf holding 1+ panels).
- Keybind
- A single chord: the character the key produces, plus the non-shift modifiers held. Shift is
already baked into
key("u"vs"U"), so it isn’t a separate flag. - Keybinds
- Chords acting on the layout / the focused pane. Defaults:
u/Ufor the undo tree,Backspaceto close the focused pane,fto toggle maximize on it,?for the keybind hint. They never fire while an editable field is focused (see the binding’s listener), so bare letters don’t hijack typing. - Packed
Grid - Packed
State - Everything the packed layout needs to render and mutate itself, on one struct. The engine’s
grid plus the live view geometry (
cols/step_px/breakpoint/root_*, set by the measure), the in-flight gestures (drag/resize), the keyboard-driven pane state (focused/maximized/help/popups), the undo history, the first-measurereadylatch, and the hostcfg. - PanelId
- Stable identity of a panel (a single widget). Provided by the consumer; used as the render key that keeps a panel’s component instance alive across restructuring.
- Step
- One grid unit — the minimum size/resize increment (
STEPpx each).
Enums§
- Breakpoint
- Responsive width bands — Bootstrap’s xs/sm/md/lg/xl boundaries (CSS px). The grid’s column and
row counts are derived per band so the physical step size stays ~constant across devices: a
phone gets fewer steps than a desktop, so the same tiles reflow and stack down instead of
shrinking to illegibility. The count is fixed within a band (the grid still stretches to fill),
so a layout has one stable signature per band — persist one layout per
Breakpoint, keyed by itsDisplayname (xs/sm/md/lg/xl). - MinSize
- A window type’s minimum size, author-facing in whichever unit reads naturally for
that type. Resolved to whole
Steps againstSTEPpx (and 1rem ≈ root font px) when a cell is placed.
Type Aliases§
- Action
- A host-registered chord’s action: arbitrary code over the live layout. Framework-agnostic —
the binding invokes it against its reactive cell’s
PackedState.Rc(notBox) soConfigstaysClonefor a binding that hands it around by prop.