scratch-gui 4.0.1 → 4.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/.github/workflows/ci-cd.yml +2 -2
  2. package/.nvmrc +1 -1
  3. package/CHANGELOG.md +45 -0
  4. package/dist/extension-worker.js +2 -0
  5. package/dist/extension-worker.js.LICENSE.txt +115 -0
  6. package/dist/extension-worker.js.map +1 -0
  7. package/dist/libraries/backdrops.json +1184 -0
  8. package/dist/libraries/costumes.json +12822 -0
  9. package/dist/libraries/sounds.json +4375 -0
  10. package/dist/libraries/sprites.json +17206 -0
  11. package/dist/scratch-gui.js +2 -1
  12. package/dist/{chunks/833.4bbf5b77396e51699161.js.LICENSE.txt → scratch-gui.js.LICENSE.txt} +30 -34
  13. package/dist/scratch-gui.js.map +1 -1
  14. package/pack/{scratch-gui-4.0.1.tgz → scratch-gui-4.0.7.tgz} +0 -0
  15. package/package.json +18 -23
  16. package/webpack.config.js +14 -52
  17. package/dist/chunks/833.4bbf5b77396e51699161.js +0 -2
  18. package/dist/runtime.js +0 -1
  19. /package/dist/{static/assets/scratch-microbit-1.2.0.30d09ba32a17082ef820.hex → 30d09ba32a17082ef820b57d52d60b7b.hex} +0 -0
  20. /package/dist/chunks/{am-steps.05e308dfe2686151dc0f.js → am-steps.3f73222d41015e1273dd.js} +0 -0
  21. /package/dist/chunks/{ar-steps.e9c85f3dc8e198eaaa12.js → ar-steps.70a4ffe7518d9f51857c.js} +0 -0
  22. /package/dist/chunks/{es-steps.b472eff86dac691d0bfd.js → es-steps.185d2537744e7847f007.js} +0 -0
  23. /package/dist/chunks/{fr-steps.bf4c30e02c2640204cad.js → fr-steps.7625c578b5499e062dee.js} +0 -0
  24. /package/dist/chunks/{ja-steps.5d5046e57e33733a503f.js → ja-steps.4400fdc64e70fbcf1b5d.js} +0 -0
  25. /package/dist/chunks/{pt_BR-steps.ea38088b1861a79930bb.js → pt_BR-steps.766aa6128e16c353d34c.js} +0 -0
  26. /package/dist/chunks/{sw-steps.c55c3dd1761feb3e8d83.js → sw-steps.49b087cb53763f2aac39.js} +0 -0
  27. /package/dist/chunks/{tr-steps.2cf369ed4ed2ef2111d8.js → tr-steps.d8fb1cdaa37d3a809c8d.js} +0 -0
  28. /package/dist/chunks/{uk-steps.e5a4ba6249fdc8c99272.js → uk-steps.138b26382fad2cc80545.js} +0 -0
  29. /package/dist/chunks/{zh_CN-steps.59ad9aafbcf84455c995.js → zh_CN-steps.4367f8310097c6618066.js} +0 -0
  30. /package/dist/chunks/{zh_TW-steps.7210c3dc836e5a46a84f.js → zh_TW-steps.4cdd3358855139a78ea7.js} +0 -0
  31. /package/dist/chunks/{zu-steps.acaf68fcef9e79e74f6b.js → zu-steps.f6818088b2be2d9f5c19.js} +0 -0
@@ -1,8 +1,8 @@
1
1
  /*
2
- object-assign
3
- (c) Sindre Sorhus
4
- @license MIT
5
- */
2
+ object-assign
3
+ (c) Sindre Sorhus
4
+ @license MIT
5
+ */
6
6
 
7
7
  /*
8
8
  object-assign
@@ -12,11 +12,27 @@ object-assign
12
12
 
13
13
  /* @license
14
14
  Papa Parse
15
- v5.3.0
15
+ v5.4.1
16
16
  https://github.com/mholt/PapaParse
17
17
  License: MIT
18
18
  */
19
19
 
20
+ /* @license twgl.js 4.24.0 Copyright (c) 2015, Gregg Tavares All Rights Reserved.
21
+ Available via the MIT license.
22
+ see: http://github.com/greggman/twgl.js for details */
23
+
24
+ /*!
25
+ Copyright (c) 2016 Jed Watson.
26
+ Licensed under the MIT License (MIT), see
27
+ http://jedwatson.github.io/classnames
28
+ */
29
+
30
+ /*!
31
+ Copyright (c) 2018 Jed Watson.
32
+ Licensed under the MIT License (MIT), see
33
+ http://jedwatson.github.io/classnames
34
+ */
35
+
20
36
  /*!
21
37
 
22
38
  JSZip v3.10.1 - A JavaScript class for generating and reading zip files
@@ -29,12 +45,6 @@ JSZip uses the library pako released under the MIT license :
29
45
  https://github.com/nodeca/pako/blob/main/LICENSE
30
46
  */
