* chore: move remaining function definitions out of blockly.js
* chore: record renamings
* chore: add aliases to moved function jsdoc
* chore: add deprecation warnings in blockly.js
* chore: fix bad merge
* chore: move functions in response to PR comments
* chore: move isNumber to utils.string
* chore: rename module Blockly.blocks.Lists to ....lists
All the other Blockly.blocks modules have lower-case names. This
one being named with an upper-case initial appears to have been a
typo on my part.
This module name is not mentioned anywhere else in the source code
(though it will be soon!) so no other files need to be edited.
Further, it does not appear anywhere in the last release (which
before PR #5696) so it is not necessary to add an entry in
renamings.js for this change.
* chore(build): Rationalise deps.js, deps.mocha.js
* Include blocks/*.js (Blockly.blocks.*) in tests/deps.js, since
these modules are used in the playground. (They are goog.provide
modules loaded via <script> tags, so their absence from deps.js
does not cause errors - but it will when they are migrated to
goog.module and must be loaded via goog.require.)
* Filter the entries in deps.mocha.js so that it includes only the
additional mocha test modules (i.e. those not mentioned in deps.js
already).
* refactor: Load blocks and generators using goog.require
* chore: move arrayRemove to a new utils.array namespace
* chore: move getBlockTypeCounts out of utils.js
* chore: remove last functions from utils.js
* chore: reorder imports
* chore: add re-export for runAfterPageLoad
* chore: move functions from utils to more specific files
* chore: use new names for utils functions
* chore: run clang-format
* chore: add deprecation warnings back to utils.js
Use Blockly.blocks.* for blocks modules, leaving the Blockly.Blocks
name for the block dictionary object.
This resolves a problem with advanced compilation of Blockly Games,
where, in the compressed output, (the minified name of)
Blockly.Blocks gets overwritten, with the dictionary object defined in
core/blocks.js being replaced by an empty namespace object
created by the provides of Blockly.Blocks.* in blocks/*.js. Without
this fix, some block definitions end up being created in the
dictionary and some on the namespace object—with chaos
predictably ensuing.
* Rename Blockly.Blocks to Blockly.blocks
Because it does not export a type as its default export.
Part of #5073.
* Name default export of Blockly.blocks Blocks.
Use named exports in Blockly.blocks by giving the former default
export the name Blocks.
Part of #5153.
* Reexport Blockly.blocks from blockly.js
* Document the format of renamings.js better.
* Renamed Blockly.connectionTypes to Blockly.ConnectionType
* Renamed core/connection_types.js to connection_type.js
* Add entry to renamings.js for renaming of Blockly.connectionTypes
Co-authored-by: Christopher Allen <cpcallen+git@google.com>
* fix: remove duplicate serialization hook implementations
* feat: add backwards compatibility to field serialization
* feat: add support for serializing old mutator hooks
* fix: build
* fix: refactor field changes into helpers
* fix: typo
* fix: removing xmlns
* tests: add tests for serialization and deserialization of mutator hooks
* fix: switch to early returns
* Move existing tests into new suite
* Add tests for setShadowState
* Add assertions for serialization
* Unskip serialization tests
* Add logic to handle shadows in both systems
* Uncomment tests
* fix: add access modifiers to new comment funcs
* fix: fixup types
* fix: remove addNextBlocks = true
* feat: add real child of shadow errors
* fix: types
* Respect nulls from blocks.save
* Upgrade list blocks to use JSO serialization
* Upgrade logic blocks to use JSO serialization
* Upgrade math blocks to use JSO serialization
* Upgrade text blocks to use JSO serialization
* Upgrade procedure blocks to use JSO serialization
* Add more mutator tests
* Fix firing enabled events
* PR Comments
* Add parameter for recording undo.
This sets up the most common default behavior, but also makes it clear
to people that it is happening, because it might not be expected.
* Add grouping of events
* Add text width caching
* Add disabling workspace resizing
* Add performance optimizations
* Respect nulls from blocks.save
* Cleanup from rebase
* PR Comments
* Cleanup from rebase
* Add tests for serializing connected blocks
* Add serialization of child blocks
* Add tests for not serializing children
* Add options for not serializing children
* Fix types
* Change addNextBlocks to default to true
* Cleanup
* Fix types
* Add basic attribute tests
* Add basic block serialization
* Add more attribute tests
* Change save to use options dictionary
* Add obeying save options
* Add test for data attribute
* Add saving data tag
* Move to ES6 syntax
* Fixup move to es6 syntax
* Declare module
* Format and lint
* Add docs
* Add returning null on insertion markers
* Fixup for move to module
* Switch to other function declarations
* Cleanup for finalized style
* Fix lint and types
* Export State def
* Switch disabled=true to enabled=false
* Migrate core/blockly.js to ES6 const/let
* Migrate core/blockly.js to goog.module
* Migrate core/blockly.js to named requires
* clang-format core/blockly.js
* Consolidate accessors in core/blockly.js
* Add getSelected/setSelected to core/common.js
* Migrate core to use Blockly.common.getSelected/setSelected instead of Blockly.selected
* Migrate demos to use Blockly.common.getSelected/setSelected instead of Blockly.selected
* Remove Blockly.selected
* Use variable instead of calling common.getSelected() multiple times
* Add accessor for selected on Blockly
* Add renaming record for Blockly.selected -> Blockly.common.getSelected/setSelected
* Use Object.defineProperties instead of .defineProperty when
installing get and set accessors for previously-mutable exports.
* Add entries to renamings.js where feasible (i.e., for static rather
than instance properties).
(Don't do blockly.js yet, to avoid merge conflicts.)