@nitro-bolt/scratchblocks 1.1.0 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,22 +1,21 @@
1
- This fork adds NitroBolt's scratch-blocks related changes
2
-
3
- Some examples:
4
- ```text
5
- {object value}
6
- [array value]
7
- use object {} and array []
8
-
9
- first row \n second row
10
- values (one) (two) @delInput @addInput
11
- ```
12
-
13
- At the start of a line, `{...}` and `[...]` create object and array blocks.
14
- Overrides remain inside the delimiters, for example
15
- `[array value :: #4D5057]`.
16
- Inside a block, empty `{}` and `[]` create object and array input slots.
17
- Use `[ ]` when an empty text input is needed.
18
- `\n` starts a new visual row inside the same block. `@delInput` and
19
- `@addInput` draw the left and right extendable-input controls independently.
1
+ This fork adds NitroBolt's scratch-blocks features:
2
+
3
+ - Object blocks use `{object value}` and object inputs use `{}`.
4
+ - Array blocks use `[array value]` and array inputs use `[]`.
5
+ - Overrides stay inside object and array block delimiters, such as
6
+ `[array value :: #4D5057]`.
7
+ - Use `[ ]` when an empty text input is needed instead of an array input.
8
+ - `\n` starts a new visual row inside the same block.
9
+ - `@delInput` and `@addInput` render the two extendable-input controls
10
+ independently.
11
+ - `c-block` makes a custom block C-shaped. Put the branch on the following
12
+ lines and close it with `end`:
13
+
14
+ ```text
15
+ new function [] :: #FF894D c-block
16
+ say [Hello!]
17
+ end
18
+ ```
20
19
 
21
20
  <!--
22
21
  Make pictures of Scratch blocks from text.
@@ -83,7 +82,7 @@ Make sure this appears at the end of the page (just before the closing `</body>`
83
82
  ```js
84
83
  <script>
85
84
  scratchblocks.renderMatching('pre.blocks', {
86
- style: 'scratch3', // Optional; Scratch 3 is the only supported style.
85
+ style: 'scratch3', // Optional; Scratch 3 is the only supported style.
87
86
  languages: ['en', 'de'], // Optional, defaults to ['en'].
88
87
  scale: 1, // Optional, defaults to 1
89
88
  });
@@ -91,8 +90,8 @@ scratchblocks.renderMatching('pre.blocks', {
91
90
  ```
92
91
  The `renderMatching()` function takes a CSS-style selector for the elements that contain scratchblocks code: we use `pre.blocks` to target `pre` tags with the class `blocks`.
93
92
 
94
- The `style` option controls how the blocks appear. `scratch3` and
95
- `scratch3-high-contrast` are supported.
93
+ The `style` option controls how the blocks appear. `scratch3` and
94
+ `scratch3-high-contrast` are supported.
96
95
 
97
96
  ### Inline blocks
98
97