1. 12 Jan, 2021 1 commit
    • Leon Arnott's avatar
      Fixed a bug where the effects of (enchant:) were temporarily suppressed... · fba54515c656
      Leon Arnott authored
      Fixed a bug where the effects of (enchant:) were temporarily suppressed whenever a (dialog:), (prompt:) or `(confirm:)` was run at roughly the same time.
      
      This isn't the fix I wanted to make (instead I'd rather it only call updateEnchantments() when it explicitly needs to), but it'll have to do for now.
      
      Also fixed a bug where the Styles panel of The Harlowe Toolbar didn't preview animations correctly.
      
      Closes #203.
      fba54515c656
  2. 06 Jan, 2021 1 commit
  3. 04 Jan, 2021 1 commit
    • Leon Arnott's avatar
      Fixed several post-release bugs. · 94a33b89e02b
      Leon Arnott authored
       * Fixed a bug where, when a transition finished, if the browser experienced lag due to a large number of other elements being present, the transitioning element's visibility could become hidden briefly before Harlowe removed the transition CSS from it.
       * Fixed a bug where (set:), (put:), (move:) and (unpack:) would produce objects with invalid TwineScript_Print() methods outside of Debug Mode, thus polluting the browser console with errors.
       * Fixed a bug where Debug Mode's Enchantments panels' headers were being drawn incorrectly.
       * Greatly improved the performance of Debug Mode's panels, reducing lag caused by a large number of entries being added to a panel at once.
      
      Closes #201.
      94a33b89e02b
  4. 15 Dec, 2020 1 commit
  5. 13 Dec, 2020 1 commit
  6. 12 Dec, 2020 1 commit
    • Leon Arnott's avatar
      Renamed (reload:) and (icon-reload:) to (restart:) and (icon-restart:),... · 7b92f6378bb8
      Leon Arnott authored
      Renamed (reload:) and (icon-reload:) to (restart:) and (icon-restart:), keeping (reload:) as an alias.
      
      Also:
       * Fixed some minor things in The Harlowe Toolbar, as well as added a minimise button to the whole thing.
       * Columns and aligners no longer have title text in Debug Mode, due to it being kind of confusing.
       * Trying out the notion that <tw-transition-container>s should never get "inline-block" at all, instead just "inline" or "block". I checked the original commit for this (a38a93a77b97), and I don't believe it was ultimately correct.
       * Fixed another Chrome opacity bug with transitions.
       * Fixed a CSS bug with <tw-dialog-links>, caused by Chrome not supporting justify-content:end.
       * Added a TwineScript_is() method to basic commands, allowing them to be considered equal by `is` in most situations where that matters.
      7b92f6378bb8
  7. 11 Dec, 2020 1 commit
  8. 09 Dec, 2020 1 commit
    • Leon Arnott's avatar
      Added (after:), a shorthand form of (event:) similar to that in Chapbook. · 34c6fe2af64e
      Leon Arnott authored
      Notable about this macro design, unlike its (event:) form, is that it contains an optional "skip" parameter similar to that for (t8n-skip:).
      
      Also:
       * Fixed a bug in the previous commit (which should've included <tw-story> as its exception).
       * Fiddled with various parts of the documentation.
       * Tweaked (palette:) to produce less dark link text whenever the produced normal text colour is rather dark.
      34c6fe2af64e
  9. 05 Dec, 2020 1 commit
    • Leon Arnott's avatar
      IAdded (hooks-named:), as well as the debugging macros (assert:) and (assert-exists:). · e40ece040a6a
      Leon Arnott authored
      (assert-exists:) is designed as something of a compromise over adding a non-nullable hook selector, pleading that such a selector proved too complicated to add in terms of concatenation with nullable selectors, making various non-error-propagating methods suddenly able to propagate errors, etc. When I added this, (assert:) naturally had to follow.
      
      I MAY change (hooks-named:) to just (hooks:), or perhaps add some aliases for it.
      
      Closes #32. Closes #196.
      
      Also:
       * Fixed a bug where (meter:) wouldn't work properly with fractional variables.
       * Added some more block elements to usuallyBlockElements in Utils.
      e40ece040a6a
  10. 03 Dec, 2020 1 commit
    • Leon Arnott's avatar
      Added (animate:), a command to re-apply a transition to an already existing hook. · e35e035aca69
      Leon Arnott authored
      This was added simply because I noticed people could use (t8n:) and (rerun:) to accomplish this, and I wanted this little hack to have a proper idiom. As it is, it isn't too useful due to
      the current suite of transitions involve the hook slowly appearing (with "rumble" and "shudder" notable exceptions), but maybe a few more could be added.
      
      As it is, I added one more transition: "blur", which uses the new CSS filters to make a hook appear from a blur.
      
      Also fixed Utils.childrenProbablyInline() a bit more.
      e35e035aca69
  11. 01 Dec, 2020 1 commit
    • Leon Arnott's avatar
      Fixed, in a somewhat forceful fashion, bugs where (button:) links (plus a lot... · e918daa6aa26
      Leon Arnott authored
      Fixed, in a somewhat forceful fashion, bugs where (button:) links (plus a lot of other block elements) would be forced into inline flow during some transitions, due to <tw-transition-container> being given 'display:inline-block'.
      
      This COULD cause some issues with some other transitioning elements (not to mention custom story structures), but it seems to be working as intended at present.
      
      Also:
      
       * Fixed the border of (input-box:) elements, such that (border:) can alter it correctly.
       * Made it so that various 3.2.0 commands that should not have changers attached will now correctly error when that happens.
       * Fixed the sizing of "button" links in (dialog:) dialogs.
      e918daa6aa26
  12. 30 Nov, 2020 1 commit
  13. 29 Nov, 2020 1 commit
    • Leon Arnott's avatar
      Added (stripes:), a variant of (gradient:) which creates a striped background... · e848ddef76a5
      Leon Arnott authored
      Added (stripes:), a variant of (gradient:) which creates a striped background (for use with (background:)) when given a given stripe width, angle, and colours.
      
      As of now, the adjusted "stops" data value on (stripes:)'s gradients may seem ugly, but it leaves the possibility open for someday adding (repeating-gradient:), which would use the same {pixels,colour} names.
      
      Also fixed a long-standing bug where, due to a precedence conflict, writing something like `$a's stops's (1)` would cause a Javascript error.
      e848ddef76a5
  14. 25 Nov, 2020 1 commit
    • Leon Arnott's avatar
      Added (button:), a styling changer for links, as well as added an optional... · d2716f3f6368
      Leon Arnott authored
      Added (button:), a styling changer for links, as well as added an optional "unavailable" text string argument to (link-storylet:).
      
      Having a drop-in styling option for links that makes them more closely resemble other contemporary IF engines' links has been something I've gradually accepted as desirable. That being said, getting this working with every kind of "link" in this engine has forced me to use a CSS class name (a namespace I'm loathe to use unnecessarily).
      
      I feel a bit more positive about (link-storylet:) now that the optional argument and the aformentioned changer are available.
      
      Also fixed a bug where (align:) would override (box:)'s width with its max-width.
      d2716f3f6368
  15. 22 Nov, 2020 1 commit
    • Leon Arnott's avatar
      Added a (meter:) command macro, used for creating a videogame bar-graph meter... · 7dffab3fe719
      Leon Arnott authored
      Added a (meter:) command macro, used for creating a videogame bar-graph meter that's bound to a numeric variable.
      
      I'm rather satisfied with this implementation of meters. The only concern right now is that it's the only "interface" macro in the documentation.
      
      Also fixed a bug with (enchant:) where errors produced by the given lambda wouldn't be reported.
      7dffab3fe719
  16. 15 Nov, 2020 1 commit
  17. 14 Nov, 2020 1 commit
    • Leon Arnott's avatar
      Added (link-storylet:). Also, link changers now accept an optional changer as... · 86ae1865d162
      Leon Arnott authored
      Added (link-storylet:). Also, link changers now accept an optional changer as their second argument, which is used to style the link and not the hook.
      
      After normalising the behaviour of the (link:) family of changers and other changers combined with them, I'd been stressing out about how to make (link:) links alterable with changers. This solution, the most direct one available, is a little uncomfortable to me because of how much further it differs from the command links' behaviour (as in, (link-goto:)). However, since those already have significant syntactic differences due to being commands rather than changers, I wonder if this divergence of usage might also assist in understanding how unalike they are.
      
      I don't feel very optimistic about (link-storylet:)'s behaviour when no storylet matches the given condition - just printing nothing - and might rework its arguments to make it easier to control what exactly it prints in any situation.
      86ae1865d162
  18. 08 Nov, 2020 1 commit
    • Leon Arnott's avatar
      Added column headers to the Debug Mode table panels, and added "Urgency" and... · 1f92a3d6dd16
      Leon Arnott authored
      Added column headers to the Debug Mode table panels, and added "Urgency" and "Exclusivity" columns to the Storylet panel.
      
      Also:
       * Altered the pseudo-element CSS for (click:), (mouseover:) and (mouseout:) to work correctly with the (box:) macro.
       * Markup that's inside the verbatim markup will no longer be syntax-highlighted as if it was outside it.
       * Fixed a few documentation mistakes.
      1f92a3d6dd16
  19. 04 Nov, 2020 1 commit
    • Leon Arnott's avatar
      Added (urgency:) and (exclusivity:) metadata macros, which affect the... · d5c3f19208db
      Leon Arnott authored
      Added (urgency:) and (exclusivity:) metadata macros, which affect the (open-storylets:) array's contents when they are used in an open storylet.
      
      I plan to add a command macro or two to provide slightly easier consumption of the storylet array than just (open-storylets:), and an increase in accessibility will mean convenience macros like these will be helpful.
      d5c3f19208db
  20. 02 Nov, 2020 1 commit
    • Leon Arnott's avatar
      Added to the Var panel of The Harlowe toolbar some input interfaces for (random:) and (either:). · 69ad962f38bb
      Leon Arnott authored
      I wanted to include a few very simple expressions alongside the typical data types, and these leveraged existing code nicely.
      
      Also:
       * Added a (checkbox:) input interface to the Input panel of The Harlowe Toolbar, which requires that a variable be bound to it.
       * Fixed some bugs elsewhere in the Toolbar.
       * Changed the styling for (text-style:"emboss") slightly, to more properly differentiate it from "shadow".
      69ad962f38bb
  21. 30 Oct, 2020 1 commit
    • Leon Arnott's avatar
      Added two interface macros, (icon-counter:) and (checkbox:), as well as a changer, (opacity:). · 0defb9d609c6
      Leon Arnott authored
      (icon-counter:) is designed as a built-in solution to putting UI displays in the sidebar, which authors have tended to do over the years. Being a mere display element instead of a clickable icon, it doesn't have the same default opacity as the other icons. (opacity:) had to be added in order to make the default opacity of sidebar icons alterable, if one wanted to bring them all into line with each other.
      
      (checkbox:) has been a long-time obvious addition to bring in from SugarCube. It also makes me want to add (checkbox-fullscreen:), as a counterpart to the link form of fullscreen activation.
      
      Also fixed a 2bind-related bug with (input-box:).
      0defb9d609c6
  22. 27 Oct, 2020 1 commit
    • Leon Arnott's avatar
      Added (str-nth:). Also, the icons produced by the icon command macros can now... · b2aa5e6ccc3b
      Leon Arnott authored
      Added (str-nth:). Also, the icons produced by the icon command macros can now have optional text labels added.
      
      These optional text labels are a string argument alongside the optional Unicode glyph string. They are differentiated solely by length, which results in a somewhat unusual type signature for these macros, but one which isn't too bothersome.
      
      The naming of (str-nth:) compared to (nth:) is also something that's a little unfortunate, but I don't think (str-nth:) is quite as useful on the whole as (nth:) is, so I assume it'll be fine given there's not as much chance of confusing the latter for the former.
      b2aa5e6ccc3b
  23. 26 Oct, 2020 1 commit
    • Leon Arnott's avatar
      Added two value macros, (plural:) and (trunc:). · 45cc28361d53
      Leon Arnott authored
      Adding some extra string and number utilities has been on my mind for awhile, but I've been less inclined to them until now due to the dry nature of implementing them. More will come soon, I believe.
      45cc28361d53
  24. 24 Oct, 2020 1 commit
  25. 19 Oct, 2020 1 commit
  26. 17 Oct, 2020 1 commit
  27. 16 Oct, 2020 1 commit
  28. 15 Oct, 2020 1 commit
    • Leon Arnott's avatar
      Added (icon-undo:), (icon-redo:), (icon-fullscreen:) and (icon-reload:), and... · 7aac8094cf1d
      Leon Arnott authored
      Added (icon-undo:), (icon-redo:), (icon-fullscreen:) and (icon-reload:), and removed the fullscreen icon from the sidebar.
      
      I decided, as expected, that the fullscreen icon tends to stick out quite a bit when it was constantly visible by default. The addition of these macros permits the author to selectively add the fullscreen icon if they wish, using existing macros.
      
      Also fixed a bug where (link:) attached to commands would cause a crash, introduced not long ago.
      7aac8094cf1d
  29. 11 Oct, 2020 1 commit
    • Leon Arnott's avatar
      Added (link-style:), (line-style:) and (char-style:) as shorthands for using... · 51820c1210f5
      Leon Arnott authored
      Added (link-style:), (line-style:) and (char-style:) as shorthands for using (enchant-in:) with ?Link, ?page's lines, and ?page's chars.
      
      I'd lately begun to feel that it was pretty silly that such useful functionality for line and char styling was locked behind such awkwardly esoteric devices as these hook data names. More relevantly, the arrival of (enchant-in:) resulted in some messy idioms resulting from it (You can't say "this hook's lines", for instance, and instead must specify the equivalent of "the page's lines which are in this hook") and those dearly needed some alternative.
      
      Also:
       * Fixed a bug where a "lines" enchantment would often cause text nodes within lines, such as the text of a (link:) link, to be transplanted out of any elements containing them.
       * Fixed a bug in the syntax highlighter (introduced a few commits ago) where whitespace at the start of a line would be incorrectly highlighted as an error even if it was inside a macro call.
      51820c1210f5
  30. 28 Sep, 2020 1 commit
    • Leon Arnott's avatar
      Added (link-fullscreen:), a macro to create a fullscreen mode toggle link, and... · 33deb183008b
      Leon Arnott authored
      Added (link-fullscreen:), a macro to create a fullscreen mode toggle link, and a fullscreen sidebar button.
      
      I've done some thinking about fullscreen functionality lately, and I've decided that there isn't THAT much reason to give the author a good degree of control over the fullscreen state. Not only is it true that most browsers nowadays only allow fullscreen mode to be entered in rather specific circumstances, but, from a UX perspective, fullscreen mode should just be a user display option, and not a necessary narrative device that must be enabled to experience the story, and which can be enabled and disabled arbitrarily - which is how it is in most all desktop games. So, I've given up plans to add fullscreen utilities more precise that these.
      
      I don't feel very comfortable about the fullscreen button, and am likely to change it or make it optional/conditionally appendable (by the addition of explicit "icon" command macros that replicate sidebar buttons).
      
      Also made the syntax highlighter tooltips only appear after 90 milliseconds, so as to keep from cluttering the view as you type.
      
      Closes #35.
      33deb183008b
  31. 26 Sep, 2020 2 commits
  32. 23 Sep, 2020 1 commit
    • Leon Arnott's avatar
      Added (split:) and (joined:), two basic string macros. · 265909dfd9cc
      Leon Arnott authored
      The reason I'd been reticent to add (split:) for so long is that I needed to see exactly what string patterns would resemble before committing to this macro's type signature. Probably overprudent in retrospect, given how straightforward it ultimately is, but nevertheless, that is how it went. That being said, I also wonder if I should a "via" lambda to (joined:)'s signature as an alternative first parameter.
      
      Also:
      
       * Fixed a bug where (click:) and its ilk would cause a crash when given to (enchant:), similar to (link:) formerly.
       * Corrected some large factual errors in (folded:)'s documentation, as well as added some clarification.
      
      Closes #15.
      265909dfd9cc
  33. 21 Sep, 2020 1 commit
    • Leon Arnott's avatar
      Reimplemented the link changers, so that only the hook is affected by changers combined with it. · a1021bbbd5f7
      Leon Arnott authored
      For a long time, the interaction between (link:) and other changers combined with it has been terribly inconsistent, with some changers applying to just the link, others to just the revealed hook, and most of them applying to both. I've decided after much heart-rending that I need to change this to a single hard-and-fast rule: changers combined with (link:) will only apply to the revealed hook, NOT the link. This is to allow (t8n:), (box:), (live:) and other hook-specific changers to interact with (link:) as expected, and also to make (link:) links more consistent with (click:) links.
      
      Sadly, of course, this means that (hover-style:), whose example usage involved combining it with (link:), has now had to have its intended uses rewritten. Also, the current means of applying changers to just the link is now limited to just (enchant:) and (enchant-in:), both of which are somewhat cumbersome. Possibly an (enchant-link:) or (enchant-link-in:) macro may need to be added to make this easier.
      
      Also fixed a bug where (for:) couldn't be attached to commands.
      a1021bbbd5f7
  34. 13 Sep, 2020 2 commits
    • Leon Arnott's avatar
      Transferred all of the de-structuring functionality of (set:) and (put:) into... · bfb797b13c2d
      Leon Arnott authored
      Transferred all of the de-structuring functionality of (set:) and (put:) into a new (unpack:) macro, and renamed de-structuring to "unpacking", on the basis that it's simply too complicated a concept to have to saddle onto the basic (set:) macro and its documentation.
      
      I feel pretty satisfied with this - not just in the transferral of functionality, but also in the "unpack" name, which was what I'd been shopping for to make this concept more digestible to Harlowe end-users.
      
      Also fixed a couple of tests, and bugs in the previous commits.
      bfb797b13c2d
    • Leon Arnott's avatar
      Added (enchant-in:), a changer variation of (enchant:) which limits the... · 003478bb9e33
      Leon Arnott authored
      Added (enchant-in:), a changer variation of (enchant:) which limits the enchantment to just the attached hook.
      
      I don't like this as the only source of restricted-effect enchantments/changes/revisions, mainly because it seems to illuminate that the hook selection syntax (?hook + ?hook, ?hook's 1st, etc.) needs to be extended to have the same flexibility as CSS selectors, at least. However, that will have to be left unconsidered for now, due to the weight of more pressing issues.
      
      I also am tempted to rename this to (enchant-here:), simply because the "in" doesn't have very smooth readability along with the arguments. But, "here" might not really suggest that it's a changer instead of a command, and the incompleteness of "in" does help with that...
      
      Also:
       * Fixed (source:)'s interaction with (text-colour:).
       * Added the "fade" (transition:), as an alias for "dissolve".
       * Added "New" badges to macros new to 3.2.0 in the documentation.
       * Worked on a few more tooltips for the syntax highlighter.
      003478bb9e33
  35. 05 Sep, 2020 1 commit
    • Leon Arnott's avatar
      Preliminary work for the new "tooltip" feature for the syntax highlighter. · 0272c2ef2cd9
      Leon Arnott authored
      A lot of work still needs to be done, mainly involving extracting the necessary definition text summaries from harloweDocs at compile time, as well as adding a lot of logic to decide which description certain tokens, like macros, should have in the tooltip.
      
      Also:
      
       * Renamed the 'newline' data name to 'linebreak', for consistency with how the rest of Harlowe's documentation describes newlines.
       * Added 'fade-up', 'fade-down', 'fade-left' and 'fade-right' transitions, which combine dissolves and slight shifts. You may notice an inconsistency between the word 'fade' and the 'dissolve' transition. I'm still musing on that one.
      0272c2ef2cd9
  36. 29 Aug, 2020 1 commit
    • Leon Arnott's avatar
      Added unclosed collapsing whitespace markup. · 28c2b78018dd
      Leon Arnott authored
      This was added for consistency with hook markup, which offers a similar syntactic feature. I've also added a collapsing whitespace panel to The Harlowe Toolbar that uses this for code generation (though I wonder if it could be expanded a little to support (collapse:).)
      28c2b78018dd
  37. 28 Aug, 2020 1 commit
    • Leon Arnott's avatar
      Added (click-undo:) and its ilk, to complement (click-goto:). · 64b7fe42f643
      Leon Arnott authored
      This was actually added so that The Harlowe Toolbar would have a slightly easier time generating correct code for "click the page to undo the turn".
      
      Also monkeyed with the syntax highlighter so that colour literals have a stripe of their colour beneath them (represented with a gradient background).
      
      Also fixed another bug in the previous commit's fix (for harlowedocs).
      64b7fe42f643
  38. 27 Aug, 2020 1 commit