# @nebula/core-navigation

Focus management and spatial navigation primitives for controller-first UIs.

## What it does

- Calculates spatial relationships between focusable rectangles.
- Filters candidates by direction (up/down/left/right).
- Picks the best next focus target using a weighted distance heuristic.

## Key concepts

- **Rect**: A focusable element described by `x`, `y`, `width`, `height`, and `id`.
- **Direction**: The requested movement direction (up/down/left/right).

## Typical use cases

- D-pad or stick navigation across grids and lists.
- Consistent focus movement in TV or handheld UIs.
- Simple focus logic without a framework dependency.
