SugarCube v2.37.3 has been published

SugarCube v2.37.3 has been published.

Downloads & documentation for all Twine/Twee compilers: https://www.motoslave.net/sugarcube/2/

v2.37.3 Changelog highlights:

  • Fix primitive revival for undefined and Infinity.

v2.37.2 Changelog highlights:

  • Fix <<createplaylist>>.

v2.37.1 Changelog highlights:

  • Fix legacy autoload code.
  • Fix legacy Config.saves.autosave when using an array of tags.
  • Fix styling issues.
  • Fix documentation.

v2.37.0 Changelog highlights:

  • Fix issue with builds that affected ancient browsers.
  • Fix issue with icon font styling.
  • Fix issue with event triggering where native listeners would not always receive custom events.
  • Fix issue with external link identification.
  • Fix issue with leftover event handlers.
  • Fix issue with media activation triggering events.
  • Fix issue with session delta coding where arrays were being ignored.
  • Update Config API:
    • Fix issue with Config.passages.transitionOut when its value was a CSS property name where outgoing passage elements were not being removed.
    • Update Config.cleanupWikifierOutput setting:
      • Fix it affecting things it should not.
      • Fix it emitting empty paragraphs.
    • Add Config.enableOptionalDebugging setting.
    • Deprecate Config.macros.ifAssignmentError in favor of Config.enableOptionalDebugging.
  • Update StoryInterface code passage:
    • Fix data-init-passage attributes being processed too early.
    • Fix included passages being processed for data-passage attributes.
  • Update TwineScript:
    • Fix object property names that look like story/temporary variables being erroneously treated as such.
    • Add support for JavaScript’s spread/rest syntax.
  • Update Array API extensions:
    • Rename <Array>.delete() instance method to <Array>.deleteAll(). Added <Array>.delete() alias for compatibility.
    • Add <Array>.deleteFirst() instance method.
    • Add <Array>.deleteLast() instance method.
    • Add <Array>.toShuffled() instance method.
    • Add <Array>.toUnique() instance method.
  • Update Dialog API:
    • Fix Dialog.close() where user specified onClose callbacks were not called when manually invoked.
    • Fix resizing when contents were dynamically changed.
    • Fix failing to render <body> inert while open when using StoryInterface.
    • Add Dialog.create() static method. Deprecate Dialog.setup() static method.
    • Add Dialog.empty() static method.
    • Add Dialog.wikiPassage() static method.
  • Update jQuery API plugins:
    • Update <jQuery>.ariaDisabled() method to affect the tabindex attribute.
    • Add tabindex option to the <jQuery>.ariaClick() method.
    • Add jQuery.wikiPassage() static method.
    • Add <jQuery>.wikiPassage() instance method.
  • Update Save API:
    • Complete API rewrite.
    • Improve performance for large counts and sizes of saves.
    • Allow configuration of auto save count.
    • Add ability to easily continue from most recent save, regardless of type.
    • Add ability to export all browser saves as a bundle that can be imported.
  • Update Setting API:
    • Add Setting.addValue() static method.
    • Add Setting.getValue() static method.
    • Add Setting.setValue() static method.
  • Update UI API:
    • Update Saves dialog to address Save API changes.
    • Add UI.update() static method.
    • Deprecate UI.jumpto() static method and bookmark special tag.
    • Deprecate UI.share() static method.
  • Update UIBar API:
    • Fix derpiness in UI bar history and toggle controls.
    • Deprecate UIBar.update() static method.
  • Update DebugBar:
    • Update variable watches to periodically update.
    • Add passage navigation control.
  • Update macros:
    • Fix issue with various link/button macros allowing invalid link text content.
    • Fix issue with input macros autofocus failing under various circumstances.
    • Fix <<if>> macro assignment error to ignore string internals during its checks and update it to default to opt-in, rather than opt-out.
    • Update <<for>> macro range syntax to accept a integer as the collection expression and made the value variable optional.
    • Update <<type>> macro to be compatible with <<capture>>.
    • Update <<unset>> macro to be able to delete object properties in addition to variables—i.e., <<unset $pc.armor>> now attempts to remove the armor property from $pc.
    • Update <<back>> and <<return>> macros to accept an optional passage name argument in their separate argument forms.
    • Update widgets’ _args special temporary variable to include a name property—i.e., _args.name.
    • Rename <<silently>> macro to <<silent>>. Added a <<silently>> alias for compatibility.
    • Add <<do>> and <<redo>> macros.
    • Deprecate <<actions>> and <<choice>> macros.
  • Update markup:
    • Update horizontal rule markup to allow trailing whitespace.
    • Update <style> element image markup parsing to accept TwineScript.
  • Update loadscreen to block full startup until dismissed.
  • Add Serial API. This removes JSON extensions.
  • Add utility functions:
    • Add triggerEvent().
  • Add :uiupdate system event.
  • Add application-name & version metadata to document head.
  • Extensive refactoring.
  • Various documentation updates.
  • Update bundled icon font and documented it.
  • Update bundled libraries:
    • jQuery to v3.7.1.
    • lz-string to v1.5.0.
11 Likes

A very nice update.

Do you know how long it will take for this new version to be incorporated in the Twine download?

Thank you.

1 Like

No. Then again, I haven’t even submitted it yet. I’m waiting for a couple of days of zero problems before I do. Once I do it’s up to CK to publish, but I don’t expect any delays. So, say by this weekend.

2 Likes

It is now included as the default in twinery.org

1 Like

Thank you! heading there now.

Just pushed v2.37.2 out the door. Downloads in the usual place.

An update has been submitted to CK for inclusion into Twine 2.

EDIT: Released v2.37.2 after v2.37.1.

1 Like

A little late in the notification, but published v2.37.3.

3 Likes

The <<do>> and <<redo>> macros are a great option for <<replace>> and live updates. The <<do>> macros listen for <<redo>> commands. When a <<redo>> is triggered, the content within the <<do>> block will be re-executed and updated.

<<replace>> requires you to specify a selector to target items, which can lead to problems if not managed carefully. With <<do>> and <<redo>> you don’t have to worry about selecting the correct item. <<redo>> allows you to filter updates using tags, giving you control over which <<do>> blocks are updated. Great addition.

Sounds useful!

The main limitation I’m aware of the <<do>><</do>> and <<redo>> is that you can’t use a <<redo>> inside a <<do>><</do>> it affects.