31
47
 
32
- /*!
33
- Copyright (c) 2016 Jed Watson.
34
- Licensed under the MIT License (MIT), see
35
- http://jedwatson.github.io/classnames
36
- */
37
-
38
48
  /*!
39
49
  * The buffer module from node.js, for the browser.
40
50
  *
@@ -48,24 +58,6 @@ https://github.com/nodeca/pako/blob/main/LICENSE
48
58
  All rights reserved.
49
59
  */
50
60
 
51
- /*!
52
- Copyright (c) 2016 Jed Watson.
53
- Licensed under the MIT License (MIT), see
54
- http://jedwatson.github.io/classnames
55
- */
56
-
57
- /*!
58
- Copyright (c) 2017 Jed Watson.
59
- Licensed under the MIT License (MIT), see
60
- http://jedwatson.github.io/classnames
61
- */
62
-
63
- /*!
64
- * @license twgl.js 4.4.0 Copyright (c) 2015, Gregg Tavares All Rights Reserved.
65
- * Available via the MIT license.
66
- * see: http://github.com/greggman/twgl.js for details
67
- */
68
-
69
61
  /*!
70
62
  * Adapted from jQuery UI core
71
63
  *
@@ -211,11 +203,11 @@ and limitations under the License.
211
203
 
212
204
  /*! @babel/runtime/helpers/possibleConstructorReturn */
213
205
 
214
- /*! @babel/runtime/helpers/slicedToArray */
206
+ /*! @babel/runtime/helpers/readOnlyError */
215
207
 
216
- /*! @license DOMPurify 3.0.9 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.9/LICENSE */
208
+ /*! @babel/runtime/helpers/slicedToArray */
217
209
 
218
- /*! @license DOMPurify | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.2.2/LICENSE */
210
+ /*! @license DOMPurify 3.1.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.6/LICENSE */
219
211
 
220
212
  /*! @source http://purl.eligrey.com/github/canvas-toBlob.js/blob/master/canvas-toBlob.js */
221
213
 
@@ -225,8 +217,6 @@ and limitations under the License.
225
217
 
226
218
  /*! fastestsmallesttextencoderdecoder */
227
219
 
228
- /*! https://mths.be/punycode v1.4.1 by @mathias */
229
-
230
220
  /*! ieee754 */
231
221
 
232
222
  /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
@@ -409,6 +399,10 @@ and limitations under the License.
409
399
  !*** ./node_modules/minilog/lib/web/formatters/minilog.js ***!
410
400
  \************************************************************/
411
401
 
402
+ /*!**************************************************************!*\
403
+ !*** ./node_modules/@babel/runtime/helpers/readOnlyError.js ***!
404
+ \**************************************************************/
405
+
412
406
  /*!**************************************************************!*\
413
407
  !*** ./node_modules/@babel/runtime/helpers/slicedToArray.js ***!
414
408
  \**************************************************************/
@@ -552,6 +546,8 @@ and limitations under the License.
552
546
  * LICENSE file in the root directory of this source tree.
553
547
  */
554
548
 
549
+ /** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */
550
+
555
551
  //!! Deliberately using an API that's deprecated in node.js because
556
552
 
557
553
  //!! Discussion: github.com/node-browser-compat/atob/pull/9
@@ -1 +1 @@
1
- {"version":3,"file":"scratch-gui.js","mappings":"AAAA","sources":["webpack://GUI/webpack/universalModuleDefinition"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"GUI\"] = factory();\n\telse\n\t\troot[\"GUI\"] = factory();\n})(self, () => {\nreturn "],"names":[],"sourceRoot":""}
1
+ {"version":3,"file":"scratch-gui.js","mappings":";AAAA","sources":["webpack://GUI/webpack/universalModuleDefinition"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"GUI\"] = factory();\n\telse\n\t\troot[\"GUI\"] = factory();\n})(self, () => {\nreturn "],"names":[],"sourceRoot":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scratch-gui",
3
- "version": "4.0.1",
3
+ "version": "4.0.7",
4
4
  "description": "Graphical User Interface for creating and running Scratch 3.0 projects",
5
5
  "author": "Massachusetts Institute of Technology",
6
6
  "license": "BSD-3-Clause",
@@ -10,11 +10,6 @@
10
10
  "url": "https://github.com/scratchfoundation/scratch-gui.git"
11
11
  },
