@blockly/keyboard-navigation
Version:
A plugin for keyboard navigation.
89 lines • 2.77 kB
TypeScript
/**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import * as Blockly from 'blockly/core';
/**
* Invisible icon that acts as an anchor for a move indicator bubble.
*/
export declare class MoveIcon implements Blockly.IIcon, Blockly.IHasBubble {
private sourceBlock;
private moveIndicator;
static readonly type: Blockly.icons.IconType<Blockly.IIcon>;
/**
* Creates a new MoveIcon instance.
*
* @param sourceBlock The block this icon is attached to.
*/
constructor(sourceBlock: Blockly.BlockSvg);
/**
* Returns the type of this icon.
*/
getType(): Blockly.icons.IconType<MoveIcon>;
/**
* Returns the weight of this icon, which controls its position relative to
* other icons.
*
* @returns The weight of this icon.
*/
getWeight(): number;
/**
* Returns the size of this icon.
*
* @returns A rect with negative width and no height to offset the default
* padding applied to icons.
*/
getSize(): Blockly.utils.Size;
/**
* Returns whether this icon is visible when its parent block is collapsed.
*
* @returns False since this icon is never visible.
*/
isShownWhenCollapsed(): boolean;
/**
* Returns whether this icon can be clicked in the flyout.
*
* @returns False since this icon is invisible and not clickable.
*/
isClickableInFlyout(): boolean;
/**
* Returns whether this icon's attached bubble is visible.
*
* @returns True because this icon only exists to host its bubble.
*/
bubbleIsVisible(): boolean;
/**
* Returns this icon's bubble.
*/
getBubble(): Blockly.IBubble | null;
/**
* Called when the location of this icon's block changes.
*
* @param blockOrigin The new location of this icon's block.
*/
onLocationChange(blockOrigin: Blockly.utils.Coordinate): void;
/**
* Disposes of this icon.
*/
dispose(): void;
applyColour(): void;
hideForInsertionMarker(): void;
updateEditable(): void;
updateCollapsed(): void;
setOffsetInBlock(): void;
onClick(): void;
setBubbleVisible(visible: boolean): Promise<void>;
initView(pointerDownListener: (e: PointerEvent) => void): void;
/** See IFocusableNode.getFocusableElement. */
getFocusableElement(): HTMLElement | SVGElement;
/** See IFocusableNode.getFocusableTree. */
getFocusableTree(): Blockly.IFocusableTree;
/** See IFocusableNode.onNodeFocus. */
onNodeFocus(): void;
/** See IFocusableNode.onNodeBlur. */
onNodeBlur(): void;
/** See IFocusableNode.canBeFocused. */
canBeFocused(): boolean;
}
//# sourceMappingURL=move_icon.d.ts.map