mirror of
https://github.com/google/blockly.git
synced 2026-01-11 10:57:07 +01:00
...and rename Blockly.blocks.all (blocks/all.js) to Blockly.libraryBlocks (blocks/blocks.js BREAKING CHANGE: (only) because the exports object from the `blocks_compressed.js` chunk will be accessed as `Blockly.libraryBlocks` instead of `Blockly.blocks.all` when the chunk is loaded in a browser via a `<script>` tag. There will be no changes visible when the chunk is loaded via ES module `import` or CJS `require`.
49 lines
988 B
JavaScript
49 lines
988 B
JavaScript
/**
|
|
* @license
|
|
* Copyright 2021 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
/**
|
|
* @fileoverview Test blocks for advanced compilation.
|
|
*/
|
|
'use strict';
|
|
|
|
goog.provide('Blockly.libraryBlocks.testBlocks');
|
|
|
|
goog.require('Blockly');
|
|
|
|
Blockly.defineBlocksWithJsonArray([
|
|
{
|
|
'type': 'test_style_hex1',
|
|
'message0': 'Block color: Bright purple %1 %2 %3 %4',
|
|
'args0': [
|
|
{
|
|
'type': 'field_input',
|
|
'name': 'TEXT',
|
|
'text': '#992aff',
|
|
},
|
|
{
|
|
'type': 'field_dropdown',
|
|
'name': 'DROPDOWN',
|
|
'options': [
|
|
['option', 'ONE'],
|
|
['option', 'TWO'],
|
|
],
|
|
},
|
|
{
|
|
'type': 'field_checkbox',
|
|
'name': 'NAME',
|
|
'checked': true,
|
|
},
|
|
{
|
|
'type': 'input_value',
|
|
'name': 'NAME',
|
|
},
|
|
],
|
|
'previousStatement': null,
|
|
'nextStatement': null,
|
|
'colour': '#992aff',
|
|
}
|
|
]);
|