12
12
  "main": "./dist/scratch-gui.js",
13
- "exports": {
14
- "webpack": "./src/index.js",
15
- "browser": "./dist/scratch-gui.js",
16
- "default": "./src/index.js"
17
- },
18
13
  "scripts": {
19
14
  "build": "npm run clean && webpack",
20
15
  "clean": "rimraf ./build ./dist",
@@ -49,7 +44,7 @@
49
44
  "cookie": "^0.6.0",
50
45
  "copy-webpack-plugin": "^6.4.1",
51
46
  "core-js": "^2.5.7",
52
- "css-loader": "^3.6.0",
47
+ "css-loader": "5.2.7",
53
48
  "dapjs": "^2.3.0",
54
49
  "es6-object-assign": "^1.1.0",
55
50
  "get-float-time-domain-data": "^0.1.0",
@@ -67,7 +62,7 @@
67
62
  "omggif": "^1.0.9",
68
63
  "papaparse": "^5.3.0",
69
64
  "postcss-import": "^12.0.0",
70
- "postcss-loader": "^3.0.0",
65
+ "postcss-loader": "4.3.0",
71
66
  "postcss-simple-vars": "^5.0.1",
72
67
  "prop-types": "^15.5.10",
73
68
  "query-string": "^5.1.1",
@@ -84,21 +79,21 @@
84
79
  "react-responsive": "^5.0.0",
85
80
  "react-style-proptype": "^3.2.2",
86
81
  "react-tabs": "^2.3.0",
87
- "react-tooltip": "^3.8.0",
82
+ "react-tooltip": "^4.5.1",
88
83
  "react-virtualized": "^9.20.1",
89
84
  "redux": "^3.7.2",
90
85
  "redux-throttle": "^0.1.1",
91
86
  "scratch-audio": "^1.0.0",
92
87
  "scratch-blocks": "^1.1.6",
93
88
  "scratch-l10n": "^3.18.3",
94
- "scratch-paint": "^2.2.2",
95
- "scratch-render": "^1.0.0",
89
+ "scratch-paint": "^2.2.151",
90
+ "scratch-render": "^1.0.233",
96
91
  "scratch-render-fonts": "^1.0.2",
97
92
  "scratch-storage": "^2.3.1",
98
- "scratch-svg-renderer": "^2.2.0",
99
- "scratch-vm": "^4.2.0",
93
+ "scratch-svg-renderer": "^2.3.102",
94
+ "scratch-vm": "^4.5.379",
100
95
  "startaudiocontext": "^1.2.1",
101
- "style-loader": "^0.23.0",
96
+ "style-loader": "4.0.0",
102
97
  "text-encoding": "^0.7.0",
103
98
  "to-style": "^1.3.3",
104
99
  "wav-encoder": "^1.3.0",
@@ -109,14 +104,14 @@
109
104
  "react-dom": "^16.0.0"
110
105
  },
