Skip to main content

Crate hadrone_core

Crate hadrone_core 

Source
Expand description

§Grid Layout Core

The spatial engine for a cross-framework grid layout system. This crate contains the deterministic math for grid compaction, collision detection, and interaction sessions. It is designed to be headless and framework-agnostic.

Re-exports§

pub use collision::CollisionResolver;
pub use collision::CollisionStrategy;
pub use collision::NoopCollisionResolver;
pub use collision::PushDownResolver;
pub use events::InteractionPhase;
pub use events::LayoutEvent;
pub use responsive::BreakpointSpec;
pub use responsive::scale_layout_cols;
pub use responsive::select_breakpoint;
pub use validate::LayoutIssue;
pub use validate::repair_layout;
pub use validate::validate_layout;

Modules§

collision
Pluggable collision resolution when an item overlaps others after move/resize.
events
Structured layout lifecycle events (RGL-style callbacks).
interaction
responsive
Breakpoint selection and proportional layout scaling (RGL-style).
validate
Layout validation and automatic repair for persisted or imported grids.

Structs§

FreePlacementCompactor
LayoutEngine
The main orchestration point for grid operations.
LayoutItem
A single item within the grid layout.
RisingTideCompactor
O(N * Cols) implementation using the “waterline” approach

Enums§

CompactionType
Supported compaction strategies.
ResizeHandle
Represents a handle for resizing a grid item.

Traits§

Compactor
Trait for grid compaction strategies. Compaction is the process of resolving overlaps and settling items into a stable layout.

Functions§

apply_aspect_and_clamp
Applies aspect_ratio (w/h) plus min/max; re-clamps x/w to cols.
collides
Checks if two layout items overlap.
layout_engine
Build an engine from compaction + collision strategy (common in interaction code).
resize_handle_aria_label
Human-readable label for assistive tech (e.g. aria-label on resize controls).