/** * @license * Copyright 2023 Google LLC * SPDX-License-Identifier: Apache-2.0 */ /** * A toolbox category that provides a search field and displays matching blocks * in its flyout. */ import * as Blockly from 'blockly/core'; /** * A toolbox category that provides a search field and displays matching blocks * in its flyout. */ export declare class ToolboxSearchCategory extends Blockly.ToolboxCategory { private static readonly START_SEARCH_SHORTCUT; static readonly SEARCH_CATEGORY_KIND = "search"; private readonly SEARCH_INPUT_ID; private searchField?; private blockSearcher; /** * Initializes a ToolboxSearchCategory. * * @param categoryDef The information needed to create a category in the * toolbox. * @param parentToolbox The parent toolbox for the category. * @param opt_parent The parent category or null if the category does not have * a parent. */ constructor(categoryDef: Blockly.utils.toolbox.CategoryInfo, parentToolbox: Blockly.IToolbox, opt_parent?: Blockly.ICollapsibleToolboxItem); /** * Initializes the search field toolbox category. * * @returns The
that will be displayed in the toolbox. */ protected createDom_(): HTMLDivElement; /** The ID of the toolbox item must match the ID of the focusable node. */ getId(): string; /** * Registers a shortcut for displaying the toolbox search category. */ private registerShortcut; /** * Returns a list of block types that are present in the toolbox definition. * * @param schema A toolbox item definition. * @param allBlocks The set of all available blocks that have been encountered * so far. */ private getAvailableBlocks; /** * Builds the BlockSearcher index based on the available blocks. */ private initBlockSearcher; /** See IFocusableNode.getFocusableElement. */ getFocusableElement(): HTMLElement | SVGElement; /** See IFocusableNode.onNodeFocus. */ onNodeFocus(): void; /** * Filters the available blocks based on the current query string. */ private matchBlocks; /** * Disposes of this category. */ dispose(): void; } //# sourceMappingURL=toolbox_search.d.ts.map