1/**2 * Shared translation for the canvas stage's non-gameplay controls.3 *4 * Gameplay keys are owned by src/input.js. This module only describes the5 * vocabulary used by the stage overlays so keyboard, pointer, and public6 * intent dispatch can share the same semantic names.7 */89const KEY_INPUTS = Object.freeze({10 Enter: "confirm",11 Escape: "menu",12 ArrowUp: "up",13 ArrowDown: "down",14 ArrowLeft: "left",15 ArrowRight: "right",16});1718export function overlayInputForKey(key) {19 return KEY_INPUTS[key] || "noop";20}2122export function pauseMenuItems(origin, status = {}) {23 const ids = origin === "index" || origin === "title"24 ? ["resume", "sound", "music", "title"]25 : ["resume", "restart", "index", "workshop", "sound", "music"];26 return ids.map((id) => ({27 id,28 label: id === "sound"29 ? `SOUND ${status.soundOn ? "ON" : "OFF"}`30 : id === "music"31 ? `MUSIC ${status.musicOn ? "ON" : "OFF"}`32 : id.toUpperCase(),33 }));34}