Christopher Allen
51d9dad31f
Re-export Blockly.utils.* submodules from Blockly.utils ( #5465 )
...
* 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.
2021-09-16 18:23:33 +01:00
Aaron Dodson
2ba51d4d75
Migrate Blockly.hueToHex to Blockly.utils.colour.hueToHex ( #5462 )
...
* 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
2021-09-14 14:13:24 -07:00
Christopher Allen
d202ae0201
Don't monkey-patch Blocky.utils.xml.document ( #5461 )
...
Use Blockly.utils.xml.setDocument instead.
2021-09-14 19:55:31 +01:00
Christopher Allen
ff9320f8d9
Migrate core/utils/xml.js to goog.module syntax ( #5459 )
...
* 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.
2021-09-14 15:51:06 +01:00
Christopher Allen
f9d0caa112
Migrate core.global.js to named exports ( #5451 )
...
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
2021-09-14 14:39:29 +01:00
Christopher Allen
a6471c4276
Rename Blockly.utils.IdGenerator to idGenerator and move Blockly.utils.genUid to there ( #5441 )
...
* Rename Blockly.utils.IdGenerator -> idGenerator
* Move genUid from Blockly.utils to Blockly.utils.idGenerator
2021-09-09 17:08:44 +01:00
Christopher Allen
2d89a36e7d
Migrate core/utils/useragent.js to goog.module syntax ( #5435 )
...
* Migrate core/utils/useragent.js to ES6 const/let
* Migrate core/utils/useragent.js to goog.module
* Migrate core/utils/useragent.js named requires
* clang-format core/utils/useragent.js
2021-09-07 18:48:18 +01:00
kozbial
7037a15011
Migrate core/utils/global.js to goog.module
2021-08-19 10:40:26 -07:00
kozbial
8c95da03b5
clang-format core/utils/svg.js
2021-08-19 09:36:57 -07:00
kozbial
cf5c38c3f5
Migrate core/utils/svg.js to goog.module
2021-08-19 09:36:57 -07:00
Aaron Dodson
ee3f4d257b
Migrate core/utils/string.js to goog.module syntax ( #5059 )
...
* Migrate core/utils/string.js to ES6 const/let
* Migrate core/utils/string.js to goog.module
* clang-format core/utils/string.js
* Migrate core/utils/string.js to current exports convention
* Convert two remaining vars to lets in core/utils/string.js
2021-08-12 11:44:08 -07:00
Maribeth Bottorff
13fdf601b7
Merge branch 'goog_module' of github.com:google/blockly into module_aria
2021-08-11 17:22:12 -07:00
Monica Kozbial
bec82da358
Remove require destructuring ( #5294 )
2021-08-03 15:07:14 -07:00
kozbial
800f8784fd
Fix eslint warning from dom.js
2021-07-30 09:37:41 -07:00
Aaron Dodson
c9a0333bfe
Merge pull request #5075 from gonfunko/dom
...
Migrate core/utils/dom.js to goog.module syntax
2021-07-29 12:12:30 -07:00
Maribeth Bottorff
027763e094
Update exports to new agreed syntax
2021-07-27 14:28:13 -07:00
Maribeth Bottorff
86826e363d
Merge branch 'goog_module' of github.com:google/blockly into module_aria
2021-07-27 14:04:46 -07:00
Christopher Allen
f6adf865f2
Migrate core/utils/size.js to goog.module
2021-07-26 23:37:09 +01:00
Aaron Dodson
0e6258ca1a
Migrated to inline exports
2021-07-21 08:17:13 -07:00
alschmiedt
be76e034ca
Merge pull request #5076 from alschmiedt/migrate_utils_toolbox
...
Migrate core/utils/toolbox.js to goog.module syntax
2021-07-20 14:12:55 -07:00
Aaron Dodson
f0fc360bfa
Inline otherwise-unused variable in core/utils/dom.js
2021-07-20 11:30:09 -07:00
alschmiedt
268a83d054
Address PR comments
2021-07-19 13:40:05 -07:00
Aaron Dodson
821cdcef0f
Merge pull request #5060 from gonfunko/style
...
Migrate core/utils/style.js to goog.module syntax
2021-07-19 09:45:03 -07:00
Aaron Dodson
9b5a919212
Convert core/utils/styles.js to inline export style
2021-07-19 09:41:58 -07:00
kozbial
972f3022ed
Migrate core/utils/coordinate.js to goog.module
2021-07-16 12:03:26 -07:00
kozbial
fb7bba3491
Migrate core/utils/coordinate.js to ES6 const/let
2021-07-16 12:03:26 -07:00
kozbial
81b16abb92
Migrate core/utils/metrics.js to goog.module
2021-07-15 17:52:04 -07:00
alschmiedt
fe9273ad5c
clang-format core/utils/toolbox.js
2021-07-15 13:00:45 -07:00
alschmiedt
2ab3bfd4cb
Migrate core/utils/toolbox.js named requires
2021-07-15 12:56:39 -07:00
alschmiedt
d3cc70eb37
Migrate core/utils/toolbox.js to goog.module
2021-07-15 12:56:01 -07:00
alschmiedt
f0d905dde0
Migrate core/utils/toolbox.js to ES6 const/let
2021-07-15 12:55:35 -07:00
Aaron Dodson
07bd3b3c79
clang-format core/utils/dom.js
2021-07-15 08:42:28 -07:00
Aaron Dodson
da81f9b229
Merge branch 'goog_module' of https://github.com/gonfunko/blockly into dom
2021-07-15 08:34:07 -07:00
kozbial
f63bf29b76
clang-format core/utils/colour.js
2021-07-15 07:03:08 -07:00
kozbial
8abfa3d888
Migrate core/utils/colour.js to goog.module
2021-07-15 07:03:08 -07:00
kozbial
426c741e90
Migrate core/utils/colour.js to ES6 const/let
2021-07-15 07:03:08 -07:00
Maribeth Bottorff
9afd937568
Migrate core/utils/aria.js to goog.module
2021-07-14 17:33:01 -07:00
Maribeth Bottorff
0ceee1b775
Update incorrect JsDoc comment.
2021-07-14 16:59:32 -07:00
Maribeth Bottorff
5e31d8d7f3
Migrate core/utils/aria.js to ES6 const/let
2021-07-14 16:58:10 -07:00
kozbial
de2cff80fd
clang-format core/utils/rect.js
2021-07-14 16:13:58 -07:00
kozbial
466a0db809
Migrate core/utils/rect.js to goog.module
2021-07-14 16:13:58 -07:00
Aaron Dodson
0ac3994343
Merge pull request #5062 from gonfunko/svg
...
Migrate core/utils/svg_paths.js to goog.module syntax
2021-07-14 15:59:43 -07:00
Aaron Dodson
1d8f6e903c
Migrate core/utils/dom.js to named requires
2021-07-14 15:38:35 -07:00
kozbial
7cc85d9c4a
clang-format core/utils/math.js
2021-07-14 15:06:03 -07:00
kozbial
06cbde1dba
Migrate core/utils/math.js to goog.module
2021-07-14 15:06:03 -07:00
kozbial
5fbf5fe40d
Migrate core/utils/math.js to ES6 const/let
2021-07-14 15:06:03 -07:00
Aaron Dodson
563defa3ba
Migrate core/utils/dom.js to goog.module
2021-07-14 15:01:16 -07:00
Aaron Dodson
042b235764
Migrate core/utils/dom.js to ES6 const/let
2021-07-14 14:52:17 -07:00
Aaron Dodson
916b49a2e5
clang-format core/utils/svg_paths.js
2021-07-14 14:44:17 -07:00
Aaron Dodson
72a0761312
Migrate core/utils/svg_paths.js to goog.module
2021-07-14 14:43:15 -07:00