Skip to content

Releases: snap-blocks/snapblocks

v1.8.0

14 Dec 00:23
Compare
Choose a tag to compare

Additions

  • Santa hats
    Just use santa or santa-{hat name}. The available hat names are: hat, trumpet, star, candles, gift, pretzel, letter, train, and house
  • Add santa option to enable santa hats by default

Fixes

  • Fix upvars
  • Fix snap spacing
  • Fix scratch2 rings
  • Make snap rings look better
  • Allow icons to be in variable names
  • Fix arrow icons in scratch2 and scratch3 styles
  • Make loop icon respect zebra coloring

v1.7.1

07 Dec 17:28
Compare
Choose a tag to compare

Changes

  • Remove background of c-shapes in hat blocks because of the snap 10.3.1 update

v1.7.0

07 Dec 03:58
Compare
Choose a tag to compare

Additions

  • @infinity icon
  • @cube and @cubeSolid icons
  • Condition hat blocks with :: condition
  • Background for c-slots in hats

Changes

  • Allow when slot [ V] signals [ V] as well as when slot [ V] gets [ V].

Fixes

  • Rename "gets" to "signals" in when [ V] signals [ V] (well, you can still use "gets")
  • Fix snap flag icon
  • Fix scratch3 input roundness
  • Fix snap input width
  • Fix empty rings
  • Fix rings in rings
  • Fix reporter x position in upvars and rings in scatch2
  • C-slots in hat blocks
  • Update snap local pin position
  • Set flat design contrast to new contrast in snap 10.3.0

v1.6.1

10 Nov 02:26
4f88c31
Compare
Choose a tag to compare

Additions:

  • Added new snap 10.2 blocks
  • Comment word wrapping

Changes:

  • Snap obsolete color is now grey (other) for parity with snap.

Fixes:

  • Fixed comments in c-slots
  • Backslash before V in inputs will cancel dropdown.
  • Small visual fixes

Full Changelog: v1.6.0...v1.6.1

v1.6.0

20 Aug 03:10
Compare
Choose a tag to compare

Added

  • Multiline comments (which allows for accurate comments). You can create them by using /* text /*. For example
    /* multiline
    comment */
    
    block /* multiline
    comment */
    
  • Added local blocks by added :: local to a block.
  • Added string / number input text formatting.
    [`monospace`] ([italic] v)
  • Larger text inputs
    [{hi}]
  • Green flag inside input
    [[__shout__go__]] (it can be escaped to get this as text)
  • Added reset override, which skips all block detections, effectively "resets" the block to it's undefined state.
  • Finally got every single icon from snap into snapblocks (too many to list here).

Changed

  • Multiline extension blocks in scratch 3 style will have each line start after the line after the extension icon (just test it out, and you'll see what I mean)

Fixed

  • Backslash duplicating label part
  • Comments showing spaces
  • Icon sizes
  • More errors and minor stuff

There's probably more stuff that I can't remember right now.

Full Changelog: v1.5.0...v1.6.0

v1.5.0

29 May 23:05
Compare
Choose a tag to compare

Additions

  • You can just type pause all instead of pause all @pause.
  • Added <> primitive [] block.
  • Added (compile (() @addInput) for (0) args) block.
  • renderElement() method.
  • Choose which element options are accepted by setting the elementOptions option to a list of options instead of a boolean.
  • Better error handling.
    • If an error occurs in renderMatching(), it will be logged to the console (with the snapblocks code that errored), and will continue to the rest of the elements.

Fixes

  • Fix scratch 3 high contrast pause icon.
  • Fixed an error with non-existent wrapped variable.
  • Make sure style is a string.
  • If a style doesn't exist, just set it to snap, don't throw an error.

Full Changelog: v1.4.2...v1.5.0

v1.4.2

11 May 01:57
Compare
Choose a tag to compare

Fixes

  • Fix multiline inputs in the Snap! style.

v1.4.1

10 May 23:40
Compare
Choose a tag to compare

Fixes

  • Set pause all @pause shape to stack (it's not cap).

v1.4.0

10 May 20:33
Compare
Choose a tag to compare

New Features:

  • Boolean switches. You can now do <t>, <f> (small true and false boolean inputs), and <true> and <false> (for big (static) boolean inputs).
  • Scale and recolor text using the same syntax as Snap!, $text-s-r-g-b e.g. $text-2-0-255-0.
  • Icons can beused with $ instead of just @. This was added to make it even more similar to Snap! (also so it's easier to convert Snap! labels to snapblocks).
    • Scaling and recoloring text can only be done with $, not @, @ is reserved for icons.
  • Easier input creation in custom block prototypes.
    • You can use {[string] (number) <boolean>} :: define+ to automatically get the correct upvar labels.
  • If there is @loop or @loopArrow at the end of a line right after a c-slot, that will be placed on the right side of the block, making that c-slot have a loop arrow.
  • Colors can be set using rgb values instead of just a hex color code, using this syntax rgb(r,g,b), for example, (color [rgb(0 , 255 , 255)] :: rgb(0,255,0)).
  • Allow for backslash in color input (to be text, rather than a color input), <touching color [\#fff] ?>.
  • Add @cloudGradient, @robot.
  • You can use either list or lists for the lists category.

Changes:

  • Refactored the Snap! style line rendering, to make it more like the Snap! source code (in fact, I just copy / pasted / edited from the Snap! source code).
  • New color system, which calculates the colors in the code, which means that zebra coloring uses the exact same colors as Snap!.
  • Remade the Snap! turnRight and turnLeft icons.
  • If a scale for an icon is set, the size will be 10 instead of 12.
  • @circle is no longer the same as @circleSolid, it's now a circle outline, like in Snap!.
  • @flag is now not colored, whereas @greenFlag is (I also added @greenflag because snap 10 uses that).
  • @loop is the full size loop, and @loopArrow is the scaled loop (again, from snap 10).
  • @turtle is now scaled by 1.2.
  • Probably more that I'm forgetting.

Fixes

  • Fixed the Snap! drop-shadow scaling on scaled icons.
  • General improvements to the Snap! style.
  • Fixed the Scratch 3 min hat width (scratchblocks#512).
  • Fixed the line after the extension icon in the Scratch 3 style not showing up.
  • Fixed some blocks that were improperly detected.
  • Snap! custom blocks check for shape as as well as spec.
  • Upvars are formatted correctly.
  • Zebra coloring on upvars has been fixed (I didn't realize it was a problem before).
  • And many more fixes.

Full Changelog: v1.3.0...v1.4.0

v1.3.0

04 Apr 03:03
Compare
Choose a tag to compare

Additions

  • Added showSpaces option, which shows spaces in inputs.
  • Added all the blocks from Snap!, Scratch 3, Scratch 2, Scratch 1.4, and BYOB.
  • grey and gray are both the same category.
  • Add gears, gearPartial, gearBig, globe, and globeBig icons.
  • Added a version property to the snapblocks library.

Changes

  • Element options are no longer prefixed with sb-. I made this change because no one has used them yet (not even the snap wiki).
  • The style element option is now blockStyle instead of sb-style.
  • These characters are no longer ignored, ,%?:.
  • Round inputs that used to turn into blocks, are put as text in the input. E.g. set instrument to ((1) Piano V) will have the input (1) Piano instead of turning into a block (this only happens when it ends with a v or V).
  • Removed the version attribute in the resulting svg image, as that is deprecated.

Fixes

  • Fixed zebra coloring in c-shaped inputs
  • Snap! style should be much much more accurate (I spent an excruciatingly long time switching tabs repeatedly).
  • snap-flat inset border works the same in all browsers now (although the method I used may need a bit of tweaking to minimize the svg size).
  • Snap! rings now have a consistent input size.
  • The first space in comments is removed.
  • Inline blocks can now be multiline. It keeps the effect where they're placed inline with text, but you can use multiline blocks, and c-shapes.
  • More small fixes that I don't need to

Full Changelog: v1.2.0...v1.3.0