ShellState beta
Class of @v12-engine/editor
export declare class ShellStateWhat is open in the editor's interface, apart from its panels (those are the dock's): a dialog, the list of keys, the tour, the command palette, the tuning box. Owned by the page that draws the editor and handed to it, so that a headless editor has the same state and nothing reads it. Each is a signal inside: what draws them follows it
Members
assetsFocus
get assetsFocus(): string | undefined;
set assetsFocus(file: string | undefined);The file the Assets panel shows first, picked: what openAssets was asked for before the panel was open
close
close(): void;Closes the dialog that is open
dialog
get dialog(): ShellDialogId | undefined;The dialog that is open, if one is
folds
readonly folds: FoldAnchors;The folds of the panels drawn, for revealFold to find
open
open<K extends ShellDialogId>(id: K, ...args: ShellDialogArgs<K>): void;Opens a dialog (the one open is replaced)
openPalette
openPalette(query?: string, from?: Element | null): void;Opens the command palette, with query typed, from where the keyboard is: in a panel, that panel's come first and the keyboard goes back to it before what is picked is done
paletteFrom
paletteFrom?: HTMLElement;What had the keyboard as the palette opened, in a panel: given it back before what is picked is done (the panel's keys ask for it)
paletteOpen
get paletteOpen(): boolean;
set paletteOpen(open: boolean);Whether the command palette (Ctrl+K) is open. Closed, what it was opened with (openPalette) goes
palettePanel
palettePanel?: string;The panel the keyboard was in as the palette opened: its own come first (EditorSearch.find's first)
paletteQuery
paletteQuery: string;What the command palette starts with typed (> for what the editor does alone, Ctrl+Shift+P)
prefabNaming
get prefabNaming(): ShellDialogs['prefab-name'] | undefined;What the prefab-name dialog was opened with, and what the Replace with dialog was: kept after they close, for the dialog to show while it goes
replacing
get replacing(): ShellDialogs['replace'] | undefined;What the Replace with dialog was last opened with, if it ever was
shortcutsShown
get shortcutsShown(): boolean;
set shortcutsShown(shown: boolean);Whether the list of every key is shown (?)
strip
strip?: (id: string) => boolean;Picks a tool of the strip by its id there, while the strip of tools is drawn (EditorClient.pickStripTool): set by the strip, taken away as it goes
tourShown
get tourShown(): boolean;
set tourShown(shown: boolean);Whether the tour of the editor is going on (Help › A tour of the editor)
tuningOpen
get tuningOpen(): boolean;
set tuningOpen(open: boolean);Whether the tuning of a game played here (its tunables, a scenario saved) is open over it: shut until asked