UNPKG

1.42 kBJavaScriptView Raw
1/**
2 * @license
3 * Copyright 2020 Google LLC
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7import * as Blockly from 'blockly/core';
8
9import {DebugDrawer} from './debugDrawer';
10import {createNewRenderer} from './debug';
11import {generateFieldTestBlocks} from './generateFieldTestBlocks';
12import {populateRandom} from './populateRandom';
13import {downloadWorkspaceScreenshot} from './screenshot';
14import {spaghetti} from './spaghetti';
15import * as logger from './logger';
16import * as testHelpers from './test_helpers.mocha';
17import {toolboxTestBlocksInit, toolboxTestBlocks} from '@blockly/block-test';
18import toolboxCategories from './toolboxCategories';
19import toolboxSimple from './toolboxSimple';
20
21let addGUIControls;
22let addCodeEditor;
23let createPlayground;
24if (typeof window !== 'undefined') {
25 addGUIControls = require('./playground/options').addGUIControls;
26 addCodeEditor = require('./playground/monaco').addCodeEditor;
27 createPlayground = require('./playground/').createPlayground;
28}
29
30// Export Blockly into the global namespace to make it easier to debug from the
31// console.
32globalThis.Blockly = Blockly;
33
34export {
35 addCodeEditor,
36 addGUIControls,
37 createNewRenderer,
38 createPlayground,
39 DebugDrawer,
40 downloadWorkspaceScreenshot,
41 generateFieldTestBlocks,
42 populateRandom,
43 logger,
44 spaghetti,
45 testHelpers,
46 toolboxCategories,
47 toolboxSimple,
48 toolboxTestBlocks,
49 toolboxTestBlocksInit,
50};