From e9a2c45695b7ead62f26d47ed20b9ef1778410c9 Mon Sep 17 00:00:00 2001 From: SharkPool <139097378+SharkPool-SP@users.noreply.github.com> Date: Wed, 21 Feb 2024 20:15:36 -0800 Subject: [PATCH 001/150] Update looks.js --- blocks_vertical/looks.js | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/blocks_vertical/looks.js b/blocks_vertical/looks.js index f6d1954178..ea9a38b9f4 100644 --- a/blocks_vertical/looks.js +++ b/blocks_vertical/looks.js @@ -730,6 +730,34 @@ Blockly.Blocks['looks_goforwardbackwardlayers'] = { } }; +Blockly.Blocks['looks_goTargetLayer'] = { + /** + * "Go infront/behind [sprite]" Block. + * @this Blockly.Block + */ + init: function() { + this.jsonInit({ + "message0": Blockly.Msg.LOOKS_GOFORWARDBACKWARDLAYERS, + "args0": [ + { + "type": "field_dropdown", + "name": "FORWARD_BACKWARD", + "options": [ + ['infront', 'infront'], + ['behind', 'behind'] + ] + }, + { + "type": "input_value", + "name": "VISIBLE_OPTION" + } + ], + "category": Blockly.Categories.looks, + "extensions": ["colours_looks", "shape_statement"] + }); + } +}; + Blockly.Blocks["looks_layersSetLayer"] = { init: function() { this.jsonInit({ From 5ccb63b5a138986046a384399b6661fe0ed8b29e Mon Sep 17 00:00:00 2001 From: SharkPool <139097378+SharkPool-SP@users.noreply.github.com> Date: Wed, 21 Feb 2024 20:52:25 -0800 Subject: [PATCH 002/150] Update looks.js --- blocks_vertical/looks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blocks_vertical/looks.js b/blocks_vertical/looks.js index ea9a38b9f4..c65d1e93ec 100644 --- a/blocks_vertical/looks.js +++ b/blocks_vertical/looks.js @@ -737,7 +737,7 @@ Blockly.Blocks['looks_goTargetLayer'] = { */ init: function() { this.jsonInit({ - "message0": Blockly.Msg.LOOKS_GOFORWARDBACKWARDLAYERS, + "message0": "go %1 of %2", "args0": [ { "type": "field_dropdown", From 04405efe265715183619c0214b654e20aa43d996 Mon Sep 17 00:00:00 2001 From: SharkPool <139097378+SharkPool-SP@users.noreply.github.com> Date: Wed, 21 Feb 2024 20:53:54 -0800 Subject: [PATCH 003/150] Update looks.js --- blocks_vertical/looks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blocks_vertical/looks.js b/blocks_vertical/looks.js index c65d1e93ec..796f83898d 100644 --- a/blocks_vertical/looks.js +++ b/blocks_vertical/looks.js @@ -737,7 +737,7 @@ Blockly.Blocks['looks_goTargetLayer'] = { */ init: function() { this.jsonInit({ - "message0": "go %1 of %2", + "message0": "go %1 %2", "args0": [ { "type": "field_dropdown", From 46ebc29b858b2964441ee29c858811fffc8655b6 Mon Sep 17 00:00:00 2001 From: SharkPool <139097378+SharkPool-SP@users.noreply.github.com> Date: Wed, 21 Feb 2024 21:04:16 -0800 Subject: [PATCH 004/150] Update default_toolbox.js --- blocks_vertical/default_toolbox.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/blocks_vertical/default_toolbox.js b/blocks_vertical/default_toolbox.js index 5bd40f1502..53c974262a 100644 --- a/blocks_vertical/default_toolbox.js +++ b/blocks_vertical/default_toolbox.js @@ -30,6 +30,13 @@ goog.require('Blockly.Blocks'); Blockly.Blocks.defaultToolbox = ''; block = Blockly.Xml.textToDom(blockText).firstChild; - gap = Blockly.Xml.textToDom(gapText).firstChild - xmlList.push(gap); xmlList.push(block); + xmlList.push(block); return xmlList; }; From b65cd6afe06c6194d97ea9d270bbe33c0c1163de Mon Sep 17 00:00:00 2001 From: sussy layers dev <72522395+jwklong@users.noreply.github.com> Date: Mon, 9 Sep 2024 17:36:40 +0100 Subject: [PATCH 062/150] make reporter custom blocks square shape to prepare for branches --- blocks_vertical/procedures.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/blocks_vertical/procedures.js b/blocks_vertical/procedures.js index 2dcb1d525e..9674c7869b 100644 --- a/blocks_vertical/procedures.js +++ b/blocks_vertical/procedures.js @@ -1011,7 +1011,8 @@ Blockly.Blocks['procedures_prototype'] = { */ init: function() { this.jsonInit({ - "extensions": ["colours_more", 'shape_procedure'] + "extensions": ["colours_more", 'shape_procedure'], + "outputShape": Blockly.OUTPUT_SHAPE_SQUARE, }); /* Data known about the procedure. */ From 375ae3987ca6b8e3f2cbc2845591c5500d84cf1b Mon Sep 17 00:00:00 2001 From: sussy layers dev <72522395+jwklong@users.noreply.github.com> Date: Mon, 9 Sep 2024 17:46:56 +0100 Subject: [PATCH 063/150] fix --- blocks_vertical/procedures.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blocks_vertical/procedures.js b/blocks_vertical/procedures.js index 9674c7869b..51524fb581 100644 --- a/blocks_vertical/procedures.js +++ b/blocks_vertical/procedures.js @@ -192,9 +192,10 @@ Blockly.ScratchBlocks.ProcedureUtils.updateDisplay_ = function() { this.setNextStatement(false) switch (ConectionType) { case 'string': - this.setOutputShape(Blockly.OUTPUT_SHAPE_ROUND); + this.setOutputShape(Blockly.OUTPUT_SHAPE_SQUARE); this.setOutput(this.output_, this.isDisplayOnly ? 'procedure' : 'String') break + //dont believe these two get used? case 'number': this.setOutputShape(Blockly.OUTPUT_SHAPE_ROUND); this.setOutput(this.output_, this.isDisplayOnly ? 'procedure' : 'Number') @@ -1012,7 +1013,6 @@ Blockly.Blocks['procedures_prototype'] = { init: function() { this.jsonInit({ "extensions": ["colours_more", 'shape_procedure'], - "outputShape": Blockly.OUTPUT_SHAPE_SQUARE, }); /* Data known about the procedure. */ From bc16a5ef5c99b210c67ad06d55a4f02f0a2b3cac Mon Sep 17 00:00:00 2001 From: sussy layers dev <72522395+jwklong@users.noreply.github.com> Date: Mon, 9 Sep 2024 17:49:08 +0100 Subject: [PATCH 064/150] revert --- blocks_vertical/procedures.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/blocks_vertical/procedures.js b/blocks_vertical/procedures.js index 51524fb581..2dcb1d525e 100644 --- a/blocks_vertical/procedures.js +++ b/blocks_vertical/procedures.js @@ -192,10 +192,9 @@ Blockly.ScratchBlocks.ProcedureUtils.updateDisplay_ = function() { this.setNextStatement(false) switch (ConectionType) { case 'string': - this.setOutputShape(Blockly.OUTPUT_SHAPE_SQUARE); + this.setOutputShape(Blockly.OUTPUT_SHAPE_ROUND); this.setOutput(this.output_, this.isDisplayOnly ? 'procedure' : 'String') break - //dont believe these two get used? case 'number': this.setOutputShape(Blockly.OUTPUT_SHAPE_ROUND); this.setOutput(this.output_, this.isDisplayOnly ? 'procedure' : 'Number') @@ -1012,7 +1011,7 @@ Blockly.Blocks['procedures_prototype'] = { */ init: function() { this.jsonInit({ - "extensions": ["colours_more", 'shape_procedure'], + "extensions": ["colours_more", 'shape_procedure'] }); /* Data known about the procedure. */ From f23796c01f96b706eb22887a3b33b14c886df015 Mon Sep 17 00:00:00 2001 From: sussy layers dev <72522395+jwklong@users.noreply.github.com> Date: Mon, 9 Sep 2024 18:24:13 +0100 Subject: [PATCH 065/150] i sure hope this works :D --- blocks_vertical/procedures.js | 79 +++++++++++++++++++++++++++++++---- 1 file changed, 70 insertions(+), 9 deletions(-) diff --git a/blocks_vertical/procedures.js b/blocks_vertical/procedures.js index 2dcb1d525e..fcc616c493 100644 --- a/blocks_vertical/procedures.js +++ b/blocks_vertical/procedures.js @@ -453,10 +453,17 @@ Blockly.ScratchBlocks.ProcedureUtils.attachShadow_ = function(input, */ Blockly.ScratchBlocks.ProcedureUtils.createArgumentReporter_ = function( argumentType, displayName) { - if (argumentType == 'n' || argumentType == 's') { - var blockType = 'argument_reporter_string_number'; - } else { - var blockType = 'argument_reporter_boolean'; + switch (argumentType) { + case 'n': + case 's': + var blockType = 'argument_reporter_string_number'; + break; + case 'b': + var blockType = 'argument_reporter_boolean'; + break; + case 'c': + var blockType = 'argument_reporter_command'; + break; } Blockly.Events.disable(); try { @@ -615,6 +622,10 @@ Blockly.ScratchBlocks.ProcedureUtils.checkOldTypeMatches_ = function(oldBlock, if (type == 'b' && oldBlock.type == 'argument_reporter_boolean') { return true; } + //dunno if this is needed but oh well + if (type == 'c' && oldBlock.type == 'argument_reporter_command') { + return true; + } return false; }; @@ -634,10 +645,16 @@ Blockly.ScratchBlocks.ProcedureUtils.createArgumentEditor_ = function( argumentType, displayName) { Blockly.Events.disable(); try { - if (argumentType == 'n' || argumentType == 's') { - var newBlock = this.workspace.newBlock('argument_editor_string_number'); - } else { - var newBlock = this.workspace.newBlock('argument_editor_boolean'); + switch (argumentType) { + case 'n': + case 's': + var newBlock = this.workspace.newBlock('argument_editor_string_number'); + break; + case 'b': + var newBlock = this.workspace.newBlock('argument_editor_boolean'); + break; + case 'c': + var newBlock = this.workspace.newBlock('argument_editor_command') } newBlock.setFieldValue(displayName, 'TEXT'); newBlock.setShadow(true); @@ -679,6 +696,17 @@ Blockly.ScratchBlocks.ProcedureUtils.updateDeclarationProcCode_ = function() { } else { this.procCode_ += '%s'; } + switch (target.type) { + case 'argument_editor_string_number': + this.procCode_ += '%s'; + break; + case 'argument_editor_boolean': + this.procCode_ += '%b'; + break; + case 'argument_editor_command': + this.procCode_ += "%c"; + break; + } } else { throw new Error( 'Unexpected input type on a procedure mutator root: ' + input.type); @@ -873,7 +901,8 @@ Blockly.ScratchBlocks.ProcedureUtils.updateArgumentReporterNames_ = function(pre for (var i = 0; i < allBlocks.length; i++) { var block = allBlocks[i]; if ((block.type === 'argument_reporter_string_number' || - block.type === 'argument_reporter_boolean') && + block.type === 'argument_reporter_boolean' || + block.type === 'argument_reporter_command') && !block.isShadow()) { // Exclude arg reporters in the prototype block, which are shadows. argReporters.push(block); } @@ -1145,6 +1174,21 @@ Blockly.Blocks['argument_reporter_string_number'] = { domToMutation: Blockly.ScratchBlocks.ProcedureUtils.argumentReporterDomToMutation }; +Blockly.Blocks['argument_reporter_command'] = { + init: function () { + this.jsonInit({ "message0": " %1", + "args0": [ + { + "type": "field_label_serializable", + "name": "VALUE", + "text": "" + } + ], + "extensions": ["colours_argument", "shape_statement"], + }); + }, +}; + Blockly.Blocks['argument_editor_boolean'] = { init: function() { this.jsonInit({ "message0": " %1", @@ -1185,6 +1229,23 @@ Blockly.Blocks['argument_editor_string_number'] = { removeFieldCallback: Blockly.ScratchBlocks.ProcedureUtils.removeArgumentCallback_ }; +Blockly.Blocks['argument_editor_command'] = { + init: function () { + this.jsonInit({ "message0": " %1", + "args0": [ + { + "type": "field_input_removable", + "name": "TEXT", + "text": "foo" + } + ], + "extensions": ["colours_argument", "shape_statement"], + }); + }, + // Exist on declaration and arguments editors, with different implementations. + removeFieldCallback: Blockly.ScratchBlocks.ProcedureUtils.removeArgumentCallback_, +}; + Blockly.Blocks['procedures_set'] = { init: function() { this.jsonInit({ From 80a87a4e4c3741efcd19666b46c56645342dc699 Mon Sep 17 00:00:00 2001 From: sussy layers dev <72522395+jwklong@users.noreply.github.com> Date: Mon, 9 Sep 2024 18:30:12 +0100 Subject: [PATCH 066/150] remove deprecated code --- blocks_vertical/procedures.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/blocks_vertical/procedures.js b/blocks_vertical/procedures.js index fcc616c493..d5e6547030 100644 --- a/blocks_vertical/procedures.js +++ b/blocks_vertical/procedures.js @@ -691,11 +691,6 @@ Blockly.ScratchBlocks.ProcedureUtils.updateDeclarationProcCode_ = function() { var target = input.connection.targetBlock(); this.displayNames_.push(target.getFieldValue('TEXT')); this.argumentIds_.push(input.name); - if (target.type == 'argument_editor_boolean') { - this.procCode_ += '%b'; - } else { - this.procCode_ += '%s'; - } switch (target.type) { case 'argument_editor_string_number': this.procCode_ += '%s'; From 04432e1e6bf18005960ad547de2635a60035f6b2 Mon Sep 17 00:00:00 2001 From: sussy layers dev <72522395+jwklong@users.noreply.github.com> Date: Mon, 9 Sep 2024 18:37:00 +0100 Subject: [PATCH 067/150] blah add this --- blocks_vertical/procedures.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blocks_vertical/procedures.js b/blocks_vertical/procedures.js index d5e6547030..7734c80b5c 100644 --- a/blocks_vertical/procedures.js +++ b/blocks_vertical/procedures.js @@ -307,7 +307,7 @@ Blockly.ScratchBlocks.ProcedureUtils.createAllInputs_ = function(connectionMap) var argumentType = component.substring(1, 2); var id = this.argumentIds_[argumentCount]; // user error shouldnt literally nuke the app, ignore invalid markers instead of erroring on them - if (component.substring(0, 1) == '%' && (argumentType == 'n' || argumentType == 'b' || argumentType == 's') && id) { + if (component.substring(0, 1) == '%' && (['n', 's', 'b', 'c'].includes(argumentType)) && id) { /* if (!(argumentType == 'n' || argumentType == 'b' || argumentType == 's')) { throw new Error( From 32de9d427317e318c8c603f32452f92d04000a76 Mon Sep 17 00:00:00 2001 From: sussy layers dev <72522395+jwklong@users.noreply.github.com> Date: Mon, 9 Sep 2024 18:48:30 +0100 Subject: [PATCH 068/150] i forgor,,, --- blocks_vertical/procedures.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blocks_vertical/procedures.js b/blocks_vertical/procedures.js index 7734c80b5c..85a0679d25 100644 --- a/blocks_vertical/procedures.js +++ b/blocks_vertical/procedures.js @@ -296,7 +296,7 @@ Blockly.ScratchBlocks.ProcedureUtils.createIcon_ = function() { Blockly.ScratchBlocks.ProcedureUtils.createAllInputs_ = function(connectionMap) { this.createIcon_() // Split the proc into components, by %n, %b, and %s (ignoring escaped). - var procComponents = this.procCode_.split(/(?=[^\\]%[nbs])/); + var procComponents = this.procCode_.split(/(?=[^\\]%[nsbc])/); procComponents = procComponents.map(function(c) { return c.trim(); // Strip whitespace. }); From 3d5d2cb5f556629af17ef7ee0e4b4dbfa40fb7b8 Mon Sep 17 00:00:00 2001 From: sussy layers dev <72522395+jwklong@users.noreply.github.com> Date: Mon, 9 Sep 2024 18:54:45 +0100 Subject: [PATCH 069/150] fix command block --- blocks_vertical/procedures.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blocks_vertical/procedures.js b/blocks_vertical/procedures.js index 85a0679d25..b783a8c6ea 100644 --- a/blocks_vertical/procedures.js +++ b/blocks_vertical/procedures.js @@ -1179,7 +1179,7 @@ Blockly.Blocks['argument_reporter_command'] = { "text": "" } ], - "extensions": ["colours_argument", "shape_statement"], + "extensions": ["colours_more", "shape_statement"], }); }, }; @@ -1234,7 +1234,7 @@ Blockly.Blocks['argument_editor_command'] = { "text": "foo" } ], - "extensions": ["colours_argument", "shape_statement"], + "extensions": ["colours_more", "shape_statement"], }); }, // Exist on declaration and arguments editors, with different implementations. From 9cef75295d78672d15faeddc2f0db061d3654f88 Mon Sep 17 00:00:00 2001 From: sussy layers dev <72522395+jwklong@users.noreply.github.com> Date: Mon, 9 Sep 2024 19:05:48 +0100 Subject: [PATCH 070/150] addcommandexternal --- blocks_vertical/procedures.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/blocks_vertical/procedures.js b/blocks_vertical/procedures.js index b783a8c6ea..0087fdbf4c 100644 --- a/blocks_vertical/procedures.js +++ b/blocks_vertical/procedures.js @@ -752,6 +752,16 @@ Blockly.ScratchBlocks.ProcedureUtils.addBooleanExternal = function() { this.focusLastEditor_(); }; +Blockly.ScratchBlocks.ProcedureUtils.addCommandExternal = function () { + Blockly.WidgetDiv.hide(true); + this.procCode_ = this.procCode_ + " %c"; + this.displayNames_.push("branch"); + this.argumentIds_.push("SUBSTACK" + Blockly.utils.genUid()); + this.argumentDefaults_.push(""); + this.updateDisplay_(); + this.focusLastEditor_(); +}; + /** * Externally-visible function to add a string/number argument to the procedure * declaration. @@ -1127,6 +1137,7 @@ Blockly.Blocks['procedures_declaration'] = { removeColor: Blockly.ScratchBlocks.ProcedureUtils.removeColor, addLabelExternal: Blockly.ScratchBlocks.ProcedureUtils.addLabelExternal, addBooleanExternal: Blockly.ScratchBlocks.ProcedureUtils.addBooleanExternal, + addCommandExternal: Blockly.ScratchBlocks.ProcedureUtils.addCommandExternal, addStringNumberExternal: Blockly.ScratchBlocks.ProcedureUtils.addStringNumberExternal, onChangeFn: Blockly.ScratchBlocks.ProcedureUtils.updateDeclarationProcCode_ }; From aa191e3f069be0a012fda8138743386a64c749eb Mon Sep 17 00:00:00 2001 From: sussy layers dev <72522395+jwklong@users.noreply.github.com> Date: Mon, 9 Sep 2024 19:17:15 +0100 Subject: [PATCH 071/150] fix,,, --- blocks_vertical/procedures.js | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/blocks_vertical/procedures.js b/blocks_vertical/procedures.js index 0087fdbf4c..0a98532f6a 100644 --- a/blocks_vertical/procedures.js +++ b/blocks_vertical/procedures.js @@ -510,8 +510,12 @@ Blockly.ScratchBlocks.ProcedureUtils.populateArgumentOnCaller_ = function(type, if (connectionMap && oldBlock) { // Reattach the old block and shadow DOM. connectionMap[input.name] = null; - oldBlock.outputConnection.connect(input.connection); - if (type != 'b' && this.generateShadows_) { + if (type == "c") { + oldBlock.previousConnection.connect(input.connection); + } else { + oldBlock.outputConnection.connect(input.connection); + } + if (type != 'b' && type != 'c' && this.generateShadows_) { var shadowDom = oldShadow || this.buildShadowDom_(type); console.log("setting shadow dom: " + shadowDom); input.connection.setShadowDom(shadowDom); @@ -558,7 +562,11 @@ Blockly.ScratchBlocks.ProcedureUtils.populateArgumentOnPrototype_ = function( } // Attach the block. - input.connection.connect(argumentReporter.outputConnection); + if (type == "c") { + input.connection.connect(argumentReporter.previousConnection); + } else { + input.connection.connect(argumentReporter.outputConnection); + } }; /** @@ -600,7 +608,11 @@ Blockly.ScratchBlocks.ProcedureUtils.populateArgumentOnDeclaration_ = function( } // Attach the block. - input.connection.connect(argumentEditor.outputConnection); + if (type == "c") { + input.connection.connect(argumentEditor.previousConnection); + } else { + input.connection.connect(argumentEditor.outputConnection); + } }; /** From 4487ced1833953e08de5a5eb7a9407e7c3162459 Mon Sep 17 00:00:00 2001 From: sussy layers dev <72522395+jwklong@users.noreply.github.com> Date: Mon, 9 Sep 2024 21:40:32 +0100 Subject: [PATCH 072/150] this might be the one --- blocks_vertical/procedures.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/blocks_vertical/procedures.js b/blocks_vertical/procedures.js index 0a98532f6a..4d82ff2565 100644 --- a/blocks_vertical/procedures.js +++ b/blocks_vertical/procedures.js @@ -316,7 +316,11 @@ Blockly.ScratchBlocks.ProcedureUtils.createAllInputs_ = function(connectionMap) */ labelText = component.substring(2).trim(); - var input = this.appendValueInput(id); + if (argumentType == "c") { + var input = this.appendStatementInput(id) + } else { + var input = this.appendValueInput(id); + } if (argumentType == 'b') { input.setCheck('Boolean'); } From 7067d083c4db25c737cd30f57280ceb582cdd123 Mon Sep 17 00:00:00 2001 From: sussy layers dev <72522395+jwklong@users.noreply.github.com> Date: Mon, 9 Sep 2024 21:57:52 +0100 Subject: [PATCH 073/150] taDA --- blocks_vertical/procedures.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blocks_vertical/procedures.js b/blocks_vertical/procedures.js index 4d82ff2565..e63bcc3d27 100644 --- a/blocks_vertical/procedures.js +++ b/blocks_vertical/procedures.js @@ -702,7 +702,7 @@ Blockly.ScratchBlocks.ProcedureUtils.updateDeclarationProcCode_ = function() { var input = this.inputList[i]; if (input.type == Blockly.DUMMY_INPUT) { this.procCode_ += input.fieldRow[0].getValue(); - } else if (input.type == Blockly.INPUT_VALUE) { + } else if (input.type == Blockly.INPUT_VALUE || input.type == Blockly.NEXT_STATEMENT) { // Inspect the argument editor. var target = input.connection.targetBlock(); this.displayNames_.push(target.getFieldValue('TEXT')); From c22cf4736eb3aaf7b7d46ff86372c6bdcdeabb4b Mon Sep 17 00:00:00 2001 From: sussy layers dev <72522395+jwklong@users.noreply.github.com> Date: Mon, 9 Sep 2024 22:08:50 +0100 Subject: [PATCH 074/150] fix..? --- blocks_vertical/procedures.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/blocks_vertical/procedures.js b/blocks_vertical/procedures.js index e63bcc3d27..9405a962ea 100644 --- a/blocks_vertical/procedures.js +++ b/blocks_vertical/procedures.js @@ -1206,9 +1206,13 @@ Blockly.Blocks['argument_reporter_command'] = { "text": "" } ], + "canDragDuplicate": true, "extensions": ["colours_more", "shape_statement"], }); }, + updateDisplay_: Blockly.ScratchBlocks.ProcedureUtils.argumentReporterUpdateDisplay, + mutationToDom: Blockly.ScratchBlocks.ProcedureUtils.argumentReporterMutationToDom, + domToMutation: Blockly.ScratchBlocks.ProcedureUtils.argumentReporterDomToMutation }; Blockly.Blocks['argument_editor_boolean'] = { @@ -1261,6 +1265,9 @@ Blockly.Blocks['argument_editor_command'] = { "text": "foo" } ], + "colour": Blockly.Colours.textField, + "colourSecondary": Blockly.Colours.textField, + "colourTertiary": Blockly.Colours.textField, "extensions": ["colours_more", "shape_statement"], }); }, From 20db3701d922537842aa96bac19e53a9a7f7f8f6 Mon Sep 17 00:00:00 2001 From: sussy layers dev <72522395+jwklong@users.noreply.github.com> Date: Mon, 9 Sep 2024 22:32:55 +0100 Subject: [PATCH 075/150] i wonder --- core/scratch_blocks_utils.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/scratch_blocks_utils.js b/core/scratch_blocks_utils.js index aa44203c5d..d17572d777 100644 --- a/core/scratch_blocks_utils.js +++ b/core/scratch_blocks_utils.js @@ -84,7 +84,8 @@ Blockly.scratchBlocksUtils.changeObscuredShadowIds = function(block) { */ Blockly.scratchBlocksUtils.isShadowArgumentReporter = function(block) { return (block.isShadow() && (block.type == 'argument_reporter_boolean' || - block.type == 'argument_reporter_string_number')); + block.type == 'argument_reporter_string_number' || + block.type == 'argument_reporter_command')); }; /** From b9ca2e0862226948196618a556926a76e8438734 Mon Sep 17 00:00:00 2001 From: JeremyGamer13 <69337718+JeremyGamer13@users.noreply.github.com> Date: Sun, 27 Oct 2024 00:20:52 -0600 Subject: [PATCH 076/150] is clone block --- blocks_vertical/control.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/blocks_vertical/control.js b/blocks_vertical/control.js index 62c516e492..8063ab3b46 100644 --- a/blocks_vertical/control.js +++ b/blocks_vertical/control.js @@ -640,6 +640,20 @@ Blockly.Blocks['control_delete_this_clone'] = { } }; +Blockly.Blocks['control_is_clone'] = { + /** + * pm: Block to check if a sprite is a clone. + * @this Blockly.Block + */ + init: function () { + this.jsonInit({ + "message0": "is clone?", + "category": Blockly.Categories.control, + "extensions": ["colours_control", "output_boolean"] + }); + } +}; + Blockly.Blocks['control_stop_sprite_menu'] = { /** * pm: Stop-sprite drop-down menu. From 4456da62279a14aea853707f4fd165f13392cb6a Mon Sep 17 00:00:00 2001 From: JeremyGamer13 <69337718+JeremyGamer13@users.noreply.github.com> Date: Sun, 27 Oct 2024 01:49:09 -0600 Subject: [PATCH 077/150] add monitors to existing blocks in the palette --- blocks_vertical/looks.js | 8 ++++++++ blocks_vertical/sensing.js | 10 +++++++++- blocks_vertical/sound.js | 1 + 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/blocks_vertical/looks.js b/blocks_vertical/looks.js index 796f83898d..e46055f563 100644 --- a/blocks_vertical/looks.js +++ b/blocks_vertical/looks.js @@ -357,6 +357,7 @@ Blockly.Blocks['looks_tintColor'] = { this.jsonInit({ "message0": "tint color", "category": Blockly.Categories.looks, + "checkboxInFlyout": true, "extensions": ["colours_looks", "output_string"] }); } @@ -784,6 +785,7 @@ Blockly.Blocks["looks_layersGetLayer"] = { "inputsInline": true, "category": "looks", "message0": "layer", + "checkboxInFlyout": true, "extensions": [ "output_number", "colours_looks" @@ -918,6 +920,7 @@ Blockly.Blocks["looks_stretchGetX"] = { init: function() { this.jsonInit({ "inputsInline": true, + "checkboxInFlyout": true, "category": "looks", "message0": "x stretch", "extensions": [ @@ -932,6 +935,7 @@ Blockly.Blocks["looks_stretchGetY"] = { init: function() { this.jsonInit({ "inputsInline": true, + "checkboxInFlyout": true, "category": "looks", "message0": "y stretch", "extensions": [ @@ -948,6 +952,7 @@ Blockly.Blocks["looks_getSpriteVisible"] = { "inputsInline": true, "category": "looks", "message0": "visible?", + "checkboxInFlyout": true, "extensions": [ "output_boolean", "colours_looks" @@ -1004,6 +1009,7 @@ Blockly.Blocks["looks_getEffectValue"] = { "inputsInline": true, "category": "looks", "message0": "%1 effect", + "checkboxInFlyout": true, "args0": [ { "type": "field_dropdown", @@ -1038,6 +1044,7 @@ Blockly.Blocks["looks_sayHeight"] = { "inputsInline": true, "category": "looks", "message0": "bubble height", + "checkboxInFlyout": true, "extensions": [ "output_string", "colours_looks" @@ -1052,6 +1059,7 @@ Blockly.Blocks["looks_sayWidth"] = { "inputsInline": true, "category": "looks", "message0": "bubble width", + "checkboxInFlyout": true, "extensions": [ "output_string", "colours_looks" diff --git a/blocks_vertical/sensing.js b/blocks_vertical/sensing.js index 958c091eb9..cb2ed88d19 100644 --- a/blocks_vertical/sensing.js +++ b/blocks_vertical/sensing.js @@ -443,6 +443,7 @@ Blockly.Blocks['sensing_mousedown'] = { this.jsonInit({ "message0": Blockly.Msg.SENSING_MOUSEDOWN, "category": Blockly.Categories.sensing, + "checkboxInFlyout": true, "extensions": ["colours_sensing", "output_boolean"] }); } @@ -457,6 +458,7 @@ Blockly.Blocks['sensing_mouseclicked'] = { this.jsonInit({ "message0": "mouse clicked?", "category": Blockly.Categories.sensing, + "checkboxInFlyout": true, "extensions": ["colours_sensing", "output_boolean"] }); } @@ -511,6 +513,7 @@ Blockly.Blocks['sensing_mousex'] = { this.jsonInit({ "message0": Blockly.Msg.SENSING_MOUSEX, "category": Blockly.Categories.sensing, + "checkboxInFlyout": true, "extensions": ["colours_sensing", "output_number"] }); } @@ -525,6 +528,7 @@ Blockly.Blocks['sensing_mousey'] = { this.jsonInit({ "message0": Blockly.Msg.SENSING_MOUSEY, "category": Blockly.Categories.sensing, + "checkboxInFlyout": true, "extensions": ["colours_sensing", "output_number"] }); } @@ -599,6 +603,7 @@ Blockly.Blocks['sensing_getclipboard'] = { this.jsonInit({ "message0": Blockly.Msg.SENSING_CLIPBOARDITEM, "category": Blockly.Categories.sensing, + "checkboxInFlyout": true, "extensions": ["colours_sensing", "output_string"] }); } @@ -668,6 +673,7 @@ Blockly.Blocks['sensing_loud'] = { this.jsonInit({ "message0": Blockly.Msg.SENSING_LOUD, "category": Blockly.Categories.sensing, + "checkboxInFlyout": true, "extensions": ["colours_sensing", "output_boolean"] }); } @@ -804,6 +810,7 @@ Blockly.Blocks['sensing_dayssince2000'] = { this.jsonInit({ "message0": Blockly.Msg.SENSING_DAYSSINCE2000, "category": Blockly.Categories.sensing, + "checkboxInFlyout": true, "extensions": ["colours_sensing", "output_number"] }); } @@ -826,13 +833,14 @@ Blockly.Blocks['sensing_username'] = { Blockly.Blocks['sensing_loggedin'] = { /** - * Block to report user's username + * pm: Block to report if a user is logged in. * @this Blockly.Block */ init: function () { this.jsonInit({ "message0": 'logged in?', "category": Blockly.Categories.sensing, + "checkboxInFlyout": true, "extensions": ["colours_sensing", "output_boolean"] }); } diff --git a/blocks_vertical/sound.js b/blocks_vertical/sound.js index eeeeacd01a..4142193f75 100644 --- a/blocks_vertical/sound.js +++ b/blocks_vertical/sound.js @@ -341,6 +341,7 @@ Blockly.Blocks['sound_getEffectValue'] = { this.jsonInit({ "inputsInline": true, "message0": "%1 effect", + "checkboxInFlyout": true, "category": Blockly.Categories.sound, "args0": [ { From 6c16a8701ed57151d07187c24b632bdd530e21ea Mon Sep 17 00:00:00 2001 From: JeremyGamer13 <69337718+JeremyGamer13@users.noreply.github.com> Date: Sun, 27 Oct 2024 02:03:40 -0600 Subject: [PATCH 078/150] no way i forgot draggable --- blocks_vertical/sensing.js | 1 + 1 file changed, 1 insertion(+) diff --git a/blocks_vertical/sensing.js b/blocks_vertical/sensing.js index cb2ed88d19..983eb25259 100644 --- a/blocks_vertical/sensing.js +++ b/blocks_vertical/sensing.js @@ -642,6 +642,7 @@ Blockly.Blocks['sensing_getdragmode'] = { this.jsonInit({ "message0": "draggable?", "category": Blockly.Categories.sensing, + "checkboxInFlyout": true, "extensions": ["colours_sensing", "output_boolean"] }); } From 4545bb9452f38b45272a24f93f39f429794556d2 Mon Sep 17 00:00:00 2001 From: JeremyGamer13 <69337718+JeremyGamer13@users.noreply.github.com> Date: Sun, 27 Oct 2024 02:47:09 -0600 Subject: [PATCH 079/150] add () touching clone of ()? --- blocks_vertical/sensing.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/blocks_vertical/sensing.js b/blocks_vertical/sensing.js index 983eb25259..9a7995901e 100644 --- a/blocks_vertical/sensing.js +++ b/blocks_vertical/sensing.js @@ -48,6 +48,30 @@ Blockly.Blocks['sensing_touchingobject'] = { } }; +Blockly.Blocks['sensing_objecttouchingclonesprite'] = { + /** + * pm: Block to Report if an Object is touching a clone of another sprite. + * @this Blockly.Block + */ + init: function () { + this.jsonInit({ + "message0": "%1 touching clone of %2?", + "args0": [ + { + "type": "input_value", + "name": "FULLTOUCHINGOBJECTMENU" + }, + { + "type": "input_value", + "name": "SPRITETOUCHINGOBJECTMENU" + } + ], + "category": Blockly.Categories.sensing, + "extensions": ["colours_sensing", "output_boolean"] + }); + } +}; + Blockly.Blocks['sensing_objecttouchingobject'] = { /** * pm" Block to Report if an Object is touching another Object. From 252ba3f949610dfcaad66ae2f7811377178b3366 Mon Sep 17 00:00:00 2001 From: sussy layers dev <72522395+jwklong@users.noreply.github.com> Date: Sun, 27 Oct 2024 10:03:01 +0000 Subject: [PATCH 080/150] dual block test --- blocks_vertical/live_tests.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/blocks_vertical/live_tests.js b/blocks_vertical/live_tests.js index 8a98de333d..f67f6d2ac3 100644 --- a/blocks_vertical/live_tests.js +++ b/blocks_vertical/live_tests.js @@ -288,6 +288,19 @@ Blockly.Blocks['control_blockduplicatesondrag'] = { } }; +Blockly.Blocks['control_dualblock'] = { + /** + * @this Blockly.Block + */ + init: function () { + this.jsonInit({ + "message0": 'dual block', + "category": Blockly.Categories.control, + "extensions": ["colours_control", "shape_statement", "output_string"] + }); + } +}; + Blockly.Blocks['operators_expandablejoininputs'] = { /** * @this Blockly.Block @@ -390,4 +403,4 @@ Blockly.Blocks['operators_expandablejoininputs'] = { 'mutation', null, oldMutation, newMutation)); Blockly.Events.setGroup(false); } -}; \ No newline at end of file +}; From 2ede3c5d388cf851e53984e5815bbcfe4a4e029c Mon Sep 17 00:00:00 2001 From: sussy layers dev <72522395+jwklong@users.noreply.github.com> Date: Sun, 27 Oct 2024 14:06:18 +0000 Subject: [PATCH 081/150] fix dual block connection thing --- core/insertion_marker_manager.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/insertion_marker_manager.js b/core/insertion_marker_manager.js index 2136a43f33..c9379d726a 100644 --- a/core/insertion_marker_manager.js +++ b/core/insertion_marker_manager.js @@ -638,7 +638,8 @@ Blockly.InsertionMarkerManager.prototype.disconnectMarker_ = function() { } if (imConn.targetConnection) { - throw 'markerConnection_ still connected at the end of disconnectInsertionMarker'; + imConn.disconnect() + //throw 'markerConnection_ still connected at the end of disconnectInsertionMarker'; } this.markerConnection_ = null; From c5d43247ec8716744ff1c43f4131833425ddeca6 Mon Sep 17 00:00:00 2001 From: sussy layers dev <72522395+jwklong@users.noreply.github.com> Date: Sun, 27 Oct 2024 14:11:37 +0000 Subject: [PATCH 082/150] fix? --- core/insertion_marker_manager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/insertion_marker_manager.js b/core/insertion_marker_manager.js index c9379d726a..3dcf8393c9 100644 --- a/core/insertion_marker_manager.js +++ b/core/insertion_marker_manager.js @@ -638,7 +638,7 @@ Blockly.InsertionMarkerManager.prototype.disconnectMarker_ = function() { } if (imConn.targetConnection) { - imConn.disconnect() + imConn.targetConnection.disconnect() //throw 'markerConnection_ still connected at the end of disconnectInsertionMarker'; } From d583091ff566d05cf11808278ad24a2bec830b1e Mon Sep 17 00:00:00 2001 From: sussy layers dev <72522395+jwklong@users.noreply.github.com> Date: Sun, 27 Oct 2024 14:28:04 +0000 Subject: [PATCH 083/150] revert --- core/insertion_marker_manager.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/insertion_marker_manager.js b/core/insertion_marker_manager.js index 3dcf8393c9..2136a43f33 100644 --- a/core/insertion_marker_manager.js +++ b/core/insertion_marker_manager.js @@ -638,8 +638,7 @@ Blockly.InsertionMarkerManager.prototype.disconnectMarker_ = function() { } if (imConn.targetConnection) { - imConn.targetConnection.disconnect() - //throw 'markerConnection_ still connected at the end of disconnectInsertionMarker'; + throw 'markerConnection_ still connected at the end of disconnectInsertionMarker'; } this.markerConnection_ = null; From cde554572b8095a2bf67c9b0a05fa7ea9e4c5b30 Mon Sep 17 00:00:00 2001 From: sussy layers dev <72522395+jwklong@users.noreply.github.com> Date: Sun, 27 Oct 2024 14:36:15 +0000 Subject: [PATCH 084/150] what if i didn't do anything --- core/insertion_marker_manager.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/insertion_marker_manager.js b/core/insertion_marker_manager.js index 2136a43f33..f3f17aeac2 100644 --- a/core/insertion_marker_manager.js +++ b/core/insertion_marker_manager.js @@ -548,7 +548,8 @@ Blockly.InsertionMarkerManager.prototype.maybeHidePreview_ = function(candidate) Blockly.InsertionMarkerManager.prototype.hidePreview_ = function() { if (this.highlightingBlock_) { this.unhighlightBlock_(); - } else if (this.markerConnection_) { + } + if (this.markerConnection_) { this.disconnectMarker_(); } }; @@ -638,7 +639,7 @@ Blockly.InsertionMarkerManager.prototype.disconnectMarker_ = function() { } if (imConn.targetConnection) { - throw 'markerConnection_ still connected at the end of disconnectInsertionMarker'; + //throw 'markerConnection_ still connected at the end of disconnectInsertionMarker'; } this.markerConnection_ = null; From fd2abcc0f46006c46f97707f86ea42a5d81a369a Mon Sep 17 00:00:00 2001 From: sussy layers dev <72522395+jwklong@users.noreply.github.com> Date: Sun, 27 Oct 2024 14:45:33 +0000 Subject: [PATCH 085/150] test --- core/insertion_marker_manager.js | 1 + 1 file changed, 1 insertion(+) diff --git a/core/insertion_marker_manager.js b/core/insertion_marker_manager.js index f3f17aeac2..239251ce8c 100644 --- a/core/insertion_marker_manager.js +++ b/core/insertion_marker_manager.js @@ -639,6 +639,7 @@ Blockly.InsertionMarkerManager.prototype.disconnectMarker_ = function() { } if (imConn.targetConnection) { + imConn.targetConnection.sourceBlock_.unplug() //throw 'markerConnection_ still connected at the end of disconnectInsertionMarker'; } From b21a04dc52b24f42316c84590ff3c6b3af3cab89 Mon Sep 17 00:00:00 2001 From: sussy layers dev <72522395+jwklong@users.noreply.github.com> Date: Sun, 27 Oct 2024 15:02:27 +0000 Subject: [PATCH 086/150] just revert everythingg --- core/insertion_marker_manager.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/core/insertion_marker_manager.js b/core/insertion_marker_manager.js index 239251ce8c..2136a43f33 100644 --- a/core/insertion_marker_manager.js +++ b/core/insertion_marker_manager.js @@ -548,8 +548,7 @@ Blockly.InsertionMarkerManager.prototype.maybeHidePreview_ = function(candidate) Blockly.InsertionMarkerManager.prototype.hidePreview_ = function() { if (this.highlightingBlock_) { this.unhighlightBlock_(); - } - if (this.markerConnection_) { + } else if (this.markerConnection_) { this.disconnectMarker_(); } }; @@ -639,8 +638,7 @@ Blockly.InsertionMarkerManager.prototype.disconnectMarker_ = function() { } if (imConn.targetConnection) { - imConn.targetConnection.sourceBlock_.unplug() - //throw 'markerConnection_ still connected at the end of disconnectInsertionMarker'; + throw 'markerConnection_ still connected at the end of disconnectInsertionMarker'; } this.markerConnection_ = null; From 250c9911b7d8334c9943404ff20473242e73f9aa Mon Sep 17 00:00:00 2001 From: jwklong Date: Fri, 15 Nov 2024 18:16:58 +0000 Subject: [PATCH 087/150] testing new block shapes --- core/block.js | 2 +- core/block_render.js | 49 ++++++++++++++++++++++++++++++++++++++++++-- core/constants.js | 6 ++++++ 3 files changed, 54 insertions(+), 3 deletions(-) diff --git a/core/block.js b/core/block.js index 8e7525d918..955b01c72d 100644 --- a/core/block.js +++ b/core/block.js @@ -1668,7 +1668,7 @@ Blockly.Block.prototype.setCommentText = function(text) { /** * Set this block's output shape. - * e.g., null, OUTPUT_SHAPE_HEXAGONAL, OUTPUT_SHAPE_ROUND, OUTPUT_SHAPE_SQUARE. + * e.g., null, OUTPUT_SHAPE_HEXAGONAL, OUTPUT_SHAPE_ROUND, OUTPUT_SHAPE_SQUARE, etc. * @param {?number} outputShape Value representing output shape * (see constants.js). */ diff --git a/core/block_render.js b/core/block_render.js index d85f8d8ab4..30f11dabd0 100644 --- a/core/block_render.js +++ b/core/block_render.js @@ -255,6 +255,26 @@ Blockly.BlockSvg.INNER_BOTTOM_LEFT_CORNER = Blockly.BlockSvg.CORNER_RADIUS + ',' + Blockly.BlockSvg.CORNER_RADIUS; +/** + * SVG path for an empty leaf input shape. + * @const + */ +Blockly.BlockSvg.INPUT_SHAPE_LEAF = + 'M ' + 4 * Blockly.BlockSvg.GRID_UNIT + ',0 ' + + ' h ' + 4 * Blockly.BlockSvg.GRID_UNIT + + ' l ' + 4 * Blockly.BlockSvg.GRID_UNIT + ',' + 4 * Blockly.BlockSvg.GRID_UNIT + + ' l ' + -4 * Blockly.BlockSvg.GRID_UNIT + ',' + 4 * Blockly.BlockSvg.GRID_UNIT + + ' h ' + -4 * Blockly.BlockSvg.GRID_UNIT + + ' l ' + -4 * Blockly.BlockSvg.GRID_UNIT + ',' + -4 * Blockly.BlockSvg.GRID_UNIT + + ' l ' + 4 * Blockly.BlockSvg.GRID_UNIT + ',' + -4 * Blockly.BlockSvg.GRID_UNIT + + ' z'; + +/** + * Width of empty leaf input shape. + * @const + */ +Blockly.BlockSvg.INPUT_SHAPE_LEAF_WIDTH = 12 * Blockly.BlockSvg.GRID_UNIT; + /** * SVG path for an empty hexagonal input shape. * @const @@ -938,6 +958,8 @@ Blockly.BlockSvg.prototype.computeInputWidth_ = function(input) { return Blockly.BlockSvg.INPUT_SHAPE_ROUND_WIDTH; case Blockly.OUTPUT_SHAPE_HEXAGONAL: return Blockly.BlockSvg.INPUT_SHAPE_HEXAGONAL_WIDTH; + case Blockly.OUTPUT_SHAPE_LEAF: + return Blockly.BlockSvg.INPUT_SHAPE_LEAF_WIDTH; default: return 0; } @@ -1156,7 +1178,7 @@ Blockly.BlockSvg.prototype.renderDraw_ = function(iconWidth, inputRows) { if (this.outputConnection) { // Width of the curve/pointy-curve var shape = this.getOutputShape(); - if (shape === Blockly.OUTPUT_SHAPE_HEXAGONAL || shape === Blockly.OUTPUT_SHAPE_ROUND) { + if (shape === Blockly.OUTPUT_SHAPE_HEXAGONAL || shape === Blockly.OUTPUT_SHAPE_ROUND || shape === Blockly.OUTPUT_SHAPE_LEAF) { this.edgeShapeWidth_ = inputRows.bottomEdge / 2; this.edgeShape_ = shape; this.squareTopLeftCorner_ = true; @@ -1199,6 +1221,8 @@ Blockly.BlockSvg.prototype.renderClassify_ = function() { shapes.push('boolean'); } else if (this.edgeShape_ === Blockly.OUTPUT_SHAPE_ROUND) { shapes.push('round'); + } else if (this.edgeShape_ === Blockly.OUTPUT_SHAPE_LEAF) { + shapes.push('leaf'); } } else { // count the number of statement inputs @@ -1488,6 +1512,14 @@ Blockly.BlockSvg.prototype.renderDrawLeft_ = function(steps) { // Draw a half-hexagon. steps.push('l ' + -this.edgeShapeWidth_ + ' ' + -this.edgeShapeWidth_ + ' l ' + this.edgeShapeWidth_ + ' ' + -this.edgeShapeWidth_); + } else if (this.edgeShape_ === Blockly.OUTPUT_SHAPE_LEAF) { + // Draw a half-leaf. + steps.push( + `a ${this.edgeShapeWidth_} ${this.edgeShapeWidth_} a 1 1 0 0 0 -${this.edgeShapeWidth_} ${this.edgeShapeWidth_}` + + `l 0 ${this.edgeShapeWidth_ * 0.6}` + + `a ${this.edgeShapeWidth_ * 0.4} ${this.edgeShapeWidth_ * 0.4} a 1 1 0 0 0 ${this.edgeShapeWidth_ * 0.4} ${this.edgeShapeWidth_ * 0.4}` + + `l ${this.edgeShapeWidth_ * 0.6} 0` + ); } } steps.push('z'); @@ -1507,9 +1539,17 @@ Blockly.BlockSvg.prototype.drawEdgeShapeRight_ = function(steps) { steps.push('a ' + this.edgeShapeWidth_ + ' ' + this.edgeShapeWidth_ + ' 0 0 1 0 ' + this.edgeShapeWidth_ * 2); } else if (this.edgeShape_ === Blockly.OUTPUT_SHAPE_HEXAGONAL) { - // Draw an half-hexagon. + // Draw a half-hexagon. steps.push('l ' + this.edgeShapeWidth_ + ' ' + this.edgeShapeWidth_ + ' l ' + -this.edgeShapeWidth_ + ' ' + this.edgeShapeWidth_); + } else if (this.edgeShape_ === Blockly.OUTPUT_SHAPE_LEAF) { + // Draw a half-leaf. + steps.push( + `a ${this.edgeShapeWidth_} ${this.edgeShapeWidth_} a 1 1 0 0 0 ${this.edgeShapeWidth_} -${this.edgeShapeWidth_}` + + `l 0 -${this.edgeShapeWidth_ * 0.6}` + + `a ${this.edgeShapeWidth_ * 0.4} ${this.edgeShapeWidth_ * 0.4} a 1 1 0 0 0 -${this.edgeShapeWidth_ * 0.4} -${this.edgeShapeWidth_ * 0.4}` + + `l -${this.edgeShapeWidth_ * 0.6} 0` + ); } } }; @@ -1676,6 +1716,11 @@ Blockly.BlockSvg.getInputShapeInfo_ = function(shape) { var inputShapeWidth = 0; switch (shape) { + case Blockly.OUTPUT_SHAPE_LEAF: + inputShapePath = Blockly.BlockSvg.INPUT_SHAPE_LEAF; + inputShapeWidth = Blockly.BlockSvg.INPUT_SHAPE_LEAF_WIDTH; + inputShapeArgType = 'leaf'; + break; case Blockly.OUTPUT_SHAPE_HEXAGONAL: inputShapePath = Blockly.BlockSvg.INPUT_SHAPE_HEXAGONAL; inputShapeWidth = Blockly.BlockSvg.INPUT_SHAPE_HEXAGONAL_WIDTH; diff --git a/core/constants.js b/core/constants.js index 1d4a00800f..9b1db85079 100644 --- a/core/constants.js +++ b/core/constants.js @@ -254,6 +254,12 @@ Blockly.OUTPUT_SHAPE_ROUND = 2; */ Blockly.OUTPUT_SHAPE_SQUARE = 3; +/** + * ENUM for output shape: leaf (really anything but i (jwklong) made it specifically for som of my extensions). + * @const + */ +Blockly.OUTPUT_SHAPE_LEAF = 4; + /** * ENUM for categories. * @const From b10e163ba8bc58a66a59033301a92f7a659febd1 Mon Sep 17 00:00:00 2001 From: jwklong Date: Fri, 15 Nov 2024 18:36:22 +0000 Subject: [PATCH 088/150] add padding for custom shape --- core/block_render.js | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/core/block_render.js b/core/block_render.js index 30f11dabd0..6e837d60d5 100644 --- a/core/block_render.js +++ b/core/block_render.js @@ -470,19 +470,29 @@ Blockly.BlockSvg.SHAPE_IN_SHAPE_PADDING = { 0: 5 * Blockly.BlockSvg.GRID_UNIT, // Field in hexagon. 1: 2 * Blockly.BlockSvg.GRID_UNIT, // Hexagon in hexagon. 2: 5 * Blockly.BlockSvg.GRID_UNIT, // Round in hexagon. - 3: 5 * Blockly.BlockSvg.GRID_UNIT // Square in hexagon. + 3: 5 * Blockly.BlockSvg.GRID_UNIT, // Square in hexagon. + 4: 5 * Blockly.BlockSvg.GRID_UNIT // Leaf in hexagon. }, 2: { // Outer shape: round. 0: 3 * Blockly.BlockSvg.GRID_UNIT, // Field in round. 1: 3 * Blockly.BlockSvg.GRID_UNIT, // Hexagon in round. 2: 1 * Blockly.BlockSvg.GRID_UNIT, // Round in round. - 3: 2 * Blockly.BlockSvg.GRID_UNIT // Square in round. + 3: 2 * Blockly.BlockSvg.GRID_UNIT, // Square in round. + 4: 2 * Blockly.BlockSvg.GRID_UNIT // Leaf in round. }, 3: { // Outer shape: square. 0: 2 * Blockly.BlockSvg.GRID_UNIT, // Field in square. 1: 2 * Blockly.BlockSvg.GRID_UNIT, // Hexagon in square. 2: 2 * Blockly.BlockSvg.GRID_UNIT, // Round in square. - 3: 2 * Blockly.BlockSvg.GRID_UNIT // Square in square. + 3: 2 * Blockly.BlockSvg.GRID_UNIT, // Square in square. + 4: 2 * Blockly.BlockSvg.GRID_UNIT // Leaf in square. + }, + 4: { // Outer shape: leaf. + 0: 3 * Blockly.BlockSvg.GRID_UNIT, // Field in leaf. + 1: 3 * Blockly.BlockSvg.GRID_UNIT, // Hexagon in leaf. + 2: 2 * Blockly.BlockSvg.GRID_UNIT, // Round in leaf. + 3: 2 * Blockly.BlockSvg.GRID_UNIT, // Square in leaf. + 4: 1 * Blockly.BlockSvg.GRID_UNIT // Leaf in leaf. } }; From 964afc8f2dfe61a892b30718f47a60ed7b898dbc Mon Sep 17 00:00:00 2001 From: jwklong Date: Fri, 15 Nov 2024 18:47:17 +0000 Subject: [PATCH 089/150] 'Silly me!' ahh --- core/block_render.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/block_render.js b/core/block_render.js index 6e837d60d5..e4ad08e500 100644 --- a/core/block_render.js +++ b/core/block_render.js @@ -1525,9 +1525,9 @@ Blockly.BlockSvg.prototype.renderDrawLeft_ = function(steps) { } else if (this.edgeShape_ === Blockly.OUTPUT_SHAPE_LEAF) { // Draw a half-leaf. steps.push( - `a ${this.edgeShapeWidth_} ${this.edgeShapeWidth_} a 1 1 0 0 0 -${this.edgeShapeWidth_} ${this.edgeShapeWidth_}` + + `a ${this.edgeShapeWidth_} ${this.edgeShapeWidth_} 0 0 0 -${this.edgeShapeWidth_} ${this.edgeShapeWidth_}` + `l 0 ${this.edgeShapeWidth_ * 0.6}` + - `a ${this.edgeShapeWidth_ * 0.4} ${this.edgeShapeWidth_ * 0.4} a 1 1 0 0 0 ${this.edgeShapeWidth_ * 0.4} ${this.edgeShapeWidth_ * 0.4}` + + `a ${this.edgeShapeWidth_ * 0.4} ${this.edgeShapeWidth_ * 0.4} 0 0 0 ${this.edgeShapeWidth_ * 0.4} ${this.edgeShapeWidth_ * 0.4}` + `l ${this.edgeShapeWidth_ * 0.6} 0` ); } From 715655505e13a9d2c0fa445865b7599f60090cb4 Mon Sep 17 00:00:00 2001 From: jwklong Date: Fri, 15 Nov 2024 18:54:35 +0000 Subject: [PATCH 090/150] jwklong makes rookie mistake jumpscare --- core/block_render.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/core/block_render.js b/core/block_render.js index e4ad08e500..fe6cf610b6 100644 --- a/core/block_render.js +++ b/core/block_render.js @@ -1525,9 +1525,9 @@ Blockly.BlockSvg.prototype.renderDrawLeft_ = function(steps) { } else if (this.edgeShape_ === Blockly.OUTPUT_SHAPE_LEAF) { // Draw a half-leaf. steps.push( - `a ${this.edgeShapeWidth_} ${this.edgeShapeWidth_} 0 0 0 -${this.edgeShapeWidth_} ${this.edgeShapeWidth_}` + - `l 0 ${this.edgeShapeWidth_ * 0.6}` + - `a ${this.edgeShapeWidth_ * 0.4} ${this.edgeShapeWidth_ * 0.4} 0 0 0 ${this.edgeShapeWidth_ * 0.4} ${this.edgeShapeWidth_ * 0.4}` + + `a ${this.edgeShapeWidth_} ${this.edgeShapeWidth_} 0 0 0 -${this.edgeShapeWidth_} ${this.edgeShapeWidth_} ` + + `l 0 ${this.edgeShapeWidth_ * 0.6} ` + + `a ${this.edgeShapeWidth_ * 0.4} ${this.edgeShapeWidth_ * 0.4} 0 0 0 ${this.edgeShapeWidth_ * 0.4} ${this.edgeShapeWidth_ * 0.4} ` + `l ${this.edgeShapeWidth_ * 0.6} 0` ); } @@ -1555,9 +1555,9 @@ Blockly.BlockSvg.prototype.drawEdgeShapeRight_ = function(steps) { } else if (this.edgeShape_ === Blockly.OUTPUT_SHAPE_LEAF) { // Draw a half-leaf. steps.push( - `a ${this.edgeShapeWidth_} ${this.edgeShapeWidth_} a 1 1 0 0 0 ${this.edgeShapeWidth_} -${this.edgeShapeWidth_}` + - `l 0 -${this.edgeShapeWidth_ * 0.6}` + - `a ${this.edgeShapeWidth_ * 0.4} ${this.edgeShapeWidth_ * 0.4} a 1 1 0 0 0 -${this.edgeShapeWidth_ * 0.4} -${this.edgeShapeWidth_ * 0.4}` + + `a ${this.edgeShapeWidth_} ${this.edgeShapeWidth_} 0 0 0 ${this.edgeShapeWidth_} -${this.edgeShapeWidth_} ` + + `l 0 -${this.edgeShapeWidth_ * 0.6} ` + + `a ${this.edgeShapeWidth_ * 0.4} ${this.edgeShapeWidth_ * 0.4} 0 0 0 -${this.edgeShapeWidth_ * 0.4} -${this.edgeShapeWidth_ * 0.4} ` + `l -${this.edgeShapeWidth_ * 0.6} 0` ); } From 7001a4a191b18951bbebc5b2bda42da58de227ed Mon Sep 17 00:00:00 2001 From: jwklong Date: Fri, 15 Nov 2024 19:19:52 +0000 Subject: [PATCH 091/150] swappity swap --- core/block_render.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/core/block_render.js b/core/block_render.js index fe6cf610b6..83f097220c 100644 --- a/core/block_render.js +++ b/core/block_render.js @@ -1525,10 +1525,10 @@ Blockly.BlockSvg.prototype.renderDrawLeft_ = function(steps) { } else if (this.edgeShape_ === Blockly.OUTPUT_SHAPE_LEAF) { // Draw a half-leaf. steps.push( - `a ${this.edgeShapeWidth_} ${this.edgeShapeWidth_} 0 0 0 -${this.edgeShapeWidth_} ${this.edgeShapeWidth_} ` + - `l 0 ${this.edgeShapeWidth_ * 0.6} ` + - `a ${this.edgeShapeWidth_ * 0.4} ${this.edgeShapeWidth_ * 0.4} 0 0 0 ${this.edgeShapeWidth_ * 0.4} ${this.edgeShapeWidth_ * 0.4} ` + - `l ${this.edgeShapeWidth_ * 0.6} 0` + `a ${this.edgeShapeWidth_} ${this.edgeShapeWidth_} 0 0 0 ${this.edgeShapeWidth_} -${this.edgeShapeWidth_} ` + + `l 0 -${this.edgeShapeWidth_ * 0.6} ` + + `a ${this.edgeShapeWidth_ * 0.4} ${this.edgeShapeWidth_ * 0.4} 0 0 0 -${this.edgeShapeWidth_ * 0.4} -${this.edgeShapeWidth_ * 0.4} ` + + `l -${this.edgeShapeWidth_ * 0.6} 0` ); } } @@ -1555,10 +1555,10 @@ Blockly.BlockSvg.prototype.drawEdgeShapeRight_ = function(steps) { } else if (this.edgeShape_ === Blockly.OUTPUT_SHAPE_LEAF) { // Draw a half-leaf. steps.push( - `a ${this.edgeShapeWidth_} ${this.edgeShapeWidth_} 0 0 0 ${this.edgeShapeWidth_} -${this.edgeShapeWidth_} ` + - `l 0 -${this.edgeShapeWidth_ * 0.6} ` + - `a ${this.edgeShapeWidth_ * 0.4} ${this.edgeShapeWidth_ * 0.4} 0 0 0 -${this.edgeShapeWidth_ * 0.4} -${this.edgeShapeWidth_ * 0.4} ` + - `l -${this.edgeShapeWidth_ * 0.6} 0` + `a ${this.edgeShapeWidth_} ${this.edgeShapeWidth_} 0 0 0 -${this.edgeShapeWidth_} ${this.edgeShapeWidth_} ` + + `l 0 ${this.edgeShapeWidth_ * 0.6} ` + + `a ${this.edgeShapeWidth_ * 0.4} ${this.edgeShapeWidth_ * 0.4} 0 0 0 ${this.edgeShapeWidth_ * 0.4} ${this.edgeShapeWidth_ * 0.4} ` + + `l ${this.edgeShapeWidth_ * 0.6} 0` ); } } From a30e55aad0d801c98f9d395f07762e07e664c5c4 Mon Sep 17 00:00:00 2001 From: jwklong Date: Fri, 15 Nov 2024 19:29:09 +0000 Subject: [PATCH 092/150] FIX --- core/block_render.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/block_render.js b/core/block_render.js index 83f097220c..517aaf6ead 100644 --- a/core/block_render.js +++ b/core/block_render.js @@ -1528,7 +1528,7 @@ Blockly.BlockSvg.prototype.renderDrawLeft_ = function(steps) { `a ${this.edgeShapeWidth_} ${this.edgeShapeWidth_} 0 0 0 ${this.edgeShapeWidth_} -${this.edgeShapeWidth_} ` + `l 0 -${this.edgeShapeWidth_ * 0.6} ` + `a ${this.edgeShapeWidth_ * 0.4} ${this.edgeShapeWidth_ * 0.4} 0 0 0 -${this.edgeShapeWidth_ * 0.4} -${this.edgeShapeWidth_ * 0.4} ` + - `l -${this.edgeShapeWidth_ * 0.6} 0` + `l ${this.edgeShapeWidth_ * 0.6} 0` ); } } @@ -1558,7 +1558,7 @@ Blockly.BlockSvg.prototype.drawEdgeShapeRight_ = function(steps) { `a ${this.edgeShapeWidth_} ${this.edgeShapeWidth_} 0 0 0 -${this.edgeShapeWidth_} ${this.edgeShapeWidth_} ` + `l 0 ${this.edgeShapeWidth_ * 0.6} ` + `a ${this.edgeShapeWidth_ * 0.4} ${this.edgeShapeWidth_ * 0.4} 0 0 0 ${this.edgeShapeWidth_ * 0.4} ${this.edgeShapeWidth_ * 0.4} ` + - `l ${this.edgeShapeWidth_ * 0.6} 0` + `l -${this.edgeShapeWidth_ * 0.6} 0` ); } } From bdeda8692b3dd796a9f2e0d449786391119a8bff Mon Sep 17 00:00:00 2001 From: jwklong Date: Fri, 15 Nov 2024 19:39:29 +0000 Subject: [PATCH 093/150] im just confused --- core/block_render.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/core/block_render.js b/core/block_render.js index 517aaf6ead..8fb13c994b 100644 --- a/core/block_render.js +++ b/core/block_render.js @@ -1525,10 +1525,10 @@ Blockly.BlockSvg.prototype.renderDrawLeft_ = function(steps) { } else if (this.edgeShape_ === Blockly.OUTPUT_SHAPE_LEAF) { // Draw a half-leaf. steps.push( - `a ${this.edgeShapeWidth_} ${this.edgeShapeWidth_} 0 0 0 ${this.edgeShapeWidth_} -${this.edgeShapeWidth_} ` + - `l 0 -${this.edgeShapeWidth_ * 0.6} ` + - `a ${this.edgeShapeWidth_ * 0.4} ${this.edgeShapeWidth_ * 0.4} 0 0 0 -${this.edgeShapeWidth_ * 0.4} -${this.edgeShapeWidth_ * 0.4} ` + - `l ${this.edgeShapeWidth_ * 0.6} 0` + `a ${this.edgeShapeWidth_} ${this.edgeShapeWidth_} 0 0 0 -${this.edgeShapeWidth_} ${this.edgeShapeWidth_} ` + + `l 0 ${this.edgeShapeWidth_ * 0.6} ` + + `a ${this.edgeShapeWidth_ * 0.4} ${this.edgeShapeWidth_ * 0.4} 0 0 0 ${this.edgeShapeWidth_ * 0.4} ${this.edgeShapeWidth_ * 0.4} ` + + `l -${this.edgeShapeWidth_ * 0.6} 0` ); } } @@ -1555,10 +1555,10 @@ Blockly.BlockSvg.prototype.drawEdgeShapeRight_ = function(steps) { } else if (this.edgeShape_ === Blockly.OUTPUT_SHAPE_LEAF) { // Draw a half-leaf. steps.push( - `a ${this.edgeShapeWidth_} ${this.edgeShapeWidth_} 0 0 0 -${this.edgeShapeWidth_} ${this.edgeShapeWidth_} ` + - `l 0 ${this.edgeShapeWidth_ * 0.6} ` + - `a ${this.edgeShapeWidth_ * 0.4} ${this.edgeShapeWidth_ * 0.4} 0 0 0 ${this.edgeShapeWidth_ * 0.4} ${this.edgeShapeWidth_ * 0.4} ` + - `l -${this.edgeShapeWidth_ * 0.6} 0` + `a ${this.edgeShapeWidth_} ${this.edgeShapeWidth_} 0 0 0 ${this.edgeShapeWidth_} -${this.edgeShapeWidth_} ` + + `l 0 -${this.edgeShapeWidth_ * 0.6} ` + + `a ${this.edgeShapeWidth_ * 0.4} ${this.edgeShapeWidth_ * 0.4} 0 0 0 -${this.edgeShapeWidth_ * 0.4} -${this.edgeShapeWidth_ * 0.4} ` + + `l ${this.edgeShapeWidth_ * 0.6} 0` ); } } From 1e033c4846172190acec0e3f17dff6b322826f0e Mon Sep 17 00:00:00 2001 From: jwklong Date: Fri, 15 Nov 2024 19:48:57 +0000 Subject: [PATCH 094/150] fixxx --- core/block_render.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/core/block_render.js b/core/block_render.js index 8fb13c994b..4b500baa66 100644 --- a/core/block_render.js +++ b/core/block_render.js @@ -1525,9 +1525,9 @@ Blockly.BlockSvg.prototype.renderDrawLeft_ = function(steps) { } else if (this.edgeShape_ === Blockly.OUTPUT_SHAPE_LEAF) { // Draw a half-leaf. steps.push( - `a ${this.edgeShapeWidth_} ${this.edgeShapeWidth_} 0 0 0 -${this.edgeShapeWidth_} ${this.edgeShapeWidth_} ` + - `l 0 ${this.edgeShapeWidth_ * 0.6} ` + - `a ${this.edgeShapeWidth_ * 0.4} ${this.edgeShapeWidth_ * 0.4} 0 0 0 ${this.edgeShapeWidth_ * 0.4} ${this.edgeShapeWidth_ * 0.4} ` + + `a ${this.edgeShapeWidth_} ${this.edgeShapeWidth_} 0 0 0 -${this.edgeShapeWidth_} -${this.edgeShapeWidth_} ` + + `l 0 -${this.edgeShapeWidth_ * 0.6} ` + + `a ${this.edgeShapeWidth_ * 0.4} ${this.edgeShapeWidth_ * 0.4} 0 0 0 ${this.edgeShapeWidth_ * 0.4} -${this.edgeShapeWidth_ * 0.4} ` + `l -${this.edgeShapeWidth_ * 0.6} 0` ); } @@ -1555,9 +1555,9 @@ Blockly.BlockSvg.prototype.drawEdgeShapeRight_ = function(steps) { } else if (this.edgeShape_ === Blockly.OUTPUT_SHAPE_LEAF) { // Draw a half-leaf. steps.push( - `a ${this.edgeShapeWidth_} ${this.edgeShapeWidth_} 0 0 0 ${this.edgeShapeWidth_} -${this.edgeShapeWidth_} ` + - `l 0 -${this.edgeShapeWidth_ * 0.6} ` + - `a ${this.edgeShapeWidth_ * 0.4} ${this.edgeShapeWidth_ * 0.4} 0 0 0 -${this.edgeShapeWidth_ * 0.4} -${this.edgeShapeWidth_ * 0.4} ` + + `a ${this.edgeShapeWidth_} ${this.edgeShapeWidth_} 0 0 0 ${this.edgeShapeWidth_} ${this.edgeShapeWidth_} ` + + `l 0 ${this.edgeShapeWidth_ * 0.6} ` + + `a ${this.edgeShapeWidth_ * 0.4} ${this.edgeShapeWidth_ * 0.4} 0 0 0 -${this.edgeShapeWidth_ * 0.4} ${this.edgeShapeWidth_ * 0.4} ` + `l ${this.edgeShapeWidth_ * 0.6} 0` ); } From c065e0b7ca29b4b765c405671261f7b0580a5267 Mon Sep 17 00:00:00 2001 From: jwklong Date: Fri, 15 Nov 2024 19:54:27 +0000 Subject: [PATCH 095/150] sweep flag --- core/block_render.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/block_render.js b/core/block_render.js index 4b500baa66..af381dc1aa 100644 --- a/core/block_render.js +++ b/core/block_render.js @@ -1525,9 +1525,9 @@ Blockly.BlockSvg.prototype.renderDrawLeft_ = function(steps) { } else if (this.edgeShape_ === Blockly.OUTPUT_SHAPE_LEAF) { // Draw a half-leaf. steps.push( - `a ${this.edgeShapeWidth_} ${this.edgeShapeWidth_} 0 0 0 -${this.edgeShapeWidth_} -${this.edgeShapeWidth_} ` + + `a ${this.edgeShapeWidth_} ${this.edgeShapeWidth_} 0 0 1 -${this.edgeShapeWidth_} -${this.edgeShapeWidth_} ` + `l 0 -${this.edgeShapeWidth_ * 0.6} ` + - `a ${this.edgeShapeWidth_ * 0.4} ${this.edgeShapeWidth_ * 0.4} 0 0 0 ${this.edgeShapeWidth_ * 0.4} -${this.edgeShapeWidth_ * 0.4} ` + + `a ${this.edgeShapeWidth_ * 0.4} ${this.edgeShapeWidth_ * 0.4} 0 0 1 ${this.edgeShapeWidth_ * 0.4} -${this.edgeShapeWidth_ * 0.4} ` + `l -${this.edgeShapeWidth_ * 0.6} 0` ); } @@ -1555,9 +1555,9 @@ Blockly.BlockSvg.prototype.drawEdgeShapeRight_ = function(steps) { } else if (this.edgeShape_ === Blockly.OUTPUT_SHAPE_LEAF) { // Draw a half-leaf. steps.push( - `a ${this.edgeShapeWidth_} ${this.edgeShapeWidth_} 0 0 0 ${this.edgeShapeWidth_} ${this.edgeShapeWidth_} ` + + `a ${this.edgeShapeWidth_} ${this.edgeShapeWidth_} 0 0 1 ${this.edgeShapeWidth_} ${this.edgeShapeWidth_} ` + `l 0 ${this.edgeShapeWidth_ * 0.6} ` + - `a ${this.edgeShapeWidth_ * 0.4} ${this.edgeShapeWidth_ * 0.4} 0 0 0 -${this.edgeShapeWidth_ * 0.4} ${this.edgeShapeWidth_ * 0.4} ` + + `a ${this.edgeShapeWidth_ * 0.4} ${this.edgeShapeWidth_ * 0.4} 0 0 1 -${this.edgeShapeWidth_ * 0.4} ${this.edgeShapeWidth_ * 0.4} ` + `l ${this.edgeShapeWidth_ * 0.6} 0` ); } From 912982f2cf9c43ff061b4eb323060f5fc4deee56 Mon Sep 17 00:00:00 2001 From: jwklong Date: Fri, 15 Nov 2024 20:01:59 +0000 Subject: [PATCH 096/150] get rid of useless l --- core/block_render.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/core/block_render.js b/core/block_render.js index af381dc1aa..d64be5b0c4 100644 --- a/core/block_render.js +++ b/core/block_render.js @@ -1527,8 +1527,7 @@ Blockly.BlockSvg.prototype.renderDrawLeft_ = function(steps) { steps.push( `a ${this.edgeShapeWidth_} ${this.edgeShapeWidth_} 0 0 1 -${this.edgeShapeWidth_} -${this.edgeShapeWidth_} ` + `l 0 -${this.edgeShapeWidth_ * 0.6} ` + - `a ${this.edgeShapeWidth_ * 0.4} ${this.edgeShapeWidth_ * 0.4} 0 0 1 ${this.edgeShapeWidth_ * 0.4} -${this.edgeShapeWidth_ * 0.4} ` + - `l -${this.edgeShapeWidth_ * 0.6} 0` + `a ${this.edgeShapeWidth_ * 0.4} ${this.edgeShapeWidth_ * 0.4} 0 0 1 ${this.edgeShapeWidth_ * 0.4} -${this.edgeShapeWidth_ * 0.4}` ); } } @@ -1557,8 +1556,7 @@ Blockly.BlockSvg.prototype.drawEdgeShapeRight_ = function(steps) { steps.push( `a ${this.edgeShapeWidth_} ${this.edgeShapeWidth_} 0 0 1 ${this.edgeShapeWidth_} ${this.edgeShapeWidth_} ` + `l 0 ${this.edgeShapeWidth_ * 0.6} ` + - `a ${this.edgeShapeWidth_ * 0.4} ${this.edgeShapeWidth_ * 0.4} 0 0 1 -${this.edgeShapeWidth_ * 0.4} ${this.edgeShapeWidth_ * 0.4} ` + - `l ${this.edgeShapeWidth_ * 0.6} 0` + `a ${this.edgeShapeWidth_ * 0.4} ${this.edgeShapeWidth_ * 0.4} 0 0 1 -${this.edgeShapeWidth_ * 0.4} ${this.edgeShapeWidth_ * 0.4}` ); } } From f8792cbb5f46ddfc2d0874c04931cc4ce30c7534 Mon Sep 17 00:00:00 2001 From: jwklong Date: Fri, 15 Nov 2024 21:33:52 +0000 Subject: [PATCH 097/150] leaf input --- core/block_render.js | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/core/block_render.js b/core/block_render.js index d64be5b0c4..b0aa09f4d3 100644 --- a/core/block_render.js +++ b/core/block_render.js @@ -259,15 +259,17 @@ Blockly.BlockSvg.INNER_BOTTOM_LEFT_CORNER = * SVG path for an empty leaf input shape. * @const */ -Blockly.BlockSvg.INPUT_SHAPE_LEAF = - 'M ' + 4 * Blockly.BlockSvg.GRID_UNIT + ',0 ' + - ' h ' + 4 * Blockly.BlockSvg.GRID_UNIT + - ' l ' + 4 * Blockly.BlockSvg.GRID_UNIT + ',' + 4 * Blockly.BlockSvg.GRID_UNIT + - ' l ' + -4 * Blockly.BlockSvg.GRID_UNIT + ',' + 4 * Blockly.BlockSvg.GRID_UNIT + - ' h ' + -4 * Blockly.BlockSvg.GRID_UNIT + - ' l ' + -4 * Blockly.BlockSvg.GRID_UNIT + ',' + -4 * Blockly.BlockSvg.GRID_UNIT + - ' l ' + 4 * Blockly.BlockSvg.GRID_UNIT + ',' + -4 * Blockly.BlockSvg.GRID_UNIT + - ' z'; +Blockly.BlockSvg.INPUT_SHAPE_LEAF = ` + M ${4 * Blockly.BlockSvg.GRID_UNIT} 0 + a ${4 * Blockly.BlockSvg.GRID_UNIT} ${4 * Blockly.BlockSvg.GRID_UNIT} 0 0 1 ${4 * Blockly.BlockSvg.GRID_UNIT} ${4 * Blockly.BlockSvg.GRID_UNIT} + l 0 ${2.4 * Blockly.BlockSvg.GRID_UNIT} + a ${1.6 * Blockly.BlockSvg.GRID_UNIT} ${1.6 * Blockly.BlockSvg.GRID_UNIT} 0 0 1 -${1.6 * Blockly.BlockSvg.GRID_UNIT} ${1.6 * Blockly.BlockSvg.GRID_UNIT} + h ${4 * Blockly.BlockSvg.GRID_UNIT} + a ${4 * Blockly.BlockSvg.GRID_UNIT} ${4 * Blockly.BlockSvg.GRID_UNIT} 0 0 1 -${4 * Blockly.BlockSvg.GRID_UNIT} -${4 * Blockly.BlockSvg.GRID_UNIT} + l 0 -${2.4 * Blockly.BlockSvg.GRID_UNIT} + a ${1.6 * Blockly.BlockSvg.GRID_UNIT} ${1.6 * Blockly.BlockSvg.GRID_UNIT} 0 0 1 ${1.6 * Blockly.BlockSvg.GRID_UNIT} -${1.6 * Blockly.BlockSvg.GRID_UNIT} + z +` /** * Width of empty leaf input shape. From f972fdb413aa41ac45765e0d79eb53a22acff423 Mon Sep 17 00:00:00 2001 From: jwklong Date: Fri, 15 Nov 2024 21:55:10 +0000 Subject: [PATCH 098/150] test plus shape --- core/block_render.js | 62 +++++++++++++++++++++++++++++++++++++++++++- core/constants.js | 6 +++++ 2 files changed, 67 insertions(+), 1 deletion(-) diff --git a/core/block_render.js b/core/block_render.js index b0aa09f4d3..76d74d6d8a 100644 --- a/core/block_render.js +++ b/core/block_render.js @@ -271,6 +271,27 @@ Blockly.BlockSvg.INPUT_SHAPE_LEAF = ` z ` +/** + * Width of empty plus input shape. + * @const + */ +Blockly.BlockSvg.INPUT_SHAPE_PLUS_WIDTH = 12 * Blockly.BlockSvg.GRID_UNIT; +/** + * SVG path for an empty leaf input shape. + * @const + */ +Blockly.BlockSvg.INPUT_SHAPE_PLUS = ` + M ${4 * Blockly.BlockSvg.GRID_UNIT} 0 + a ${4 * Blockly.BlockSvg.GRID_UNIT} ${4 * Blockly.BlockSvg.GRID_UNIT} 0 0 1 ${4 * Blockly.BlockSvg.GRID_UNIT} ${4 * Blockly.BlockSvg.GRID_UNIT} + l 0 ${2.4 * Blockly.BlockSvg.GRID_UNIT} + a ${1.6 * Blockly.BlockSvg.GRID_UNIT} ${1.6 * Blockly.BlockSvg.GRID_UNIT} 0 0 1 -${1.6 * Blockly.BlockSvg.GRID_UNIT} ${1.6 * Blockly.BlockSvg.GRID_UNIT} + h ${4 * Blockly.BlockSvg.GRID_UNIT} + a ${4 * Blockly.BlockSvg.GRID_UNIT} ${4 * Blockly.BlockSvg.GRID_UNIT} 0 0 1 -${4 * Blockly.BlockSvg.GRID_UNIT} -${4 * Blockly.BlockSvg.GRID_UNIT} + l 0 -${2.4 * Blockly.BlockSvg.GRID_UNIT} + a ${1.6 * Blockly.BlockSvg.GRID_UNIT} ${1.6 * Blockly.BlockSvg.GRID_UNIT} 0 0 1 ${1.6 * Blockly.BlockSvg.GRID_UNIT} -${1.6 * Blockly.BlockSvg.GRID_UNIT} + z +` + /** * Width of empty leaf input shape. * @const @@ -972,6 +993,8 @@ Blockly.BlockSvg.prototype.computeInputWidth_ = function(input) { return Blockly.BlockSvg.INPUT_SHAPE_HEXAGONAL_WIDTH; case Blockly.OUTPUT_SHAPE_LEAF: return Blockly.BlockSvg.INPUT_SHAPE_LEAF_WIDTH; + case Blockly.OUTPUT_SHAPE_PLUS: + return Blockly.BlockSvg.INPUT_SHAPE_PLUS_WIDTH; default: return 0; } @@ -1190,7 +1213,7 @@ Blockly.BlockSvg.prototype.renderDraw_ = function(iconWidth, inputRows) { if (this.outputConnection) { // Width of the curve/pointy-curve var shape = this.getOutputShape(); - if (shape === Blockly.OUTPUT_SHAPE_HEXAGONAL || shape === Blockly.OUTPUT_SHAPE_ROUND || shape === Blockly.OUTPUT_SHAPE_LEAF) { + if (shape != Blockly.OUTPUT_SHAPE_SQUARE) { this.edgeShapeWidth_ = inputRows.bottomEdge / 2; this.edgeShape_ = shape; this.squareTopLeftCorner_ = true; @@ -1235,6 +1258,8 @@ Blockly.BlockSvg.prototype.renderClassify_ = function() { shapes.push('round'); } else if (this.edgeShape_ === Blockly.OUTPUT_SHAPE_LEAF) { shapes.push('leaf'); + } else if (this.edgeShape_ === Blockly.OUTPUT_SHAPE_PLUS) { + shapes.push('plus'); } } else { // count the number of statement inputs @@ -1531,6 +1556,21 @@ Blockly.BlockSvg.prototype.renderDrawLeft_ = function(steps) { `l 0 -${this.edgeShapeWidth_ * 0.6} ` + `a ${this.edgeShapeWidth_ * 0.4} ${this.edgeShapeWidth_ * 0.4} 0 0 1 ${this.edgeShapeWidth_ * 0.4} -${this.edgeShapeWidth_ * 0.4}` ); + } else if (this.edgeShape_ === Blockly.OUTPUT_SHAPE_PLUS) { + // Draw a half-plus. + let unit = 6 + let remainingHeight = this.edgeShapeWidth_ - unit * 6 + steps.push(` + a ${unit} ${unit} 0 0 1 -${unit} -${unit} + a ${unit} ${unit} 0 0 0 -${unit} -${unit} + l -2 0 + a ${unit} ${unit} 0 0 1 -${unit} -${unit} + l 0 -${remainingHeight} + a ${unit} ${unit} 0 0 1 ${unit} -${unit} + l 2 0 + a ${unit} ${unit} 0 0 0 ${unit} -${unit} + a ${unit} ${unit} 0 0 1 ${unit} -${unit} + `) } } steps.push('z'); @@ -1560,6 +1600,21 @@ Blockly.BlockSvg.prototype.drawEdgeShapeRight_ = function(steps) { `l 0 ${this.edgeShapeWidth_ * 0.6} ` + `a ${this.edgeShapeWidth_ * 0.4} ${this.edgeShapeWidth_ * 0.4} 0 0 1 -${this.edgeShapeWidth_ * 0.4} ${this.edgeShapeWidth_ * 0.4}` ); + } else if (this.edgeShape_ === Blockly.OUTPUT_SHAPE_PLUS) { + // Draw a half-plus. + let unit = 6 + let remainingHeight = this.edgeShapeWidth_ - unit * 6 + steps.push(` + a ${unit} ${unit} 0 0 1 ${unit} ${unit} + a ${unit} ${unit} 0 0 0 ${unit} ${unit} + l 2 0 + a ${unit} ${unit} 0 0 1 ${unit} ${unit} + l 0 ${remainingHeight} + a ${unit} ${unit} 0 0 1 -${unit} ${unit} + l -2 0 + a ${unit} ${unit} 0 0 0 -${unit} ${unit} + a ${unit} ${unit} 0 0 1 -${unit} ${unit} + `) } } }; @@ -1726,6 +1781,11 @@ Blockly.BlockSvg.getInputShapeInfo_ = function(shape) { var inputShapeWidth = 0; switch (shape) { + case Blockly.OUTPUT_SHAPE_PLUS: + inputShapePath = Blockly.BlockSvg.INPUT_SHAPE_PLUS; + inputShapeWidth = Blockly.BlockSvg.INPUT_SHAPE_PLUS_WIDTH; + inputShapeArgType = 'plus'; + break; case Blockly.OUTPUT_SHAPE_LEAF: inputShapePath = Blockly.BlockSvg.INPUT_SHAPE_LEAF; inputShapeWidth = Blockly.BlockSvg.INPUT_SHAPE_LEAF_WIDTH; diff --git a/core/constants.js b/core/constants.js index 9b1db85079..09945bf88e 100644 --- a/core/constants.js +++ b/core/constants.js @@ -260,6 +260,12 @@ Blockly.OUTPUT_SHAPE_SQUARE = 3; */ Blockly.OUTPUT_SHAPE_LEAF = 4; +/** + * ENUM for output shape: plus (another custom one). + * @const + */ +Blockly.OUTPUT_SHAPE_PLUS = 5; + /** * ENUM for categories. * @const From 6957365816e627eaeaa85290c0d885b6fa5c198c Mon Sep 17 00:00:00 2001 From: jwklong Date: Fri, 15 Nov 2024 22:08:19 +0000 Subject: [PATCH 099/150] paddington --- core/block_render.js | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/core/block_render.js b/core/block_render.js index 76d74d6d8a..ca75920c0d 100644 --- a/core/block_render.js +++ b/core/block_render.js @@ -494,28 +494,40 @@ Blockly.BlockSvg.SHAPE_IN_SHAPE_PADDING = { 1: 2 * Blockly.BlockSvg.GRID_UNIT, // Hexagon in hexagon. 2: 5 * Blockly.BlockSvg.GRID_UNIT, // Round in hexagon. 3: 5 * Blockly.BlockSvg.GRID_UNIT, // Square in hexagon. - 4: 5 * Blockly.BlockSvg.GRID_UNIT // Leaf in hexagon. + 4: 5 * Blockly.BlockSvg.GRID_UNIT, // Leaf in hexagon. + 5: 4 * Blockly.BlockSvg.GRID_UNIT // Plus in hexagon. }, 2: { // Outer shape: round. 0: 3 * Blockly.BlockSvg.GRID_UNIT, // Field in round. 1: 3 * Blockly.BlockSvg.GRID_UNIT, // Hexagon in round. 2: 1 * Blockly.BlockSvg.GRID_UNIT, // Round in round. 3: 2 * Blockly.BlockSvg.GRID_UNIT, // Square in round. - 4: 2 * Blockly.BlockSvg.GRID_UNIT // Leaf in round. + 4: 2 * Blockly.BlockSvg.GRID_UNIT, // Leaf in round. + 5: 2 * Blockly.BlockSvg.GRID_UNIT // Plus in round. }, 3: { // Outer shape: square. 0: 2 * Blockly.BlockSvg.GRID_UNIT, // Field in square. 1: 2 * Blockly.BlockSvg.GRID_UNIT, // Hexagon in square. 2: 2 * Blockly.BlockSvg.GRID_UNIT, // Round in square. 3: 2 * Blockly.BlockSvg.GRID_UNIT, // Square in square. - 4: 2 * Blockly.BlockSvg.GRID_UNIT // Leaf in square. + 4: 2 * Blockly.BlockSvg.GRID_UNIT, // Leaf in square. + 5: 2 * Blockly.BlockSvg.GRID_UNIT // Plus in square. }, 4: { // Outer shape: leaf. 0: 3 * Blockly.BlockSvg.GRID_UNIT, // Field in leaf. 1: 3 * Blockly.BlockSvg.GRID_UNIT, // Hexagon in leaf. 2: 2 * Blockly.BlockSvg.GRID_UNIT, // Round in leaf. 3: 2 * Blockly.BlockSvg.GRID_UNIT, // Square in leaf. - 4: 1 * Blockly.BlockSvg.GRID_UNIT // Leaf in leaf. + 4: 1 * Blockly.BlockSvg.GRID_UNIT, // Leaf in leaf. + 5: 2 * Blockly.BlockSvg.GRID_UNIT // Plus in leaf. + }, + 5: { // Outer shape: plus. + 0: 5 * Blockly.BlockSvg.GRID_UNIT, // Field in plus. + 1: 4 * Blockly.BlockSvg.GRID_UNIT, // Hexagon in plus. + 2: 4 * Blockly.BlockSvg.GRID_UNIT, // Round in plus. + 3: 5 * Blockly.BlockSvg.GRID_UNIT, // Square in plus. + 4: 5 * Blockly.BlockSvg.GRID_UNIT, // Leaf in plus. + 4: 3 * Blockly.BlockSvg.GRID_UNIT // Plus in plus. } }; From 55e9dd74de7b7b948eae503e33ef372ab4c81548 Mon Sep 17 00:00:00 2001 From: jwklong Date: Fri, 15 Nov 2024 22:24:31 +0000 Subject: [PATCH 100/150] fix --- core/block_render.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/block_render.js b/core/block_render.js index ca75920c0d..60134b2652 100644 --- a/core/block_render.js +++ b/core/block_render.js @@ -527,7 +527,7 @@ Blockly.BlockSvg.SHAPE_IN_SHAPE_PADDING = { 2: 4 * Blockly.BlockSvg.GRID_UNIT, // Round in plus. 3: 5 * Blockly.BlockSvg.GRID_UNIT, // Square in plus. 4: 5 * Blockly.BlockSvg.GRID_UNIT, // Leaf in plus. - 4: 3 * Blockly.BlockSvg.GRID_UNIT // Plus in plus. + 5: 3 * Blockly.BlockSvg.GRID_UNIT // Plus in plus. } }; From e46ed8f3ffae633b1e352da5e6adb9c82388d2e1 Mon Sep 17 00:00:00 2001 From: jwklong Date: Fri, 15 Nov 2024 22:34:43 +0000 Subject: [PATCH 101/150] blahhh I HATE NEW LINES --- core/block_render.js | 65 ++++++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 33 deletions(-) diff --git a/core/block_render.js b/core/block_render.js index 60134b2652..8a44d78201 100644 --- a/core/block_render.js +++ b/core/block_render.js @@ -259,17 +259,16 @@ Blockly.BlockSvg.INNER_BOTTOM_LEFT_CORNER = * SVG path for an empty leaf input shape. * @const */ -Blockly.BlockSvg.INPUT_SHAPE_LEAF = ` - M ${4 * Blockly.BlockSvg.GRID_UNIT} 0 - a ${4 * Blockly.BlockSvg.GRID_UNIT} ${4 * Blockly.BlockSvg.GRID_UNIT} 0 0 1 ${4 * Blockly.BlockSvg.GRID_UNIT} ${4 * Blockly.BlockSvg.GRID_UNIT} - l 0 ${2.4 * Blockly.BlockSvg.GRID_UNIT} - a ${1.6 * Blockly.BlockSvg.GRID_UNIT} ${1.6 * Blockly.BlockSvg.GRID_UNIT} 0 0 1 -${1.6 * Blockly.BlockSvg.GRID_UNIT} ${1.6 * Blockly.BlockSvg.GRID_UNIT} - h ${4 * Blockly.BlockSvg.GRID_UNIT} - a ${4 * Blockly.BlockSvg.GRID_UNIT} ${4 * Blockly.BlockSvg.GRID_UNIT} 0 0 1 -${4 * Blockly.BlockSvg.GRID_UNIT} -${4 * Blockly.BlockSvg.GRID_UNIT} - l 0 -${2.4 * Blockly.BlockSvg.GRID_UNIT} - a ${1.6 * Blockly.BlockSvg.GRID_UNIT} ${1.6 * Blockly.BlockSvg.GRID_UNIT} 0 0 1 ${1.6 * Blockly.BlockSvg.GRID_UNIT} -${1.6 * Blockly.BlockSvg.GRID_UNIT} - z -` +Blockly.BlockSvg.INPUT_SHAPE_LEAF = + `M ${4 * Blockly.BlockSvg.GRID_UNIT} 0 ` + + `a ${4 * Blockly.BlockSvg.GRID_UNIT} ${4 * Blockly.BlockSvg.GRID_UNIT} 0 0 1 ${4 * Blockly.BlockSvg.GRID_UNIT} ${4 * Blockly.BlockSvg.GRID_UNIT} ` + + `l 0 ${2.4 * Blockly.BlockSvg.GRID_UNIT} ` + + `a ${1.6 * Blockly.BlockSvg.GRID_UNIT} ${1.6 * Blockly.BlockSvg.GRID_UNIT} 0 0 1 -${1.6 * Blockly.BlockSvg.GRID_UNIT} ${1.6 * Blockly.BlockSvg.GRID_UNIT} ` + + `h ${4 * Blockly.BlockSvg.GRID_UNIT} ` + + `a ${4 * Blockly.BlockSvg.GRID_UNIT} ${4 * Blockly.BlockSvg.GRID_UNIT} 0 0 1 -${4 * Blockly.BlockSvg.GRID_UNIT} -${4 * Blockly.BlockSvg.GRID_UNIT} ` + + `l 0 -${2.4 * Blockly.BlockSvg.GRID_UNIT} ` + + `a ${1.6 * Blockly.BlockSvg.GRID_UNIT} ${1.6 * Blockly.BlockSvg.GRID_UNIT} 0 0 1 ${1.6 * Blockly.BlockSvg.GRID_UNIT} -${1.6 * Blockly.BlockSvg.GRID_UNIT} ` + + `z` /** * Width of empty plus input shape. @@ -1572,17 +1571,17 @@ Blockly.BlockSvg.prototype.renderDrawLeft_ = function(steps) { // Draw a half-plus. let unit = 6 let remainingHeight = this.edgeShapeWidth_ - unit * 6 - steps.push(` - a ${unit} ${unit} 0 0 1 -${unit} -${unit} - a ${unit} ${unit} 0 0 0 -${unit} -${unit} - l -2 0 - a ${unit} ${unit} 0 0 1 -${unit} -${unit} - l 0 -${remainingHeight} - a ${unit} ${unit} 0 0 1 ${unit} -${unit} - l 2 0 - a ${unit} ${unit} 0 0 0 ${unit} -${unit} - a ${unit} ${unit} 0 0 1 ${unit} -${unit} - `) + steps.push( + `a ${unit} ${unit} 0 0 1 -${unit} -${unit} ` + + `a ${unit} ${unit} 0 0 0 -${unit} -${unit} ` + + `l -2 0 ` + + `a ${unit} ${unit} 0 0 1 -${unit} -${unit} ` + + `l 0 -${remainingHeight} ` + + `a ${unit} ${unit} 0 0 1 ${unit} -${unit} ` + + `l 2 0 ` + + `a ${unit} ${unit} 0 0 0 ${unit} -${unit} ` + + `a ${unit} ${unit} 0 0 1 ${unit} -${unit}` + ) } } steps.push('z'); @@ -1616,17 +1615,17 @@ Blockly.BlockSvg.prototype.drawEdgeShapeRight_ = function(steps) { // Draw a half-plus. let unit = 6 let remainingHeight = this.edgeShapeWidth_ - unit * 6 - steps.push(` - a ${unit} ${unit} 0 0 1 ${unit} ${unit} - a ${unit} ${unit} 0 0 0 ${unit} ${unit} - l 2 0 - a ${unit} ${unit} 0 0 1 ${unit} ${unit} - l 0 ${remainingHeight} - a ${unit} ${unit} 0 0 1 -${unit} ${unit} - l -2 0 - a ${unit} ${unit} 0 0 0 -${unit} ${unit} - a ${unit} ${unit} 0 0 1 -${unit} ${unit} - `) + steps.push( + `a ${unit} ${unit} 0 0 1 ${unit} ${unit} ` + + `a ${unit} ${unit} 0 0 0 ${unit} ${unit} ` + + `l 2 0 ` + + `a ${unit} ${unit} 0 0 1 ${unit} ${unit} ` + + `l 0 ${remainingHeight} ` + + `a ${unit} ${unit} 0 0 1 -${unit} ${unit} ` + + `l -2 0 ` + + `a ${unit} ${unit} 0 0 0 -${unit} ${unit} ` + + `a ${unit} ${unit} 0 0 1 -${unit} ${unit}` + ) } } }; From 77ad755f956b3e763ef42eadbc348a56a3cbc51c Mon Sep 17 00:00:00 2001 From: jwklong Date: Fri, 15 Nov 2024 22:47:34 +0000 Subject: [PATCH 102/150] fix silly mistake --- core/block_render.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/block_render.js b/core/block_render.js index 8a44d78201..6e0b97cfdd 100644 --- a/core/block_render.js +++ b/core/block_render.js @@ -1570,7 +1570,7 @@ Blockly.BlockSvg.prototype.renderDrawLeft_ = function(steps) { } else if (this.edgeShape_ === Blockly.OUTPUT_SHAPE_PLUS) { // Draw a half-plus. let unit = 6 - let remainingHeight = this.edgeShapeWidth_ - unit * 6 + let remainingHeight = this.edgeShapeWidth_ * 2 - unit * 6 steps.push( `a ${unit} ${unit} 0 0 1 -${unit} -${unit} ` + `a ${unit} ${unit} 0 0 0 -${unit} -${unit} ` + @@ -1614,7 +1614,7 @@ Blockly.BlockSvg.prototype.drawEdgeShapeRight_ = function(steps) { } else if (this.edgeShape_ === Blockly.OUTPUT_SHAPE_PLUS) { // Draw a half-plus. let unit = 6 - let remainingHeight = this.edgeShapeWidth_ - unit * 6 + let remainingHeight = this.edgeShapeWidth_ * 2 - unit * 6 steps.push( `a ${unit} ${unit} 0 0 1 ${unit} ${unit} ` + `a ${unit} ${unit} 0 0 0 ${unit} ${unit} ` + From d9e33ea931eb68a704806ad0192effeb1df8fe89 Mon Sep 17 00:00:00 2001 From: jwklong Date: Sat, 16 Nov 2024 08:50:31 +0000 Subject: [PATCH 103/150] adjust padding --- core/block_render.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/block_render.js b/core/block_render.js index 6e0b97cfdd..e41806ca4d 100644 --- a/core/block_render.js +++ b/core/block_render.js @@ -494,14 +494,14 @@ Blockly.BlockSvg.SHAPE_IN_SHAPE_PADDING = { 2: 5 * Blockly.BlockSvg.GRID_UNIT, // Round in hexagon. 3: 5 * Blockly.BlockSvg.GRID_UNIT, // Square in hexagon. 4: 5 * Blockly.BlockSvg.GRID_UNIT, // Leaf in hexagon. - 5: 4 * Blockly.BlockSvg.GRID_UNIT // Plus in hexagon. + 5: 3 * Blockly.BlockSvg.GRID_UNIT // Plus in hexagon. }, 2: { // Outer shape: round. 0: 3 * Blockly.BlockSvg.GRID_UNIT, // Field in round. 1: 3 * Blockly.BlockSvg.GRID_UNIT, // Hexagon in round. 2: 1 * Blockly.BlockSvg.GRID_UNIT, // Round in round. - 3: 2 * Blockly.BlockSvg.GRID_UNIT, // Square in round. - 4: 2 * Blockly.BlockSvg.GRID_UNIT, // Leaf in round. + 3: 3 * Blockly.BlockSvg.GRID_UNIT, // Square in round. + 4: 3 * Blockly.BlockSvg.GRID_UNIT, // Leaf in round. 5: 2 * Blockly.BlockSvg.GRID_UNIT // Plus in round. }, 3: { // Outer shape: square. From 96b4b08cc97e7931e2855d0809c3c923c3f1a142 Mon Sep 17 00:00:00 2001 From: jwklong Date: Sat, 16 Nov 2024 09:30:03 +0000 Subject: [PATCH 104/150] custom connection shape --- core/connection.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/core/connection.js b/core/connection.js index fcaddd187e..ed66908b52 100644 --- a/core/connection.js +++ b/core/connection.js @@ -82,6 +82,13 @@ Blockly.Connection.prototype.targetConnection = null; */ Blockly.Connection.prototype.check_ = null; +/** + * connection shape override + * @type {number?} + * @private + */ +Blockly.Connection.prototype.shape_ = null; + /** * DOM representation of a shadow block, or null if none. * @type {Element} @@ -689,12 +696,29 @@ Blockly.Connection.prototype.setCheck = function(check) { return this; }; +/** + * Change a connection's shape + * @param {number} shape Compatible value type or list of value types. + * Null if all types are compatible. + * @return {!Blockly.Connection} The connection being modified + * (to allow chaining). + */ +Blockly.Connection.prototype.setShape = function(shape) { + if (shape) { + this.shape_ = shape + } else { + this.shape_ = null; + } + return this; +}; + /** * Returns a shape enum for this connection. * Used in scratch-blocks to draw unoccupied inputs. * @return {number} Enum representing shape. */ Blockly.Connection.prototype.getOutputShape = function() { + if (this.shape_) return this.shape_ if (!this.check_) return Blockly.OUTPUT_SHAPE_ROUND; if (this.check_.indexOf('Boolean') !== -1) { return Blockly.OUTPUT_SHAPE_HEXAGONAL; From bfaa29c76b2033380da4e6d3128b8a9817a40df2 Mon Sep 17 00:00:00 2001 From: jwklong Date: Sat, 16 Nov 2024 09:36:55 +0000 Subject: [PATCH 105/150] more custom shape --- core/block.js | 3 +++ core/input.js | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/core/block.js b/core/block.js index 955b01c72d..c799d023f5 100644 --- a/core/block.js +++ b/core/block.js @@ -1499,6 +1499,9 @@ Blockly.Block.prototype.interpolate_ = function(message, args, lastDummyAlign) { if (field) { fieldStack.push([field, element['name']]); } else if (input) { + if (element['shape']) { + input.setShape(element['shape']); + } if (element['check']) { input.setCheck(element['check']); } diff --git a/core/input.js b/core/input.js index 91bb4f12bf..6c23e30d86 100644 --- a/core/input.js +++ b/core/input.js @@ -218,6 +218,14 @@ Blockly.Input.prototype.setCheck = function(check) { return this; }; +Blockly.Input.prototype.setShape = function(shape) { + if (!this.connection) { + throw 'This input does not have a connection.'; + } + this.connection.setShape(shape); + return this; +}; + /** * Change the alignment of the connection's field(s). * @param {number} align One of Blockly.ALIGN_LEFT, ALIGN_CENTRE, ALIGN_RIGHT. From f3dd27a499a4ba2241ccb8d87c9811032581dd05 Mon Sep 17 00:00:00 2001 From: jwklong Date: Sat, 16 Nov 2024 10:18:34 +0000 Subject: [PATCH 106/150] debug --- core/block.js | 1 + 1 file changed, 1 insertion(+) diff --git a/core/block.js b/core/block.js index c799d023f5..66de11b0e1 100644 --- a/core/block.js +++ b/core/block.js @@ -1499,6 +1499,7 @@ Blockly.Block.prototype.interpolate_ = function(message, args, lastDummyAlign) { if (field) { fieldStack.push([field, element['name']]); } else if (input) { + console.debug(element) if (element['shape']) { input.setShape(element['shape']); } From 567e8fcb36e135fdfddbc7745b5c18fc5f8db92c Mon Sep 17 00:00:00 2001 From: jwklong Date: Sat, 16 Nov 2024 10:35:53 +0000 Subject: [PATCH 107/150] no debug --- core/block.js | 1 - 1 file changed, 1 deletion(-) diff --git a/core/block.js b/core/block.js index 66de11b0e1..c799d023f5 100644 --- a/core/block.js +++ b/core/block.js @@ -1499,7 +1499,6 @@ Blockly.Block.prototype.interpolate_ = function(message, args, lastDummyAlign) { if (field) { fieldStack.push([field, element['name']]); } else if (input) { - console.debug(element) if (element['shape']) { input.setShape(element['shape']); } From 49cfa0efd7cfca0a469f41a780708fc9420c3752 Mon Sep 17 00:00:00 2001 From: jwklong Date: Sat, 16 Nov 2024 11:40:31 +0000 Subject: [PATCH 108/150] a --- core/block_render.js | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/core/block_render.js b/core/block_render.js index e41806ca4d..e60e4947e8 100644 --- a/core/block_render.js +++ b/core/block_render.js @@ -260,15 +260,17 @@ Blockly.BlockSvg.INNER_BOTTOM_LEFT_CORNER = * @const */ Blockly.BlockSvg.INPUT_SHAPE_LEAF = - `M ${4 * Blockly.BlockSvg.GRID_UNIT} 0 ` + - `a ${4 * Blockly.BlockSvg.GRID_UNIT} ${4 * Blockly.BlockSvg.GRID_UNIT} 0 0 1 ${4 * Blockly.BlockSvg.GRID_UNIT} ${4 * Blockly.BlockSvg.GRID_UNIT} ` + - `l 0 ${2.4 * Blockly.BlockSvg.GRID_UNIT} ` + - `a ${1.6 * Blockly.BlockSvg.GRID_UNIT} ${1.6 * Blockly.BlockSvg.GRID_UNIT} 0 0 1 -${1.6 * Blockly.BlockSvg.GRID_UNIT} ${1.6 * Blockly.BlockSvg.GRID_UNIT} ` + - `h ${4 * Blockly.BlockSvg.GRID_UNIT} ` + - `a ${4 * Blockly.BlockSvg.GRID_UNIT} ${4 * Blockly.BlockSvg.GRID_UNIT} 0 0 1 -${4 * Blockly.BlockSvg.GRID_UNIT} -${4 * Blockly.BlockSvg.GRID_UNIT} ` + - `l 0 -${2.4 * Blockly.BlockSvg.GRID_UNIT} ` + - `a ${1.6 * Blockly.BlockSvg.GRID_UNIT} ${1.6 * Blockly.BlockSvg.GRID_UNIT} 0 0 1 ${1.6 * Blockly.BlockSvg.GRID_UNIT} -${1.6 * Blockly.BlockSvg.GRID_UNIT} ` + - `z` + ` + M ${4 * Blockly.BlockSvg.GRID_UNIT} 0 + a ${4 * Blockly.BlockSvg.GRID_UNIT} ${4 * Blockly.BlockSvg.GRID_UNIT} 0 0 1 ${4 * Blockly.BlockSvg.GRID_UNIT} ${4 * Blockly.BlockSvg.GRID_UNIT} + l 0 ${2.4 * Blockly.BlockSvg.GRID_UNIT} + a ${1.6 * Blockly.BlockSvg.GRID_UNIT} ${1.6 * Blockly.BlockSvg.GRID_UNIT} 0 0 1 -${1.6 * Blockly.BlockSvg.GRID_UNIT} ${1.6 * Blockly.BlockSvg.GRID_UNIT} + h -${4 * Blockly.BlockSvg.GRID_UNIT} + a ${4 * Blockly.BlockSvg.GRID_UNIT} ${4 * Blockly.BlockSvg.GRID_UNIT} 0 0 1 -${4 * Blockly.BlockSvg.GRID_UNIT} -${4 * Blockly.BlockSvg.GRID_UNIT} + l 0 -${2.4 * Blockly.BlockSvg.GRID_UNIT} + a ${1.6 * Blockly.BlockSvg.GRID_UNIT} ${1.6 * Blockly.BlockSvg.GRID_UNIT} 0 0 1 ${1.6 * Blockly.BlockSvg.GRID_UNIT} -${1.6 * Blockly.BlockSvg.GRID_UNIT} + z + ` /** * Width of empty plus input shape. @@ -1570,8 +1572,10 @@ Blockly.BlockSvg.prototype.renderDrawLeft_ = function(steps) { } else if (this.edgeShape_ === Blockly.OUTPUT_SHAPE_PLUS) { // Draw a half-plus. let unit = 6 - let remainingHeight = this.edgeShapeWidth_ * 2 - unit * 6 + let remainingHeight = this.edgeShapeWidth_ * 2 - 36 + let remainingWidth = this.edgeShapeWidth_ - 40 steps.push( + `l -${remainingWidth} 0 ` + `a ${unit} ${unit} 0 0 1 -${unit} -${unit} ` + `a ${unit} ${unit} 0 0 0 -${unit} -${unit} ` + `l -2 0 ` + @@ -1580,7 +1584,8 @@ Blockly.BlockSvg.prototype.renderDrawLeft_ = function(steps) { `a ${unit} ${unit} 0 0 1 ${unit} -${unit} ` + `l 2 0 ` + `a ${unit} ${unit} 0 0 0 ${unit} -${unit} ` + - `a ${unit} ${unit} 0 0 1 ${unit} -${unit}` + `a ${unit} ${unit} 0 0 1 ${unit} -${unit} ` + + `l ${remainingWidth} 0` ) } } @@ -1614,8 +1619,10 @@ Blockly.BlockSvg.prototype.drawEdgeShapeRight_ = function(steps) { } else if (this.edgeShape_ === Blockly.OUTPUT_SHAPE_PLUS) { // Draw a half-plus. let unit = 6 - let remainingHeight = this.edgeShapeWidth_ * 2 - unit * 6 + let remainingHeight = this.edgeShapeWidth_ * 2 - 36 + let remainingWidth = this.edgeShapeWidth_ - 40 steps.push( + `l ${remainingWidth} 0 ` + `a ${unit} ${unit} 0 0 1 ${unit} ${unit} ` + `a ${unit} ${unit} 0 0 0 ${unit} ${unit} ` + `l 2 0 ` + @@ -1624,7 +1631,8 @@ Blockly.BlockSvg.prototype.drawEdgeShapeRight_ = function(steps) { `a ${unit} ${unit} 0 0 1 -${unit} ${unit} ` + `l -2 0 ` + `a ${unit} ${unit} 0 0 0 -${unit} ${unit} ` + - `a ${unit} ${unit} 0 0 1 -${unit} ${unit}` + `a ${unit} ${unit} 0 0 1 -${unit} ${unit} ` + + `l -${remainingWidth} 0` ) } } From 605a8e27f7e069c77d9f3bd6bb657135b1e195fe Mon Sep 17 00:00:00 2001 From: jwklong Date: Sat, 16 Nov 2024 11:48:10 +0000 Subject: [PATCH 109/150] a --- core/block_render.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/block_render.js b/core/block_render.js index e60e4947e8..9bf027db4e 100644 --- a/core/block_render.js +++ b/core/block_render.js @@ -261,7 +261,7 @@ Blockly.BlockSvg.INNER_BOTTOM_LEFT_CORNER = */ Blockly.BlockSvg.INPUT_SHAPE_LEAF = ` - M ${4 * Blockly.BlockSvg.GRID_UNIT} 0 + M ${6 * Blockly.BlockSvg.GRID_UNIT} 0 a ${4 * Blockly.BlockSvg.GRID_UNIT} ${4 * Blockly.BlockSvg.GRID_UNIT} 0 0 1 ${4 * Blockly.BlockSvg.GRID_UNIT} ${4 * Blockly.BlockSvg.GRID_UNIT} l 0 ${2.4 * Blockly.BlockSvg.GRID_UNIT} a ${1.6 * Blockly.BlockSvg.GRID_UNIT} ${1.6 * Blockly.BlockSvg.GRID_UNIT} 0 0 1 -${1.6 * Blockly.BlockSvg.GRID_UNIT} ${1.6 * Blockly.BlockSvg.GRID_UNIT} @@ -1573,7 +1573,7 @@ Blockly.BlockSvg.prototype.renderDrawLeft_ = function(steps) { // Draw a half-plus. let unit = 6 let remainingHeight = this.edgeShapeWidth_ * 2 - 36 - let remainingWidth = this.edgeShapeWidth_ - 40 + let remainingWidth = this.edgeShapeWidth_ * 2 - 40 steps.push( `l -${remainingWidth} 0 ` + `a ${unit} ${unit} 0 0 1 -${unit} -${unit} ` + @@ -1620,7 +1620,7 @@ Blockly.BlockSvg.prototype.drawEdgeShapeRight_ = function(steps) { // Draw a half-plus. let unit = 6 let remainingHeight = this.edgeShapeWidth_ * 2 - 36 - let remainingWidth = this.edgeShapeWidth_ - 40 + let remainingWidth = this.edgeShapeWidth_ * 2 - 40 steps.push( `l ${remainingWidth} 0 ` + `a ${unit} ${unit} 0 0 1 ${unit} ${unit} ` + From bd014eabf43df034707ee59bb1f143df2c171fb0 Mon Sep 17 00:00:00 2001 From: jwklong Date: Sat, 16 Nov 2024 12:08:21 +0000 Subject: [PATCH 110/150] test --- core/block_render.js | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/core/block_render.js b/core/block_render.js index 9bf027db4e..63c0c50b5f 100644 --- a/core/block_render.js +++ b/core/block_render.js @@ -281,17 +281,24 @@ Blockly.BlockSvg.INPUT_SHAPE_PLUS_WIDTH = 12 * Blockly.BlockSvg.GRID_UNIT; * SVG path for an empty leaf input shape. * @const */ -Blockly.BlockSvg.INPUT_SHAPE_PLUS = ` - M ${4 * Blockly.BlockSvg.GRID_UNIT} 0 - a ${4 * Blockly.BlockSvg.GRID_UNIT} ${4 * Blockly.BlockSvg.GRID_UNIT} 0 0 1 ${4 * Blockly.BlockSvg.GRID_UNIT} ${4 * Blockly.BlockSvg.GRID_UNIT} - l 0 ${2.4 * Blockly.BlockSvg.GRID_UNIT} - a ${1.6 * Blockly.BlockSvg.GRID_UNIT} ${1.6 * Blockly.BlockSvg.GRID_UNIT} 0 0 1 -${1.6 * Blockly.BlockSvg.GRID_UNIT} ${1.6 * Blockly.BlockSvg.GRID_UNIT} - h ${4 * Blockly.BlockSvg.GRID_UNIT} - a ${4 * Blockly.BlockSvg.GRID_UNIT} ${4 * Blockly.BlockSvg.GRID_UNIT} 0 0 1 -${4 * Blockly.BlockSvg.GRID_UNIT} -${4 * Blockly.BlockSvg.GRID_UNIT} - l 0 -${2.4 * Blockly.BlockSvg.GRID_UNIT} - a ${1.6 * Blockly.BlockSvg.GRID_UNIT} ${1.6 * Blockly.BlockSvg.GRID_UNIT} 0 0 1 ${1.6 * Blockly.BlockSvg.GRID_UNIT} -${1.6 * Blockly.BlockSvg.GRID_UNIT} - z -` +Blockly.BlockSvg.INPUT_SHAPE_PLUS = + ` + M ${6 * Blockly.BlockSvg.GRID_UNIT} 0 + a ${Blockly.BlockSvg.GRID_UNIT} ${Blockly.BlockSvg.GRID_UNIT} 0 0 1 ${Blockly.BlockSvg.GRID_UNIT} ${Blockly.BlockSvg.GRID_UNIT} + a ${Blockly.BlockSvg.GRID_UNIT} ${Blockly.BlockSvg.GRID_UNIT} 0 0 0 ${Blockly.BlockSvg.GRID_UNIT} ${Blockly.BlockSvg.GRID_UNIT} + a ${Blockly.BlockSvg.GRID_UNIT} ${Blockly.BlockSvg.GRID_UNIT} 0 0 1 ${Blockly.BlockSvg.GRID_UNIT} ${Blockly.BlockSvg.GRID_UNIT} + a ${Blockly.BlockSvg.GRID_UNIT} ${Blockly.BlockSvg.GRID_UNIT} 0 0 1 -${Blockly.BlockSvg.GRID_UNIT} ${Blockly.BlockSvg.GRID_UNIT} + a ${Blockly.BlockSvg.GRID_UNIT} ${Blockly.BlockSvg.GRID_UNIT} 0 0 0 -${Blockly.BlockSvg.GRID_UNIT} ${Blockly.BlockSvg.GRID_UNIT} + a ${Blockly.BlockSvg.GRID_UNIT} ${Blockly.BlockSvg.GRID_UNIT} 0 0 1 -${Blockly.BlockSvg.GRID_UNIT} ${Blockly.BlockSvg.GRID_UNIT} + h ${4 * Blockly.BlockSvg.GRID_UNIT} + a ${Blockly.BlockSvg.GRID_UNIT} ${Blockly.BlockSvg.GRID_UNIT} 0 0 1 -${Blockly.BlockSvg.GRID_UNIT} -${Blockly.BlockSvg.GRID_UNIT} + a ${Blockly.BlockSvg.GRID_UNIT} ${Blockly.BlockSvg.GRID_UNIT} 0 0 0 -${Blockly.BlockSvg.GRID_UNIT} -${Blockly.BlockSvg.GRID_UNIT} + a ${Blockly.BlockSvg.GRID_UNIT} ${Blockly.BlockSvg.GRID_UNIT} 0 0 1 -${Blockly.BlockSvg.GRID_UNIT} -${Blockly.BlockSvg.GRID_UNIT} + a ${Blockly.BlockSvg.GRID_UNIT} ${Blockly.BlockSvg.GRID_UNIT} 0 0 1 ${Blockly.BlockSvg.GRID_UNIT} -${Blockly.BlockSvg.GRID_UNIT} + a ${Blockly.BlockSvg.GRID_UNIT} ${Blockly.BlockSvg.GRID_UNIT} 0 0 0 ${Blockly.BlockSvg.GRID_UNIT} -${Blockly.BlockSvg.GRID_UNIT} + a ${Blockly.BlockSvg.GRID_UNIT} ${Blockly.BlockSvg.GRID_UNIT} 0 0 1 ${Blockly.BlockSvg.GRID_UNIT} -${Blockly.BlockSvg.GRID_UNIT} + z + ` /** * Width of empty leaf input shape. From fdecdfe7d0cc0feb4e59da861ed64a4c4f47db2e Mon Sep 17 00:00:00 2001 From: jwklong Date: Sat, 16 Nov 2024 12:34:48 +0000 Subject: [PATCH 111/150] fix shit --- core/block_render.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/core/block_render.js b/core/block_render.js index 63c0c50b5f..11e4d77585 100644 --- a/core/block_render.js +++ b/core/block_render.js @@ -262,10 +262,12 @@ Blockly.BlockSvg.INNER_BOTTOM_LEFT_CORNER = Blockly.BlockSvg.INPUT_SHAPE_LEAF = ` M ${6 * Blockly.BlockSvg.GRID_UNIT} 0 + l ${2 * Blockly.BlockSvg.GRID_UNIT} 0 a ${4 * Blockly.BlockSvg.GRID_UNIT} ${4 * Blockly.BlockSvg.GRID_UNIT} 0 0 1 ${4 * Blockly.BlockSvg.GRID_UNIT} ${4 * Blockly.BlockSvg.GRID_UNIT} l 0 ${2.4 * Blockly.BlockSvg.GRID_UNIT} a ${1.6 * Blockly.BlockSvg.GRID_UNIT} ${1.6 * Blockly.BlockSvg.GRID_UNIT} 0 0 1 -${1.6 * Blockly.BlockSvg.GRID_UNIT} ${1.6 * Blockly.BlockSvg.GRID_UNIT} h -${4 * Blockly.BlockSvg.GRID_UNIT} + l -${2.4 * Blockly.BlockSvg.GRID_UNIT} 0 a ${4 * Blockly.BlockSvg.GRID_UNIT} ${4 * Blockly.BlockSvg.GRID_UNIT} 0 0 1 -${4 * Blockly.BlockSvg.GRID_UNIT} -${4 * Blockly.BlockSvg.GRID_UNIT} l 0 -${2.4 * Blockly.BlockSvg.GRID_UNIT} a ${1.6 * Blockly.BlockSvg.GRID_UNIT} ${1.6 * Blockly.BlockSvg.GRID_UNIT} 0 0 1 ${1.6 * Blockly.BlockSvg.GRID_UNIT} -${1.6 * Blockly.BlockSvg.GRID_UNIT} @@ -283,19 +285,25 @@ Blockly.BlockSvg.INPUT_SHAPE_PLUS_WIDTH = 12 * Blockly.BlockSvg.GRID_UNIT; */ Blockly.BlockSvg.INPUT_SHAPE_PLUS = ` - M ${6 * Blockly.BlockSvg.GRID_UNIT} 0 + M ${9 * Blockly.BlockSvg.GRID_UNIT} 0 a ${Blockly.BlockSvg.GRID_UNIT} ${Blockly.BlockSvg.GRID_UNIT} 0 0 1 ${Blockly.BlockSvg.GRID_UNIT} ${Blockly.BlockSvg.GRID_UNIT} + l 0 2 a ${Blockly.BlockSvg.GRID_UNIT} ${Blockly.BlockSvg.GRID_UNIT} 0 0 0 ${Blockly.BlockSvg.GRID_UNIT} ${Blockly.BlockSvg.GRID_UNIT} a ${Blockly.BlockSvg.GRID_UNIT} ${Blockly.BlockSvg.GRID_UNIT} 0 0 1 ${Blockly.BlockSvg.GRID_UNIT} ${Blockly.BlockSvg.GRID_UNIT} + l 0 4 a ${Blockly.BlockSvg.GRID_UNIT} ${Blockly.BlockSvg.GRID_UNIT} 0 0 1 -${Blockly.BlockSvg.GRID_UNIT} ${Blockly.BlockSvg.GRID_UNIT} a ${Blockly.BlockSvg.GRID_UNIT} ${Blockly.BlockSvg.GRID_UNIT} 0 0 0 -${Blockly.BlockSvg.GRID_UNIT} ${Blockly.BlockSvg.GRID_UNIT} + l 0 2 a ${Blockly.BlockSvg.GRID_UNIT} ${Blockly.BlockSvg.GRID_UNIT} 0 0 1 -${Blockly.BlockSvg.GRID_UNIT} ${Blockly.BlockSvg.GRID_UNIT} - h ${4 * Blockly.BlockSvg.GRID_UNIT} + h -${6 * BlocklySvg.GRID_UNIT} a ${Blockly.BlockSvg.GRID_UNIT} ${Blockly.BlockSvg.GRID_UNIT} 0 0 1 -${Blockly.BlockSvg.GRID_UNIT} -${Blockly.BlockSvg.GRID_UNIT} + l 0 -2 a ${Blockly.BlockSvg.GRID_UNIT} ${Blockly.BlockSvg.GRID_UNIT} 0 0 0 -${Blockly.BlockSvg.GRID_UNIT} -${Blockly.BlockSvg.GRID_UNIT} a ${Blockly.BlockSvg.GRID_UNIT} ${Blockly.BlockSvg.GRID_UNIT} 0 0 1 -${Blockly.BlockSvg.GRID_UNIT} -${Blockly.BlockSvg.GRID_UNIT} + l 0 -4 a ${Blockly.BlockSvg.GRID_UNIT} ${Blockly.BlockSvg.GRID_UNIT} 0 0 1 ${Blockly.BlockSvg.GRID_UNIT} -${Blockly.BlockSvg.GRID_UNIT} a ${Blockly.BlockSvg.GRID_UNIT} ${Blockly.BlockSvg.GRID_UNIT} 0 0 0 ${Blockly.BlockSvg.GRID_UNIT} -${Blockly.BlockSvg.GRID_UNIT} + l 0 -2 a ${Blockly.BlockSvg.GRID_UNIT} ${Blockly.BlockSvg.GRID_UNIT} 0 0 1 ${Blockly.BlockSvg.GRID_UNIT} -${Blockly.BlockSvg.GRID_UNIT} z ` From 8d97014fb800c20504e4b4cdff9a1d5e3a00469b Mon Sep 17 00:00:00 2001 From: jwklong Date: Sat, 16 Nov 2024 12:43:30 +0000 Subject: [PATCH 112/150] FIXXX SHITTT --- core/block_render.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/block_render.js b/core/block_render.js index 11e4d77585..814d38f33f 100644 --- a/core/block_render.js +++ b/core/block_render.js @@ -295,7 +295,7 @@ Blockly.BlockSvg.INPUT_SHAPE_PLUS = a ${Blockly.BlockSvg.GRID_UNIT} ${Blockly.BlockSvg.GRID_UNIT} 0 0 0 -${Blockly.BlockSvg.GRID_UNIT} ${Blockly.BlockSvg.GRID_UNIT} l 0 2 a ${Blockly.BlockSvg.GRID_UNIT} ${Blockly.BlockSvg.GRID_UNIT} 0 0 1 -${Blockly.BlockSvg.GRID_UNIT} ${Blockly.BlockSvg.GRID_UNIT} - h -${6 * BlocklySvg.GRID_UNIT} + h -${6 * Blockly.BlockSvg.GRID_UNIT} a ${Blockly.BlockSvg.GRID_UNIT} ${Blockly.BlockSvg.GRID_UNIT} 0 0 1 -${Blockly.BlockSvg.GRID_UNIT} -${Blockly.BlockSvg.GRID_UNIT} l 0 -2 a ${Blockly.BlockSvg.GRID_UNIT} ${Blockly.BlockSvg.GRID_UNIT} 0 0 0 -${Blockly.BlockSvg.GRID_UNIT} -${Blockly.BlockSvg.GRID_UNIT} From 659df4167b9b47a34f233aed7b188389e6123596 Mon Sep 17 00:00:00 2001 From: jwklong Date: Sat, 16 Nov 2024 12:58:42 +0000 Subject: [PATCH 113/150] fix block being too big --- core/block_render.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/block_render.js b/core/block_render.js index 814d38f33f..233cf7d8aa 100644 --- a/core/block_render.js +++ b/core/block_render.js @@ -1588,7 +1588,7 @@ Blockly.BlockSvg.prototype.renderDrawLeft_ = function(steps) { // Draw a half-plus. let unit = 6 let remainingHeight = this.edgeShapeWidth_ * 2 - 36 - let remainingWidth = this.edgeShapeWidth_ * 2 - 40 + let remainingWidth = this.edgeShapeWidth_ - 20 steps.push( `l -${remainingWidth} 0 ` + `a ${unit} ${unit} 0 0 1 -${unit} -${unit} ` + @@ -1635,7 +1635,7 @@ Blockly.BlockSvg.prototype.drawEdgeShapeRight_ = function(steps) { // Draw a half-plus. let unit = 6 let remainingHeight = this.edgeShapeWidth_ * 2 - 36 - let remainingWidth = this.edgeShapeWidth_ * 2 - 40 + let remainingWidth = this.edgeShapeWidth_ - 20 steps.push( `l ${remainingWidth} 0 ` + `a ${unit} ${unit} 0 0 1 ${unit} ${unit} ` + From d0cf697a03441f2a2ba90dcf345a22c4c7eff4b8 Mon Sep 17 00:00:00 2001 From: Embin <113154360+NotEmbin@users.noreply.github.com> Date: Sun, 17 Nov 2024 19:25:49 -0800 Subject: [PATCH 114/150] "with with" erm, no --- blocks_vertical/sensing.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blocks_vertical/sensing.js b/blocks_vertical/sensing.js index 9a7995901e..7f99e4dd26 100644 --- a/blocks_vertical/sensing.js +++ b/blocks_vertical/sensing.js @@ -891,7 +891,7 @@ Blockly.Blocks["sensing_regextest"] = { init: function() { this.jsonInit({ "inputsInline": true, - "message0": "test regex %2 %3 with with text %1", + "message0": "test regex %2 %3 with text %1", "args0": [ { "type": "input_value", From d86c1058c4e0f9ddc648c8699cdf9ec80d4c7e5e Mon Sep 17 00:00:00 2001 From: JeremyGamer13 <69337718+JeremyGamer13@users.noreply.github.com> Date: Mon, 18 Nov 2024 23:55:14 -0700 Subject: [PATCH 115/150] replace letters from to and power/root/log blocks --- blocks_vertical/operators.js | 91 ++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) diff --git a/blocks_vertical/operators.js b/blocks_vertical/operators.js index 361b3b3309..b4f696f024 100644 --- a/blocks_vertical/operators.js +++ b/blocks_vertical/operators.js @@ -769,6 +769,36 @@ Blockly.Blocks["operator_replaceFirst"] = { }; Blockly.Blocks["operator_getLettersFromIndexToIndexInText"] = { + init: function() { + this.jsonInit({ + "inputsInline": true, + "message0": "letters from %1 up to before %2 in %3", + "args0": [ + { + "type": "input_value", + "name": "INDEX1" + }, + { + "type": "input_value", + "name": "INDEX2" + }, + { + "type": "input_value", + "name": "TEXT" + } + ], + "category": Blockly.Categories.operators, + "extensions": ["colours_operators", "output_string"] + }); + } +}; + + +Blockly.Blocks["operator_getLettersFromIndexToIndexInTextFixed"] = { + /** + * pm: Duplicate of operator_getLettersFromIndexToIndexInText to prevent breaking old projects. + * @this Blockly.Block + */ init: function() { this.jsonInit({ "inputsInline": true, @@ -961,6 +991,67 @@ Blockly.Blocks["operator_advMath"] = { } }; +Blockly.Blocks["operator_advMathExpanded"] = { + /** + * pm: Duplicate of operator_advMath to prevent breaking old projects. + * Updated to split power and root + log, while also allowing extra params for them + * @this Blockly.Block + */ + init: function() { + this.jsonInit({ + "inputsInline": true, + "message0": "%1 * %2 %3 %4", + "args0": [ + { + "type": "input_value", + "name": "ONE" + }, + { + "type": "input_value", + "name": "TWO" + }, + { + "type": "field_dropdown", + "name": "OPTION", + "options": [ + ["root", "root"], + ["log", "log"] + ] + }, + { + "type": "input_value", + "name": "THREE" + } + ], + "category": Blockly.Categories.operators, + "extensions": ["colours_operators", "output_number"] + }); + } +}; +Blockly.Blocks['operator_power'] = { + /** + * pm: Block for getting a ^ b. + * @this Blockly.Block + */ + init: function() { + this.jsonInit({ + "message0": "%1 ^ %2", + "args0": [ + { + "type": "input_value", + "name": "NUM1" + }, + { + "type": "input_value", + "name": "NUM2" + } + ], + "category": Blockly.Categories.operators, + "extensions": ["colours_operators", "output_number"] + }); + } +}; + Blockly.Blocks["operator_constrainnumber"] = { init: function() { this.jsonInit({ From 104ee34fd62fa2b0d25a8b44bec6d1735e24e93e Mon Sep 17 00:00:00 2001 From: someCatInTheWorld <162684669+someCatInTheWorld@users.noreply.github.com> Date: Thu, 21 Nov 2024 18:38:40 +1100 Subject: [PATCH 116/150] merge-upstream: stuff --- media/blue-flag.svg | 2 +- media/green-flag.svg | 20 +- pnpm-lock.yaml | 462 ++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 457 insertions(+), 27 deletions(-) diff --git a/media/blue-flag.svg b/media/blue-flag.svg index dbd6db1694..1113f8322f 100644 --- a/media/blue-flag.svg +++ b/media/blue-flag.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/media/green-flag.svg b/media/green-flag.svg index 976233ab71..1113f8322f 100644 --- a/media/green-flag.svg +++ b/media/green-flag.svg @@ -1,19 +1 @@ - - - - -greenflag - - - + \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 198656dfa6..86f90ff820 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,6 +8,9 @@ importers: .: dependencies: + exceljs: + specifier: ^4.4.0 + version: 4.4.0 exports-loader: specifier: 0.7.0 version: 0.7.0 @@ -20,6 +23,9 @@ importers: scratch-l10n: specifier: 3.15.20220923031622 version: 3.15.20220923031622 + xlsx: + specifier: ^0.18.5 + version: 0.18.5 devDependencies: async: specifier: 2.6.4 @@ -62,7 +68,7 @@ importers: version: 1.6.6 uglifyjs-webpack-plugin: specifier: 1.3.0 - version: 1.3.0(webpack@4.46.0(webpack-cli@3.3.12)) + version: 1.3.0(webpack@4.46.0) webpack: specifier: 4.46.0 version: 4.46.0(webpack-cli@3.3.12) @@ -174,6 +180,12 @@ packages: resolution: {integrity: sha512-xm8XrMKz0IlUdocVbYJe0Z9xEgidU7msskG8BbhnTPK/HZ2z/7FP7ykqPgrUH+C+r414mNfNWam1f2vqOjqjYQ==} engines: {node: '>=6.9.0'} + '@fast-csv/format@4.3.5': + resolution: {integrity: sha512-8iRn6QF3I8Ak78lNAa+Gdl5MJJBM5vRHivFtMRUWINdevNo00K7OXxS2PshawLKTejVwieIlPmK5YlLu6w4u8A==} + + '@fast-csv/parse@4.3.6': + resolution: {integrity: sha512-uRsLYksqpbDmWaSmzvJcuApSEe38+6NQZBUsuAyMZKqHxH0g1wcJgsKUvN3WC8tewaqFjBMMGrkHmC+T7k8LvA==} + '@jridgewell/gen-mapping@0.3.5': resolution: {integrity: sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==} engines: {node: '>=6.0.0'} @@ -222,6 +234,9 @@ packages: '@types/babel__traverse@7.20.6': resolution: {integrity: sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==} + '@types/node@14.18.63': + resolution: {integrity: sha512-fAtCfv4jJg+ExtXhvCkCqUKZ+4ok/JQk01qDKhL5BDDoS3AxKXhV5/MAVUZyQnSEd2GT92fkgZl0pz0Q0AzcIQ==} + '@types/node@20.14.12': resolution: {integrity: sha512-r7wNXakLeSsGT0H1AU863vS2wa5wBOK4bWMjZz2wj+8nBx+m5PeIn0k8AloSLpRuiwdRQZwarZqHE4FNArPuJQ==} @@ -311,6 +326,10 @@ packages: engines: {node: '>=0.4.0'} hasBin: true + adler-32@1.3.1: + resolution: {integrity: sha512-ynZ4w/nUUv5rrsR8UUGoe1VC9hZj6V5hU9Qw1HlMDJGEJw5S7TfTErWTjMys6M7vr0YWcPqs3qAr4ss0nDfP+A==} + engines: {node: '>=0.8'} + agent-base@6.0.2: resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} engines: {node: '>= 6.0.0'} @@ -374,6 +393,18 @@ packages: aproba@1.2.0: resolution: {integrity: sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==} + archiver-utils@2.1.0: + resolution: {integrity: sha512-bEL/yUb/fNNiNTuUz979Z0Yg5L+LzLxGJz8x79lYmR54fmTIb6ob/hNQgkQnIUDWIFjZVQwl9Xs356I6BAMHfw==} + engines: {node: '>= 6'} + + archiver-utils@3.0.4: + resolution: {integrity: sha512-KVgf4XQVrTjhyWmx6cte4RxonPLR9onExufI1jhvw/MQ4BB6IsZD5gT8Lq+u/+pRkWna/6JoHpiQioaqFP5Rzw==} + engines: {node: '>= 10'} + + archiver@5.3.2: + resolution: {integrity: sha512-+25nxyyznAXF7Nef3y0EbBeqmGZgeN/BxHX29Rs39djAfaFalmQ89SE6CWyDCHzGL0yt/ycBtNOmGTW0FyGWNw==} + engines: {node: '>= 10'} + argparse@1.0.10: resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} @@ -431,6 +462,9 @@ packages: async@2.6.4: resolution: {integrity: sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==} + async@3.2.6: + resolution: {integrity: sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==} + asynckit@0.4.0: resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} @@ -468,6 +502,10 @@ packages: bcrypt-pbkdf@1.0.2: resolution: {integrity: sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==} + big-integer@1.6.52: + resolution: {integrity: sha512-QxD8cf2eVqJOOz63z6JIN9BzvVs/dlySa5HGSBH5xtR8dPteIRQnBxxKqkNTiT6jbDTF6jAfrd4oMcND9RGbQg==} + engines: {node: '>=0.6'} + big.js@5.2.2: resolution: {integrity: sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==} @@ -479,9 +517,18 @@ packages: resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} engines: {node: '>=8'} + binary@0.3.0: + resolution: {integrity: sha512-D4H1y5KYwpJgK8wk1Cue5LLPgmwHKYSChkbspQg5JtVuR5ulGckxfR62H3AE9UDkdMC8yyXlqYihuz3Aqg2XZg==} + bindings@1.5.0: resolution: {integrity: sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==} + bl@4.1.0: + resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} + + bluebird@3.4.7: + resolution: {integrity: sha512-iD3898SR7sWVRHbiQv+sHUtHnMvC1o3nW5rAcqnq3uOn07DSAppZYUkIGslDz6gXC7HfunPe7YVBgoEJASPcHA==} + bluebird@3.7.2: resolution: {integrity: sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==} @@ -494,6 +541,9 @@ packages: brace-expansion@1.1.11: resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} + brace-expansion@2.0.1: + resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} + braces@2.3.2: resolution: {integrity: sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==} engines: {node: '>=0.10.0'} @@ -538,12 +588,23 @@ packages: buffer-from@1.1.2: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + buffer-indexof-polyfill@1.0.2: + resolution: {integrity: sha512-I7wzHwA3t1/lwXQh+A5PbNvJxgfo5r3xulgpYDB5zckTu/Z9oUK9biouBKQUjEqzaz3HnAT6TYoovmE+GqSf7A==} + engines: {node: '>=0.10'} + buffer-xor@1.0.3: resolution: {integrity: sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==} buffer@4.9.2: resolution: {integrity: sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==} + buffer@5.7.1: + resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} + + buffers@0.1.1: + resolution: {integrity: sha512-9q/rDEGSb/Qsvv2qvzIzdluL5k7AaJOTrw23z9reQthrbF7is4CtlT0DXyO1oei2DCp4uojjzQ7igaSHp1kAEQ==} + engines: {node: '>=0.2.0'} + builtin-status-codes@3.0.0: resolution: {integrity: sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ==} @@ -579,6 +640,13 @@ packages: caseless@0.12.0: resolution: {integrity: sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==} + cfb@1.2.2: + resolution: {integrity: sha512-KfdUZsSOw19/ObEWasvBP/Ac4reZvAGauZhs6S/gqNhXhI7cKwvlH7ulj+dOEYnca4bm4SGo8C1bTAQvnTjgQA==} + engines: {node: '>=0.8'} + + chainsaw@0.1.0: + resolution: {integrity: sha512-75kWfWt6MEKNC8xYXIdRpDehRYY/tNSgwKaJq+dbbDcxORuVrrQ+SEHoWsniVn9XPYfP4gmdWIeDk/4YNp1rNQ==} + chalk@1.1.3: resolution: {integrity: sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==} engines: {node: '>=0.10.0'} @@ -653,6 +721,10 @@ packages: resolution: {integrity: sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==} engines: {iojs: '>= 1.0.0', node: '>= 0.12.0'} + codepage@1.15.0: + resolution: {integrity: sha512-3g6NUTPd/YtuuGrhMnOMRjFc+LJw/bnMp3+0r/Wcz3IXUuCosKRJvMphm5+Q+bvTVGcJJuRvVLuYba+WojaFaA==} + engines: {node: '>=0.8'} + collection-visit@1.0.0: resolution: {integrity: sha512-lNkKvzEeMBBjUGHZ+q6z9pSJla0KWAQPvtzhEV9+iGyQYG+pBpl7xKDhxoNSOZH2hhv0v5k0y2yAM4o4SjoSkw==} engines: {node: '>=0.10.0'} @@ -693,6 +765,10 @@ packages: component-emitter@1.3.1: resolution: {integrity: sha512-T0+barUSQRTUQASh8bx02dl+DhF54GtIDY13Y3m9oWTklKbb3Wv974meRpeZ3lp1JpLVECWWNHC4vaG2XHXouQ==} + compress-commons@4.1.2: + resolution: {integrity: sha512-D3uMHtGc/fcO1Gt1/L7i1e33VOvD4A9hfQLP+6ewd+BvG/gQ84Yh4oftEhAdjSMgBgwGL+jsppT7JYNpo6MHHg==} + engines: {node: '>= 10'} + concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} @@ -727,6 +803,15 @@ packages: core-util-is@1.0.3: resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} + crc-32@1.2.2: + resolution: {integrity: sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==} + engines: {node: '>=0.8'} + hasBin: true + + crc32-stream@4.0.3: + resolution: {integrity: sha512-NT7w2JVU7DFroFdYkeq8cywxrgjPHWkdX1wjpRQXPX5Asews3tA+Ght6lddQO5Mkumffp3X7GEqku3epj2toIw==} + engines: {node: '>= 10'} + create-ecdh@4.0.4: resolution: {integrity: sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==} @@ -753,6 +838,9 @@ packages: resolution: {integrity: sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==} engines: {node: '>=0.10'} + dayjs@1.11.13: + resolution: {integrity: sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==} + debug@2.6.9: resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} peerDependencies: @@ -864,6 +952,9 @@ packages: resolution: {integrity: sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==} engines: {node: '>=0.4', npm: '>=1.2'} + duplexer2@0.1.4: + resolution: {integrity: sha512-asLFVfWWtJ90ZyOUHMqk7/S2w2guQKxUI2itj3d92ADHhxUSbCMGi1f1cBcJ7xM1To+pE/Khbwo1yuNbMEPKeA==} + duplexer@0.1.2: resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==} @@ -969,6 +1060,10 @@ packages: evp_bytestokey@1.0.3: resolution: {integrity: sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==} + exceljs@4.4.0: + resolution: {integrity: sha512-XctvKaEMaj1Ii9oDOqbW/6e1gXknSY4g/aLCDicOXqBE4M0nRWkUu0PTp++UPNzoFY12BNHMfs/VadKIS6llvg==} + engines: {node: '>=8.3.0'} + expand-brackets@2.1.4: resolution: {integrity: sha512-w/ozOKR9Obk3qoWeY/WDi6MFta9AoMR+zud60mdnbniMcBxRuFJyDt2LdX/14A1UABeqk+Uk+LDfUpvoGKppZA==} engines: {node: '>=0.10.0'} @@ -1009,6 +1104,10 @@ packages: resolution: {integrity: sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==} engines: {'0': node >=0.6.0} + fast-csv@4.3.6: + resolution: {integrity: sha512-2RNSpuwwsJGP0frGsOmTb9oUF+VkFSM4SyLTDgwf2ciHWTarN0lQTC+F2f/t5J9QjW+c65VFIAAu85GsvMIusw==} + engines: {node: '>=10.0.0'} + fast-deep-equal@1.1.0: resolution: {integrity: sha512-fueX787WZKCV0Is4/T2cyAdM4+x1S3MXXOAhavE1ys/W42SHAPacLTQhucja22QBYrfGw50M2sRiXPtTGv9Ymw==} @@ -1105,6 +1204,10 @@ packages: resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} engines: {node: '>= 6'} + frac@1.1.2: + resolution: {integrity: sha512-w/XBfkibaTl3YDqASwfDUqkna4Z2p9cFSr1aHDt0WoMTECnRfBOv2WArlZILlqgWlmdIlALXGpM2AOhEk5W3IA==} + engines: {node: '>=0.8'} + fragment-cache@0.2.1: resolution: {integrity: sha512-GMBAbW9antB8iZRHLoGw0b3HANt57diZYFO/HL1JGIC1MjKrdmhxvrJbupnVvpys0zsz7yBApXdQyfepKly2kA==} engines: {node: '>=0.10.0'} @@ -1115,6 +1218,9 @@ packages: from@0.1.7: resolution: {integrity: sha512-twe20eF1OxVxp/ML/kq2p1uc6KvFK/+vs8WjEbeKmV2He22MKm7YF2ANIt+EOqhJ5L3K/SuuPhk0hWQDjOM23g==} + fs-constants@1.0.0: + resolution: {integrity: sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==} + fs-extra@8.1.0: resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==} engines: {node: '>=6 <7 || >=8'} @@ -1133,13 +1239,18 @@ packages: resolution: {integrity: sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==} engines: {node: '>= 4.0'} os: [darwin] - deprecated: The v1 package contains DANGEROUS / INSECURE binaries. Upgrade to safe fsevents v2 + deprecated: Upgrade to fsevents v2 to mitigate potential security issues fsevents@2.3.3: resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] + fstream@1.0.12: + resolution: {integrity: sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==} + engines: {node: '>=0.6'} + deprecated: This package is no longer supported. + function-bind@1.1.2: resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} @@ -1578,6 +1689,10 @@ packages: resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} engines: {node: '>=0.10.0'} + lazystream@1.0.1: + resolution: {integrity: sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw==} + engines: {node: '>= 0.6.3'} + levn@0.3.0: resolution: {integrity: sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==} engines: {node: '>= 0.8.0'} @@ -1585,6 +1700,9 @@ packages: lie@3.3.0: resolution: {integrity: sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==} + listenercount@1.0.1: + resolution: {integrity: sha512-3mk/Zag0+IJxeDrxSgaDPy4zZ3w05PRZeJNnlWhzFz5OkX49J4krc+A8X2d2M69vGMBEX0uyl8M+W+8gH+kBqQ==} + loader-runner@2.4.0: resolution: {integrity: sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw==} engines: {node: '>=4.3.0 <5.0.0 || >=5.10'} @@ -1601,6 +1719,45 @@ packages: resolution: {integrity: sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==} engines: {node: '>=6'} + lodash.defaults@4.2.0: + resolution: {integrity: sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ==} + + lodash.difference@4.5.0: + resolution: {integrity: sha512-dS2j+W26TQ7taQBGN8Lbbq04ssV3emRw4NY58WErlTO29pIqS0HmoT5aJ9+TUQ1N3G+JOZSji4eugsWwGp9yPA==} + + lodash.escaperegexp@4.1.2: + resolution: {integrity: sha512-TM9YBvyC84ZxE3rgfefxUWiQKLilstD6k7PTGt6wfbtXF8ixIJLOL3VYyV/z+ZiPLsVxAsKAFVwWlWeb2Y8Yyw==} + + lodash.flatten@4.4.0: + resolution: {integrity: sha512-C5N2Z3DgnnKr0LOpv/hKCgKdb7ZZwafIrsesve6lmzvZIRZRGaZ/l6Q8+2W7NaT+ZwO3fFlSCzCzrDCFdJfZ4g==} + + lodash.groupby@4.6.0: + resolution: {integrity: sha512-5dcWxm23+VAoz+awKmBaiBvzox8+RqMgFhi7UvX9DHZr2HdxHXM/Wrf8cfKpsW37RNrvtPn6hSwNqurSILbmJw==} + + lodash.isboolean@3.0.3: + resolution: {integrity: sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==} + + lodash.isequal@4.5.0: + resolution: {integrity: sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==} + + lodash.isfunction@3.0.9: + resolution: {integrity: sha512-AirXNj15uRIMMPihnkInB4i3NHeb4iBtNg9WRWuK2o31S+ePwwNmDPaTL3o7dTJ+VXNZim7rFs4rxN4YU1oUJw==} + + lodash.isnil@4.0.0: + resolution: {integrity: sha512-up2Mzq3545mwVnMhTDMdfoG1OurpA/s5t88JmQX809eH3C8491iu2sfKhTfhQtKY78oPNhiaHJUpT/dUDAAtng==} + + lodash.isplainobject@4.0.6: + resolution: {integrity: sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==} + + lodash.isundefined@3.0.1: + resolution: {integrity: sha512-MXB1is3s899/cD8jheYYE2V9qTHwKvt+npCwpD+1Sxm3Q3cECXCiYHjeHWXNwr6Q0SOBPrYUDxendrO6goVTEA==} + + lodash.union@4.6.0: + resolution: {integrity: sha512-c4pB2CdGrGdjMKYLA+XiRDO7Y0PRQbm/Gzg8qMj+QH+pFVAoTp5sBpO0odL3FjoPCGjK96p6qsP+yQoiLoOBcw==} + + lodash.uniq@4.5.0: + resolution: {integrity: sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==} + lodash@4.17.21: resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} @@ -1684,6 +1841,10 @@ packages: minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + minimatch@5.1.6: + resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==} + engines: {node: '>=10'} + minimist@0.0.8: resolution: {integrity: sha512-miQKw5Hv4NS1Psg2517mV4e4dYNaO3++hjAvLOAzKqZ61rH8NS1SK+vbfBWZ5PY/Me/bEWhUwqMghEW5Fb9T7Q==} @@ -2038,6 +2199,9 @@ packages: resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} engines: {node: '>= 6'} + readdir-glob@1.1.3: + resolution: {integrity: sha512-v05I2k7xN8zXvPD9N+z/uhXPaj0sUFCe2rcWZIpBsqxfP7xXFQ0tipAd/wjj1YxWyWtUS5IDJpOG82JKt2EAVA==} + readdirp@2.2.1: resolution: {integrity: sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==} engines: {node: '>=0.10'} @@ -2162,6 +2326,10 @@ packages: safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} + saxes@5.0.1: + resolution: {integrity: sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==} + engines: {node: '>=10'} + schema-utils@0.4.7: resolution: {integrity: sha512-v/iwU6wvwGK8HbU9yi3/nhGzP0yGSuhQMzL6ySiec1FSrZZDkhm4noOSWzrNFo/jEc+SJY6jRTwuwbSXJPDUnQ==} engines: {node: '>= 4'} @@ -2307,6 +2475,10 @@ packages: sprintf-js@1.0.3: resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} + ssf@0.11.2: + resolution: {integrity: sha512-+idbmIXoYET47hH+d7dfm2epdOMUDjqcB4648sTZ+t2JwoyBFL/insLfB/racrDmsKB3diwsDA696pZMieAC5g==} + engines: {node: '>=0.8'} + sshpk@1.18.0: resolution: {integrity: sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==} engines: {node: '>=0.10.0'} @@ -2390,6 +2562,10 @@ packages: resolution: {integrity: sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==} engines: {node: '>=6'} + tar-stream@2.2.0: + resolution: {integrity: sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==} + engines: {node: '>=6'} + tcp-port-used@1.0.2: resolution: {integrity: sha512-l7ar8lLUD3XS1V2lfoJlCBaeoaWo/2xfYt81hM7VlvR4RrMVFqfmzfhLVk40hAb368uitje5gPtBRL1m/DGvLA==} @@ -2457,6 +2633,9 @@ packages: engines: {node: '>=8.9.0'} hasBin: true + traverse@0.3.9: + resolution: {integrity: sha512-iawgk0hLP3SxGKDfnDJf8wTz4p2qImnyihM5Hh/sGvQ3K37dPi/w8sRhdNIxYA1TwFwc5mDhIJq+O0RsvXBKdQ==} + tty-browserify@0.0.0: resolution: {integrity: sha512-JVa5ijo+j/sOoHGjw0sxw734b1LhBkQ3bvUGNdxnVXDCX81Yx7TFgnZygxrIIWn23hbfTaMYLwRmAxFyDuFmIw==} @@ -2506,6 +2685,9 @@ packages: resolution: {integrity: sha512-PcA2tsuGSF9cnySLHTLSh2qrQiJ70mn+r+Glzxv2TWZblxsxCC52BDlZoPCsz7STd9pN7EZetkWZBAvk4cgZdQ==} engines: {node: '>=0.10.0'} + unzipper@0.10.14: + resolution: {integrity: sha512-ti4wZj+0bQTiX2KmKWuwj7lhV+2n//uXEotUmGuQqrbVZSEGFMbI68+c6JCQ8aAmUWYvtHEz2A8K6wXvueR/6g==} + upath@1.2.0: resolution: {integrity: sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==} engines: {node: '>=4'} @@ -2547,6 +2729,10 @@ packages: deprecated: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. hasBin: true + uuid@8.3.2: + resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} + hasBin: true + v8-compile-cache@2.4.0: resolution: {integrity: sha512-ocyWc3bAHBB/guyqJQVI5o4BZkPhznPYUG2ea80Gond/BgNWpap8TOmLSeeQG7bnh2KMISxskdADG59j7zruhw==} @@ -2603,10 +2789,18 @@ packages: resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==} hasBin: true + wmf@1.0.2: + resolution: {integrity: sha512-/p9K7bEh0Dj6WbXg4JG0xvLQmIadrner1bi45VMJTfnbVHsc7yIajZyoSoK60/dtVBs12Fm6WkUI5/3WAVsNMw==} + engines: {node: '>=0.8'} + word-wrap@1.2.5: resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} engines: {node: '>=0.10.0'} + word@0.3.0: + resolution: {integrity: sha512-OELeY0Q61OXpdUfTp+oweA/vtLVg5VDOXh+3he3PNzLGG/y0oylSOC1xRVj0+l4vQ3tj/bB1HVHv1ocXkQceFA==} + engines: {node: '>=0.8'} + worker-farm@1.7.0: resolution: {integrity: sha512-rvw3QTZc8lAxyVrqcSGVm5yP/IJ2UcB3U0graE3LCFoZ0Yn2x4EoVSqJKdB/T5M+FLcRPjz4TDacRf3OCfNUzw==} @@ -2633,6 +2827,14 @@ packages: utf-8-validate: optional: true + xlsx@0.18.5: + resolution: {integrity: sha512-dmg3LCjBPHZnQp5/F/+nnTa+miPJxUXB6vtk42YjBBKayDNagxGEeIdWApkYPOf3Z3pm3k62Knjzp7lMeTEtFQ==} + engines: {node: '>=0.8'} + hasBin: true + + xmlchars@2.2.0: + resolution: {integrity: sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==} + xtend@4.0.2: resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} engines: {node: '>=0.4'} @@ -2655,6 +2857,10 @@ packages: yauzl@2.10.0: resolution: {integrity: sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==} + zip-stream@4.1.1: + resolution: {integrity: sha512-9qv4rlDiopXg4E69k+vMHjNN63YFMe9sZMrdlvKnCjlCRWeCBswPPMPUfx+ipsAWq1LXHe70RcbaHdJJpS6hyQ==} + engines: {node: '>= 10'} + snapshots: '@ampproject/remapping@2.3.0': @@ -2811,6 +3017,25 @@ snapshots: '@babel/helper-validator-identifier': 7.24.7 to-fast-properties: 2.0.0 + '@fast-csv/format@4.3.5': + dependencies: + '@types/node': 14.18.63 + lodash.escaperegexp: 4.1.2 + lodash.isboolean: 3.0.3 + lodash.isequal: 4.5.0 + lodash.isfunction: 3.0.9 + lodash.isnil: 4.0.0 + + '@fast-csv/parse@4.3.6': + dependencies: + '@types/node': 14.18.63 + lodash.escaperegexp: 4.1.2 + lodash.groupby: 4.6.0 + lodash.isfunction: 3.0.9 + lodash.isnil: 4.0.0 + lodash.isundefined: 3.0.1 + lodash.uniq: 4.5.0 + '@jridgewell/gen-mapping@0.3.5': dependencies: '@jridgewell/set-array': 1.2.1 @@ -2866,6 +3091,8 @@ snapshots: dependencies: '@babel/types': 7.24.9 + '@types/node@14.18.63': {} + '@types/node@20.14.12': dependencies: undici-types: 5.26.5 @@ -2983,6 +3210,8 @@ snapshots: acorn@8.12.1: {} + adler-32@1.3.1: {} + agent-base@6.0.2: dependencies: debug: 4.3.5 @@ -3050,6 +3279,42 @@ snapshots: aproba@1.2.0: {} + archiver-utils@2.1.0: + dependencies: + glob: 7.2.3 + graceful-fs: 4.2.10 + lazystream: 1.0.1 + lodash.defaults: 4.2.0 + lodash.difference: 4.5.0 + lodash.flatten: 4.4.0 + lodash.isplainobject: 4.0.6 + lodash.union: 4.6.0 + normalize-path: 3.0.0 + readable-stream: 2.3.8 + + archiver-utils@3.0.4: + dependencies: + glob: 7.2.3 + graceful-fs: 4.2.10 + lazystream: 1.0.1 + lodash.defaults: 4.2.0 + lodash.difference: 4.5.0 + lodash.flatten: 4.4.0 + lodash.isplainobject: 4.0.6 + lodash.union: 4.6.0 + normalize-path: 3.0.0 + readable-stream: 3.6.2 + + archiver@5.3.2: + dependencies: + archiver-utils: 2.1.0 + async: 3.2.6 + buffer-crc32: 0.2.13 + readable-stream: 3.6.2 + readdir-glob: 1.1.3 + tar-stream: 2.2.0 + zip-stream: 4.1.1 + argparse@1.0.10: dependencies: sprintf-js: 1.0.3 @@ -3100,6 +3365,8 @@ snapshots: dependencies: lodash: 4.17.21 + async@3.2.6: {} + asynckit@0.4.0: {} atob@2.1.2: {} @@ -3149,6 +3416,8 @@ snapshots: dependencies: tweetnacl: 0.14.5 + big-integer@1.6.52: {} + big.js@5.2.2: {} binary-extensions@1.13.1: @@ -3157,11 +3426,24 @@ snapshots: binary-extensions@2.3.0: optional: true + binary@0.3.0: + dependencies: + buffers: 0.1.1 + chainsaw: 0.1.0 + bindings@1.5.0: dependencies: file-uri-to-path: 1.0.0 optional: true + bl@4.1.0: + dependencies: + buffer: 5.7.1 + inherits: 2.0.4 + readable-stream: 3.6.2 + + bluebird@3.4.7: {} + bluebird@3.7.2: {} bn.js@4.12.0: {} @@ -3173,6 +3455,10 @@ snapshots: balanced-match: 1.0.2 concat-map: 0.0.1 + brace-expansion@2.0.1: + dependencies: + balanced-match: 1.0.2 + braces@2.3.2(supports-color@6.1.0): dependencies: arr-flatten: 1.1.0 @@ -3251,6 +3537,8 @@ snapshots: buffer-from@1.1.2: {} + buffer-indexof-polyfill@1.0.2: {} + buffer-xor@1.0.3: {} buffer@4.9.2: @@ -3259,6 +3547,13 @@ snapshots: ieee754: 1.2.1 isarray: 1.0.0 + buffer@5.7.1: + dependencies: + base64-js: 1.5.1 + ieee754: 1.2.1 + + buffers@0.1.1: {} + builtin-status-codes@3.0.0: {} cacache@10.0.4: @@ -3327,6 +3622,15 @@ snapshots: caseless@0.12.0: {} + cfb@1.2.2: + dependencies: + adler-32: 1.3.1 + crc-32: 1.2.2 + + chainsaw@0.1.0: + dependencies: + traverse: 0.3.9 + chalk@1.1.3: dependencies: ansi-styles: 2.2.1 @@ -3434,6 +3738,8 @@ snapshots: co@4.6.0: {} + codepage@1.15.0: {} + collection-visit@1.0.0: dependencies: map-visit: 1.0.0 @@ -3469,6 +3775,13 @@ snapshots: component-emitter@1.3.1: {} + compress-commons@4.1.2: + dependencies: + buffer-crc32: 0.2.13 + crc32-stream: 4.0.3 + normalize-path: 3.0.0 + readable-stream: 3.6.2 + concat-map@0.0.1: {} concat-stream@1.6.2: @@ -3510,6 +3823,13 @@ snapshots: core-util-is@1.0.3: {} + crc-32@1.2.2: {} + + crc32-stream@4.0.3: + dependencies: + crc-32: 1.2.2 + readable-stream: 3.6.2 + create-ecdh@4.0.4: dependencies: bn.js: 4.12.0 @@ -3566,6 +3886,8 @@ snapshots: dependencies: assert-plus: 1.0.0 + dayjs@1.11.13: {} + debug@2.6.9(supports-color@6.1.0): dependencies: ms: 2.0.0 @@ -3663,6 +3985,10 @@ snapshots: domain-browser@1.2.0: {} + duplexer2@0.1.4: + dependencies: + readable-stream: 2.3.8 + duplexer@0.1.2: {} duplexify@3.7.1: @@ -3810,6 +4136,18 @@ snapshots: md5.js: 1.3.5 safe-buffer: 5.2.1 + exceljs@4.4.0: + dependencies: + archiver: 5.3.2 + dayjs: 1.11.13 + fast-csv: 4.3.6 + jszip: 3.10.1 + readable-stream: 3.6.2 + saxes: 5.0.1 + tmp: 0.2.3 + unzipper: 0.10.14 + uuid: 8.3.2 + expand-brackets@2.1.4(supports-color@6.1.0): dependencies: debug: 2.6.9(supports-color@6.1.0) @@ -3873,6 +4211,11 @@ snapshots: extsprintf@1.3.0: {} + fast-csv@4.3.6: + dependencies: + '@fast-csv/format': 4.3.5 + '@fast-csv/parse': 4.3.6 + fast-deep-equal@1.1.0: {} fast-deep-equal@3.1.3: {} @@ -3981,6 +4324,8 @@ snapshots: combined-stream: 1.0.8 mime-types: 2.1.35 + frac@1.1.2: {} + fragment-cache@0.2.1: dependencies: map-cache: 0.2.2 @@ -3992,6 +4337,8 @@ snapshots: from@0.1.7: {} + fs-constants@1.0.0: {} + fs-extra@8.1.0: dependencies: graceful-fs: 4.2.10 @@ -4018,6 +4365,13 @@ snapshots: fsevents@2.3.3: optional: true + fstream@1.0.12: + dependencies: + graceful-fs: 4.2.10 + inherits: 2.0.4 + mkdirp: 0.5.6 + rimraf: 2.7.1 + function-bind@1.1.2: {} functional-red-black-tree@1.0.1: {} @@ -4459,6 +4813,10 @@ snapshots: kind-of@6.0.3: {} + lazystream@1.0.1: + dependencies: + readable-stream: 2.3.8 + levn@0.3.0: dependencies: prelude-ls: 1.1.2 @@ -4468,6 +4826,8 @@ snapshots: dependencies: immediate: 3.0.6 + listenercount@1.0.1: {} + loader-runner@2.4.0: {} loader-utils@1.4.2: @@ -4486,6 +4846,32 @@ snapshots: p-locate: 3.0.0 path-exists: 3.0.0 + lodash.defaults@4.2.0: {} + + lodash.difference@4.5.0: {} + + lodash.escaperegexp@4.1.2: {} + + lodash.flatten@4.4.0: {} + + lodash.groupby@4.6.0: {} + + lodash.isboolean@3.0.3: {} + + lodash.isequal@4.5.0: {} + + lodash.isfunction@3.0.9: {} + + lodash.isnil@4.0.0: {} + + lodash.isplainobject@4.0.6: {} + + lodash.isundefined@3.0.1: {} + + lodash.union@4.6.0: {} + + lodash.uniq@4.5.0: {} + lodash@4.17.21: {} lru-cache@4.1.5: @@ -4580,6 +4966,10 @@ snapshots: dependencies: brace-expansion: 1.1.11 + minimatch@5.1.6: + dependencies: + brace-expansion: 2.0.1 + minimist@0.0.8: {} minimist@1.2.8: {} @@ -4713,8 +5103,7 @@ snapshots: remove-trailing-separator: 1.1.0 optional: true - normalize-path@3.0.0: - optional: true + normalize-path@3.0.0: {} oauth-sign@0.9.0: {} @@ -4971,6 +5360,10 @@ snapshots: string_decoder: 1.3.0 util-deprecate: 1.0.2 + readdir-glob@1.1.3: + dependencies: + minimatch: 5.1.6 + readdirp@2.2.1: dependencies: graceful-fs: 4.2.10 @@ -5099,6 +5492,10 @@ snapshots: safer-buffer@2.1.2: {} + saxes@5.0.1: + dependencies: + xmlchars: 2.2.0 + schema-utils@0.4.7: dependencies: ajv: 6.12.6 @@ -5270,6 +5667,10 @@ snapshots: sprintf-js@1.0.3: {} + ssf@0.11.2: + dependencies: + frac: 1.1.2 + sshpk@1.18.0: dependencies: asn1: 0.2.6 @@ -5378,6 +5779,14 @@ snapshots: tapable@1.1.3: {} + tar-stream@2.2.0: + dependencies: + bl: 4.1.0 + end-of-stream: 1.4.4 + fs-constants: 1.0.0 + inherits: 2.0.4 + readable-stream: 3.6.2 + tcp-port-used@1.0.2: dependencies: debug: 4.3.1 @@ -5385,7 +5794,7 @@ snapshots: transitivePeerDependencies: - supports-color - terser-webpack-plugin@1.4.6(webpack@4.46.0(webpack-cli@3.3.12)): + terser-webpack-plugin@1.4.6(webpack@4.46.0): dependencies: cacache: 12.0.4 find-cache-dir: 2.1.0 @@ -5462,6 +5871,8 @@ snapshots: request: 2.88.2 should: 13.2.3 + traverse@0.3.9: {} + tty-browserify@0.0.0: {} tunnel-agent@0.6.0: @@ -5481,7 +5892,7 @@ snapshots: commander: 2.13.0 source-map: 0.6.1 - uglifyjs-webpack-plugin@1.3.0(webpack@4.46.0(webpack-cli@3.3.12)): + uglifyjs-webpack-plugin@1.3.0(webpack@4.46.0): dependencies: cacache: 10.0.4 find-cache-dir: 1.0.0 @@ -5518,6 +5929,19 @@ snapshots: has-value: 0.3.1 isobject: 3.0.1 + unzipper@0.10.14: + dependencies: + big-integer: 1.6.52 + binary: 0.3.0 + bluebird: 3.4.7 + buffer-indexof-polyfill: 1.0.2 + duplexer2: 0.1.4 + fstream: 1.0.12 + graceful-fs: 4.2.10 + listenercount: 1.0.1 + readable-stream: 2.3.8 + setimmediate: 1.0.5 + upath@1.2.0: optional: true @@ -5554,6 +5978,8 @@ snapshots: uuid@3.4.0: {} + uuid@8.3.2: {} + v8-compile-cache@2.4.0: {} verror@1.10.0: @@ -5638,7 +6064,7 @@ snapshots: node-libs-browser: 2.2.1 schema-utils: 1.0.0 tapable: 1.1.3 - terser-webpack-plugin: 1.4.6(webpack@4.46.0(webpack-cli@3.3.12)) + terser-webpack-plugin: 1.4.6(webpack@4.46.0) watchpack: 1.7.5 webpack-sources: 1.4.3 optionalDependencies: @@ -5652,8 +6078,12 @@ snapshots: dependencies: isexe: 2.0.0 + wmf@1.0.2: {} + word-wrap@1.2.5: {} + word@0.3.0: {} + worker-farm@1.7.0: dependencies: errno: 0.1.8 @@ -5672,6 +6102,18 @@ snapshots: ws@8.18.0: {} + xlsx@0.18.5: + dependencies: + adler-32: 1.3.1 + cfb: 1.2.2 + codepage: 1.15.0 + crc-32: 1.2.2 + ssf: 0.11.2 + wmf: 1.0.2 + word: 0.3.0 + + xmlchars@2.2.0: {} + xtend@4.0.2: {} y18n@4.0.3: {} @@ -5702,3 +6144,9 @@ snapshots: dependencies: buffer-crc32: 0.2.13 fd-slicer: 1.1.0 + + zip-stream@4.1.1: + dependencies: + archiver-utils: 3.0.4 + compress-commons: 4.1.2 + readable-stream: 3.6.2 From 913583b426cb43b533308171b1ead769c9edff34 Mon Sep 17 00:00:00 2001 From: someCatInTheWorld <162684669+someCatInTheWorld@users.noreply.github.com> Date: Fri, 22 Nov 2024 10:38:13 +1100 Subject: [PATCH 117/150] Update rebuild.yml --- .github/workflows/rebuild.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rebuild.yml b/.github/workflows/rebuild.yml index 053c391082..6473b39cf7 100644 --- a/.github/workflows/rebuild.yml +++ b/.github/workflows/rebuild.yml @@ -4,7 +4,7 @@ on: workflow_dispatch: push: branches: - - develop + - merge-upsteam jobs: rebuild: From c721fc66ccf421f6f84a249baed0be67e694cea4 Mon Sep 17 00:00:00 2001 From: someCatInTheWorld <162684669+someCatInTheWorld@users.noreply.github.com> Date: Fri, 22 Nov 2024 10:38:54 +1100 Subject: [PATCH 118/150] Update rebuild.yml --- .github/workflows/rebuild.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rebuild.yml b/.github/workflows/rebuild.yml index 6473b39cf7..f81ec89885 100644 --- a/.github/workflows/rebuild.yml +++ b/.github/workflows/rebuild.yml @@ -4,7 +4,7 @@ on: workflow_dispatch: push: branches: - - merge-upsteam + - merge-upstream jobs: rebuild: From 658723f8f6e4d704de7032e8f57487ef7eee7887 Mon Sep 17 00:00:00 2001 From: someCatInTheWorld <162684669+someCatInTheWorld@users.noreply.github.com> Date: Fri, 22 Nov 2024 10:49:46 +1100 Subject: [PATCH 119/150] Update rebuild.yml --- .github/workflows/rebuild.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rebuild.yml b/.github/workflows/rebuild.yml index f81ec89885..59d213e01e 100644 --- a/.github/workflows/rebuild.yml +++ b/.github/workflows/rebuild.yml @@ -19,7 +19,8 @@ jobs: - name: Rebuild run: | - sudo apt install python2-minimal + sudo apt update + sudo apt-get install python2-minimal npm install npm run translate From 7151a72da41378aca6d50d6d2022d030f1ef1020 Mon Sep 17 00:00:00 2001 From: someCatInTheWorld <162684669+someCatInTheWorld@users.noreply.github.com> Date: Fri, 22 Nov 2024 10:55:05 +1100 Subject: [PATCH 120/150] Update rebuild.yml --- .github/workflows/rebuild.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/rebuild.yml b/.github/workflows/rebuild.yml index 59d213e01e..087fe2a9b7 100644 --- a/.github/workflows/rebuild.yml +++ b/.github/workflows/rebuild.yml @@ -43,8 +43,7 @@ jobs: - name: Clear out things run: | - rm -rf dist/* - rm -rf media/* + git rm -r -f ./**/* - name: Download built-dist uses: actions/download-artifact@v3.0.1 From 93e0adbebba959ec65ca3816c3d1a21ec4adf586 Mon Sep 17 00:00:00 2001 From: someCatInTheWorld <162684669+someCatInTheWorld@users.noreply.github.com> Date: Fri, 22 Nov 2024 10:59:01 +1100 Subject: [PATCH 121/150] Update rebuild.yml --- .github/workflows/rebuild.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/rebuild.yml b/.github/workflows/rebuild.yml index 087fe2a9b7..8ba06ac98c 100644 --- a/.github/workflows/rebuild.yml +++ b/.github/workflows/rebuild.yml @@ -44,6 +44,7 @@ jobs: - name: Clear out things run: | git rm -r -f ./**/* + git commit -m "Clean up" - name: Download built-dist uses: actions/download-artifact@v3.0.1 From 573a32ab2db4a863f86418c5be6fe86d27947b0d Mon Sep 17 00:00:00 2001 From: someCatInTheWorld <162684669+someCatInTheWorld@users.noreply.github.com> Date: Fri, 22 Nov 2024 11:02:00 +1100 Subject: [PATCH 122/150] Update rebuild.yml --- .github/workflows/rebuild.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rebuild.yml b/.github/workflows/rebuild.yml index 8ba06ac98c..59d213e01e 100644 --- a/.github/workflows/rebuild.yml +++ b/.github/workflows/rebuild.yml @@ -43,8 +43,8 @@ jobs: - name: Clear out things run: | - git rm -r -f ./**/* - git commit -m "Clean up" + rm -rf dist/* + rm -rf media/* - name: Download built-dist uses: actions/download-artifact@v3.0.1 From f8152680df2b95a806cc49e744b3079f4b494dd3 Mon Sep 17 00:00:00 2001 From: sussy layers dev <72522395+jwklong@users.noreply.github.com> Date: Mon, 25 Nov 2024 08:35:54 +0000 Subject: [PATCH 123/150] fix input square shape --- core/block_render.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/block_render.js b/core/block_render.js index 233cf7d8aa..6a4636afca 100644 --- a/core/block_render.js +++ b/core/block_render.js @@ -341,11 +341,11 @@ Blockly.BlockSvg.INPUT_SHAPE_HEXAGONAL_WIDTH = 12 * Blockly.BlockSvg.GRID_UNIT; Blockly.BlockSvg.INPUT_SHAPE_SQUARE = Blockly.BlockSvg.TOP_LEFT_CORNER_START + Blockly.BlockSvg.TOP_LEFT_CORNER + - ' h ' + (13 * Blockly.BlockSvg.GRID_UNIT - 2 * Blockly.BlockSvg.CORNER_RADIUS) + + ' h ' + (4 * Blockly.BlockSvg.GRID_UNIT - 2 * Blockly.BlockSvg.CORNER_RADIUS) + Blockly.BlockSvg.TOP_RIGHT_CORNER + - ' v ' + (9.5 * Blockly.BlockSvg.GRID_UNIT - 2 * Blockly.BlockSvg.CORNER_RADIUS) + + ' v ' + (8 * Blockly.BlockSvg.GRID_UNIT - 2 * Blockly.BlockSvg.CORNER_RADIUS) + Blockly.BlockSvg.BOTTOM_RIGHT_CORNER + - ' h ' + (-13 * Blockly.BlockSvg.GRID_UNIT + 2 * Blockly.BlockSvg.CORNER_RADIUS) + + ' h ' + (-4 * Blockly.BlockSvg.GRID_UNIT + 2 * Blockly.BlockSvg.CORNER_RADIUS) + Blockly.BlockSvg.BOTTOM_LEFT_CORNER + ' z'; From aa012040d9287123ab44b105f7826b26f0bccd1a Mon Sep 17 00:00:00 2001 From: sussy layers dev <72522395+jwklong@users.noreply.github.com> Date: Mon, 25 Nov 2024 08:37:18 +0000 Subject: [PATCH 124/150] revert --- core/block_render.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/block_render.js b/core/block_render.js index 6a4636afca..233cf7d8aa 100644 --- a/core/block_render.js +++ b/core/block_render.js @@ -341,11 +341,11 @@ Blockly.BlockSvg.INPUT_SHAPE_HEXAGONAL_WIDTH = 12 * Blockly.BlockSvg.GRID_UNIT; Blockly.BlockSvg.INPUT_SHAPE_SQUARE = Blockly.BlockSvg.TOP_LEFT_CORNER_START + Blockly.BlockSvg.TOP_LEFT_CORNER + - ' h ' + (4 * Blockly.BlockSvg.GRID_UNIT - 2 * Blockly.BlockSvg.CORNER_RADIUS) + + ' h ' + (13 * Blockly.BlockSvg.GRID_UNIT - 2 * Blockly.BlockSvg.CORNER_RADIUS) + Blockly.BlockSvg.TOP_RIGHT_CORNER + - ' v ' + (8 * Blockly.BlockSvg.GRID_UNIT - 2 * Blockly.BlockSvg.CORNER_RADIUS) + + ' v ' + (9.5 * Blockly.BlockSvg.GRID_UNIT - 2 * Blockly.BlockSvg.CORNER_RADIUS) + Blockly.BlockSvg.BOTTOM_RIGHT_CORNER + - ' h ' + (-4 * Blockly.BlockSvg.GRID_UNIT + 2 * Blockly.BlockSvg.CORNER_RADIUS) + + ' h ' + (-13 * Blockly.BlockSvg.GRID_UNIT + 2 * Blockly.BlockSvg.CORNER_RADIUS) + Blockly.BlockSvg.BOTTOM_LEFT_CORNER + ' z'; From 5431fe20e0d596da2b6384ea3413c17d8d305bfc Mon Sep 17 00:00:00 2001 From: sussy layers dev <72522395+jwklong@users.noreply.github.com> Date: Mon, 25 Nov 2024 16:22:32 +0000 Subject: [PATCH 125/150] downgrade ubuntu just to see if that fixes it --- .github/workflows/rebuild.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rebuild.yml b/.github/workflows/rebuild.yml index fbee5d30f9..791cb19095 100644 --- a/.github/workflows/rebuild.yml +++ b/.github/workflows/rebuild.yml @@ -8,7 +8,7 @@ on: jobs: rebuild: concurrency: ci-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession. - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/setup-node@v3 with: From d1db72723e6ba7ce781cd6dc1c3a336ac0240cda Mon Sep 17 00:00:00 2001 From: sussy layers dev <72522395+jwklong@users.noreply.github.com> Date: Mon, 25 Nov 2024 16:23:22 +0000 Subject: [PATCH 126/150] revert since that didn't work --- .github/workflows/rebuild.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rebuild.yml b/.github/workflows/rebuild.yml index 791cb19095..fbee5d30f9 100644 --- a/.github/workflows/rebuild.yml +++ b/.github/workflows/rebuild.yml @@ -8,7 +8,7 @@ on: jobs: rebuild: concurrency: ci-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession. - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest steps: - uses: actions/setup-node@v3 with: From b31d5ebf473d19d2870a89a85d4cc6f523451984 Mon Sep 17 00:00:00 2001 From: someCatInTheWorld <162684669+someCatInTheWorld@users.noreply.github.com> Date: Fri, 29 Nov 2024 11:29:18 +1100 Subject: [PATCH 127/150] test --- .github/workflows/rebuild.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/rebuild.yml b/.github/workflows/rebuild.yml index 59d213e01e..8d99d9159f 100644 --- a/.github/workflows/rebuild.yml +++ b/.github/workflows/rebuild.yml @@ -45,6 +45,7 @@ jobs: run: | rm -rf dist/* rm -rf media/* + git rm -rf . - name: Download built-dist uses: actions/download-artifact@v3.0.1 From d0945266d4fdbe669ae0af801a36b0152ac187ce Mon Sep 17 00:00:00 2001 From: someCatInTheWorld <162684669+someCatInTheWorld@users.noreply.github.com> Date: Fri, 29 Nov 2024 13:55:37 +1100 Subject: [PATCH 128/150] Update rebuild.yml --- .github/workflows/rebuild.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/rebuild.yml b/.github/workflows/rebuild.yml index 8d99d9159f..b816e11239 100644 --- a/.github/workflows/rebuild.yml +++ b/.github/workflows/rebuild.yml @@ -46,6 +46,7 @@ jobs: rm -rf dist/* rm -rf media/* git rm -rf . + echo '{"name":"scratch-blocks","version":"0.1.0","description":"built scratch-blocks files","license":"GPL-3.0","repository":{},"main":"./dist/vertical.js","browser":"./dist/vertical.js","scripts":{},"dependencies":{},"devDependencies":{}}' > ./package.json - name: Download built-dist uses: actions/download-artifact@v3.0.1 From 97cfd951c32c7e4ffb2ad4ea6dced46b2346a36a Mon Sep 17 00:00:00 2001 From: sussy layers dev <72522395+jwklong@users.noreply.github.com> Date: Sun, 8 Dec 2024 17:14:20 +0000 Subject: [PATCH 129/150] contextmenu.blockcollapseoption --- core/contextmenu.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/core/contextmenu.js b/core/contextmenu.js index 2a80ebe2bc..46e12160c6 100644 --- a/core/contextmenu.js +++ b/core/contextmenu.js @@ -286,6 +286,31 @@ Blockly.ContextMenu.blockDuplicateOption = function(block, event) { return duplicateOption; }; +/** + * Make a context menu option for adding or removing comments on the current + * block. + * @param {!Blockly.BlockSvg} block The block where the right-click originated. + * @return {!Object} A menu option, containing text, enabled, and a callback. + * @package + */ +Blockly.ContextMenu.blockCollapseOption = function(block) { + var commentOption = { + enabled: true + }; + if (block.isCollapsed()) { + commentOption.text = "Expand block"; + commentOption.callback = function() { + block.setCollapsed(false) + }; + } else { + commentOption.text = "Collapse block"; + commentOption.callback = function() { + block.setCollapsed(true) + }; + } + return commentOption; +}; + /** * Make a context menu option for adding or removing comments on the current * block. From d3cf1d95f1a8c03155d2af9e5b23e74c125b84ca Mon Sep 17 00:00:00 2001 From: sussy layers dev <72522395+jwklong@users.noreply.github.com> Date: Sun, 8 Dec 2024 17:14:34 +0000 Subject: [PATCH 130/150] add collapse option to block context menu --- core/block_svg.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/block_svg.js b/core/block_svg.js index 792de24164..27ce04c5d2 100644 --- a/core/block_svg.js +++ b/core/block_svg.js @@ -726,11 +726,11 @@ Blockly.BlockSvg.prototype.showContextMenu_ = function(e) { var block = this; var menuOptions = []; if (this.isDeletable() && this.isMovable() && !block.isInFlyout) { - menuOptions.push( - Blockly.ContextMenu.blockDuplicateOption(block, e)); + menuOptions.push(Blockly.ContextMenu.blockDuplicateOption(block, e)); if (this.isEditable() && this.workspace.options.comments) { menuOptions.push(Blockly.ContextMenu.blockCommentOption(block)); } + menuOptions.push(Blockly.ContextMenu.blockCollapseOption(block)); menuOptions.push(Blockly.ContextMenu.blockDeleteOption(block)); } else if (this.parentBlock_ && this.isShadow_ && this.type !== 'polygon') { this.parentBlock_.showContextMenu_(e); From 92eb61376403f84ad025d8cf7e476968edc41cab Mon Sep 17 00:00:00 2001 From: sussy layers dev <72522395+jwklong@users.noreply.github.com> Date: Sun, 8 Dec 2024 17:29:52 +0000 Subject: [PATCH 131/150] quick fix --- core/block_render.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/block_render.js b/core/block_render.js index 233cf7d8aa..2328d32a52 100644 --- a/core/block_render.js +++ b/core/block_render.js @@ -1160,7 +1160,7 @@ Blockly.BlockSvg.prototype.computeOutputPadding_ = function(inputRows) { var otherShape; // In checking the left/start side, a field takes precedence over any input. // That's because a field will be rendered before any value input. - if (firstField) { + if (firstField || !firstInput.connection) { otherShape = 0; // Field comes first in the row. } else { // Value input comes first in the row. From d63eebe7aeae271444779a7c2636909b026f355e Mon Sep 17 00:00:00 2001 From: sussy layers dev <72522395+jwklong@users.noreply.github.com> Date: Sun, 8 Dec 2024 17:52:24 +0000 Subject: [PATCH 132/150] fix inputs showing when collapsed --- core/block_render.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/block_render.js b/core/block_render.js index 2328d32a52..2d1857f3b7 100644 --- a/core/block_render.js +++ b/core/block_render.js @@ -1395,7 +1395,7 @@ Blockly.BlockSvg.prototype.renderDrawRight_ = function(steps, inputRows.rightEdge); cursorX = this.renderFields_(input.fieldRow, fieldX, fieldY); - if (input.type == Blockly.INPUT_VALUE) { + if (input.type == Blockly.INPUT_VALUE && !this.isCollapsed()) { // Create inline input connection. // In blocks with a notch, inputs should be bumped to a min X, // to avoid overlapping with the notch. From 2241afa8dfc23a7513aee102e64afd6c14b0bd68 Mon Sep 17 00:00:00 2001 From: sussy layers dev <72522395+jwklong@users.noreply.github.com> Date: Sun, 8 Dec 2024 18:00:22 +0000 Subject: [PATCH 133/150] try this --- core/block_render.js | 194 ++++++++++++++++++++++--------------------- 1 file changed, 98 insertions(+), 96 deletions(-) diff --git a/core/block_render.js b/core/block_render.js index 2d1857f3b7..c43ea4816e 100644 --- a/core/block_render.js +++ b/core/block_render.js @@ -1373,109 +1373,111 @@ Blockly.BlockSvg.prototype.renderDrawTop_ = function(steps, rightEdge) { */ Blockly.BlockSvg.prototype.renderDrawRight_ = function(steps, inputRows, iconWidth) { - var cursorX = 0; - var cursorY = 0; - var connectionX, connectionY; - for (var y = 0, row; row = inputRows[y]; y++) { - cursorX = row.paddingStart; - if (y == 0) { - cursorX += this.RTL ? -iconWidth : iconWidth; - } - - if (row.type == Blockly.BlockSvg.INLINE) { - // Inline inputs. - for (var x = 0, input; input = row[x]; x++) { - // Align fields vertically within the row. - // Moves the field to half of the row's height. - // In renderFields_, the field is further centered - // by its own rendered height. - var fieldY = cursorY + row.height / 2; - - var fieldX = Blockly.BlockSvg.getAlignedCursor_(cursorX, input, - inputRows.rightEdge); - - cursorX = this.renderFields_(input.fieldRow, fieldX, fieldY); - if (input.type == Blockly.INPUT_VALUE && !this.isCollapsed()) { - // Create inline input connection. - // In blocks with a notch, inputs should be bumped to a min X, - // to avoid overlapping with the notch. - if (this.previousConnection) { - cursorX = Math.max(cursorX, Blockly.BlockSvg.INPUT_AND_FIELD_MIN_X); + if (!this.isCollapsed()) { + var cursorX = 0; + var cursorY = 0; + var connectionX, connectionY; + for (var y = 0, row; row = inputRows[y]; y++) { + cursorX = row.paddingStart; + if (y == 0) { + cursorX += this.RTL ? -iconWidth : iconWidth; + } + + if (row.type == Blockly.BlockSvg.INLINE) { + // Inline inputs. + for (var x = 0, input; input = row[x]; x++) { + // Align fields vertically within the row. + // Moves the field to half of the row's height. + // In renderFields_, the field is further centered + // by its own rendered height. + var fieldY = cursorY + row.height / 2; + + var fieldX = Blockly.BlockSvg.getAlignedCursor_(cursorX, input, + inputRows.rightEdge); + + cursorX = this.renderFields_(input.fieldRow, fieldX, fieldY); + if (input.type == Blockly.INPUT_VALUE) { + // Create inline input connection. + // In blocks with a notch, inputs should be bumped to a min X, + // to avoid overlapping with the notch. + if (this.previousConnection) { + cursorX = Math.max(cursorX, Blockly.BlockSvg.INPUT_AND_FIELD_MIN_X); + } + connectionX = this.RTL ? -cursorX : cursorX; + // Attempt to center the connection vertically. + var connectionYOffset = row.height / 2; + connectionY = cursorY + connectionYOffset; + input.connection.setOffsetInBlock(connectionX, connectionY); + this.renderInputShape_(input, cursorX, cursorY + connectionYOffset); + cursorX += input.renderWidth + Blockly.BlockSvg.SEP_SPACE_X; } - connectionX = this.RTL ? -cursorX : cursorX; - // Attempt to center the connection vertically. - var connectionYOffset = row.height / 2; - connectionY = cursorY + connectionYOffset; - input.connection.setOffsetInBlock(connectionX, connectionY); - this.renderInputShape_(input, cursorX, cursorY + connectionYOffset); - cursorX += input.renderWidth + Blockly.BlockSvg.SEP_SPACE_X; } - } - // Remove final separator and replace it with right-padding. - cursorX -= Blockly.BlockSvg.SEP_SPACE_X; - cursorX += row.paddingEnd; - // Update right edge for all inputs, such that all rows - // stretch to be at least the size of all previous rows. - inputRows.rightEdge = Math.max(cursorX, inputRows.rightEdge); - // Move to the right edge - cursorX = Math.max(cursorX, inputRows.rightEdge); - this.width = Math.max(this.width, cursorX); - if (this.type == Blockly.PROCEDURES_DEFINITION_BLOCK_TYPE + '_return') { - this.renderDefineBlock_(steps, inputRows, row[0], row, cursorY, cursorX); - } - if (this.type != Blockly.PROCEDURES_DEFINITION_BLOCK_TYPE + '_return') { - if (!this.edgeShape_) { - // Include corner radius in drawing the horizontal line. - steps.push('H', cursorX - Blockly.BlockSvg.CORNER_RADIUS - this.edgeShapeWidth_); - steps.push(Blockly.BlockSvg.TOP_RIGHT_CORNER); + // Remove final separator and replace it with right-padding. + cursorX -= Blockly.BlockSvg.SEP_SPACE_X; + cursorX += row.paddingEnd; + // Update right edge for all inputs, such that all rows + // stretch to be at least the size of all previous rows. + inputRows.rightEdge = Math.max(cursorX, inputRows.rightEdge); + // Move to the right edge + cursorX = Math.max(cursorX, inputRows.rightEdge); + this.width = Math.max(this.width, cursorX); + if (this.type == Blockly.PROCEDURES_DEFINITION_BLOCK_TYPE + '_return') { + this.renderDefineBlock_(steps, inputRows, row[0], row, cursorY, cursorX); + } + if (this.type != Blockly.PROCEDURES_DEFINITION_BLOCK_TYPE + '_return') { + if (!this.edgeShape_) { + // Include corner radius in drawing the horizontal line. + steps.push('H', cursorX - Blockly.BlockSvg.CORNER_RADIUS - this.edgeShapeWidth_); + steps.push(Blockly.BlockSvg.TOP_RIGHT_CORNER); + } else { + // Don't include corner radius - no corner (edge shape drawn). + steps.push('H', cursorX - this.edgeShapeWidth_); + } + // Subtract CORNER_RADIUS * 2 to account for the top right corner + // and also the bottom right corner. Only move vertically the non-corner length. + if (!this.edgeShape_) { + steps.push('v', row.height - Blockly.BlockSvg.CORNER_RADIUS * 2); + } + } + } else if (row.type == Blockly.NEXT_STATEMENT) { + // Nested statement. + var input = row[0]; + var fieldX = cursorX; + // Align fields vertically within the row. + // In renderFields_, the field is further centered by its own height. + var fieldY = cursorY; + fieldY += Blockly.BlockSvg.MIN_STATEMENT_INPUT_HEIGHT; + this.renderFields_(input.fieldRow, fieldX, fieldY); + // Move to the start of the notch. + cursorX = inputRows.statementEdge + Blockly.BlockSvg.NOTCH_WIDTH; + + if (this.type == Blockly.PROCEDURES_DEFINITION_BLOCK_TYPE) { + this.renderDefineBlock_(steps, inputRows, input, row, cursorY); } else { - // Don't include corner radius - no corner (edge shape drawn). - steps.push('H', cursorX - this.edgeShapeWidth_); + Blockly.BlockSvg.drawStatementInputFromTopRight_(steps, cursorX, + inputRows.rightEdge, row); } - // Subtract CORNER_RADIUS * 2 to account for the top right corner - // and also the bottom right corner. Only move vertically the non-corner length. - if (!this.edgeShape_) { - steps.push('v', row.height - Blockly.BlockSvg.CORNER_RADIUS * 2); + + // Create statement connection. + connectionX = this.RTL ? -cursorX : cursorX; + input.connection.setOffsetInBlock(connectionX, cursorY); + if (input.connection.isConnected()) { + this.width = Math.max(this.width, inputRows.statementEdge + + input.connection.targetBlock().getHeightWidth().width); + } + if ((!(this.type == Blockly.PROCEDURES_DEFINITION_BLOCK_TYPE || + this.type == Blockly.PROCEDURES_DEFINITION_BLOCK_TYPE + '_return')) && + (y == inputRows.length - 1 || + inputRows[y + 1].type == Blockly.NEXT_STATEMENT)) { + // If the final input is a statement stack, add a small row underneath. + // Consecutive statement stacks are also separated by a small divider. + steps.push(Blockly.BlockSvg.TOP_RIGHT_CORNER); + steps.push('v', Blockly.BlockSvg.EXTRA_STATEMENT_ROW_Y - 2 * Blockly.BlockSvg.CORNER_RADIUS); + cursorY += Blockly.BlockSvg.EXTRA_STATEMENT_ROW_Y; } } - } else if (row.type == Blockly.NEXT_STATEMENT) { - // Nested statement. - var input = row[0]; - var fieldX = cursorX; - // Align fields vertically within the row. - // In renderFields_, the field is further centered by its own height. - var fieldY = cursorY; - fieldY += Blockly.BlockSvg.MIN_STATEMENT_INPUT_HEIGHT; - this.renderFields_(input.fieldRow, fieldX, fieldY); - // Move to the start of the notch. - cursorX = inputRows.statementEdge + Blockly.BlockSvg.NOTCH_WIDTH; - - if (this.type == Blockly.PROCEDURES_DEFINITION_BLOCK_TYPE) { - this.renderDefineBlock_(steps, inputRows, input, row, cursorY); - } else { - Blockly.BlockSvg.drawStatementInputFromTopRight_(steps, cursorX, - inputRows.rightEdge, row); - } - - // Create statement connection. - connectionX = this.RTL ? -cursorX : cursorX; - input.connection.setOffsetInBlock(connectionX, cursorY); - if (input.connection.isConnected()) { - this.width = Math.max(this.width, inputRows.statementEdge + - input.connection.targetBlock().getHeightWidth().width); - } - if ((!(this.type == Blockly.PROCEDURES_DEFINITION_BLOCK_TYPE || - this.type == Blockly.PROCEDURES_DEFINITION_BLOCK_TYPE + '_return')) && - (y == inputRows.length - 1 || - inputRows[y + 1].type == Blockly.NEXT_STATEMENT)) { - // If the final input is a statement stack, add a small row underneath. - // Consecutive statement stacks are also separated by a small divider. - steps.push(Blockly.BlockSvg.TOP_RIGHT_CORNER); - steps.push('v', Blockly.BlockSvg.EXTRA_STATEMENT_ROW_Y - 2 * Blockly.BlockSvg.CORNER_RADIUS); - cursorY += Blockly.BlockSvg.EXTRA_STATEMENT_ROW_Y; - } + cursorY += row.height; } - cursorY += row.height; } this.drawEdgeShapeRight_(steps); if (!inputRows.length) { From 6847269b654b3b3cad855bdb5f4198bbe3db52b9 Mon Sep 17 00:00:00 2001 From: sussy layers dev <72522395+jwklong@users.noreply.github.com> Date: Sun, 8 Dec 2024 18:06:36 +0000 Subject: [PATCH 134/150] fix --- core/block_render.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/block_render.js b/core/block_render.js index c43ea4816e..c67260a388 100644 --- a/core/block_render.js +++ b/core/block_render.js @@ -1373,9 +1373,9 @@ Blockly.BlockSvg.prototype.renderDrawTop_ = function(steps, rightEdge) { */ Blockly.BlockSvg.prototype.renderDrawRight_ = function(steps, inputRows, iconWidth) { + var cursorX = 0; + var cursorY = 0; if (!this.isCollapsed()) { - var cursorX = 0; - var cursorY = 0; var connectionX, connectionY; for (var y = 0, row; row = inputRows[y]; y++) { cursorX = row.paddingStart; From fee61c739549cebe48b1f2ee7917c8e74fc305c9 Mon Sep 17 00:00:00 2001 From: sussy layers dev <72522395+jwklong@users.noreply.github.com> Date: Sun, 8 Dec 2024 18:30:13 +0000 Subject: [PATCH 135/150] disable collapsed option for now --- core/block_svg.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/block_svg.js b/core/block_svg.js index 27ce04c5d2..14e1d9f484 100644 --- a/core/block_svg.js +++ b/core/block_svg.js @@ -730,7 +730,7 @@ Blockly.BlockSvg.prototype.showContextMenu_ = function(e) { if (this.isEditable() && this.workspace.options.comments) { menuOptions.push(Blockly.ContextMenu.blockCommentOption(block)); } - menuOptions.push(Blockly.ContextMenu.blockCollapseOption(block)); + //menuOptions.push(Blockly.ContextMenu.blockCollapseOption(block)); menuOptions.push(Blockly.ContextMenu.blockDeleteOption(block)); } else if (this.parentBlock_ && this.isShadow_ && this.type !== 'polygon') { this.parentBlock_.showContextMenu_(e); From 9befb6b4344e62c4ec919cb28f3ede9e1470ce3e Mon Sep 17 00:00:00 2001 From: sussy layers dev <72522395+jwklong@users.noreply.github.com> Date: Sun, 8 Dec 2024 19:14:59 +0000 Subject: [PATCH 136/150] change readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 287b280a97..fdfd3ace2d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# PenguinMod/scratch-blocks +# PenguinMod-Blocks