From f530615c9838d4d134fb6fcd6dba4804c002a235 Mon Sep 17 00:00:00 2001 From: Chadwick Maycumber <36460656+cmaycumber@users.noreply.github.com> Date: Thu, 24 Sep 2026 19:33:53 -0700 Subject: [PATCH] fix(input): export ActionRegistry from renderoni and renderoni/input `engine.actions` is public and typed ActionRegistry, and games register their actions on it, but the class and its ActionDefinition / ActionRecord / ActionDescriptor types were never exported. Code that wants to type an action sink, or build a registry for a test, had to reach into dist internals. Re-export them from `renderoni/input`, which `renderoni` already re-exports. Co-Authored-By: Claude Opus 5.5 (1M context) --- src/input/index.ts | 2 +- tests/public-exports.test.ts | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 tests/public-exports.test.ts diff --git a/src/input/index.ts b/src/input/index.ts index 17e4c2c..e5c4f65 100644 --- a/src/input/index.ts +++ b/src/input/index.ts @@ -1,2 +1,2 @@ export * from './input-manager.js'; - +export * from './actions.js'; diff --git a/tests/public-exports.test.ts b/tests/public-exports.test.ts new file mode 100644 index 0000000..b0e0557 --- /dev/null +++ b/tests/public-exports.test.ts @@ -0,0 +1,11 @@ +import { describe, expect, it } from 'vitest'; +import * as root from '../src/index.js'; +import * as input from '../src/input/index.js'; +import { RenderoniEngine } from '../src/core/engine.js'; + +describe('public exports', () => { + it('exposes ActionRegistry, the type behind engine.actions, from renderoni and renderoni/input', () => { + expect(root.ActionRegistry).toBe(input.ActionRegistry); + expect(new RenderoniEngine({ mode: 'headless' }).actions).toBeInstanceOf(root.ActionRegistry); + }); +});