* 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.)
* Reexport Blockly.utils.* modules from Blockly.utils
* Update metadata (file sizes) again
blockly_compressed.js has gotten too big for the second time this
quarter. Update the expected file sizes for it so that tests
will continue to pass.
* Add hideChaff() to core/workspace_svg.js
* Mark Blockly.hideChaff as deprecated
* Update uses of Blockly.hideChaff() to WorkspaceSvg.hideChaff() in core
* Update uses of Blockly.hideChaff() to WorkspaceSvg.hideChaff() in demos
* Style and formatting fixes
* Switch from accessor to stub wrapper for Blockly.hideChaff
Co-authored-by: Christopher Allen <cpcallen+github@gmail.com>
Co-authored-by: Christopher Allen <cpcallen+github@gmail.com>
* Move bump objects function into a separate module
* Fix types
* Migrate core/inject.js to ES6 const/let
* Migrate core/inject.js to goog.module and move more functions to bump_objects.js
* Migrate core/inject.js named requires
* clang-format core/inject.js
* Rename private functions
* Move hueToHex to core/utils/colour.js
* Mark Blockly.hueToHex as deprecated and pass calls through to Blockly.utils.colour.hueToHex
* Migrate core to use Blockly.utils.colour.hueToHex
* Migrate demos to use Blockly.utils.colour.hueToHex
* Move bump objects function into a separate module
* Fix types
* Update core/bump_objects.js
Fix missing newline.
Co-authored-by: Christopher Allen <cpcallen+github@gmail.com>
Co-authored-by: Christopher Allen <cpcallen+github@gmail.com>
* Migrate prompt/alert/confirm to dedicated module
* Update core/blockly.js to pass through calls to prompt/alert/confirm to core/dialog.js
* Update calls to Blockly.prompt/alert/confirm to dialog.prompt/alert/confirm
* Fix typo and errant redeclaration of Blockly.prompt
* Clarify JSDoc on customizing Blockly.dialog.alert/confirm/prompt
* Migrate core/utils/xml.js to ES6 const/let
* Migrate core/utils/xml.js to goog.module
The document() function is renamed to getDocument() so as to avoid
shadowing the global of the same name.
* clang-format core/utils/xml.js
* Call monkey-patchable exports.global internally too
This fixes Node test failures due to the monkey-patching of
Blockly.utils.xml.global in scripts/package/node/core.js not being
able to affect the target calls in createElement and createTextNode.
This is part of #5153 but is being prioritised because we want remove
the declareLegacyNamespace calls from the core/utils/*.js modules and
then reexport them explicitly via utils.js, and it turns out that
doing so results in the exports object of this module being passed to
Object.freeze - which fails on the global object, which can't be made
non-extensible!
The new name chosen for the former default export is globalThis, since
it is intended to have the same value as the global variable of that
name; see:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis
Running npm run build:deps in goog_module makes a change to tests/deps.js that was previously committed by PR #5441 but which appears to have been inadvertently undone by #5222.
* Migrate core/tooltip.js to ES6 const/let
* Migrate core/tooltip.js to goog.module
* Migrate core/tooltip.js to named requires
* clang-format core/tooltip.js
* Fix exports of mutable fields in core/tooltip.js
* Don't assign a value when exporting visible in core/tooltip.js
Some files were using Blockly.utils.object.inherits (or .mixin) without
having imported Blockly.utils.object.
Similarly, trashcan.js tried to use utils.Size as a constructor
instead of importing Size from Blockly.utils.Size.
* Migrate core/events/events.js to ES6 const/let
* Migrate core/events/events.js to goog.module
* Migrate core/events/events.js to named requires
* clang-format core/events/events.js
* Migrate Blockly core to use getRecordUndo/setRecordUndo
* Update core/events.js to reflect latest guidance around exporting mutable fields