1. 01 Nov, 2016 1 commit
  2. 11 Sep, 2016 1 commit
    • Leon Arnott's avatar
      Added the (hover-style:) changer macro, which allows passed style changers to... · 9a605ba4689d
      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.
      9a605ba4689d
  3. 06 Sep, 2016 1 commit
    • Leon Arnott's avatar
      (count:) now accepts multiple values. · d67319fd80bb
      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.
      d67319fd80bb
  4. 03 Sep, 2016 2 commits
    • Leon Arnott's avatar
      96876edde043
    • Leon Arnott's avatar
      Added "any" and "all" properties to sequentials, which are used for "all" and... · c6a0b59b3b47
      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.
      c6a0b59b3b47
  5. 01 Sep, 2016 1 commit
    • Leon Arnott's avatar
      Joining changers outside of macros now requres interstitial "+" signs. · af415bd075be
      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.
      af415bd075be
  6. 30 Aug, 2016 3 commits
  7. 29 Aug, 2016 1 commit
    • Leon Arnott's avatar
      Added hidden hook markup and the macros (hidden:), and (show:). · b132150f7b5c
      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.
      b132150f7b5c
  8. 24 Aug, 2016 1 commit
    • Leon Arnott's avatar
      Fixed various mistakes or vaguaries in numerous error messages. · b1f96134476b
      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.
      b1f96134476b
  9. 23 Aug, 2016 1 commit
    • Leon Arnott's avatar
      Lambdas may now omit the leading temp variable, and can use "it" for it. · 6906e892b585
      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:).
      6906e892b585
  10. 20 Aug, 2016 3 commits
    • Leon Arnott's avatar
      Fixed a parsing bug involving belonging indices and negative numbers. · 0febb90c4d69
      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.
      0febb90c4d69
    • Leon Arnott's avatar
      Differing revision changers (like (append:) and (prepend:)) can now be added together. · 871a14138eca
      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.
      871a14138eca
    • Leon Arnott's avatar
      HookSets no longer have a "section" property. · cf8600032bc9
      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).
      cf8600032bc9
  11. 18 Aug, 2016 1 commit
  12. 17 Aug, 2016 1 commit
  13. 16 Aug, 2016 1 commit
  14. 10 Aug, 2016 1 commit
  15. 08 Aug, 2016 1 commit
    • Leon Arnott's avatar
      Added the (dataentries:) macro. · f4871e79bab3
      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.
      f4871e79bab3
  16. 07 Aug, 2016 2 commits
  17. 04 Aug, 2016 1 commit
    • Leon Arnott's avatar
      Initial commit of the debug mode variable pane. · 0e8dffeafbe4
      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.
      0e8dffeafbe4
  18. 02 Aug, 2016 2 commits
  19. 01 Aug, 2016 1 commit
  20. 25 Jul, 2016 2 commits
    • Leon Arnott's avatar
      Fixed a compatibility bug with jQuery 3.0. · af7563d3b006
      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.
      af7563d3b006
    • Leon Arnott's avatar
      Improved the performace of the "turns" debug dropdown. · e29dc9d76576
      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:).
      e29dc9d76576
  21. 21 Jul, 2016 1 commit
    • Leon Arnott's avatar
      Created a DebugMode module, and added a "turns" dropdown to the panel. · 1a804a8204db
      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.
      1a804a8204db
  22. 14 Jul, 2016 1 commit
  23. 13 Jul, 2016 1 commit
    • Leon Arnott's avatar
      Altered the CodeMirror highlighting mode. · 4029a40e3fd4
      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.
      4029a40e3fd4
  24. 12 Jul, 2016 1 commit
  25. 11 Jul, 2016 1 commit
    • Leon Arnott's avatar
      Moved assignmentrequest.js to the datatypes directory. · a8080700a3d6
      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".
      a8080700a3d6
  26. 09 Jul, 2016 1 commit
  27. 07 Jul, 2016 2 commits
  28. 27 Jun, 2016 1 commit
  29. 22 Jun, 2016 1 commit
  30. 21 Jun, 2016 1 commit
    • Leon Arnott's avatar
      Removed (click-page:), incorporating its functionality into (click: ?Page). · a96854602b57
      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.
      a96854602b57
  31. 08 Jun, 2016 1 commit
    • Leon Arnott's avatar
      Moved around the utilities a bit. · 8217033ef56f
      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.
      8217033ef56f