- 01 Nov, 2016 1 commit
-
-
Leon Arnott authored
Given that Babel inserts the pragma into its compiled output automatically, the pragmas aren't necessarily needed - however, for testing the raw ES6 in a browser without compilation, they still have to be there.
-
- 11 Sep, 2016 1 commit
-
-
Leon Arnott authored
Added the (hover-style:) changer macro, which allows passed style changers to only apply when hovering over the hook. I'm a little uncomfortable about its name (as compared to (text-style:)) and the specificity of only allowing style changers (which currently does not include (transition:)s) but I think it'll be fine, and could be safely expanded a little in future. Also fixed a bug where joining a changer, using "+" in markup, with a changer macro that produced an error, would suppress the error.
-
- 06 Sep, 2016 1 commit
-
-
Leon Arnott authored
Also fixed a bug where the wrong value would be given if passed the empty string as a search term (due to being passed to String#split()). Closes #8.
-
- 03 Sep, 2016 2 commits
-
-
Leon Arnott authored
-
Leon Arnott authored
Added "any" and "all" properties to sequentials, which are used for "all" and "any" comparison operations. These properties produce special, unstorable "determiner" values, which, when used as the object of "contains", "is in", or other comparison expressions, results in every element of the sequential being compared using the operation. This is, I feel, a better solution to simply adding "contains all" and "contains any" operators, in that it naturally expands to cover ">", ">=" and other non-set-related operations. Also fixes a bug (that didn't manifest until just now) where certain unstorable values could be stored if they were in storable data structures.
-
- 01 Sep, 2016 1 commit
-
-
Leon Arnott authored
This was important, I decided, to ensure consistency in changer concatenation between macros and passage markup. $changer + $changer2 now joins changers in both modes. Also added a "none" (text-style:) which, when added to other (text-style:) combined changers, removes their styles.
-
- 30 Aug, 2016 3 commits
-
-
Leon Arnott authored
Trying to use common incorrect operators will result in an error message telling you what the correct operator is. These incorrect operators current include =>, =<, gte, lte, gt, lt, eq, isnot, neq, are, x. (This, of course, means that JS variable names that equal these words are no longer passed through.)
-
Leon Arnott authored
Fixed a bug where datasets could contain (and compared) data structures by reference, in constructing, concatenating and subtracting. Also: * Fixed a bug where subtracting arrays was also subject to comparing data structures by reference. * Fixed a bug where subtracting non-subtractable values (such as booleans) wouldn't produce an error.
-
Leon Arnott authored
Also fixed bugs where certain error messages described values as "whatever this is" instead of treating them correctly.
-
- 29 Aug, 2016 1 commit
-
-
Leon Arnott authored
I spent years feeling rueful about adding this, as I'd felt it directly competes with the (replace:) macros' idiom. Lately, though, I've seen the merit in it, as a way of keeping revealed text inside the flow of the prose it is revealed inside, when said text is vital to the readability of the passage. I currently feel like this doesn't provide much way of expressing structure and relationship between hidden hooks and visible ones - no semantic way to convey that they form a list with only a single one visible, for instance, or that one builds upon the last, as with <<becomes>> and <<gains>> in Twine 1. But, future macros providing semantically clearer means of showing hidden hooks ((show-next:), (reveal-next:) or somesuch) can always be added.
-
- 24 Aug, 2016 1 commit
-
-
Leon Arnott authored
Also added to the test case HTML page a "ErrorMessages" global which collects all Harlowe error messages produced as a result of tests, so that they can be checked. Also decided to stick with the uncapitalised "boolean" for the data type in documentation and errors.
-
- 23 Aug, 2016 1 commit
-
-
Leon Arnott authored
I'm still not entirely sold on this decision, which is why it's currently undocumented, but here it is: you can now write (find: where it > 3) etc., and "it" will refer to the loop variable, even if elided. "it" also works when the variable is provided - (find: _item where it > 3). (What I'm hesitant about is that this is ultimately a new meaning for "it", similar to but not equivalent to previous uses where "it"'s value was always leftward and explicitly visible.) Also fixed/removed a few revision tests, and altered some documentation references to (datamap:), changing it to (dm:).
-
- 20 Aug, 2016 3 commits
-
-
Leon Arnott authored
This prevented a meaningful error message being displayed for "(print: 1st of -0.2)", for instance. Incidentally, this also indirectly changes the syntax highlighting for negative numbers - now, the - sign, if alongside the first digit, now is coloured the same as the rest of the number.
-
Leon Arnott authored
This involved adding some structural indirection to the ChangeDescriptor's newTargets property - instead of an array of HookSets or jQuerys, it's an array of {target, append} properties, tying the append method to the target.
-
Leon Arnott authored
This enables the "when stored, can work across passages" test for revision macros to finally pass. In practice, it means that the section used for HookSets' hook selection is determined by the consumer macro. As a result, Section.selectHook() is gone, and (somewhat frustratingly) HookSet.forEach() now takes a section as its first param, breaking symmetry with Array#forEach. While implementing this, HookSets' targets and newTargets were changed to no longer be stored as strings - only HookSet, jQuery collections and arrays thereof are used now. Also, as a necessity of these changes, HookSets no longer have a length, and can no longer be spread with "...". (But, neither of these had much point ever since they became unstorable).
-
- 18 Aug, 2016 1 commit
-
-
Leon Arnott authored
This allows the "can be composed" tests for these macros to be re-enabled. Also gave HookSets a TwineScript_is() method, allowing them to finally be compared by value using the "is" operator.
-
- 17 Aug, 2016 1 commit
-
-
Leon Arnott authored
Now, all code spans in the docs which occur outside of the "Passage markup" section will now use the macro mode for highlighting, rather than the markup mode. This means that identifiers and operators should be styled more accurately.
-
- 16 Aug, 2016 1 commit
-
-
Leon Arnott authored
Also fixed a bug where using (set:) to set a substring, when the given array of positions contained "length" (such as (set: $a's (a:1,"length")) to "foo")), wouldn't produce an error.
-
- 10 Aug, 2016 1 commit
-
-
Leon Arnott authored
Also corrected and added a few other lines elsewhere.
-
- 08 Aug, 2016 1 commit
-
-
Leon Arnott authored
This macro, designed primarily for use with lambdas, lets you iterate over a datamap and have access to its names and values easily, without needing to interleave (datanames:) and (datavalues:). Also: * Fixed a bug where lambdas couldn't iterate over values that consisted of datamaps, datasets, or any Harlowe-specific data. * Added some styling for "where", "via", "making" and "with" to the CodeMirror mode.
-
- 07 Aug, 2016 2 commits
-
-
Leon Arnott authored
-
Leon Arnott authored
-
- 04 Aug, 2016 1 commit
-
-
Leon Arnott authored
This pane displays the (currently just global) variables in the story, and should update them the moment they change, using VarRef event handlers. This still could do with a few more features, such as: a button to hide/show the pane, and of course the inclusion of temporary variables. Also: * Fixed some serious bugs in the debug mode's turns dropdown. * Added an on() event handler register to VarRef. * Error messages now refer to Booleans as "the Boolean value" rather than "the logic value". * Corrected a few documentation lines.
-
- 02 Aug, 2016 2 commits
-
-
Leon Arnott authored
-
Leon Arnott authored
Also specified that 1.2.3 requires jQuery 2.x.
-
- 01 Aug, 2016 1 commit
-
-
Leon Arnott authored
This includes a ] inside a hook, a } inside the collapsing markup, or any of the formatting markup's closing tokens immediately after an opening token. I still need to determine if the HTML comments markup should have this applied, too. Closes #55.
-
- 25 Jul, 2016 2 commits
-
-
Leon Arnott authored
jQuery 3 removes the 'context' property, which was used by the fix added in b0a5841edfa4. A survey leads me to believe, though, that using just desc.target instead of desc.target.context should work too. The situation I believe I was guarding against (the desc.target being detached from the DOM such that its containing <tw-collapsed> element is invisible) doesn't seem like it can actually occur.
-
Leon Arnott authored
Now, State has three event hooks which DebugMode uses to alter its view - forward, back and load - and the handlers DebugMode registers only do the minimum of DOM manipulation needed. Also fixed a bug in the "stores lots of data" test for (loadgame:).
-
- 21 Jul, 2016 1 commit
-
-
Leon Arnott authored
This element allows the current session's turn history to be viewed, and to navigate to a particular turn using the menu. Also: * Made the debug mode panel slightly smaller. * Brought forward the mathFilter change to (pow:) in e47bdd66af23. * Fixed the use of 'tilde' rather than 'grave' in the verbatim syntax documentation. * In the test suite HTML file, fixed the bug where the harlowe-css.css file was included twice.
-
- 14 Jul, 2016 1 commit
-
-
Leon Arnott authored
* Also wrapped it in the mathFilter function to filter out NaNs. * Also fixed a small documentation mistake.
-
- 13 Jul, 2016 1 commit
-
-
Leon Arnott authored
* To provide aid in distinguishing new lines from wrapped lines, the lineNumbers CM option is now enabled (but with the numbers themselves replaced with bullets). * Placing the cursor on hook nametags will now highlight identical nametags and hookRefs, much like vice-versa. * Temporary variable occurrences can now be highlighted by placing the cursor on one. * The token underlining feature will now ignore unwrapped text tokens, the underlining of which somewhat distracted from editing prose. * String literal delineating quotes are now curved outward, as simulated "smart quotes", to help convey where such literals begin and end.
-
- 12 Jul, 2016 1 commit
-
-
Leon Arnott authored
This alters the way Colours are converted to CSS properties inside (text-colour:) and (background:) - now, they'll be converted to rgba() instead of hexadecimal notation. Also fixed a bug in the Array#includes polyfill.
-
- 11 Jul, 2016 1 commit
-
-
Leon Arnott authored
Since this is actually a directly user-created value, it should go here. Also renamed the "TwineScript_Unobservable" property to "TwineScript_Unstorable", and removed the unused properties "TwineScript_Sealed", "TwineScript_Writeproof" and "TwineScript_DeleteValue".
-
- 09 Jul, 2016 1 commit
-
-
Leon Arnott authored
This should prevent (http:...) and (https:...) from being considered invalid macros. Closes #41.
-
- 07 Jul, 2016 2 commits
-
-
Leon Arnott authored
Also cleaned up the update notes a bit.
-
Leon Arnott authored
* The (rgb:) and (hsl:) macros behave like the CSS colour functions, accepting three numbers to produce a new colour value. I'd like to add (rgba:) and (hsla:) as well at some point. * Colour values now have r, g, b, h, s and l properties, which can be used to extract components for use in further (hsl:) or (rgb:) calls. The h, s and l properties implicitly convert the colour's internal RGB representation into HSL, but should be accurate.
-
- 27 Jun, 2016 1 commit
-
-
Leon Arnott authored
-
- 22 Jun, 2016 1 commit
-
-
Leon Arnott authored
Now, these times should display as "12" instead of "0". Closes #54. Also added a changelog note about the changes to the "pulse" transition in 7656f49977ab.
-
- 21 Jun, 2016 1 commit
-
-
Leon Arnott authored
Now, including the ?Page, ?Passage or ?Sidebar in a (click:) enchantment's targets will, instead of turning its entire text into a link, border the page and wait for a click anywhere in it, like the (click-page:) macro provided. You may observe that this "border-link" feature would be desirable for plain hooks. I'll have to see what I can do.
-
- 08 Jun, 2016 1 commit
-
-
Leon Arnott authored
* Added a Polyfills module to hold post-ES6 polyfills which aren't supplied by es6-shim. Currently it just supplies Array#includes. * Chipped away at Utils some more, removing a few methods and shifting findAndFilter() to jQuerypolyfills. * Removed the mostly empty Macrolib module, instead having the Harlowe module include the macro library itself.
-