Expand description
Shared primitives: the drag context, id/geometry types, hooks, and the
Draggable/DropZone/DragOverlay components every other module builds on.
Re-exports§
pub use components::DndProvider;pub use components::DndProvider;pub use components::DragOverlay;pub use components::DragOverlay;pub use components::Draggable;pub use components::Draggable;pub use components::DropZone;pub use components::DropZone;pub use components::ParentZone;pub use hooks::client_point;pub use hooks::element_point;pub use hooks::use_dnd;pub use hooks::use_dnd_provider;pub use hooks::use_zone_id;pub use hooks::use_zone_registry;pub use machine::transition;pub use machine::GestureEffect;pub use machine::GestureEvent;pub use machine::GesturePhase;pub use model::apply_clone_or_move;pub use model::apply_list_clone_or_move;pub use modifiers::apply_modifiers;pub use modifiers::DragModifier;pub use modifiers::ModifierCtx;pub use registry::ZoneRecord;pub use registry::ZoneRegistry;pub use state::DndContext;pub use state::DragState;pub use types::effective_effect;pub use types::DragId;pub use types::DragMode;pub use types::DropEffect;pub use types::DropOutcome;pub use types::Point;pub use types::Rect;pub use types::ZoneId;pub use viewport::screen_delta_to_world;pub use viewport::screen_to_world;pub use viewport::world_delta_to_screen;pub use viewport::world_to_screen;pub use viewport::CanvasViewport;
Modules§
- components
- Ready-made components over the shared drag context.
- hooks
- Hooks for providing and consuming the drag context.
- machine
- A formal state machine for pointer-driven drag gestures.
- model
- Small model helpers for applying completed drops to app-owned state.
- modifiers
- Composable drag constraints, applied as a chain to a proposed position.
- registry
- The zone registry: every mounted
crate::core::DropZonerecords itself here (id, label, drop callback, acceptance filter, and its mounted DOM handle). Pointer drags hit-test against cached client rects; keyboard navigation walks the zones in spatial order (top-to-bottom, left-to-right, with unmeasured zones last in registration order). - state
- The shared drag state. One
DndContext<T>lives in Dioxus context and is read/written byDraggableandDropZonecomponents (and by you, if you wire events manually). - types
- Shared identity, geometry and result types used by every drop module.
- viewport
- Pure pan/zoom geometry for canvas-like coordinate planes.