Creates a new SettingsViewModel instance and loads initial settings.
The Redux store for state management
Service for handling settings persistence and logic
Works out what changing a keyboard shortcut comes to
The page the dialog should open on, when its opener asked for one.
Read once by the dialog as it mounts. It is not in Redux because the dialog reads this view model directly rather than subscribing to the store, so a dispatch would not reach it — the same reason the tactile connection state is held outside the store.
The requested section, or null when the opener had no preference
Current state of the connection to a tactile graphics display.
Reports whether this browser offers WebMCP, so the dialog shows the agent-tools setting only where it can do something.
True when the browser can take MAIDR's WebMCP tools
Disposes the view model and resets settings state.
Loads settings from storage and updates the state.
Saves settings, updates state, and closes the settings modal.
The settings to save
Saves settings and updates the state without closing the modal.
The settings to save
Resets settings to default values and updates the state.
The shortcuts the Keyboard Shortcuts tab lists, with the keys the dialog's unsaved edits give them.
These return rather than dispatch, like the tactile state below: the dialog holds its edits in its own state until Save, and a changed shortcut is one of those edits.
The shortcuts as the dialog's edits have them
Every shortcut the reader may change, grouped
Gives a command the shortcut the reader pressed.
The command to rebind
The new shortcut, as hotkeys-js would bind it
The shortcuts as the dialog's edits have them
What happened, what to announce, and the edits after it
Puts one command's default shortcut back.
The command to restore
The shortcuts as the dialog's edits have them
What happened, what to announce, and the edits after it
Puts every default shortcut back.
The shortcuts as the dialog's edits have them
What happened, what to announce, and the edits after it
Subscribes to changes in the tactile display connection.
Settings reads this view model directly rather than through a Redux selector, so connection progress reaches the dialog through this subscription instead of a store update the dialog would not re-render for.
Called with each new connection state
A disposable that ends the subscription
Reports whether the page can reach a tactile display over one transport.
The connection to test
Fetches what connecting to a tactile display would otherwise wait on, so the connect click is not spent waiting for it: the DotPad SDK for a DotPad, nothing for a Monarch.
The device the reader picked, or null when none yet
Opens the browser's device picker and connects to a tactile display.
Must be reached synchronously from the user's click: the browser only shows the picker while a gesture is still in progress, and anything awaited first spends that activation.
Whether to look for a DotPad over Bluetooth or USB, or for a Monarch over WebHID
The connection state once the attempt settles
Disconnects the tactile display.
ViewModel for managing application settings and configuration.