Releases: cjneidhart/brick
Releases · cjneidhart/brick
v0.4.0
Added
- The
createGetter
,passageName
, andtags
functions. - The
passages
object, with four methods:filter
find
get
withTag
- Passages can now contain
<style>
elements. - Boxed booleans, numbers, and strings can now be imported and exported properly. A warning will be emitted when these types are saved or passed to
clone
.
Changed
- Temporary variables are now lexically scoped. New scopes are created with each
{ }
pair. - Parse errors are now "loud"; encountering a parse error causes Brick to not render anything except the error message.
- Leading and trailing whitespace in a wiki-style link is now trimmed, to match the behavior of passage initialization. Whitespace around the link/text separator (
|
,->
, or<-
) is also trimmed. - Passage names starting with
Story
are banned, like the documentation says. - Passage tags starting with
brick
are banned.
Fixed
- Errors that occur while evaluating a macro's arguments are properly caught and rendered, instead of being handled by an
alert()
.
Removed
- The
capturedVars
andcreateCallback
properties ofMacroContext
have been removed.
v0.3.1
Updated documentation.
v0.3.0
Changed
- Added a third type of variable, constants. They can be accessed by prefixing an identifier with
@
,
which is transpiled toconstants.NAME
. Constants can only be created or deleted during story startup. - Macros no longer live in a special registry. Now, macros are just methods of the
constants
global value.
v0.2.1
Added
- The
@later
macro for performing operations after a delay. - The
@append
,@prepend
, and@replace
macros for DOM manipulation. - The
@punt
macro to preserve a temporary variable between passages. - The utility functions
either
andrandomInt
.
Fixed
- Fix a bug in the Twine highlighter involving the JavaScript dot operator.
v0.2.0
First release! Here's an incomplete list of features:
- A full markup parser and renderer, including a small selection of built-in macros
- Saves via IndexedDB to improve load times and massively increase storage limits
- Story and temporary variables, which are accessible in markup raw and as macro arguments
- Captured variables (currently just for the
for
macro)
Some likely next steps:
- Exposing more of the API to story authors
- Import/export of saves
- Improved mobile CSS
- More input elements as macros, such as dropdowns
- Automated testing