mirror of
https://github.com/google/blockly.git
synced 2026-01-09 01:50:11 +01:00
fix!: delete IASTNodeLocation and friends (#9015)
This commit is contained in:
@@ -40,7 +40,6 @@ import {EndRowInput} from './inputs/end_row_input.js';
|
||||
import {Input} from './inputs/input.js';
|
||||
import {StatementInput} from './inputs/statement_input.js';
|
||||
import {ValueInput} from './inputs/value_input.js';
|
||||
import type {IASTNodeLocation} from './interfaces/i_ast_node_location.js';
|
||||
import {isCommentIcon} from './interfaces/i_comment_icon.js';
|
||||
import {type IIcon} from './interfaces/i_icon.js';
|
||||
import type {
|
||||
@@ -61,7 +60,7 @@ import type {Workspace} from './workspace.js';
|
||||
* Class for one block.
|
||||
* Not normally called directly, workspace.newBlock() is preferred.
|
||||
*/
|
||||
export class Block implements IASTNodeLocation {
|
||||
export class Block {
|
||||
/**
|
||||
* An optional callback method to use whenever the block's parent workspace
|
||||
* changes. This is usually only called from the constructor, the block type
|
||||
|
||||
@@ -39,7 +39,6 @@ import {IconType} from './icons/icon_types.js';
|
||||
import {MutatorIcon} from './icons/mutator_icon.js';
|
||||
import {WarningIcon} from './icons/warning_icon.js';
|
||||
import type {Input} from './inputs/input.js';
|
||||
import type {IASTNodeLocationSvg} from './interfaces/i_ast_node_location_svg.js';
|
||||
import type {IBoundedElement} from './interfaces/i_bounded_element.js';
|
||||
import {IContextMenu} from './interfaces/i_contextmenu.js';
|
||||
import type {ICopyable} from './interfaces/i_copyable.js';
|
||||
@@ -74,7 +73,6 @@ import type {WorkspaceSvg} from './workspace_svg.js';
|
||||
export class BlockSvg
|
||||
extends Block
|
||||
implements
|
||||
IASTNodeLocationSvg,
|
||||
IBoundedElement,
|
||||
IContextMenu,
|
||||
ICopyable<BlockCopyData>,
|
||||
|
||||
@@ -124,9 +124,6 @@ import {FocusableTreeTraverser} from './utils/focusable_tree_traverser.js';
|
||||
|
||||
import {Input} from './inputs/input.js';
|
||||
import {InsertionMarkerPreviewer} from './insertion_marker_previewer.js';
|
||||
import {IASTNodeLocation} from './interfaces/i_ast_node_location.js';
|
||||
import {IASTNodeLocationSvg} from './interfaces/i_ast_node_location_svg.js';
|
||||
import {IASTNodeLocationWithBlock} from './interfaces/i_ast_node_location_with_block.js';
|
||||
import {IAutoHideable} from './interfaces/i_autohideable.js';
|
||||
import {IBoundedElement} from './interfaces/i_bounded_element.js';
|
||||
import {IBubble} from './interfaces/i_bubble.js';
|
||||
@@ -541,9 +538,6 @@ export {
|
||||
Gesture,
|
||||
Grid,
|
||||
HorizontalFlyout,
|
||||
IASTNodeLocation,
|
||||
IASTNodeLocationSvg,
|
||||
IASTNodeLocationWithBlock,
|
||||
IAutoHideable,
|
||||
IBoundedElement,
|
||||
IBubble,
|
||||
|
||||
@@ -17,7 +17,6 @@ import type {BlockMove} from './events/events_block_move.js';
|
||||
import {EventType} from './events/type.js';
|
||||
import * as eventUtils from './events/utils.js';
|
||||
import type {Input} from './inputs/input.js';
|
||||
import type {IASTNodeLocationWithBlock} from './interfaces/i_ast_node_location_with_block.js';
|
||||
import type {IConnectionChecker} from './interfaces/i_connection_checker.js';
|
||||
import * as blocks from './serialization/blocks.js';
|
||||
import {idGenerator} from './utils.js';
|
||||
@@ -26,7 +25,7 @@ import * as Xml from './xml.js';
|
||||
/**
|
||||
* Class for a connection between blocks.
|
||||
*/
|
||||
export class Connection implements IASTNodeLocationWithBlock {
|
||||
export class Connection {
|
||||
/** Constants for checking whether two connections are compatible. */
|
||||
static CAN_CONNECT = 0;
|
||||
static REASON_SELF_CONNECTION = 1;
|
||||
|
||||
@@ -23,8 +23,6 @@ import * as dropDownDiv from './dropdowndiv.js';
|
||||
import {EventType} from './events/type.js';
|
||||
import * as eventUtils from './events/utils.js';
|
||||
import type {Input} from './inputs/input.js';
|
||||
import type {IASTNodeLocationSvg} from './interfaces/i_ast_node_location_svg.js';
|
||||
import type {IASTNodeLocationWithBlock} from './interfaces/i_ast_node_location_with_block.js';
|
||||
import type {IFocusableNode} from './interfaces/i_focusable_node.js';
|
||||
import type {IFocusableTree} from './interfaces/i_focusable_tree.js';
|
||||
import type {IKeyboardAccessible} from './interfaces/i_keyboard_accessible.js';
|
||||
@@ -71,8 +69,6 @@ export type FieldValidator<T = any> = (newValue: T) => T | null | undefined;
|
||||
*/
|
||||
export abstract class Field<T = any>
|
||||
implements
|
||||
IASTNodeLocationSvg,
|
||||
IASTNodeLocationWithBlock,
|
||||
IKeyboardAccessible,
|
||||
IRegistrable,
|
||||
ISerializable,
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
*/
|
||||
// Former goog.module ID: Blockly.FlyoutButton
|
||||
|
||||
import type {IASTNodeLocationSvg} from './blockly.js';
|
||||
import * as browserEvents from './browser_events.js';
|
||||
import * as Css from './css.js';
|
||||
import type {IBoundedElement} from './interfaces/i_bounded_element.js';
|
||||
@@ -34,7 +33,6 @@ import type {WorkspaceSvg} from './workspace_svg.js';
|
||||
*/
|
||||
export class FlyoutButton
|
||||
implements
|
||||
IASTNodeLocationSvg,
|
||||
IBoundedElement,
|
||||
IRenderedElement,
|
||||
IFocusableNode,
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
// Former goog.module ID: Blockly.IASTNodeLocation
|
||||
|
||||
/**
|
||||
* An AST node location interface.
|
||||
*/
|
||||
export interface IASTNodeLocation {}
|
||||
@@ -1,14 +0,0 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
// Former goog.module ID: Blockly.IASTNodeLocationSvg
|
||||
|
||||
import type {IASTNodeLocation} from './i_ast_node_location.js';
|
||||
|
||||
/**
|
||||
* An AST node location SVG interface.
|
||||
*/
|
||||
export interface IASTNodeLocationSvg extends IASTNodeLocation {}
|
||||
@@ -1,22 +0,0 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
// Former goog.module ID: Blockly.IASTNodeLocationWithBlock
|
||||
|
||||
import type {Block} from '../block.js';
|
||||
import type {IASTNodeLocation} from './i_ast_node_location.js';
|
||||
|
||||
/**
|
||||
* An AST node location that has an associated block.
|
||||
*/
|
||||
export interface IASTNodeLocationWithBlock extends IASTNodeLocation {
|
||||
/**
|
||||
* Get the source block associated with this node.
|
||||
*
|
||||
* @returns The source block.
|
||||
*/
|
||||
getSourceBlock(): Block | null;
|
||||
}
|
||||
@@ -21,7 +21,6 @@ import * as common from './common.js';
|
||||
import type {ConnectionDB} from './connection_db.js';
|
||||
import type {Abstract} from './events/events_abstract.js';
|
||||
import * as eventUtils from './events/utils.js';
|
||||
import type {IASTNodeLocation} from './interfaces/i_ast_node_location.js';
|
||||
import type {IConnectionChecker} from './interfaces/i_connection_checker.js';
|
||||
import {IProcedureMap} from './interfaces/i_procedure_map.js';
|
||||
import type {IVariableMap} from './interfaces/i_variable_map.js';
|
||||
@@ -43,7 +42,7 @@ import {deleteVariable, getVariableUsesById} from './variables.js';
|
||||
* Class for a workspace. This is a data structure that contains blocks.
|
||||
* There is no UI, and can be created headlessly.
|
||||
*/
|
||||
export class Workspace implements IASTNodeLocation {
|
||||
export class Workspace {
|
||||
/**
|
||||
* Angle away from the horizontal to sweep for blocks. Order of execution is
|
||||
* generally top to bottom, but a small angle changes the scan to give a bit
|
||||
|
||||
@@ -41,7 +41,6 @@ import type {FlyoutButton} from './flyout_button.js';
|
||||
import {getFocusManager} from './focus_manager.js';
|
||||
import {Gesture} from './gesture.js';
|
||||
import {Grid} from './grid.js';
|
||||
import type {IASTNodeLocationSvg} from './interfaces/i_ast_node_location_svg.js';
|
||||
import {isAutoHideable} from './interfaces/i_autohideable.js';
|
||||
import type {IBoundedElement} from './interfaces/i_bounded_element.js';
|
||||
import {IContextMenu} from './interfaces/i_contextmenu.js';
|
||||
@@ -101,7 +100,6 @@ const ZOOM_TO_FIT_MARGIN = 20;
|
||||
export class WorkspaceSvg
|
||||
extends Workspace
|
||||
implements
|
||||
IASTNodeLocationSvg,
|
||||
IContextMenu,
|
||||
IFocusableNode,
|
||||
IFocusableTree,
|
||||
|
||||
Reference in New Issue
Block a user