New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@blockly/block-plus-minus

Package Overview
Dependencies
Maintainers
0
Versions
105
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@blockly/block-plus-minus

A group of blocks that replace the built-in mutator UI with a +/- based UI.

  • 8.0.12
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

@blockly/block-plus-minus Built on Blockly

A group of Blockly blocks that replace the built-in mutator UI with a +/- based UI.

Currently this only affects the built-in blocks that use mutators (controls_if, text_join, list_create_with, procedures_defnoreturn, and procedures_defreturn).

But the ability to easily add this to your own mutators may be added in the future.

Installation

Yarn

yarn add @blockly/block-plus-minus

npm

npm install @blockly/block-plus-minus --save

Usage

Import

import Blockly from 'blockly';
import '@blockly/block-plus-minus';

Blockly Languages

We do not currently support translating the text in this plugin to different languages. However, if you would like to support multiple languages the messages can be translated by assigning the following properties of Blockly.Msg

  • PROCEDURE_VARIABLE (Default: "variable:"): The label which signals the text input is a variable.
Blockly.Msg['PROCEDURE_VARIABLE'] = 'variabele:'; // Dutch
// Inject workspace, etc...

XML

Blocks will automatically use the +/- UI when loaded from XML. But here is some example XML incase you are trying to add specific mutations of blocks:

If
<block type="controls_if"></block>

<block type="controls_if">
    <mutation elseif="1"></mutation>
</block>

<block type="controls_if">
    <mutation elseif="1" else="1"></mutation>
</block>

Text Join
<block type="text_join"></block>

<block type="text_join">
    <mutation items="0"></mutation>
</block>

List Create
<block type="lists_create_with"></block>

<block type="lists_create_with">
    <mutation items="0"></mutation>
</block>

License

Apache 2.0

Keywords

FAQs

Package last updated on 04 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc