Microsoft MakeCode

Variables shadow block gone in toolbox after changing to NPM PXT-Blockly

I’ve switched over to using NPM PXT-Blockly.

I’ve got some custom variable blocks for blockly of which are working fine with the create variable button apart from one feature.
For some reason the shadow block of which I am trying to place within the input of the “variables_set” block doesn’t show. I think this is because I’m declaring it within a toolbox file. Is there something else I need to do for that shadow block to appear?


Definition -

Blockly.Blocks['variables_set'] = {
    init: function() {
        .appendField(new Blockly.FieldVariable(""), "VAR")
        .appendField(new Blockly.FieldDropdown([['=', '='], ['+=', '+='], ["-=", "-="]]), 'NAME')
      this.setPreviousStatement(true, null);
      this.setNextStatement(true, null);
      this.setTooltip("assign a value, increment, or decrement a variable");

Generator -

Blockly.Python['variables_set'] = function(block) {
    var variable_name = Blockly.Python.variableDB_.getName(block.getFieldValue('VAR'), Blockly.Variables.NAME_TYPE);
    var text_text = block.getFieldValue('NAME');
    var value_name = Blockly.Python.valueToCode(block, 'varset', Blockly.Python.ORDER_ATOMIC);
    // TODO: Assemble Python into code variable.
    var code = variable_name + ' ' +text_text+ ' ' +value_name+ '\n';
    return code;

Toolbox -

<block type="variables_set">
    <value name="varset">
      <shadow type="textinline">
        <field name="text">0</field>

Does anyone know what I need to do to fix it?