diff --git a/README.md b/README.md index 96c86ecb3..886b1c102 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,13 @@ repositories: - [Snowman](https://github.com/klembot/snowman) - [SugarCube](https://github.com/tmedwards/sugarcube-2) +#### BUILDS + +Binary packages for Twine are available on the +[Releases](https://github.com/klembot/twinejs/releases) tab for Windows, MacOS +and Linux. Community-created builds exist on other platforms, such as the Snap +Store or Arch User Repository. As always, only install from sources you trust. + ### INSTALL Run `npm install` at the top level of the directory to install all goodies. diff --git a/docs/en/custom.css b/docs/en/custom.css index 9b9908da3..97d99a2fa 100644 --- a/docs/en/custom.css +++ b/docs/en/custom.css @@ -30,4 +30,9 @@ .content h1, .content h2, .content h3 { font-family: var(--font-display); font-weight: normal; +} + +.content hr { + margin-bottom: 48px; + margin-top: 48px; } \ No newline at end of file diff --git a/docs/en/src/SUMMARY.md b/docs/en/src/SUMMARY.md index f7a6d008f..4daf8e6e8 100644 --- a/docs/en/src/SUMMARY.md +++ b/docs/en/src/SUMMARY.md @@ -2,63 +2,75 @@ - [Introduction](README.md) - [Getting Started](getting-started/index.md) - - [Installing Twine](getting-started/installing.md) - - [Basic Concepts](getting-started/basic-concepts.md) - - [Getting Around in Twine](getting-started/getting-around.md) - - [Updating Twine](getting-started/updating.md) - - [Uninstalling Twine](getting-started/uninstalling.md) - - [Using an Older Version of Twine](getting-started/downgrading.md) + - [Installing Twine](getting-started/installing.md) + - [Basic Concepts](getting-started/basic-concepts.md) + - [Getting Around in Twine](getting-started/getting-around.md) + - [Updating Twine](getting-started/updating.md) + - [Uninstalling Twine](getting-started/uninstalling.md) + - [Using an Older Version of Twine](getting-started/downgrading.md) - [Using the Story Library](story-library/index.md) - - [Viewing Stories](story-library/viewing.md) - - [Creating, Copying and Importing Stories](story-library/creating.md) - - [Editing Stories](story-library/editing.md) - - [Renaming Stories](story-library/renaming.md) - - [Archiving and Exporting Stories](story-library/exporting.md) - - [Deleting Stories](story-library/deleting.md) - - [Tagging Stories](story-library/tagging.md) - - [Changing the Library's Location](story-library/location.md) + - [Viewing Stories](story-library/viewing.md) + - [Creating, Copying and Importing Stories](story-library/creating.md) + - [Editing Stories](story-library/editing.md) + - [Renaming Stories](story-library/renaming.md) + - [Archiving and Exporting Stories](story-library/exporting.md) + - [Deleting Stories](story-library/deleting.md) + - [Tagging Stories](story-library/tagging.md) + - [Changing the Library's Location](story-library/location.md) - [Editing Stories](editing-stories/index.md) - - [Navigating the Story Map](editing-stories/navigating.md) - - [Undoing and Redoing](editing-stories/undoing.md) - - [Selecting and Moving Passages](editing-stories/selecting.md) - - [Editing Passages](editing-stories/editing-passages.md) - - [Linking Passages](editing-stories/linking-passages.md) - - [Deleting Passages](editing-stories/deleting.md) - - [Tagging Passages](editing-stories/tagging.md) - - [Finding and Replacing Text](editing-stories/finding-replacing.md) - - [Renaming a Story](editing-stories/renaming.md) - - [Changing the Story Format](editing-stories/changing-story-format.md) - - [Viewing Story Statistics](editing-stories/stats.md) - - [Editing Story JavaScript and CSS](editing-stories/js-and-css.md) + - [Navigating the Story Map](editing-stories/navigating.md) + - [Undoing and Redoing](editing-stories/undoing.md) + - [Selecting and Moving Passages](editing-stories/selecting.md) + - [Editing Passages](editing-stories/editing-passages.md) + - [Linking Passages](editing-stories/linking-passages.md) + - [Deleting Passages](editing-stories/deleting.md) + - [Tagging Passages](editing-stories/tagging.md) + - [Finding and Replacing Text](editing-stories/finding-replacing.md) + - [Renaming a Story](editing-stories/renaming.md) + - [Changing the Story Format](editing-stories/changing-story-format.md) + - [Viewing Story Statistics](editing-stories/stats.md) + - [Editing Story JavaScript and CSS](editing-stories/js-and-css.md) - [Publishing Your Work](publishing/index.md) - - [Testing a Story](publishing/testing.md) - - [Proofing a Story](publishing/proofing.md) - - [Playing a Story](publishing/playing.md) - - [Publishing a Story](publishing/publishing.md) - - [The Scratch Folder](publishing/scratch-folder.md) + - [Testing a Story](publishing/testing.md) + - [Proofing a Story](publishing/proofing.md) + - [Playing a Story](publishing/playing.md) + - [Publishing a Story](publishing/publishing.md) + - [The Scratch Folder](publishing/scratch-folder.md) - [Managing Story Formats](story-formats/index.md) - - [Viewing Story Formats](story-formats/viewing.md) - - [Changing the Default Story Format](story-formats/default.md) - - [Changing the Proofing Format](story-formats/proofing.md) - - [Adding a Story Format](story-formats/adding.md) - - [Removing a Story Format](story-formats/removing.md) - - [Disabling Story Format Extensions](story-formats/extensions.md) - - [How Twine Manages Story Format Versions](story-formats/versions.md) + - [Viewing Story Formats](story-formats/viewing.md) + - [Changing the Default Story Format](story-formats/default.md) + - [Changing the Proofing Format](story-formats/proofing.md) + - [Adding a Story Format](story-formats/adding.md) + - [Removing a Story Format](story-formats/removing.md) + - [Disabling Story Format Extensions](story-formats/extensions.md) + - [How Twine Manages Story Format Versions](story-formats/versions.md) - [Customizing Twine](customizing/index.md) - - [Setting Preferences](customizing/preferences.md) - - [Command-Line Switches](customizing/command-line.md) - - [Advanced Customization](customizing/advanced.md) + - [Setting Preferences](customizing/preferences.md) + - [Command-Line Switches](customizing/command-line.md) + - [Advanced Customization](customizing/advanced.md) - [Limitations](limitations/index.md) - - [Large Stories](limitations/large-stories.md) - - [Combining Stories](limitations/combining.md) - - [Collaborating on Stories](limitations/collaborating.md) - - [Using Images and Multimedia](limitations/multimedia.md) - - [Using Source Control](limitations/source-control.md) + - [Large Stories](limitations/large-stories.md) + - [Combining Stories](limitations/combining.md) + - [Collaborating on Stories](limitations/collaborating.md) + - [Using Images and Multimedia](limitations/multimedia.md) + - [Using Source Control](limitations/source-control.md) - [Troubleshooting Problems](troubleshooting/index.md) - - [Backups](troubleshooting/backups.md) - - [Viewing Local Storage Directly](troubleshooting/local-storage.md) - - [If An Error Message Appears While Editing](troubleshooting/error-message.md) - - [If Twine Won't Start](troubleshooting/wont-start.md) - - [If Twine Lost Your Story](troubleshooting/lost-story.md) - - [If Your Story Is Damaged](troubleshooting/damaged-story.md) - - [If You See Visual Glitches in Twine](troubleshooting/visual-glitches.md) \ No newline at end of file + - [Backups](troubleshooting/backups.md) + - [Viewing Local Storage Directly](troubleshooting/local-storage.md) + - [If An Error Message Appears While Editing](troubleshooting/error-message.md) + - [If Twine Won't Start](troubleshooting/wont-start.md) + - [If Twine Lost Your Story](troubleshooting/lost-story.md) + - [If Your Story Is Damaged](troubleshooting/damaged-story.md) + - [If You See Visual Glitches in Twine](troubleshooting/visual-glitches.md) +- [Release Notes](release-notes/index.md) + - [2.8 Versions](release-notes/2-8.md) + - [2.7 Versions](release-notes/2-7.md) + - [2.6 Versions](release-notes/2-6.md) + - [2.5 Versions](release-notes/2-5.md) + - [2.4 Versions](release-notes/2-4.md) + - [2.3 Versions](release-notes/2-3.md) + - [2.2 Versions](release-notes/2-2.md) + - [2.1 Versions](release-notes/2-1.md) + - [2.0 Versions](release-notes/2-0.md) + - [1.0 Versions](release-notes/1-0.md) + - [Tweebox Versions](release-notes/tweebox.md) diff --git a/docs/en/src/release-notes/1-0.md b/docs/en/src/release-notes/1-0.md new file mode 100644 index 000000000..8c84ab9ef --- /dev/null +++ b/docs/en/src/release-notes/1-0.md @@ -0,0 +1,807 @@ +# About Twine 1 + +Twine 1 was available only as a desktop app for Mac and Windows, and was written +in Python (instead of JavaScript, which the current version is written in). As +such, it doesn't have much in common with the 2.x release series. + +--- + +# Twine 1.4.3 + +Release Notes: January 1, 2022 + +## Bugfixes/alterations + +### Development program + +#### Story Map + +- Signficantly improved the performance of the story map, with minor + improvements to numerous other features. Thanks to Richard Lake and Maarten + ter Huurne for this. +- Potentially fixed a crash involving dragging passages. +- Fixed a bug where pasting passages would sometimes place them in incorrect + positions. + +#### Menus + +- Added an "Update StoryIncludes Links" menu option, allowing StoryIncludes + passage availability to be manually refreshed. This menu item will be disabled + if StoryIncludes isn't present. +- Added Option-Command-F as an alternative 'exit fullscreen' key command. + +#### StoryIncludes + +- Now, closing StorySettings will refresh the StoryIncludes links automatically. +- Now, you can include a .tws which itself contains a StoryIncludes passage. + +#### Passage editor + +- Pressing control-A while typing in the passage title box should now correctly + select the title text. +- If you highlight a link with separate link text and passage title (such as + \[\[link text|passage\]\]) then press control-L, a new passage named + "passage" (instead of "link text|passage") is created. +- In the "create passages" prompt given when you close a passage containing red + links, the 'cancel' button now correctly cancels closing the passage. + +#### Importing + +- Fixed a bug where you couldn't import Twine HTML files which had tags written + in uppercase. +- Fixed a bug where Twine HTML files with storeArea \s with the attribute + "hidden" couldn't be imported. +- Changed the MIME-type of imported TTF font files from "application/x-font-ttf" + to "application/font-sfnt", and added "format(truetype)" to the generated + @font-face CSS, and made similar changes for OTF fonts. + +#### Story formats + +- Now, Twine will continue instead of crashing if, during startup, the + last opened story's format isn't available. Also, it will properly + error and quit if zero story formats are available (which should be + unlikely). +- Changed the naming of custom story formats' Python files from + \[story format name\]/\[story format name\].py to \[story format + name\]/header.py, in order to fix the issue where if a user renames + the story format's directory, the custom Header file will no longer + be found. However, old story formats which still use \[story format + name\].py should continue to work correctly. + +## Game engine + +### General + +- Fixed a missing Y in the "got itself in a mess" error message. +- The storeArea's passage is now read using textContent instead of + innerText, fixing a number of minor bugs involving consecutive + whitespace in passages being truncated. + +#### Syntax + +- Fixed a bug where the image syntax didn't work with images at + external URLs. + +#### Macros/Functions + +- Fixed a bug where variables saved via «remember» were unwittingly + shared over all Twine stories accessed from the same website. +- Fixed a bug in Jonah where certain internal link + +--- + +# Twine 1.4.2 + +Release date: June 2, 2014 + +## Bugfixes + +### Development program + +#### Fatal errors + +- Now, building games in non-English locales should no longer get an + encoding error caused by the built file's timestamp. Thanks to mth + for assistance and Cab for the report. + +#### StoryIncludes + +- The Story\_\_\_ passages are no longer forbidden from being included + via StoryIncludes. +- The StoryIncludes passage is no longer broken on OS X. + +#### Importing + +- Fixed buggy HTML importing for passages that have `>` symbols in + their titles. +- It is now possible to import from HTML files that use the SugarCube + custom header. +- Fixed imported images having the wrong MIME-type if their filename + extensions were in all-caps (such as "tree.JPG"). +- Altered the MIME-type of imported fonts in ttf and otf format to + "application/x-font-..." instead of "application/font-...". Also, + unrecognised files are now "application/octet-stream". This + shouldn't really change anything, but may improve browser support. + +#### Story Map + +- The position of passages created by right-clicking and selecting + "New Passage Here" should be fixed. +- Fixed [passage](passage) names with full stops no longer failing to + have incoming [link arrows](Story%20Map). +- Selecting "New Passage" when a Start passage is missing no longer + creates the "Start" passage, since it could be irritating for + "partial .tws files" that are being used in a large StoryIncludes + project. + +#### Passage editor + +- Passages with very long names no longer have the left half of their + name scrolled out of the title text box when you initially edit + them. +- The passage editor now has a uniform tab width (set to 4 spaces). +- Fixed a bug where HTML wouldn't be highlighted if its tag names or + attribute names contained hyphens (e.g. `
`) + +## Game engine + +### General + +- Built HTML files now have a UTF-8 byte-order mark. This should cause + [Dropbox](http://dropbox.com) to correctly transmit them with UTF-8 + encoding instead of ASCII. Hooray\!\! +- Fixed certain page elements (such as StoryTitle and StoryAuthor) not + being drawn at the start of a test play build that begins at a + non-Start passage. +- Fixed the image preloader code, which didn't detect whitespace + correctly, and thus prevented preloading images in HTML \ tags + that had a space between "src" and "=". + +### Syntax + +- You should now be able to put a \] character inside the link syntax + (e.g. \[\[\<\<$obj\[0\].x\>\>|Passage name\]\]) and put a quoted + "\>\>" inside the macro syntax (e.g. \<\\>" + \>\> ). +- Shorthand [\<\\>](<>): variable default was + causing $vars provided as arguments to mess up horridly. This should + fix this. +- Raw HTML entities (such as or \< or somesuch) are now correctly + preserved, rather than being converted to their symbols during the + build process. + +#### Macros/Functions + +- Using Passage() instead of passage() in your code will no longer + silently fail instead of producing an error message. +- \<\\>, \<\\> and \<\\> no longer + incorrectly convert Twine operators in the text of the provided link + to Javascript operators (e.g. \<\\> becoming + \<\\>). +- The undocumented clone() function has been updated to hopefully + allow certain native objects to be cloned more effectively. +- A number of macro error messages are a little clearer - displaying + "$" instead of state.history\[0\].variables." when referring to the + macro invocation. +- Fixed a bug where certain objects were being passed by reference + when used in a setter link - e.g. \[\[Link\]\[$a = $obj\]\] caused + $a and $obj to point to the same object, with changes to one + altering the other. +- Fixed a bug where object literals as shorthand \<\\> + arguments wouldn't work at all. +- Fixed a bug where multi-line string or object literals in + \<\\> or \<\\> macros, etc., would not have Twine + operators converted by Wikifier.parse() correctly. + +#### History/Back Button + +- Game history: Added a test for iOS Safari's private browsing mode, + which does not disable sessionStorage but does reduce its quota to 0 +- making it hard to tell if it's actually usable. This causes the + "couldn't save the state" alert to not pop up if you're playing in + private mode. +- The story state serialisation functions have been rewritten to allow + basic Javascript functions stored in Twine variables to be + decompiled and stored. Previously, using the Sugarcane back button + or a bookmark would cause function variables to lose their value. + (Of course, this relies on [function + decompilation](http://perfectionkills.com/state-of-function-decompilation-in-javascript/), + so bound functions and native functions' serialisation will silently + fail. And, when recompiling them, their original scope is lost.) + +#### Internals/Scripts + +- Added Array.prototype.forEach(), Object.create() and Array.isArray() + polyfills to the engine, allowing IE 8-compliant scripts to use + them. +- The engine now records the previous value of window.onerror, and + restores it once the message has been displayed once. + +## New features + +### Development program + +#### General + +- Added StoryInit, a special passage in which to put Twine macros that + you want to run before every play - including Test Plays of specific + passages. This is generally a more ideal place to put your initial + \<\\> macros instead of the Start passage. Thanks to T. M. + Edwards for pioneering this feature. + +#### Error checking + +- Added a very basic passage code error-checking system. When closing + a passage, Twine will now report a few possible errors: not matching + an \<\\> macro with an \<\\>, using "=" instead of "is" + in the \<\\> macro, misspelling "http://" in a link, and + putting HTML \ tags in a script passage. (Less obvious + errors can only be identified by your browser's Javascript engine, + and will, as usual, only be identified at runtime.) +- Also, when closing a passage, Twine will now offer to create new + passages for each red link in the passage text. This potentially + saves you having to create them yourself. +- Also, when closing a passage, Twine will now offer to import all + images, linked from URLs, into the story, and update the \[img\] + references to match. Importing images is recommended because it + saves you the bother of hosting the image files, keeps the story + from breaking if your image hosting site is down, and allows you to + host the HTML file on sites such as , which only + allow single HTML files to be uploaded. +- All of the above checks and helpers can be run from the "Verify All + Passages" menu item in the Build menu, or the "Verify Passage" item + in the passage editor's Passage menu. + +#### StoryIncludes + +- Twine now tries to keep track of passages that aren't present in the + file, but are included via the StoryIncludes feature (henceforth, + "included passages"). Links to included passages are now mauve, and + passages that link to included passages now have a mauve marker + drawn on them in the Story Map. + +#### Story Metadata + +- Added a "metadata" option to the Story Menu, which lets you edit + some data that is included in the final HTML file. +- The "identity" specifies a noun to use for game interface dialog boxes (the + restart confirmation, the error dialog, etc.) If left blank, then "game" will + be used. +- The "description" provides text to use for a HTML `` description + element, which is often used by search engines etc. to provide a summary of + the page. I've noticed that often Google will, at a loss to find the game + content, display odd bits of the storeArea div as a page description in its + search results, which is most definitely not a good look. Maybe this will fix + things. + +#### StorySettings + +#### Story Formats + +- Custom story formats can now supply a Python file, "header.py", which lets + various parts of the Twine development program be customised to match the + features of the story format. See the [base header.py + class](https://github.com/tweecode/twine/blob/master/header.py), which your + header.py file should subclass, for details. + +## Game engine + +#### Syntax + +- You can now use the inline syntax as a shorthand for the `` + HTML tag. +- `@@.robot;This is a robot-class span@@` is equivalent to `This is a robot-class span`. +- You can also use it alongside style attributes: + `@@.robot;text-decoration:underline;This is a robot-class span with an +underline@@` +- One bothersome fact about Twine up to now is that there's no real "bridge" + between the basic Twine link's functionality and raw HTML. There was no + convenient way to make a raw `` link trigger a passage change. So, I've + added a "data-passage" HTML attribute that you can put on HTML ``, ``, + `` and `` tags. +- `Some text` is equivalent to `%%[[Some +text|Distant woods]]%%`, but allows you to add extra HTML attributes to the + link, like "style". +- `` is equivalent to `%%[img[Trees]]%%` - thus, you + can now refer to imported images in HTML. (If you wish to make an image that + links to a passage, put the `` inside an `` element.) +- `` is how you can make an image map + area link to a passage. +- You can also attach data-passage to any other kind of tag to make it serve as + a link, too: `This looks like ordinary +text`. +- To simulate setter-links, you can also add a "data-setter" property, too. + `Collect teeth`. + Note that it does nothing without a data-passage attribute as well. +- It should now be possible to supply variables to the image syntax, as an image + passage name or URL - for instance, [img[$pictureName]]. +- Removed the quote-by-line [[syntax]], on the basis that a good number of + people don't really want indenting that often, and would rather have + greater-than signs as bullet points. The rest can rely on the indented block + syntax (`%%<<<%%`) or HTML `
` tags. + +#### Generated HTML + +- Passage links no longer have ID attributes that reveal the name of + the passage they go to, allowing anyone to "cheat" by right clicking + them and selecting "Inspect Element". This has been the case for + every previous version of Twine, but not anymore\! +- Jonah: rewind links now have the class "toolbar-rewind" instead of + "toolbar-rewind to here". + +#### Default CSS + +- Mobile [Sugarcane](Sugarcane) layout: I've added a somewhat + rudimentary media query to Sugarcane that converts the sidebar to a + vertical header, using a minimum of alterations, when viewed on a + 640px-width + +--- + +# Twine 1.4.1 + +Release Date: January 11, 2014 + +## Bugfixes + +### Bugfixes Development program + +- Potentially fixed the Windows VC++ runtime problem. If you haven't installed + the VC++ 9 redistributable, the Twine installer should now correctly contain + it. +- Fixed `«endnobr»` consuming the three characters that come after it. +- Fixed external link syntax highlighting. +- Fixed syntax highlighting for shorthand «print» macros. +- Fixed unmatched `«endif»` and `«endsilently»` macros not being + syntax-highlighted red. +- Removed the "Delete Passage" menu item in the Story menu, due to an identical + entry being in the Edit menu. +- External links and variable links are no longer considered broken links in the + IDE. +- Fixed annotation passages being drawn too dark in smooth drawing mode. +- Fixed the monospace font using the normal font's size instead of its own. + time. This should make HTML exporting/importing more symmetrical. +- Improved speed of HTML importing. +- The StorySettings passage is no longer converted to all-lowercase at build +- Fixed an error when trying to replace a passage with one from animported file. +- Now, the "no Start passage" warning is suppressed if a StoryIncludes passage is present. +- Fixed importing from HTML sometimes failing to read passages correctly. + +## Bugfixes Game engine + +- Fixed passages with names containing quote marks being unrecognised by links. +- Altered Sugarcane's browser state-saving to avoid a crash in Firefox caused by having lots of variables in your story. +- Fixed HTML tables in passages not being constructed correctly. +- Fixed TiddlyWiki emdashes not being rendered correctly. +- Fixed the `«nobr»` macro inserting zero-width space characters into contained + macro tags, thus breaking them. +- Fixed bug preventing custom macros from being usable in StoryMenu etc. +- Fixed the `[img]` syntax used in CSS stylesheets inserting a terminating + semicolon, preventing further attributes from being used on the same line. +- Added "vertical-align:bottom" to images to compensate for a line-height + difference between XHTML Transitional and HTML5. Why is there a line-height + difference? The person who can answer that is not on this Earth, but in + Heaven. +- Fixed the `«nobr»` macro not working if any text follows it. +- Fixed `«choice»`. Now, clicking a `«choice»` disables all .choice links in the + passage, not just itself. This returns it to 1.3.5 behaviour. +- Fixed variables used as array indexes not being parsed correctly. +- Restored the left positioning of the Sugarcane sidebar. +- Added support for "javascript:" and "data:" URIs in external links. +- You can now use external links in the simple link syntax, such as `[[http://example.net]]`. +- Possibly broken pretty-links (as in, links with a separate link text and + destination) are now no longer assumed to be external URIs unless they contain + a protocol (like "http:"), or the symbols . / \ or #. This should make link + debugging a bit easier. +- Fixed the shorthand `«display»` macro tag's title sometimes being incorrectly + parsed as its first argument. +- Shorthand `«display»`: Attempting to access a parameter() that wasn't supplied + make "variadic passages" (passages that can take multiple optional variables) + will no longer throw an error, on the newly considered basis that it would + difficult. +- Fixed a bug where backslashes would be incorrectly converted to arbitrary + letters if passage obfuscation was being used. +- `«back»` now works better when Undo is off in Sugarcane. Previously it would + mess up the variable state in cases when link variables were in use. +- `«back»` and `«return»` now work when restoring a Jonah state via bookmark. +- `«back»` also now works when clicked in a past Jonah passage - previously it + would act as if it was in the present passage. +- `«back»` now works in the StoryMenu, StoryAuthor, StoryTitle and StorySubtitle + passages. +- `«choice»` now produces an error message if it's used in the StoryMenu, + StoryAuthor, StoryTitle and StorySubtitle passage. +- Fixed Jonah scrolling in IE 8. +- Now, only the StoryTitle passage's text content will be used for the window + title, instead of its raw code. +- Now, if a story has no StoryTitle, or the StoryTitle has no text content, it + will default to the name of the .tws file used to build it, instead of just + "Untitled Story". +- Fixed a bug where putting "Lookup:" in the StorySettings could potentially + crash the game. +- Added a sanity check in case a script overrides History.prototype.display() + but doesn't pass enough arguments (since in 1.4 it takes 4 arguments instead + of 3). +- Fixed HTML `` structures in passages not being rendered correctly. + +## Additions + +### Additions to Development program + +- IDE tag colours now vary between shades of orange based on the hash of the + tags, to help differentiate dissimilarly tagged passages from a distance. +- Added a Preferences option for showing the faint connector arrows for image + and stylesheet passages. +- Passages displayed via the shorthand «display» syntax now result in connector + arrows being drawn. + +### Additions to Game engine + +- The StoryMenu now auto-updates when you change passages!! The code is + re-executed and re-rendered into the element. This means you could, say, + «print» a variable inside it, and it would update automatically. (This change + also applies to StoryAuthor, StoryTitle and StorySubtitle). +- Added the tags() function, which takes one or more strings and returns an + array of the tags of the given passage (or the current passage if no name is + supplied). +- Added passage(), which simply holds the name of the current passage (If a + passage is being «display»ed by another, passage() is the name of the + “topmost” passage.) +- Added turns(), which provides the number of turns that have elapsed in the + current game. +- Added visitedTag(), which returns the number of times passages with the given + tag have been visited. Provide multiple tags to only search for passages that + contain both. +- Added 'header' and 'footer' elements to Jonah's .passage elements, to provide + a bit more symmetry with Sugarcane's DOM layout. +- The CSS selector “:link” in stylesheets is now converted to `[class*=Link]` + at runtime. This is to provide backwards-compatibility for people who used + “a:link” to refer to Twine links (which is no longer usable as internal links + no longer have href attributes). It's a mean sight of a hack, but so be it - + I shan't be adding back the "javascript:void(0)" href no matter what you say. +- Added the "visitedLink" class, which is applied to passage links that link to + already visited passages. “:visited” is converted to “.visitedLink” much like + the above. This provides a surprising amount of power - you can give + .visitedLink “display:none”, for instance, to make links to all visited + passages disappear automatically. +- Re-implemented `«textinput»`. It creates an `` text element which, when + a `")),t.onClick&&a[j]("click",t.onClick),t.update&&N.push(function(e){return t.update(e,a)}),a)}))),C.endsWith("preview")&&(v=n.tagName||"span",i=z('
<").concat(v,">").concat(n.text||"","").concat(C.startsWith("t8n")?"<".concat(v,">")+n.text2+""):"","
")),C.startsWith("t8n"))&&(i[j]("mouseup",update),i[j]("touchend",update),(e=i[W](":first-child"))[j]("animationend",function(){return e.style.visibility="hidden"})),(C.endsWith("checkbox")||C.endsWith("checkboxrow"))&&(i=z("").concat(n.text,"")),C.endsWith("w")&&(n.subrow.reduce(reducer,i),n.subrow.forEach(function(e){var a=e.model;e.model=function(e,t){return!i[W](":scope > input:checked")||S&&!o[W](":scope > input:checked")?e:a(e,t)}})),i[j]("change",update)),"checkboxes"===C&&(i=z('
").concat(n.name,"
")),n.options.forEach(function(e,t){var a=z("").concat(e,""));a[j]("change",update),i.append(a)})),"radios"===C&&(i=z('
").concat(n.name,"
")),n.options.forEach(function(e,t){t=z("").concat(e,""));t[j]("change",update),i.append(t)})),C.endsWith("textarea")&&(v="text",a=n.multiline?"textarea":"input",C.endsWith("expression-textarea")&&(n.update=function(e,t){!e.expression&&t[W](a).value?t.setAttribute("invalid","This doesn't seem to be valid code."):t.removeAttribute("invalid")},n.model=function(e,t){t=(t[W](a).value||"").trim();t&&(H(t,"","macro").children.every(function recur(e){return"text"!==e.type&&"error"!==e.type&&("string"===e.type||"hook"===e.type||e.children.every(recur))})?n.modelCallback(e,t):e.valid=!0)}),C.endsWith("string-textarea")&&!n.model&&(n.model=function(e,t){n.modelCallback(e,JSON.stringify(t[W](a).value||""))}),C.endsWith("number-textarea")&&(v="number",n.model||(n.model=function(e,t){n.modelCallback(e,+t[W](a).value||0)})),(i=z("<".concat(k?"span":"div",' class="harlowe-3-labeledInput">').concat(n.text,"<").concat(a," ").concat(n.useSelection?"data-use-selection":"").concat(C.includes("passage")?'list="harlowe-3-passages"':"",' style="width:').concat(n.width,";").concat(n.multiline?"max-width:".concat(n.width,";"):"","padding:var(--grid-size);margin").concat(k?":2px 0.5rem 0 0.5rem":"-left:1rem",";").concat(n.multiline&&k?"display:inline-block;height:40px":"",'" type=').concat(v," ").concat(n.persist?"data-persist":"",' placeholder="').concat(n.placeholder||"",'">")))[W](a)[j]("input",update)),(C.endsWith("number")||C.endsWith("range"))&&(i=z("<"+(k?"span":"div")+' class="harlowe-3-labeledInput">'+n.text+''+n.text+""),v=O(n.value),i.append(v),i[B]("input").forEach(function(e){return e[j]("change",update)})),C.endsWith("gradient")&&(s=(i=z("
")))[W](".harlowe-3-gradientBar"),t=function createColourStop(e,t,a){var r=z("
')+"
"),o=O(t),a=(o[B]("input").forEach(function(e){return e[j]("change",function(){var e=o[W]("[type=range]").value,t=o[W]("[type=color]").value;r.setAttribute("data-colour",F(t,e)),e<1&&r.setAttribute("data-harlowe-colour",R(t,e)),update()})}),z('")));a[j]("click",function(){r.remove(),update()}),o.append(a),r.firstChild.prepend(o),s.append(r),update()},setTimeout(function(){t(0,"#ffffff"),t(.5,"#000000",!0),t(1,"#ffffff")}),i[W]("button")[j]("click",function(){return t(.5,"#888888")}),i[j]("mousedown",v=function listener(e){var t,a,r,o,n=e.target;n.classList.contains("harlowe-3-colourStop")&&(t=document.documentElement,e=s.getBoundingClientRect(),a=e.left,r=e.right-a,e=function onMouseUp(){t[q]("mousemove",o),t[q]("mouseup",onMouseUp),t[q]("touchmove",o),t[q]("touchend",onMouseUp)},t[j]("mousemove",o=function onMouseMove(e){var t=e.pageX,e=e.touches;void 0!==(t=t||(null==e?void 0:e[0].pageX))&&(e=Math.min(1,Math.max(0,(t-window.scrollX-a)/r)),n.style.left="calc(".concat(100*e,"% - 8px)"),n.firstChild.style.left="".concat(-(M?464:384)*e-(M?0:40),"px"),n.setAttribute("data-pos",e),update())}),t[j]("mouseup",e),t[j]("touchmove",o),t[j]("touchend",e),Array.from(s[B]("[selected]")).forEach(function(e){return e.removeAttribute("selected")}),n.setAttribute("selected",!0))}),i[j]("touchstart",v),N.push(function(){s.style.background="linear-gradient(to right, ".concat(Array.from(s[B](".harlowe-3-colourStop")).sort(function(e,t){return e.getAttribute("data-pos")-t.getAttribute("data-pos")}).map(function(e){return e.getAttribute("data-colour")+" "+100*e.getAttribute("data-pos")+"%"}),")")})),C.endsWith("dropdown")&&(r=z("<".concat(k?"span":"div",' style="white-space:nowrap;').concat(k?"":"width:50%;",'position:relative;">').concat(n.text,'")),n.options.forEach(function(e,t){r[W]("select").append(z('