diff --git a/core/blockly.ts b/core/blockly.ts index 0682f729d24..71c19f77d99 100644 --- a/core/blockly.ts +++ b/core/blockly.ts @@ -104,7 +104,6 @@ import {IRegistrable} from './interfaces/i_registrable.js'; import {IRegistrableField} from './interfaces/i_registrable_field.js'; import {ISelectable} from './interfaces/i_selectable.js'; import {ISelectableToolboxItem} from './interfaces/i_selectable_toolbox_item.js'; -import {ISerializer as SerializerInterface} from './interfaces/i_serializer.js'; import {IStyleable} from './interfaces/i_styleable.js'; import {IToolbox} from './interfaces/i_toolbox.js'; import {IToolboxItem} from './interfaces/i_toolbox_item.js'; @@ -134,12 +133,7 @@ import * as thrasos from './renderers/thrasos/thrasos.js'; import * as zelos from './renderers/zelos/zelos.js'; import {Scrollbar} from './scrollbar.js'; import {ScrollbarPair} from './scrollbar_pair.js'; -import * as serializationBlocks from './serialization/blocks.js'; -import * as serializationExceptions from './serialization/exceptions.js'; -import * as serializationPriorities from './serialization/priorities.js'; -import * as serializationRegistry from './serialization/registry.js'; -import * as serializationVariables from './serialization/variables.js'; -import * as serializationWorkspaces from './serialization/workspaces.js'; +import * as serialization from './serialization.js'; import * as ShortcutItems from './shortcut_items.js'; import {ShortcutRegistry} from './shortcut_registry.js'; import {Theme} from './theme.js'; @@ -157,7 +151,6 @@ import {Trashcan} from './trashcan.js'; import * as utils from './utils.js'; import * as colour from './utils/colour.js'; import * as deprecation from './utils/deprecation.js'; -import * as svgMath from './utils/svg_math.js'; import * as toolbox from './utils/toolbox.js'; import {VariableMap} from './variable_map.js'; import {VariableModel} from './variable_model.js'; @@ -743,12 +736,4 @@ export {config}; export const connectionTypes = ConnectionType; export {inject}; export {inputTypes}; -export namespace serialization { - export const blocks = serializationBlocks; - export const exceptions = serializationExceptions; - export const priorities = serializationPriorities; - export const registry = serializationRegistry; - export const variables = serializationVariables; - export const workspaces = serializationWorkspaces; - export type ISerializer = SerializerInterface; -} +export {serialization}; diff --git a/core/serialization.ts b/core/serialization.ts new file mode 100644 index 00000000000..991b022adeb --- /dev/null +++ b/core/serialization.ts @@ -0,0 +1,29 @@ +/** + * @license + * Copyright 2022 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +/** + * Serialization methods. + */ +import * as goog from '../closure/goog/goog.js'; +goog.declareModuleId('Blockly.serialization'); + +import * as blocks from './serialization/blocks.js'; +import * as exceptions from './serialization/exceptions.js'; +import * as priorities from './serialization/priorities.js'; +import * as registry from './serialization/registry.js'; +import * as variables from './serialization/variables.js'; +import * as workspaces from './serialization/workspaces.js'; +import {ISerializer} from './interfaces/i_serializer.js'; + +export { + blocks, + exceptions, + priorities, + registry, + variables, + workspaces, + ISerializer, +};