import type { DomicileHost } from "../domicile-host"; import type { On } from "./subscribe"; import type { System } from "./system-calls"; export type ShellListeners = { optionschange: () => void; }; export type ShellNamespace = { /** * The config's `shell_options`, unchecked: `undefined` until the compositor * says. Check them against the shell's declaration with `watchShellOptions`. */ readonly options: Readonly> | undefined; /** * Hear each command `domicile send-shell` sends, describing the commands * this page runs and the keys that run them. Answer each with `answer`. */ commands: System["shellCommands"]; /** * Say this page ran the command numbered `sent`, with what it printed if * anything, or why not. */ answer: System["answerShellCommand"]; /** * Open links of these schemes, such as `mailto`, for the desktop, instead * of the application that opens the scheme: hear each one `domicile open` * (and so `xdg-open` and applications' links) and the Email portal hand * over. The page that claimed a scheme last gets its links. Links a page * in a browser window opens arrive as `WEBVIEW_EXTERNAL_APP_EVENT` instead. */ links: System["claimLinks"]; on: On; }; export type ShellHost = Pick; export declare const shell: (host: ShellHost, calls: Pick) => ShellNamespace;