Commit Graph

236 Commits

Author SHA1 Message Date
Neil Fraser 90b3f75d82 Remove @author tags (#5601)
Our files are up to a decade old, and have churned so much, that the initial author of the file no longer has much meaning.

Furthermore, this will encourage developers to post to the developer group, rather than emailing Googlers (usually me) directly.
2021-10-15 09:50:46 -07:00
Neil Fraser c929b3015b chore: Convert == to === and != to !== where possible. (#5599) 2021-10-15 09:17:04 -07:00
Monica Kozbial 49bc2b1ae4 Replace namespace annotation with class annotation in files that define a class (#5566) 2021-09-28 15:57:09 -07:00
Monica Kozbial f67214dac5 Update @package annotations (#5558) 2021-09-28 08:55:49 -07:00
Monica Kozbial d8fbe1b05b Add namespace and alias annotations to jsdoc (#5550)
* Add annotations to files under core/events

* Add annotations to files under core/interfaces

* Add annotations to files under core/keyboard_nav

* Add annotations to files under core/renderers

* Add annotations to files under core/serialization

* Add annotations to files under core/theme

* Add annotations to files under core/toolbox

* Add annotations to files under core/utils

* Add annotations to files under core
2021-09-27 14:42:54 -07:00
Aaron Dodson e1310b6464 fix: JSDoc generation for modules without classes 2021-09-22 14:37:55 -07:00
kozbial bbf26e5e6b Fix jsdoc in core/utils/useragent.js 2021-09-21 09:55:38 -07:00
Beka Westberg e954193009 fix: project cereal cleanup (#5398)
* fix: make exception constructors package

* fix: rename blocks.load to blocks.append

* fix: inline docs

* fix: consistency in block serialization

* fix: remove unexported functions

* fix: interface requires

* fix: tag TODO with issue number
2021-09-20 13:08:35 -07:00
Beka Westberg 410365f4a1 feat: add support for defining toolboxes using pure json (#5392)
* feat: add recycling to core

* feat: add support for json block definitions in flyout

* tests: reorganize tests

* tests: add tests for generating contents

* Fixup reycling

* tests: add tests for recycling

* fix: types

* fix: lint

* fix: PR comments

* fix: creating blocks from flyout

* test: add test block to playground

* fix: types

* feat: add support for enabled
2021-09-20 13:08:35 -07:00
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