111
106
  "devDependencies": {
112
- "@babel/cli": "7.24.1",
113
- "@babel/core": "7.24.4",
114
- "@babel/eslint-parser": "7.24.1",
107
+ "@babel/cli": "7.24.8",
108
+ "@babel/core": "7.25.2",
109
+ "@babel/eslint-parser": "7.25.1",
115
110
  "@babel/plugin-proposal-object-rest-spread": "7.20.7",
116
111
  "@babel/plugin-syntax-dynamic-import": "7.8.3",
117
- "@babel/plugin-transform-async-to-generator": "7.24.1",
118
- "@babel/preset-env": "7.24.4",
119
- "@babel/preset-react": "7.24.1",
112
+ "@babel/plugin-transform-async-to-generator": "7.24.7",
113
+ "@babel/preset-env": "7.25.3",
114
+ "@babel/preset-react": "7.24.7",
120
115
  "@commitlint/cli": "17.8.1",
121
116
  "@commitlint/config-conventional": "17.8.1",
122
117
  "babel-core": "7.0.0-bridge.0",
@@ -128,7 +123,7 @@
128
123
  "eslint-import-resolver-webpack": "0.11.1",
129
124
  "eslint-plugin-import": "2.29.1",
130
125
  "eslint-plugin-jest": "22.21.0",
131
- "eslint-plugin-react": "7.34.1",
126
+ "eslint-plugin-react": "7.35.0",
132
127
  "file-loader": "6.2.0",
133
128
  "gh-pages": "3.2.3",
134
129
  "html-webpack-plugin": "5.6.0",
@@ -140,13 +135,13 @@
140
135
  "redux-mock-store": "1.5.4",
141
136
  "rimraf": "2.7.1",
142
137
  "scratch-semantic-release-config": "1.0.14",
143
- "scratch-webpack-configuration": "1.3.0",
138
+ "scratch-webpack-configuration": "1.4.0",
144
139
  "selenium-webdriver": "3.6.0",
145
140
  "semantic-release": "19.0.5",
146
141
  "stream-browserify": "3.0.0",
147
142
  "url-loader": "4.1.1",
148
143
  "web-audio-test-api": "0.5.2",
149
- "webpack": "5.91.0",
144
+ "webpack": "5.93.0",
150
145
  "webpack-cli": "5.1.4",
151
146
  "webpack-dev-server": "5.0.4",
152
147
  "yauzl": "2.10.0"
package/webpack.config.js CHANGED
@@ -5,11 +5,6 @@ const webpack = require('webpack');
5
5
  const CopyWebpackPlugin = require('copy-webpack-plugin');
6
6
  const HtmlWebpackPlugin = require('html-webpack-plugin');
7
7
 
8
- // PostCss
9
- const autoprefixer = require('autoprefixer');
10
- const postcssVars = require('postcss-simple-vars');
11
- const postcssImport = require('postcss-import');
12
-
13
8
  const ScratchWebpackConfigBuilder = require('scratch-webpack-configuration');
14
9
 
15
10
  // const STATIC_PATH = process.env.STATIC_PATH || '/static';
@@ -17,7 +12,8 @@ const ScratchWebpackConfigBuilder = require('scratch-webpack-configuration');
17
12
  const baseConfig = new ScratchWebpackConfigBuilder(
18
13
  {
19
14
  rootPath: path.resolve(__dirname),
20
- enableReact: true
15
+ enableReact: true,
16
+ shouldSplitChunks: false
21
17
  })
22
18
  .setTarget('browserslist')
23
19
  .merge({
@@ -33,58 +29,13 @@ const baseConfig = new ScratchWebpackConfigBuilder(
33
29
  Buffer: require.resolve('buffer/'),
34
30
  stream: require.resolve('stream-browserify')
35
31
  }
36
- },
37
- optimization: {
38
- splitChunks: {
39
- chunks: 'all'
40
- },
41
- mergeDuplicateChunks: true,
42
- runtimeChunk: 'single'
43
32
  }
44
33
  })
45
- .addModuleRule({
46
- test: /\.css$/,
47
- use: [
48
- {
49
- loader: 'style-loader'
50
- },
51
- {
52
- loader: 'css-loader',
53
- options: {
54
- modules: {
55
- localIdentName: '[name]_[local]_[hash:base64:5]'
56
- },
57
- importLoaders: 1,
58
- localsConvention: 'camelCase'
59
- }
60
- },
61
- {
62
- loader: 'postcss-loader',
63
- options: {
64
- ident: 'postcss',
65
- plugins: function () {
66
- return [
67
- postcssImport,
68
- postcssVars,
69
- autoprefixer
70
- ];
71
- }
72
- }
73
- }
74
- ]
75
- })
76
34
  .addModuleRule({
77
35
  test: /\.(svg|png|wav|mp3|gif|jpg)$/,
78
36
  resourceQuery: /^$/, // reject any query string
79
37
  type: 'asset' // let webpack decide on the best type of asset
80
38
  })
81
- .addModuleRule({
82
- test: /\.hex$/,
83
- type: 'asset/resource'
84
- })
85
- .addPlugin(new webpack.ProvidePlugin({
86
- Buffer: ['buffer', 'Buffer']
87
- }))
88
39
  .addPlugin(new webpack.DefinePlugin({
89
40
  'process.env.DEBUG': Boolean(process.env.DEBUG),
90
41
  'process.env.GA_ID': `"${process.env.GA_ID || 'UA-000000-01'}"`,
@@ -129,7 +80,18 @@ const distConfig = baseConfig.clone()
129
80
  output: {
130
81
  path: path.resolve(__dirname, 'dist')
131
82
  }
132
- });
83
+ })
84
+ .addPlugin(
85
+ new CopyWebpackPlugin({
86
+ patterns: [
87
+ {
88
+ from: 'src/lib/libraries/*.json',
89
+ to: 'libraries',
90
+ flatten: true
91
+ }
92
+ ]
93
+ })
94
+ );
133
95
 
134
96
  // build the examples and debugging tools in `build/`
135
97
  const buildConfig = baseConfig.clone()