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

834 B

@nebula/core-input

Action-based input abstraction for controller-first apps. Converts raw device events into app-level actions.

What it does

  • Normalizes device input into a consistent InputEvent shape.
  • Maps physical controls to logical actions (e.g. confirm, back).
  • Emits action updates with value and active state.

Key concepts

  • InputEvent: Normalized event with source, control, type, and value.
  • InputBinding: Maps a physical control to an action name.
  • ActionUpdate: The emitted result when an input matches a binding.

Typical use cases

  • Gamepad-first UIs that should work across Deck, Xbox, and PlayStation layouts.
  • Unified handling of keyboard and controller inputs without coupling to hardware.
  • Action-driven UI logic (confirm/back/menu) instead of button-driven logic.