Releases: tmedwards/sugarcube-2
Releases · tmedwards/sugarcube-2
RELEASE: v2.37.0
Changelog:
- 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 ofConfig.enableOptionalDebugging
.
- Fix issue with
- Update
StoryInterface
code passage:- Fix
data-init-passage
attributes being processed too early. - Fix included passages being processed for
data-passage
attributes.
- Fix
- 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.
- Rename
- Update
Dialog
API:- Fix
Dialog.close()
where user specifiedonClose
callbacks were not called when manually invoked. - Fix resizing when contents were dynamically changed.
- Fix failing to render
<body>
inert while open when usingStoryInterface
. - Add
Dialog.create()
static method. DeprecateDialog.setup()
static method. - Add
Dialog.empty()
static method. - Add
Dialog.wikiPassage()
static method.
- Fix
- Update
jQuery
API plugins:- Update
<jQuery>.ariaDisabled()
method to affect thetabindex
attribute. - Add
tabindex
option to the<jQuery>.ariaClick()
method. - Add
jQuery.wikiPassage()
static method. - Add
<jQuery>.wikiPassage()
instance method.
- Update
- 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.
- Add
- Update
UI
API:- Update Saves dialog to address
Save
API changes. - Add
UI.update()
static method. - Deprecate
UI.jumpto()
static method andbookmark
special tag. - Deprecate
UI.share()
static method.
- Update Saves dialog to address
- 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>>
macrorange
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 thearmor
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 aname
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
- 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.
RELEASE: v2.36.1
Changelog:
- Fixed an issue with the build system that was producing subtly broken builds.
RELEASE: v2.36.0
Changelog:
- Fixed an issue with the
selected
keyword in the<<cycle>>
and<<listbox>>
macros'<<option>>
tags. - Fixed instances where using the
[img[]]
markup as an argument to macros would drop thelink-image
class. - Fixed
Config.history.maxStates
to disallow unlimited states (value:0
). - Added the
init
special tag that, similar toStoryInit
, allows pre-story-start initialization tasks. Intended for add-on/library use. - Added a
data-init-passage
content attribute toStoryInterface
that allows content to be updated only once at initialization. - Added the
State.metadata.entries()
andState.metadata.keys()
static methods. - Added a
once
keyword to the<<cycle>>
macro that ends the cycle upon reaching the final option. - Added the
<Array>.countWith()
method. - Added the
Save
Events API. - Added support for template literals within TwineScript.
- Added various accessibility improvements.
- Updated the
<<done>>
macro to better serve when used to wait for DOM updates. <<widget>>
macro updates:- Added a
container
keyword that allows non-void/container widgets and an associated_contents
special variable. - Added a new special arguments variable,
_args
, and deprecated the old variable,$args
.
- Added a
- Updated the default value of
Config.history.maxStates
from100
to40
. - Updated passage objects to maintain the order of passage tags as specified in the data chunk.
- Deprecated the
Config.saves.onLoad
andConfig.saves.onSave
settings in favor of theSave
Events API. - Updated bundled library:
jQuery
to v3.6.0. - Updates to locale files:
- Updated the localization template. Translators are asked to updated the locale files as necessary.
- Added
nl.js
– Dutch.
- Various documentation updates.
- Various internal improvements.
- Build system updates.
RELEASE: v2.35.0
Changelog:
- Fixed issues with nested
<svg>
tags. - Fixed issues with comments within macro arguments.
- Added the
<<done>>
macro. NOTE: This is functionally equivalent to Chapel's macro of the same name, so if you're using that you can, and should, remove it. - Updated
<<numberbox>>
to more reliably show a numeric keypad on mobile devices. - Updates to locale files:
- Added
ar-EG.js
– العربية (مصر). - Added
it-IT.js
– Italiano (Italy). - Updated
de.js
– Deutsch.
- Added
- Various documentation updates.
- Various internal improvements.
RELEASE: v2.34.1
Changelog:
- Fixed a regression in the behavior of the naked variable markup.
RELEASE: v2.34.0
Changelog:
- Fixed the
<AudioRunner>.fadeIn()
and<AudioRunner>.fadeOut()
methods. - Fixed explicitly set
undefined
values within arrays being transformed intonull
when roundtripping through sessions/saves. - Fixed
<<type>>
to immediately start typing, after any start delay, rather than also waiting one typing speed delay. - Updated saves to support saving to disk on mobile devices, by default—see the
Config.saves.tryDiskOnMobile
setting if you wish to disable it. - Updated the naked variable markup and
<<print>>
family of macros to: include default conversions for DOM objects and better conversions for various edge cases values. - Updated the documentation—mostly a few minor edits here and there.
- Updated bundled library:
FileSaver.js
to v2.0.4.
RELEASE: v2.33.4
Changelog:
- Updated the HTML parser to handle custom elements.
RELEASE: v2.33.3
- Fixed Safari v14 breaking detection of various audio formats.
- Minor improvement to how
<<numberbox>>
handles decimal numbers—mostly for Firefox. - Documentation changes:
- Fixed an oopsie in the Harlowe guide.
- Added an entry for
UIBar.update()
. - Added a guide for the Definitely Typed TypeScript bindings for SugarCube's APIs.
- Added additional warnings about Twine 2's automatic passage creation feature.
- Development changes:
- Fixed Node.js v14 API change that broke the build script.
- Updated development dependencies.
RELEASE: v2.33.2
Changelog:
- Fixed an issue where the
<<type>>
macro could throw an error if the player navigated away while it was still typing. - Fixed an issue where WAI-ARIA focus outlines could be lost when navigating.
- Fixed an issue in the
Dialog
API documentation. - Updated the Saves dialog to disable save buttons if the
Config.saves.isAllowed
query yieldsfalse
. - Minor internal improvement to the
<<repeat>>
and<<timed>>
macros.
SugarCube v2.33.1
Changelog:
<<type>>
macro updates:- Added the
Config.macros.typeSkipKey
setting. - Added a
skipkey
option. - Changed the skip key event to
keydown
.
- Added the