Files
andrew 987ff560f5 Add initial Nebula Core packages and docs
Import initial monorepo structure for Nebula Core: add packages (@nebula/core, core-glyphs, core-input, core-navigation, core-theme, core-ui, core-utils) with source, dist, tests and assets. Expand README with overview, quick start and API snippets, and add package-level documentation files. Add jsconfig.json for path mapping, package.json and lockfiles to bootstrap the repo. This commit sets up the project layout, docs, and local package links for further development.
2026-01-31 22:57:16 +13:00
..

@nebula/core-navigation

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

Why it exists

Directional navigation needs predictable, consistent logic for TVs and handhelds. This package provides small, testable functions that you can plug into any UI layer.

Usage

import { pickBestCandidate } from "@nebula/core-navigation";

const current = { id: "settings", x: 100, y: 100, width: 180, height: 80 };
const candidates = [
  { id: "play", x: 100, y: 10, width: 180, height: 80 },
  { id: "help", x: 320, y: 100, width: 180, height: 80 }
];

const next = pickBestCandidate(current, candidates, "up");

SteamOS / Steam Deck notes

Use these primitives to drive focus on elements that are at least 810mm tall on a TV. Combine with large hit targets and visible focus rings.