/* ====================================================== Glide version: 0.1.52a ====================================================== */ declare const GLIDE_EXCOMMANDS: [ { readonly name: "back"; readonly description: "Go back one page in history"; readonly content: false; readonly repeatable: true; }, { readonly name: "forward"; readonly description: "Go forward one page in history"; readonly content: false; readonly repeatable: true; }, { readonly name: "reload"; readonly description: "Reload the current page"; readonly content: false; readonly repeatable: true; }, { readonly name: "reload_hard"; readonly description: "Reload the current page, bypassing the cache"; readonly content: false; readonly repeatable: true; }, { readonly name: "quit"; readonly description: "Close all windows"; readonly content: false; readonly repeatable: false; }, { readonly name: "clear"; readonly description: "Clear all notifications"; readonly content: false; readonly repeatable: false; }, { readonly name: "set"; readonly description: "Set an option"; readonly args_schema: { readonly name: { readonly type: "string"; readonly position: 0; readonly required: true; }; readonly value: { readonly type: "string"; readonly position: 1; readonly required: true; }; }; readonly content: false; readonly repeatable: false; }, { readonly name: "profile_dir"; readonly description: "Show the current profile directory"; readonly content: false; readonly repeatable: false; }, { readonly name: "config_edit"; readonly description: "Open the config file in the default editor"; readonly content: false; readonly repeatable: false; }, { readonly name: "config_path"; readonly description: "Show the config file path"; readonly content: false; readonly repeatable: false; }, { readonly name: "config_reload"; readonly description: "Reload the config file"; readonly content: false; readonly repeatable: false; }, { readonly name: "config_init"; readonly description: "Initialise a config dir with all the necessary setup"; readonly args_schema: { readonly location: { readonly type: { readonly enum: readonly [ "home", "profile", "cwd" ]; }; readonly required: false; readonly position: 0; }; }; readonly content: false; readonly repeatable: false; }, { readonly name: "css_edit"; readonly description: "Open the userChrome.css file in the default editor"; readonly content: false; readonly repeatable: false; }, { readonly name: "repeat"; readonly description: "Repeat the last invoked command. In general only applies to \"mutative\" commands"; readonly content: false; readonly repeatable: false; }, { readonly name: "map"; readonly description: "Show all mappings"; readonly content: false; readonly repeatable: false; }, { readonly name: "unmap"; readonly description: "Remove a mapping from normal mode"; readonly args_schema: { readonly lhs: { readonly type: "string"; readonly required: true; readonly position: 0; }; }; readonly content: false; readonly repeatable: false; }, { readonly name: "nunmap"; readonly description: "Remove a mapping from normal mode"; readonly args_schema: { readonly lhs: { readonly type: "string"; readonly required: true; readonly position: 0; }; }; readonly content: false; readonly repeatable: false; }, { readonly name: "iunmap"; readonly description: "Remove a mapping from insert mode"; readonly args_schema: { readonly lhs: { readonly type: "string"; readonly required: true; readonly position: 0; }; }; readonly content: false; readonly repeatable: false; }, { readonly name: "tab"; readonly description: "Switch to the given tab index"; readonly args_schema: { readonly tab_index: { readonly type: "integer"; readonly required: true; readonly position: 0; }; }; readonly content: false; readonly repeatable: false; }, { readonly name: "tab_new"; readonly description: "Create a new tab with the given URL or the default new tab page if not provided"; readonly args_schema: { readonly url: { readonly type: "string"; readonly required: false; readonly position: 0; }; }; readonly content: false; readonly repeatable: false; }, { readonly name: "tab_close"; readonly description: "Close the current tab"; readonly content: false; readonly repeatable: true; }, { readonly name: "tab_next"; readonly description: "Switch to the next tab, wrapping around if applicable"; readonly content: false; readonly repeatable: true; }, { readonly name: "tab_prev"; readonly description: "Switch to the previous tab, wrapping around if applicable"; readonly content: false; readonly repeatable: true; }, { readonly name: "commandline_show"; readonly description: "Show the commandline UI"; readonly content: false; readonly args_schema: {}; readonly repeatable: false; }, { readonly name: "commandline_toggle"; readonly description: "Toggle the commandline UI"; readonly content: false; readonly args_schema: {}; readonly repeatable: false; }, { readonly name: "commandline_focus_next"; readonly description: "Focus the next completion in the commandline"; readonly content: false; readonly args_schema: {}; readonly repeatable: false; }, { readonly name: "commandline_focus_back"; readonly description: "Focus the previous completion in the commandline"; readonly content: false; readonly args_schema: {}; readonly repeatable: false; }, { readonly name: "commandline_delete"; readonly description: "Delete the focused commandline completion"; readonly content: false; readonly args_schema: {}; readonly repeatable: false; }, { readonly name: "commandline_accept"; readonly description: "Accept the focused commandline completion"; readonly content: false; readonly args_schema: {}; readonly repeatable: false; }, { readonly name: "url_yank"; readonly description: "Yank the URL of the current tab to the clipboard"; readonly content: false; readonly repeatable: false; }, { readonly name: "echo"; readonly description: "Log the given arguments to the console"; readonly content: false; readonly args_schema: {}; readonly repeatable: false; }, { readonly name: "mode_change"; readonly description: "Change the current mode"; readonly content: false; readonly repeatable: false; readonly args_schema: { readonly mode: { readonly type: { readonly enum: GlideMode[]; }; readonly required: true; readonly position: 0; }; readonly "--automove": { readonly type: { readonly enum: readonly [ "left", "endline" ]; }; readonly required: false; }; readonly "--operator": { readonly type: { readonly enum: readonly [ "d", "c", "r" ]; }; readonly required: false; readonly description: "Only applicable for operator-pending mode"; }; }; }, { readonly name: "caret_move"; readonly description: "Move the text caret"; readonly content: false; readonly repeatable: false; readonly args_schema: { readonly direction: { readonly type: { readonly enum: readonly [ "left", "right", "up", "down" ]; }; readonly required: true; readonly position: 0; }; }; }, { readonly name: "visual_selection_copy"; readonly description: "Copy the currently selected text to the clipboard & change to normal mode"; readonly content: false; readonly repeatable: false; }, { readonly name: "help"; readonly description: "Open the docs"; readonly content: false; readonly repeatable: false; }, { readonly name: "tutor"; readonly description: "Open the Glide tutorial"; readonly content: false; readonly repeatable: false; }, { readonly name: "repl"; readonly description: "Start the config REPL"; readonly content: false; readonly repeatable: false; }, { readonly name: "keys"; readonly description: "Synthesize the given key sequence as if they were actually pressed"; readonly args_schema: { readonly keyseq: { readonly type: "string"; readonly required: true; readonly position: 0; }; }; readonly content: false; readonly repeatable: false; }, { readonly name: "r"; readonly description: "Replace the current character"; readonly content: false; readonly repeatable: false; readonly args_schema: { readonly character: { readonly type: "string"; readonly required: false; readonly position: 0; }; }; }, { readonly name: "scroll_top"; readonly description: "Scroll to the top of the window"; readonly content: true; readonly repeatable: false; }, { readonly name: "scroll_page_down"; readonly description: "Scroll down by 1 page (the size of the viewport)"; readonly content: true; readonly repeatable: false; }, { readonly name: "scroll_page_up"; readonly description: "Scroll up by 1 page (the size of the viewport)"; readonly content: true; readonly repeatable: false; }, { readonly name: "scroll_bottom"; readonly description: "Scroll to the bottom of the window"; readonly content: true; readonly repeatable: false; }, { readonly name: "blur"; readonly description: "Blur the active element"; readonly content: true; readonly repeatable: false; }, { readonly name: "focusinput"; readonly description: "Focus an input element based on the given filter"; readonly content: true; readonly repeatable: false; readonly args_schema: { readonly filter: { readonly type: { readonly enum: readonly [ "last" ]; }; readonly required: true; readonly position: 0; }; }; }, { readonly name: "hint"; readonly description: "Show hint labels for jumping to clickable elements"; readonly content: false; readonly repeatable: false; readonly args_schema: { readonly "-s": { readonly type: "string"; readonly required: false; readonly description: "*Only* show hints for all elements matching this CSS selector"; }; readonly "--include": { readonly type: "string"; readonly required: false; readonly description: "*Also* show hints for all elements matching this CSS selector"; }; readonly "-e": { readonly type: "boolean"; readonly required: false; readonly description: "*Only* show hints for all elements that are editable"; }; readonly "--auto": { readonly type: "boolean"; readonly required: false; readonly description: "If only one hint is generated, automatically activate it."; }; readonly "--action": { readonly type: { readonly enum: readonly [ "click", "newtab-click" ]; }; readonly required: false; }; readonly "--location": { readonly type: { readonly enum: readonly [ "content", "browser-ui" ]; }; readonly required: false; }; }; }, { readonly name: "hints_remove"; readonly description: "Remove all hint labels and exit hint mode"; readonly content: false; readonly repeatable: false; }, { readonly name: "execute_motion"; readonly description: "Used from op-pending mode to execute a motion."; readonly content: true; readonly repeatable: false; }, { readonly name: "motion"; readonly description: "Execute a given motion (internal)"; readonly content: true; readonly repeatable: false; readonly args_schema: { readonly keyseq: { readonly type: { readonly enum: readonly [ "w", "W", "e", "b", "B", "0", "$", "{", "}", "s", "v", "vh", "vl", "vd", "vc", "x", "X", "o" ]; }; readonly required: true; readonly position: 0; }; }; }, { readonly name: "undo"; readonly description: "Undo the most recent edit"; readonly content: false; readonly repeatable: false; }, { readonly name: "redo"; readonly description: "Redo the most recent undo"; readonly content: false; readonly repeatable: false; } ]; export type GlideExcmdName = (typeof GLIDE_EXCOMMANDS)[number]["name"]; export type GlideCommandString = GlideExcmdName | `${GlideExcmdName} ${string}`; // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. declare global { var glide: { ctx: { /** * The currently active mode. */ mode: GlideMode; /** * The URL of the currently focused tab. */ url: URL; /** * The operating system Glide is running on. */ os: "linux" | "win" | "macosx" | "ios" | "android" | "other"; /** * Whether or not the currently focused element is editable. * * This includes but is not limited to `html: