import type { MappingTokens } from './controller-db'; import type { GamepadSlotSample } from './input-snapshot'; /** * Minimal raw Gamepad shape from browser API (no DOM types here). * * M3 F-2 seam fix: `id` mirrors the browser `Gamepad.id` string so the * remap lookup can derive the SDL GUID keyed by device identity (not by * slot index, which is unstable across reconnects). */ export interface RawGamepadStub { readonly index: number; readonly id: string; readonly connected: boolean; readonly mapping: string; readonly buttons: readonly { readonly value: number; readonly pressed: boolean; }[]; readonly axes: readonly number[]; } /** * Diff prev vs cur frames for all gamepad slots. Returns a flat * GamepadSlotSample[] array keyed by gamepad.index. * * - Standard-mapping slots produce GamepadSlotSample with edge sets filled * from prev vs cur pressed-set delta. * - Non-standard slots: when `remapLookup` returns mapping tokens for the * gamepad id, raw HID indices are re-projected onto the standard layout * and the slot reports standardMapping=true (D-1 semantic redefinition). * With no lookup or no match, the slot reports standardMapping=false with * empty readpoints and connected=true (Feat1 behaviour, AC-04). * - Disconnected slots (in prev but not in cur) produce no entry: a slot * absent from the sample reads as connected=false. * - Null entries in the browser getGamepads() array are skipped by the * caller before calling this function. * * @param remapLookup - Optional acquisition-layer normalizer. Given a * browser Gamepad.id, returns SDL mapping tokens or null. Only consulted * for non-standard-mapping gamepads (D-1 option A). */ export declare function diffGamepadFrame(prev: ReadonlyMap, curGamepads: readonly RawGamepadStub[], remapLookup?: (gamepadId: string) => MappingTokens | null): GamepadSlotSample[]; //# sourceMappingURL=gamepad-frame.d.ts.map