scratch-vm 5.0.163 → 5.0.165-spork.1
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.
- package/CHANGELOG.md +54 -0
- package/dist/node/scratch-vm.js +70 -40
- package/dist/node/scratch-vm.js.map +1 -1
- package/dist/web/scratch-vm.js +70 -40
- package/dist/web/scratch-vm.js.map +1 -1
- package/package.json +7 -7
- package/release.config.js +12 -0
- package/src/engine/blocks.js +82 -30
- package/src/engine/comment.js +1 -1
- package/src/engine/runtime.js +8 -12
- package/webpack.config.js +1 -1
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,29 @@
|
|
3
3
|
All notable changes to this project will be documented in this file. See
|
4
4
|
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
5
|
|
6
|
+
## [5.0.165-spork.1](https://github.com/scratchfoundation/scratch-vm/compare/v5.0.164...v5.0.165-spork.1) (2025-02-11)
|
7
|
+
|
8
|
+
|
9
|
+
### Bug Fixes
|
10
|
+
|
11
|
+
* add the hat extension to extension hat blocks ([#5](https://github.com/scratchfoundation/scratch-vm/issues/5)) ([2baf2c9](https://github.com/scratchfoundation/scratch-vm/commit/2baf2c91b6b215163a07f686cf2c4ddbbcfbe978))
|
12
|
+
* add the monitor block extension to extension monitor blocks ([#6](https://github.com/scratchfoundation/scratch-vm/issues/6)) ([4837dd8](https://github.com/scratchfoundation/scratch-vm/commit/4837dd8e8b19ca24b3aa014162b57fba34a74534))
|
13
|
+
* fix bug that could result in the VM's representation of shadow blocks getting into a bad state ([#9](https://github.com/scratchfoundation/scratch-vm/issues/9)) ([31189d6](https://github.com/scratchfoundation/scratch-vm/commit/31189d616b1fff1715ca65c851cbc7fa2d29a837))
|
14
|
+
* Fix test failures. ([#10](https://github.com/scratchfoundation/scratch-vm/issues/10)) ([111ccd6](https://github.com/scratchfoundation/scratch-vm/commit/111ccd6481527c1214ae2a9b8e1a30cba01538e5))
|
15
|
+
* handle modern workspace comment events ([#3](https://github.com/scratchfoundation/scratch-vm/issues/3)) ([88c097b](https://github.com/scratchfoundation/scratch-vm/commit/88c097b1f2b36c2cc244e977f8927c5d02783687))
|
16
|
+
* handle new custom block comment events ([#4](https://github.com/scratchfoundation/scratch-vm/issues/4)) ([22fcd67](https://github.com/scratchfoundation/scratch-vm/commit/22fcd6753d5348ca3477c4a87c4dfcdbf5560fc1))
|
17
|
+
* run stacks in response to click events ([#1](https://github.com/scratchfoundation/scratch-vm/issues/1)) ([12e2362](https://github.com/scratchfoundation/scratch-vm/commit/12e2362ac68a7165ecdef650080da83c6d9cd5c6))
|
18
|
+
* update VM state when blocks are removed from an input previously occupied by a shadow block ([#8](https://github.com/scratchfoundation/scratch-vm/issues/8)) ([410826b](https://github.com/scratchfoundation/scratch-vm/commit/410826b9faa62ed70ff12430e42c8262c858de1f))
|
19
|
+
* use scratch-blocks@^2.0.0-beta ([e92a2c6](https://github.com/scratchfoundation/scratch-vm/commit/e92a2c64d0a897ddf2df2a43707672a30e0e0978))
|
20
|
+
* use toolboxitemid instead of id as the identifier attribute for extensions toolbox categories ([#2](https://github.com/scratchfoundation/scratch-vm/issues/2)) ([484d15b](https://github.com/scratchfoundation/scratch-vm/commit/484d15b1bedcfc0702ea1cba94251637c6defc0c))
|
21
|
+
|
22
|
+
## [5.0.164](https://github.com/scratchfoundation/scratch-vm/compare/v5.0.163...v5.0.164) (2025-02-11)
|
23
|
+
|
24
|
+
|
25
|
+
### Bug Fixes
|
26
|
+
|
27
|
+
* **deps:** update dependency scratch-l10n to v5.0.121 ([79cd5c3](https://github.com/scratchfoundation/scratch-vm/commit/79cd5c3e27774f50c5eb111285737bd8c99bfaa4))
|
28
|
+
|
6
29
|
## [5.0.163](https://github.com/scratchfoundation/scratch-vm/compare/v5.0.162...v5.0.163) (2025-02-10)
|
7
30
|
|
8
31
|
|
@@ -874,6 +897,22 @@ All notable changes to this project will be documented in this file. See
|
|
874
897
|
|
875
898
|
* **deps:** update dependency scratch-l10n to v5.0.35 ([d063757](https://github.com/scratchfoundation/scratch-vm/commit/d06375799f9a913daa7da8a8c5a2a0d7f1694e5b))
|
876
899
|
|
900
|
+
## [5.0.40-spork.1](https://github.com/scratchfoundation/scratch-vm/compare/v5.0.39...v5.0.40-spork.1) (2024-12-11)
|
901
|
+
|
902
|
+
|
903
|
+
### Bug Fixes
|
904
|
+
|
905
|
+
* add the hat extension to extension hat blocks ([#5](https://github.com/scratchfoundation/scratch-vm/issues/5)) ([2baf2c9](https://github.com/scratchfoundation/scratch-vm/commit/2baf2c91b6b215163a07f686cf2c4ddbbcfbe978))
|
906
|
+
* add the monitor block extension to extension monitor blocks ([#6](https://github.com/scratchfoundation/scratch-vm/issues/6)) ([4837dd8](https://github.com/scratchfoundation/scratch-vm/commit/4837dd8e8b19ca24b3aa014162b57fba34a74534))
|
907
|
+
* fix bug that could result in the VM's representation of shadow blocks getting into a bad state ([#9](https://github.com/scratchfoundation/scratch-vm/issues/9)) ([31189d6](https://github.com/scratchfoundation/scratch-vm/commit/31189d616b1fff1715ca65c851cbc7fa2d29a837))
|
908
|
+
* Fix test failures. ([#10](https://github.com/scratchfoundation/scratch-vm/issues/10)) ([111ccd6](https://github.com/scratchfoundation/scratch-vm/commit/111ccd6481527c1214ae2a9b8e1a30cba01538e5))
|
909
|
+
* handle modern workspace comment events ([#3](https://github.com/scratchfoundation/scratch-vm/issues/3)) ([88c097b](https://github.com/scratchfoundation/scratch-vm/commit/88c097b1f2b36c2cc244e977f8927c5d02783687))
|
910
|
+
* handle new custom block comment events ([#4](https://github.com/scratchfoundation/scratch-vm/issues/4)) ([22fcd67](https://github.com/scratchfoundation/scratch-vm/commit/22fcd6753d5348ca3477c4a87c4dfcdbf5560fc1))
|
911
|
+
* run stacks in response to click events ([#1](https://github.com/scratchfoundation/scratch-vm/issues/1)) ([12e2362](https://github.com/scratchfoundation/scratch-vm/commit/12e2362ac68a7165ecdef650080da83c6d9cd5c6))
|
912
|
+
* update VM state when blocks are removed from an input previously occupied by a shadow block ([#8](https://github.com/scratchfoundation/scratch-vm/issues/8)) ([410826b](https://github.com/scratchfoundation/scratch-vm/commit/410826b9faa62ed70ff12430e42c8262c858de1f))
|
913
|
+
* use scratch-blocks@^2.0.0-beta ([e92a2c6](https://github.com/scratchfoundation/scratch-vm/commit/e92a2c64d0a897ddf2df2a43707672a30e0e0978))
|
914
|
+
* use toolboxitemid instead of id as the identifier attribute for extensions toolbox categories ([#2](https://github.com/scratchfoundation/scratch-vm/issues/2)) ([484d15b](https://github.com/scratchfoundation/scratch-vm/commit/484d15b1bedcfc0702ea1cba94251637c6defc0c))
|
915
|
+
|
877
916
|
## [5.0.39](https://github.com/scratchfoundation/scratch-vm/compare/v5.0.38...v5.0.39) (2024-12-11)
|
878
917
|
|
879
918
|
|
@@ -1720,6 +1759,21 @@ See https://www.scratchfoundation.org/open-source-license
|
|
1720
1759
|
|
1721
1760
|
* **deps:** update dependency scratch-l10n to v3.18.345 ([93110fa](https://github.com/scratchfoundation/scratch-vm/commit/93110fa161f3a3f9982b4ce097bda51104e7af8d))
|
1722
1761
|
|
1762
|
+
## [4.8.37-spork.1](https://github.com/scratchfoundation/scratch-vm/compare/v4.8.36...v4.8.37-spork.1) (2024-10-21)
|
1763
|
+
|
1764
|
+
|
1765
|
+
### Bug Fixes
|
1766
|
+
|
1767
|
+
* add the hat extension to extension hat blocks ([#5](https://github.com/scratchfoundation/scratch-vm/issues/5)) ([2baf2c9](https://github.com/scratchfoundation/scratch-vm/commit/2baf2c91b6b215163a07f686cf2c4ddbbcfbe978))
|
1768
|
+
* add the monitor block extension to extension monitor blocks ([#6](https://github.com/scratchfoundation/scratch-vm/issues/6)) ([4837dd8](https://github.com/scratchfoundation/scratch-vm/commit/4837dd8e8b19ca24b3aa014162b57fba34a74534))
|
1769
|
+
* fix bug that could result in the VM's representation of shadow blocks getting into a bad state ([#9](https://github.com/scratchfoundation/scratch-vm/issues/9)) ([31189d6](https://github.com/scratchfoundation/scratch-vm/commit/31189d616b1fff1715ca65c851cbc7fa2d29a837))
|
1770
|
+
* handle modern workspace comment events ([#3](https://github.com/scratchfoundation/scratch-vm/issues/3)) ([88c097b](https://github.com/scratchfoundation/scratch-vm/commit/88c097b1f2b36c2cc244e977f8927c5d02783687))
|
1771
|
+
* handle new custom block comment events ([#4](https://github.com/scratchfoundation/scratch-vm/issues/4)) ([22fcd67](https://github.com/scratchfoundation/scratch-vm/commit/22fcd6753d5348ca3477c4a87c4dfcdbf5560fc1))
|
1772
|
+
* run stacks in response to click events ([#1](https://github.com/scratchfoundation/scratch-vm/issues/1)) ([12e2362](https://github.com/scratchfoundation/scratch-vm/commit/12e2362ac68a7165ecdef650080da83c6d9cd5c6))
|
1773
|
+
* update VM state when blocks are removed from an input previously occupied by a shadow block ([#8](https://github.com/scratchfoundation/scratch-vm/issues/8)) ([410826b](https://github.com/scratchfoundation/scratch-vm/commit/410826b9faa62ed70ff12430e42c8262c858de1f))
|
1774
|
+
* use scratch-blocks@^2.0.0-beta ([e92a2c6](https://github.com/scratchfoundation/scratch-vm/commit/e92a2c64d0a897ddf2df2a43707672a30e0e0978))
|
1775
|
+
* use toolboxitemid instead of id as the identifier attribute for extensions toolbox categories ([#2](https://github.com/scratchfoundation/scratch-vm/issues/2)) ([484d15b](https://github.com/scratchfoundation/scratch-vm/commit/484d15b1bedcfc0702ea1cba94251637c6defc0c))
|
1776
|
+
|
1723
1777
|
## [4.8.36](https://github.com/scratchfoundation/scratch-vm/compare/v4.8.35...v4.8.36) (2024-10-19)
|
1724
1778
|
|
1725
1779
|
|
package/dist/node/scratch-vm.js
CHANGED
@@ -4319,14 +4319,6 @@ class Blocks {
|
|
4319
4319
|
const stage = this.runtime.getTargetForStage();
|
4320
4320
|
const editingTarget = this.runtime.getEditingTarget();
|
4321
4321
|
|
4322
|
-
// UI event: clicked scripts toggle in the runtime.
|
4323
|
-
if (e.element === 'stackclick') {
|
4324
|
-
this.runtime.toggleScript(e.blockId, {
|
4325
|
-
stackClick: true
|
4326
|
-
});
|
4327
|
-
return;
|
4328
|
-
}
|
4329
|
-
|
4330
4322
|
// Block create/update/destroy
|
4331
4323
|
switch (e.type) {
|
4332
4324
|
case 'create':
|
@@ -4435,10 +4427,11 @@ class Blocks {
|
|
4435
4427
|
this.emitProjectChanged();
|
4436
4428
|
break;
|
4437
4429
|
}
|
4430
|
+
case 'block_comment_create':
|
4438
4431
|
case 'comment_create':
|
4439
4432
|
if (this.runtime.getEditingTarget()) {
|
4440
4433
|
const currTarget = this.runtime.getEditingTarget();
|
4441
|
-
currTarget.createComment(e.commentId, e.blockId,
|
4434
|
+
currTarget.createComment(e.commentId, e.blockId, '', e.json.x, e.json.y, e.json.width, e.json.height, false);
|
4442
4435
|
if (currTarget.comments[e.commentId].x === null && currTarget.comments[e.commentId].y === null) {
|
4443
4436
|
// Block comments imported from 2.0 projects are imported with their
|
4444
4437
|
// x and y coordinates set to null so that scratch-blocks can
|
@@ -4446,12 +4439,13 @@ class Blocks {
|
|
4446
4439
|
// comments, then the auto positioning should have taken place.
|
4447
4440
|
// Update the x and y position of these comments to match the
|
4448
4441
|
// one from the event.
|
4449
|
-
currTarget.comments[e.commentId].x = e.
|
4450
|
-
currTarget.comments[e.commentId].y = e.
|
4442
|
+
currTarget.comments[e.commentId].x = e.json.x;
|
4443
|
+
currTarget.comments[e.commentId].y = e.json.y;
|
4451
4444
|
}
|
4452
4445
|
}
|
4453
4446
|
this.emitProjectChanged();
|
4454
4447
|
break;
|
4448
|
+
case 'block_comment_change':
|
4455
4449
|
case 'comment_change':
|
4456
4450
|
if (this.runtime.getEditingTarget()) {
|
4457
4451
|
const currTarget = this.runtime.getEditingTarget();
|
@@ -4460,20 +4454,11 @@ class Blocks {
|
|
4460
4454
|
return;
|
4461
4455
|
}
|
4462
4456
|
const comment = currTarget.comments[e.commentId];
|
4463
|
-
|
4464
|
-
if (Object.prototype.hasOwnProperty.call(change, 'minimized')) {
|
4465
|
-
comment.minimized = change.minimized;
|
4466
|
-
}
|
4467
|
-
if (Object.prototype.hasOwnProperty.call(change, 'width') && Object.prototype.hasOwnProperty.call(change, 'height')) {
|
4468
|
-
comment.width = change.width;
|
4469
|
-
comment.height = change.height;
|
4470
|
-
}
|
4471
|
-
if (Object.prototype.hasOwnProperty.call(change, 'text')) {
|
4472
|
-
comment.text = change.text;
|
4473
|
-
}
|
4457
|
+
comment.text = e.newContents_;
|
4474
4458
|
this.emitProjectChanged();
|
4475
4459
|
}
|
4476
4460
|
break;
|
4461
|
+
case 'block_comment_move':
|
4477
4462
|
case 'comment_move':
|
4478
4463
|
if (this.runtime.getEditingTarget()) {
|
4479
4464
|
const currTarget = this.runtime.getEditingTarget();
|
@@ -4488,6 +4473,34 @@ class Blocks {
|
|
4488
4473
|
this.emitProjectChanged();
|
4489
4474
|
}
|
4490
4475
|
break;
|
4476
|
+
case 'block_comment_collapse':
|
4477
|
+
case 'comment_collapse':
|
4478
|
+
if (this.runtime.getEditingTarget()) {
|
4479
|
+
const currTarget = this.runtime.getEditingTarget();
|
4480
|
+
if (currTarget && !Object.prototype.hasOwnProperty.call(currTarget.comments, e.commentId)) {
|
4481
|
+
log.warn("Cannot collapse comment with id ".concat(e.commentId, " because it does not exist."));
|
4482
|
+
return;
|
4483
|
+
}
|
4484
|
+
const comment = currTarget.comments[e.commentId];
|
4485
|
+
comment.minimized = e.newCollapsed;
|
4486
|
+
this.emitProjectChanged();
|
4487
|
+
}
|
4488
|
+
break;
|
4489
|
+
case 'block_comment_resize':
|
4490
|
+
case 'comment_resize':
|
4491
|
+
if (this.runtime.getEditingTarget()) {
|
4492
|
+
const currTarget = this.runtime.getEditingTarget();
|
4493
|
+
if (currTarget && !Object.prototype.hasOwnProperty.call(currTarget.comments, e.commentId)) {
|
4494
|
+
log.warn("Cannot resize comment with id ".concat(e.commentId, " because it does not exist."));
|
4495
|
+
return;
|
4496
|
+
}
|
4497
|
+
const comment = currTarget.comments[e.commentId];
|
4498
|
+
comment.width = e.newSize.width;
|
4499
|
+
comment.height = e.newSize.height;
|
4500
|
+
this.emitProjectChanged();
|
4501
|
+
}
|
4502
|
+
break;
|
4503
|
+
case 'block_comment_delete':
|
4491
4504
|
case 'comment_delete':
|
4492
4505
|
if (this.runtime.getEditingTarget()) {
|
4493
4506
|
const currTarget = this.runtime.getEditingTarget();
|
@@ -4510,6 +4523,14 @@ class Blocks {
|
|
4510
4523
|
this.emitProjectChanged();
|
4511
4524
|
}
|
4512
4525
|
break;
|
4526
|
+
case 'click':
|
4527
|
+
// UI event: clicked scripts toggle in the runtime.
|
4528
|
+
if (e.targetType === 'block') {
|
4529
|
+
this.runtime.toggleScript(this.getTopLevelScript(e.blockId), {
|
4530
|
+
stackClick: true
|
4531
|
+
});
|
4532
|
+
}
|
4533
|
+
break;
|
4513
4534
|
}
|
4514
4535
|
}
|
4515
4536
|
|
@@ -4709,19 +4730,32 @@ class Blocks {
|
|
4709
4730
|
if (typeof e.oldParent !== 'undefined') {
|
4710
4731
|
const oldParent = this._blocks[e.oldParent];
|
4711
4732
|
if (typeof e.oldInput !== 'undefined' && oldParent.inputs[e.oldInput].block === e.id) {
|
4712
|
-
// This block was connected to
|
4713
|
-
|
4733
|
+
// This block was connected to an input. We either want to
|
4734
|
+
// restore the shadow block that previously occupied
|
4735
|
+
// this input, or null out the input's block.
|
4736
|
+
const shadow = oldParent.inputs[e.oldInput].shadow;
|
4737
|
+
if (shadow && e.id !== shadow) {
|
4738
|
+
oldParent.inputs[e.oldInput].block = shadow;
|
4739
|
+
this._blocks[shadow].parent = oldParent.id;
|
4740
|
+
} else {
|
4741
|
+
oldParent.inputs[e.oldInput].block = null;
|
4742
|
+
if (e.id !== shadow) {
|
4743
|
+
this._blocks[e.id].parent = null;
|
4744
|
+
}
|
4745
|
+
}
|
4714
4746
|
} else if (oldParent.next === e.id) {
|
4715
4747
|
// This block was connected to the old parent's next connection.
|
4716
4748
|
oldParent.next = null;
|
4749
|
+
this._blocks[e.id].parent = null;
|
4717
4750
|
}
|
4718
|
-
this._blocks[e.id].parent = null;
|
4719
4751
|
didChange = true;
|
4720
4752
|
}
|
4721
4753
|
|
4722
4754
|
// Is this block a top-level block?
|
4723
4755
|
if (typeof e.newParent === 'undefined') {
|
4724
|
-
this.
|
4756
|
+
if (!this._blocks[e.id].shadow) {
|
4757
|
+
this._addScript(e.id);
|
4758
|
+
}
|
4725
4759
|
} else {
|
4726
4760
|
// Remove script, if one exists.
|
4727
4761
|
this._deleteScript(e.id);
|
@@ -5312,7 +5346,7 @@ class Comment {
|
|
5312
5346
|
this.blockId = null;
|
5313
5347
|
}
|
5314
5348
|
toXML() {
|
5315
|
-
return "<comment id=\"".concat(this.id, "\" x=\"").concat(this.x, "\" y=\"").concat(this.y, "\" w=\"").concat(this.width, "\" h=\"").concat(this.height, "\" pinned=\"").concat(this.
|
5349
|
+
return "<comment id=\"".concat(this.id, "\" x=\"").concat(this.x, "\" y=\"").concat(this.y, "\" w=\"").concat(this.width, "\" h=\"").concat(this.height, "\" pinned=\"").concat(!this.minimized, "\" collapsed=\"").concat(this.minimized, "\">").concat(xmlEscape(this.text), "</comment>");
|
5316
5350
|
}
|
5317
5351
|
|
5318
5352
|
// TODO choose min and defaults for width and height
|
@@ -7329,9 +7363,7 @@ class Runtime extends EventEmitter {
|
|
7329
7363
|
type: menuId,
|
7330
7364
|
inputsInline: true,
|
7331
7365
|
output: 'String',
|
7332
|
-
|
7333
|
-
colourSecondary: categoryInfo.color2,
|
7334
|
-
colourTertiary: categoryInfo.color3,
|
7366
|
+
style: categoryInfo.id,
|
7335
7367
|
outputShape: menuInfo.acceptReporters ? ScratchBlocksConstants.OUTPUT_SHAPE_ROUND : ScratchBlocksConstants.OUTPUT_SHAPE_SQUARE,
|
7336
7368
|
args0: [{
|
7337
7369
|
type: 'field_dropdown',
|
@@ -7373,9 +7405,7 @@ class Runtime extends EventEmitter {
|
|
7373
7405
|
message0: '%1',
|
7374
7406
|
inputsInline: true,
|
7375
7407
|
output: output,
|
7376
|
-
|
7377
|
-
colourSecondary: categoryInfo.color2,
|
7378
|
-
colourTertiary: categoryInfo.color3,
|
7408
|
+
style: categoryInfo.id,
|
7379
7409
|
outputShape: outputShape,
|
7380
7410
|
args0: [{
|
7381
7411
|
name: "field_".concat(fieldName),
|
@@ -7415,9 +7445,8 @@ class Runtime extends EventEmitter {
|
|
7415
7445
|
type: extendedOpcode,
|
7416
7446
|
inputsInline: true,
|
7417
7447
|
category: categoryInfo.name,
|
7418
|
-
|
7419
|
-
|
7420
|
-
colourTertiary: categoryInfo.color3
|
7448
|
+
style: categoryInfo.id,
|
7449
|
+
extensions: []
|
7421
7450
|
};
|
7422
7451
|
const context = {
|
7423
7452
|
// TODO: store this somewhere so that we can map args appropriately after translation.
|
@@ -7436,7 +7465,7 @@ class Runtime extends EventEmitter {
|
|
7436
7465
|
// the category block icon.
|
7437
7466
|
const iconURI = blockInfo.blockIconURI || categoryInfo.blockIconURI;
|
7438
7467
|
if (iconURI) {
|
7439
|
-
blockJSON.extensions
|
7468
|
+
blockJSON.extensions.push('scratch_extension');
|
7440
7469
|
blockJSON.message0 = '%1 %2';
|
7441
7470
|
const iconJSON = {
|
7442
7471
|
type: 'field_image',
|
@@ -7473,6 +7502,7 @@ class Runtime extends EventEmitter {
|
|
7473
7502
|
}
|
7474
7503
|
blockJSON.outputShape = ScratchBlocksConstants.OUTPUT_SHAPE_SQUARE;
|
7475
7504
|
blockJSON.nextStatement = null; // null = available connection; undefined = terminal
|
7505
|
+
blockJSON.extensions.push('shape_hat');
|
7476
7506
|
break;
|
7477
7507
|
case BlockType.CONDITIONAL:
|
7478
7508
|
case BlockType.LOOP:
|
@@ -7517,7 +7547,7 @@ class Runtime extends EventEmitter {
|
|
7517
7547
|
}
|
7518
7548
|
if (blockInfo.blockType === BlockType.REPORTER) {
|
7519
7549
|
if (!blockInfo.disableMonitor && context.inputList.length === 0) {
|
7520
|
-
blockJSON.
|
7550
|
+
blockJSON.extensions.push('monitor_block');
|
7521
7551
|
}
|
7522
7552
|
} else if (blockInfo.blockType === BlockType.LOOP) {
|
7523
7553
|
// Add icon to the bottom right of a loop block
|
@@ -7744,7 +7774,7 @@ class Runtime extends EventEmitter {
|
|
7744
7774
|
}
|
7745
7775
|
return {
|
7746
7776
|
id: categoryInfo.id,
|
7747
|
-
xml: "<category name=\"".concat(name, "\"
|
7777
|
+
xml: "<category name=\"".concat(name, "\" toolboxitemid=\"").concat(categoryInfo.id, "\" ").concat(statusButtonXML, " ").concat(colorXML, " ").concat(menuIconXML, ">").concat(paletteBlocks.map(block => block.xml).join(''), "</category>")
|
7748
7778
|
};
|
7749
7779
|
});
|
7750
7780
|
}
|
@@ -32721,7 +32751,7 @@ module.exports = require("uuid");
|
|
32721
32751
|
/***/ ((module) => {
|
32722
32752
|
|
32723
32753
|
"use strict";
|
32724
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"scratch-vm","version":"5.0.
|
32754
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"scratch-vm","version":"5.0.40-spork.1","description":"Virtual Machine for Scratch 3.0","author":"Massachusetts Institute of Technology","license":"AGPL-3.0-only","homepage":"https://github.com/scratchfoundation/scratch-vm#readme","repository":{"type":"git","url":"https://github.com/scratchfoundation/scratch-vm.git","sha":"0ed962df655549448753dec55cff5cb9678274d8"},"main":"./dist/node/scratch-vm.js","browser":"./dist/web/scratch-vm.js","exports":{"webpack":"./src/index.js","browser":"./dist/web/scratch-vm.js","node":"./dist/node/scratch-vm.js","default":"./src/index.js"},"scripts":{"build":"npm run docs && webpack --progress","coverage":"tap ./test/{unit,integration}/*.js --coverage --coverage-report=lcov","docs":"jsdoc -c .jsdoc.json","i18n:src":"mkdirp translations/core && format-message extract --out-file translations/core/en.json src/extensions/**/index.js","i18n:push":"tx-push-src scratch-editor extensions translations/core/en.json","lint":"eslint . && format-message lint src/**/*.js","prepare":"husky install","prepublish":"in-publish && npm run build || not-in-publish","start":"webpack serve","tap":"tap ./test/{unit,integration}/*.js","tap:unit":"tap ./test/unit/*.js","tap:integration":"tap ./test/integration/*.js","test":"npm run lint && npm run tap","watch":"webpack --progress --watch","version":"json -f package.json -I -e \\"this.repository.sha = \'$(git log -n1 --pretty=format:%H)\'\\""},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"browserslist":["Chrome >= 63","Edge >= 15","Firefox >= 57","Safari >= 11"],"tap":{"branches":60,"functions":70,"lines":70,"statements":70},"dependencies":{"@vernier/godirect":"^1.5.0","arraybuffer-loader":"^1.0.6","atob":"^2.1.2","btoa":"^1.2.1","buffer":"^6.0.3","canvas-toBlob":"^1.0.0","decode-html":"^2.0.0","diff-match-patch":"^1.0.4","format-message":"^6.2.1","htmlparser2":"^3.10.0","immutable":"^3.8.1","jszip":"^3.1.5","minilog":"^3.1.0","scratch-audio":"^2.0.0","scratch-parser":"^6.0.0","scratch-render":"^2.0.0","scratch-sb1-converter":"^2.0.0","scratch-storage":"^4.0.0","scratch-svg-renderer":"3.0.60","scratch-translate-extension-languages":"^1.0.0","text-encoding":"^0.7.0","uuid":"^8.3.2","web-worker":"^1.3.0"},"devDependencies":{"@babel/core":"7.26.8","@babel/eslint-parser":"7.26.8","@babel/preset-env":"7.26.8","@commitlint/cli":"17.8.1","@commitlint/config-conventional":"17.8.1","adm-zip":"0.4.11","babel-loader":"9.2.1","callsite":"1.0.0","copy-webpack-plugin":"4.6.0","docdash":"1.2.0","eslint":"8.57.1","eslint-config-scratch":"9.0.9","expose-loader":"1.0.3","file-loader":"6.2.0","format-message-cli":"6.2.4","husky":"8.0.3","in-publish":"2.0.1","js-md5":"0.7.3","jsdoc":"3.6.11","json":"^9.0.4","pngjs":"3.4.0","scratch-blocks":"2.0.0-spork.4","scratch-l10n":"5.0.121","scratch-render-fonts":"1.0.161","scratch-semantic-release-config":"3.0.0","scratch-webpack-configuration":"3.0.0","script-loader":"0.7.2","semantic-release":"19.0.5","stats.js":"0.17.0","tap":"16.3.10","webpack":"5.97.1","webpack-cli":"4.10.0","webpack-dev-server":"3.11.3"}}');
|
32725
32755
|
|
32726
32756
|
/***/ })
|
32727
32757
|
|