{
  "exports": [
    {
      "doc": "Default inspector view used for any peripheral that has no domain-specific\nview registered in `PERIPHERAL_VIEWS`. Renders the raw snapshot field map,\npretty-printing any JSON-string fields. This is what makes \"implement the\ninspector, see it in the UI\" work before a custom view exists.\n\nAccepts the uniform PeripheralViewProps shape, so it can stand in\nfor any registered view.",
      "examples": [
        "<GenericInspector\n  name=\"uicr\"\n  events={peripheralEvents}\n  refreshKey={snapshotVersion}\n  getSnapshot={() => getPeripheralSnapshot(\"uicr\")}\n  sendCommand={(cmd) => sendPeripheralCommand(\"uicr\", cmd)}\n/>"
      ],
      "kind": "component",
      "name": "GenericInspector",
      "props": [
        {
          "doc": "Peripheral name as reported by the machine (e.g. \"kmu\", \"uicr\").",
          "name": "name",
          "required": true,
          "type": "string"
        },
        {
          "doc": "All peripheral events seen so far; the view filters for the ones it cares about.",
          "name": "events",
          "required": true,
          "type": "PeripheralEvent[]"
        },
        {
          "doc": "Monotonic counter that increments whenever new events arrive.",
          "name": "refreshKey",
          "required": true,
          "type": "number"
        },
        {
          "doc": "Pull the current snapshot for this peripheral (null if unavailable).",
          "name": "getSnapshot",
          "required": true,
          "type": "() => PeripheralSnapshot | null"
        },
        {
          "doc": "Send a command to this peripheral's inspector.",
          "name": "sendCommand",
          "required": true,
          "type": "(cmd: { name: string; params: Record<string, string> }) => void"
        }
      ],
      "signature": "function GenericInspector(props: PeripheralViewProps): JSX.Element",
      "slug": "genericinspector"
    },
    {
      "doc": "Optional human-friendly labels for the selector. Unknown peripherals fall\nback to an upper-cased name.",
      "kind": "constant",
      "name": "PERIPHERAL_LABELS",
      "signature": "const PERIPHERAL_LABELS: Record<string, string>",
      "slug": "peripheral-labels"
    },
    {
      "doc": "Registry mapping a peripheral name (as reported by the machine) to a\ndomain-specific inspector view. A peripheral without an entry here still\nappears in the list and is rendered with the generic fallback view.\n\nTo add a richer view for a peripheral: write a component that accepts\n`PeripheralViewProps`, then add one line here.",
      "kind": "constant",
      "name": "PERIPHERAL_VIEWS",
      "signature": "const PERIPHERAL_VIEWS: Record<string, ComponentType<PeripheralViewProps>>",
      "slug": "peripheral-views"
    },
    {
      "doc": "Display label for a peripheral name: registered label or upper-cased name.",
      "kind": "function",
      "name": "peripheralLabel",
      "returns": "string",
      "signature": "function peripheralLabel(name: string): string",
      "slug": "peripherallabel"
    },
    {
      "doc": "Generic peripheral inspector panel. A permanent section (like Display and\nConsole): it always renders, lists whatever inspectable peripherals the live\nmachine exposes, and shows a domain-specific view when registered, otherwise\nthe generic fallback. Empty/error states keep it visible and diagnosable.",
      "examples": [
        "const { peripheralList, peripheralEvents, peripheralError,\n        snapshotVersion, getPeripheralSnapshot, sendPeripheralCommand } = useVemu();\n<PeripheralPanel\n  peripherals={peripheralList}\n  events={peripheralEvents}\n  error={peripheralError}\n  refreshKey={snapshotVersion}\n  getSnapshot={getPeripheralSnapshot}\n  sendCommand={sendPeripheralCommand}\n/>"
      ],
      "kind": "component",
      "name": "PeripheralPanel",
      "props": [
        {
          "doc": "Names of inspectable peripherals reported by the running machine.",
          "name": "peripherals",
          "required": true,
          "type": "string[]"
        },
        {
          "doc": "All peripheral events seen so far (passed through to the selected view).",
          "name": "events",
          "required": true,
          "type": "PeripheralEvent[]"
        },
        {
          "doc": "Build/exposure error to surface (instead of a silent empty panel).",
          "name": "error",
          "required": false,
          "type": "string | null"
        },
        {
          "doc": "Monotonic counter that bumps when new events arrive.",
          "name": "refreshKey",
          "required": true,
          "type": "number"
        },
        {
          "doc": "Pull the current snapshot for a peripheral by name (null if unavailable).",
          "name": "getSnapshot",
          "required": true,
          "type": "(name: string) => PeripheralSnapshot | null"
        },
        {
          "doc": "Send a command to a peripheral's inspector.",
          "name": "sendCommand",
          "required": true,
          "type": "(name: string, cmd: { name: string; params: Record<string, string> }) => void"
        }
      ],
      "signature": "function PeripheralPanel(props: PeripheralPanelProps): JSX.Element",
      "slug": "peripheralpanel"
    },
    {
      "doc": "Vertical list of inspectable peripherals (the left pane of\nPeripheralPanel). Renders human-friendly labels via\n`peripheralLabel` and highlights the current selection.",
      "examples": [
        "const [selected, setSelected] = useState<string | null>(null);\n<PeripheralSelector peripherals={[\"kmu\", \"uicr\"]} selected={selected} onSelect={setSelected} />"
      ],
      "kind": "component",
      "name": "PeripheralSelector",
      "props": [
        {
          "doc": "Names of the peripherals to list, in display order.",
          "name": "peripherals",
          "required": true,
          "type": "string[]"
        },
        {
          "doc": "Currently selected peripheral name, or null when nothing is selected.",
          "name": "selected",
          "required": true,
          "type": "string | null"
        },
        {
          "doc": "Called with the peripheral name when the user clicks an entry.",
          "name": "onSelect",
          "required": true,
          "type": "(name: string) => void"
        }
      ],
      "signature": "function PeripheralSelector(props: PeripheralSelectorProps): JSX.Element",
      "slug": "peripheralselector"
    },
    {
      "doc": "Uniform props every peripheral inspector view receives.\nDomain-specific views (KMU, UICR) and the generic fallback all implement\nthis interface, so adding a new view is: write a component matching these\nprops + register it in peripheralViews.tsx.",
      "fields": [
        {
          "doc": "Peripheral name as reported by the machine (e.g. \"kmu\", \"uicr\").",
          "name": "name",
          "type": "string"
        },
        {
          "doc": "All peripheral events seen so far; the view filters for the ones it cares about.",
          "name": "events",
          "type": "PeripheralEvent[]"
        },
        {
          "doc": "Monotonic counter that increments whenever new events arrive.",
          "name": "refreshKey",
          "type": "number"
        },
        {
          "doc": "Pull the current snapshot for this peripheral (null if unavailable).",
          "name": "getSnapshot",
          "type": "() => PeripheralSnapshot | null"
        },
        {
          "doc": "Send a command to this peripheral's inspector.",
          "name": "sendCommand",
          "type": "(cmd: { name: string; params: Record<string, string> }) => void"
        }
      ],
      "kind": "interface",
      "name": "PeripheralViewProps",
      "signature": "interface PeripheralViewProps",
      "slug": "peripheralviewprops"
    },
    {
      "doc": "Core VEMU hook. Manages wasm init, board selection, firmware loading,\nthe RAF render loop, UART I/O, and peripheral inspector state.",
      "examples": [
        "function Emu() {\n  const { boards, selectedBoard, setSelectedBoard, loadProgram,\n          hasVideo, setDraw, setUartSink, sendUart } = useVemu();\n  return (\n    <>\n      <select value={selectedBoard} onChange={(e) => setSelectedBoard(e.target.value)}>\n        {boards.map((b) => <option key={b.id} value={b.id}>{b.name}</option>)}\n      </select>\n      <button onClick={async () => {\n        const bytes = new Uint8Array(await (await fetch(\"/demo.elf\")).arrayBuffer());\n        loadProgram(bytes, \"elf\");\n      }}>Run</button>\n      <VemuCanvas hasVideo={hasVideo} setDraw={setDraw} />\n      <VemuTerminal setUartSink={setUartSink} sendUart={sendUart} />\n    </>\n  );\n}"
      ],
      "kind": "hook",
      "name": "useVemu",
      "returns": "UseVemuResult",
      "signature": "function useVemu(options?: { loadModule?: () => Promise<VemuLoader> }): UseVemuResult",
      "slug": "usevemu"
    },
    {
      "doc": "Everything useVemu returns: emulator status, board selection,\nprogram/run controls, video + UART wiring callbacks, and the peripheral\ninspector surface.",
      "fields": [
        {
          "doc": "Current emulator lifecycle state.",
          "name": "status",
          "type": "VemuStatus"
        },
        {
          "doc": "Boards compiled into the loaded runtime.",
          "name": "boards",
          "type": "BoardInfo[]"
        },
        {
          "doc": "Id of the currently selected board (empty string until boards are listed).",
          "name": "selectedBoard",
          "type": "string"
        },
        {
          "doc": "Select a board by id; instantiates a fresh (non-running) machine for it.",
          "name": "setSelectedBoard",
          "type": "Dispatch<SetStateAction<string>>"
        },
        {
          "doc": "True once the running machine has produced at least one video frame.",
          "name": "hasVideo",
          "type": "boolean"
        },
        {
          "doc": "Human-readable simulated clock speed (e.g. \"4.2 MHz\"); empty while not running.",
          "name": "ips",
          "type": "string"
        },
        {
          "doc": "Load a program (ROM/ELF/binary) and start running, optionally switching board first.",
          "name": "loadProgram",
          "type": "(data: Uint8Array, kind: ProgramKind, boardOverride?: string) => void"
        },
        {
          "doc": "Load a raw UICR image (uicr.bin) into the running machine's UICR region.\n Returns false when no machine is built or the board has no UICR.\n Not persisted — re-apply after loading a new program image.",
          "name": "loadUicr",
          "type": "(data: Uint8Array) => boolean"
        },
        {
          "doc": "Pause the run loop (status returns to \"ready\").",
          "name": "stop",
          "type": "() => void"
        },
        {
          "doc": "Reset the machine and restart with the last loaded program.",
          "name": "reset",
          "type": "() => void"
        },
        {
          "doc": "Discard the current machine and rebuild the selected board with empty flash.",
          "name": "eraseAll",
          "type": "() => void"
        },
        {
          "doc": "Register the callback that renders video frames (wired up by `VemuCanvas`).",
          "name": "setDraw",
          "type": "(cb: (f: VemuFrame) => void) => void"
        },
        {
          "doc": "Register the sink for UART output bytes (wired up by `VemuTerminal`).",
          "name": "setUartSink",
          "type": "(cb: (b: Uint8Array) => void) => void"
        },
        {
          "doc": "Send UART input bytes to the running machine.",
          "name": "sendUart",
          "type": "(bytes: Uint8Array) => void"
        },
        {
          "doc": "Names of inspectable peripherals exposed by the current machine.",
          "name": "peripheralList",
          "type": "string[]"
        },
        {
          "doc": "Rolling buffer (last 100) of peripheral events emitted by the machine.",
          "name": "peripheralEvents",
          "type": "PeripheralEvent[]"
        },
        {
          "doc": "Build/exposure error to surface in the peripheral panel, or null.",
          "name": "peripheralError",
          "type": "string | null"
        },
        {
          "doc": "Monotonic counter that bumps when inspector snapshots should be re-pulled.",
          "name": "snapshotVersion",
          "type": "number"
        },
        {
          "doc": "Pull the current snapshot for a peripheral by name (null if unavailable).",
          "name": "getPeripheralSnapshot",
          "type": "(name: string) => PeripheralSnapshot | null"
        },
        {
          "doc": "Send a command to a peripheral's inspector.",
          "name": "sendPeripheralCommand",
          "type": "(name: string, cmd: { name: string; params: Record<string, string> }) => void"
        }
      ],
      "kind": "interface",
      "name": "UseVemuResult",
      "signature": "interface UseVemuResult",
      "slug": "usevemuresult"
    },
    {
      "doc": "Pixel-perfect display surface for the emulator's video output. Registers a\ndraw callback that blits each RGBA frame into a 2D canvas, resizing the\nbacking store whenever the frame dimensions change, and shows a \"NO SIGNAL\"\noverlay until the first frame arrives.",
      "examples": [
        "const { hasVideo, setDraw } = useVemu();\n<VemuCanvas hasVideo={hasVideo} setDraw={setDraw} />"
      ],
      "kind": "component",
      "name": "VemuCanvas",
      "props": [
        {
          "doc": "True once the machine has produced a video frame; gates the \"NO SIGNAL\" overlay.",
          "name": "hasVideo",
          "required": true,
          "type": "boolean"
        },
        {
          "doc": "Registers the frame-draw callback with the hook (`useVemu().setDraw`).",
          "name": "setDraw",
          "required": true,
          "type": "(cb: (f: VemuFrame) => void) => void"
        }
      ],
      "signature": "function VemuCanvas(props: VemuCanvasProps): JSX.Element",
      "slug": "vemucanvas"
    },
    {
      "doc": "Optional override for testing / stub mode. Returned by the `loadModule`\nfactory passed to useVemu to replace the default wasm loading.",
      "fields": [
        {
          "doc": "Constructor used to build emulator instances (the wasm `Emulator` class or a stub).",
          "name": "EmulatorClass",
          "type": "VemuModuleStatic"
        },
        {
          "doc": "Returns the available boards as a JSON-encoded `BoardInfo[]` string.",
          "name": "listBoards",
          "type": "() => string"
        }
      ],
      "kind": "interface",
      "name": "VemuLoader",
      "signature": "interface VemuLoader",
      "slug": "vemuloader"
    },
    {
      "doc": "xterm.js console bound to the emulator's UART. Machine output is written to\nthe terminal; keystrokes are passed through raw (picocom-style) as UART\ninput. Auto-fits to its container and re-fits on resize.",
      "examples": [
        "const { setUartSink, sendUart } = useVemu();\n<VemuTerminal setUartSink={setUartSink} sendUart={sendUart} />"
      ],
      "kind": "component",
      "name": "VemuTerminal",
      "props": [
        {
          "doc": "Registers the UART output sink with the hook (`useVemu().setUartSink`).",
          "name": "setUartSink",
          "required": true,
          "type": "(cb: (b: Uint8Array) => void) => void"
        },
        {
          "doc": "Sends keystrokes to the machine as UART input bytes (`useVemu().sendUart`).",
          "name": "sendUart",
          "required": true,
          "type": "(bytes: Uint8Array) => void"
        }
      ],
      "signature": "function VemuTerminal(props: VemuTerminalProps): JSX.Element",
      "slug": "vemuterminal"
    },
    {
      "doc": "Branded title bar for the VEMU emulator window. Renders the `vemu.` wordmark\nas a link back to https://vemulator.com — every embedding carries attribution.",
      "examples": [
        "<VemuTitleBar />"
      ],
      "kind": "function",
      "name": "VemuTitleBar",
      "returns": "import(\"react\").JSX.Element",
      "signature": "function VemuTitleBar(): import(\"react\").JSX.Element",
      "slug": "vemutitlebar"
    }
  ],
  "generated": {
    "package_version": "0.3.2",
    "tool": "extract-react-api"
  }
}
