/** * @license * Copyright 2024 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import * as Blockly from 'blockly/core'; /** Plugin for keyboard navigation. */ export declare class KeyboardNavigation { /** The workspace. */ protected workspace: Blockly.WorkspaceSvg; /** Keyboard navigation controller instance for the workspace. */ private navigationController; /** Cursor for the main workspace. */ private cursor; /** * Focus ring in the workspace. */ private workspaceFocusRing; /** * Selection ring inside the workspace. */ private workspaceSelectionRing; /** * Used to restore monkey patch. */ private oldWorkspaceResize; /** * Constructs the keyboard navigation. * * @param workspace The workspace that the plugin will be added to. * @param options Options for plugin * @param options.allowCrossWorkspacePaste If true, will allow paste * option to appear enabled when pasting in a different workspace * than was copied from. Defaults to false. Set to true if using * cross-tab-copy-paste plugin or similar. */ constructor(workspace: Blockly.WorkspaceSvg, options?: { allowCrossWorkspacePaste: boolean; }); private resizeWorkspaceRings; private resizeFocusRingInternal; /** * Disables keyboard navigation for this navigator's workspace. */ dispose(): void; /** * Toggle visibility of a help dialog for the keyboard shortcuts. */ toggleShortcutDialog(): void; /** * Registers a specific flyout cursor that allows navigation to * flyout labels and buttons. */ static registerFlyoutCursor(): void; /** * Registers a default toolbox implementation that doesn't handle * keydown events, since we now handle them in this plugin. If you * use the default toolbox, call this function before calling * `Blockly.inject`. If you use a custom toolbox, override the * `onKeyDown_` method in your toolbox implementation to make it a no-op. */ static registerNavigationDeferringToolbox(): void; /** * Register CSS used by the plugin. * This is broken up into sections by purpose, with some notes about * where it should eventually live. * Must be called before `Blockly.inject`. */ static registerKeyboardNavigationStyles(): void; } //# sourceMappingURL=index.d.ts.map