Skip to content

Commit

Permalink
RELEASE: v2.33.1
Browse files Browse the repository at this point in the history
* `<<type>>` macro updates:
	* Added the `Config.macros.typeSkipKey` setting.
	* Added a `skipkey` option.
	* Changed the skip key event to `keydown`.
  • Loading branch information
tmedwards authored Jul 31, 2020
2 parents 3603aa0 + bd1a4a5 commit ba1a16e
Show file tree
Hide file tree
Showing 35 changed files with 604 additions and 479 deletions.
19 changes: 15 additions & 4 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,16 @@
"eqeqeq" : ["error", "always", { "null" : "ignore" }],
"func-call-spacing" : ["error", "never"],
"func-name-matching" : ["error", "always"],
"id-length" : ["error", { "exceptions": ["O", "T", "_", "a", "b", "i", "j", "m", "w", "x", "y"] }],
"generator-star-spacing" : ["error", "after"],
"id-length" : ["error", { "exceptions": ["O", "P", "T", "_", "a", "b", "i", "j", "m", "w", "x", "y"] }],
"indent" : ["error", "tab", { "ArrayExpression" : "first", "CallExpression" : { "arguments" : "first" }, "FunctionDeclaration" : { "body" : 1, "parameters" : "first" }, "FunctionExpression" : { "body" : 1, "parameters" : "first" }, "ObjectExpression" : "first", "SwitchCase" : 0, "VariableDeclarator" : 1 }],
"key-spacing" : ["error", { "align" : "colon", "beforeColon" : true, "afterColon" : true }],
"keyword-spacing" : "error",
"linebreak-style" : ["error", "unix"],
"lines-around-directive" : ["error", { "before" : "never", "after" : "always" }],
"max-depth" : ["error", { "max" : 6 }],
"max-len" : ["warn", { "code" : 120, "tabWidth" : 4, "comments" : 120, "ignoreTrailingComments" : true, "ignoreUrls" : true, "ignoreStrings" : true, "ignoreTemplateLiterals" : true, "ignoreRegExpLiterals" : true }],
"max-nested-callbacks" : ["error", { "max" : 4 }],
"max-nested-callbacks" : ["error", { "max" : 5 }],
"max-params" : ["error", { "max" : 5 }],
"multiline-ternary" : "off",
"new-cap" : "error",
Expand Down Expand Up @@ -72,23 +73,32 @@
"no-floating-decimal" : "error",
"no-global-assign" : "error",
"no-implicit-coercion" : ["error", { "boolean" : false }],
"no-import-assign" : "error",
"no-iterator" : "error",
"no-labels" : ["error", { "allowLoop" : true, "allowSwitch" : true }],
"no-label-var" : "error",
"no-loop-func" : "error",
"no-mixed-spaces-and-tabs" : ["off", "smart-tabs"],
"no-multi-assign" : "off",
"no-multi-spaces" : "off",
"no-multiple-empty-lines" : ["error", { "max" : 2 }],
"no-nested-ternary" : "error",
"no-new" : "off",
"no-new-func" : "error",
"no-new-object" : "error",
"no-new-require" : "error",
"no-new-symbol" : "error",
"no-new-wrappers" : "error",
"no-param-reassign" : ["error", { "props" : true }],
"no-plusplus" : "off",
"no-regex-spaces" : "error",
"no-restricted-globals" : ["error", "isFinite", "isNaN"],
"no-restricted-syntax" : ["error", "WithStatement"],
"no-return-await" : "error",
"no-self-assign" : ["error", { "props": true }],
"no-sequences" : "error",
"no-template-curly-in-string" : "error",
"no-throw-literal" : "error",
"no-trailing-spaces" : ["error", { "skipBlankLines" : true }],
"no-undef" : "error",
"no-undef-init" : "error",
Expand All @@ -114,7 +124,7 @@
"padded-blocks" : ["error", "never"],
"prefer-arrow-callback" : "error",
"prefer-const" : "error",
"prefer-destructuring" : ["off", { "array" : true, "object" : true }],
"prefer-destructuring" : ["off", { "array" : false, "object" : true }, { "enforceForRenamedProperties" : true }],
"prefer-numeric-literals" : "error",
"prefer-promise-reject-errors" : "error",
"prefer-rest-params" : "off",
Expand All @@ -126,7 +136,7 @@
"require-await" : "error",
"semi" : ["error", "always"],
"sort-keys" : ["off", "asc", { "caseSensitive" : true, "natural" : true }],
"sort-imports" : ["warn", { "ignoreCase" : false, "ignoreMemberSort" : false, "memberSyntaxSortOrder" : ["none", "all", "multiple", "single"] }],
"sort-imports" : "error",
"sort-vars" : ["off", { "ignoreCase" : false }],
"space-before-blocks" : ["error", "always"],
"space-before-function-paren" : ["error", { "anonymous" : "always", "asyncArrow" : "always", "named" : "never" }],
Expand All @@ -135,6 +145,7 @@
"space-unary-ops" : ["error", { "words" : true, "nonwords" : false }],
"spaced-comment" : ["error", "always", { "block" : { "exceptions" : ["*"], "markers": ["!"], "balanced" : true }, "line" : { "exceptions" : ["-"], "markers" : ["/"] } }],
"strict" : ["warn", "safe"],
"switch-colon-spacing" : "error",
"symbol-description" : "error",
"template-curly-spacing" : ["error", "never"],
"template-tag-spacing" : ["error", "never"],
Expand Down
2 changes: 1 addition & 1 deletion dist/format.js

Large diffs are not rendered by default.

73 changes: 45 additions & 28 deletions docs/api/api-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Determines whether the audio subsystem automatically pauses tracks that have bee

#### Since:

* `v2.28.0`
* `v2.28.0`: Introduced.

#### Examples:

Expand All @@ -43,7 +43,7 @@ It is unlikely that you will ever want to disable this setting.

#### Since:

* `v2.28.0`
* `v2.28.0`: Introduced.

#### Examples:

Expand All @@ -65,7 +65,7 @@ Determines whether the story's history controls (Backward, Jump To, & Forward bu

#### Since:

* `v2.0.0`
* `v2.0.0`: Introduced.

#### Examples:

Expand All @@ -81,7 +81,7 @@ Sets the maximum number of states (moments) to which the history is allowed to g

#### Since:

* `v2.0.0`
* `v2.0.0`: Introduced.

#### Examples:

Expand Down Expand Up @@ -114,7 +114,7 @@ This setting exists because it's unlikely that you'll ever want to actually perf

#### Since:

* `v2.0.0`
* `v2.0.0`: Introduced.

#### Examples:

Expand All @@ -135,7 +135,7 @@ This setting exists to prevent a misconfigured loop from making the browser unre

#### Since:

* `v2.0.0`
* `v2.0.0`: Introduced.

#### Examples:

Expand All @@ -146,13 +146,30 @@ Config.macros.maxLoopIterations = 5000;

<!-- *********************************************************************** -->

### `Config.macros.typeSkipKey`*string* (default: `" "`, space) {#config-api-property-macros-typeskipkey}

Sets the default [`KeyboardEvent.key`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) value that causes the currently running [`<<type>>` macro](#macros-macro-type) instance to finish typing its content immediately.

#### Since:

* `v2.33.1`: Introduced.

#### Examples:

```
// Change the default skip key to Control (CTRL)
Config.macros.typeSkipKey = "Control";
```

<!-- *********************************************************************** -->

### `Config.macros.typeVisitedPassages`*boolean* (default: `true`) {#config-api-property-macros-typevisitedpassages}

Determines whether the [`<<type>>` macro](#macros-macro-type) types out content on previously visited passages or simply outputs it immediately.

#### Since:

* `v2.32.0`
* `v2.32.0`: Introduced.

#### Examples:

Expand All @@ -175,7 +192,7 @@ Allows the destination of passage navigation to be overridden. The callback is

#### Since:

* `v2.13.0`
* `v2.13.0`: Introduced.

#### Examples:

Expand Down Expand Up @@ -221,7 +238,7 @@ Determines whether alternate passage descriptions are used by the *Saves* and *J

#### Since:

* `v2.0.0`
* `v2.0.0`: Introduced.

#### Examples:

Expand Down Expand Up @@ -250,7 +267,7 @@ Determines whether passage titles are combined with the story title, within the

#### Since:

* `v2.0.0`
* `v2.0.0`: Introduced.

#### Examples:

Expand All @@ -270,7 +287,7 @@ Does not affect <code>script</code> or <code>stylesheet</code> tagged passages,

#### Since:

* `v2.19.0`
* `v2.19.0`: Introduced.

#### Examples:

Expand All @@ -294,7 +311,7 @@ The function will be called just before the built-in no-break passage processing

#### Since:

* `v2.30.0`
* `v2.30.0`: Introduced.

#### Examples:

Expand All @@ -313,7 +330,7 @@ Sets the starting passage, the very first passage that will be displayed.

#### Since:

* `v2.0.0`
* `v2.0.0`: Introduced.

#### Examples:

Expand All @@ -333,7 +350,7 @@ If using an integer delay, ideally, it should probably be slightly longer than t

#### Since:

* `v2.0.0`
* `v2.0.0`: Introduced.

#### Examples:

Expand Down Expand Up @@ -390,7 +407,7 @@ If the autosave cannot be loaded, for any reason, then the start passage is load

#### Since:

* `v2.0.0`
* `v2.0.0`: Introduced.

#### Examples:

Expand Down Expand Up @@ -419,7 +436,7 @@ When setting the value to boolean <code>true</code>, you will likely also need t

#### Since:

* `v2.0.0`: Basic syntax.
* `v2.0.0`: Introduced.
* `v2.30.0`: Added function values and deprecated string values.

#### Examples:
Expand All @@ -445,7 +462,7 @@ Sets the story ID associated with saves.

#### Since:

* `v2.0.0`
* `v2.0.0`: Introduced.

#### Examples:

Expand All @@ -461,7 +478,7 @@ Determines whether saving is allowed within the current context. The callback i

#### Since:

* `v2.0.0`
* `v2.0.0`: Introduced.

#### Examples:

Expand All @@ -479,7 +496,7 @@ Performs any required pre-processing before the save data is loaded—e.g., upgr

#### Since:

* `v2.0.0`
* `v2.0.0`: Introduced.

#### Callback parameters:

Expand Down Expand Up @@ -507,7 +524,7 @@ Performs any required post-processing before the save data is saved. The callba

#### Since:

* `v2.0.0`: Basic syntax.
* `v2.0.0`: Introduced.
* `v2.33.0`: Added save operation details object parameter to the callback function.

#### Callback parameters:
Expand Down Expand Up @@ -566,7 +583,7 @@ Sets the maximum number of available save slots.

#### Since:

* `v2.0.0`
* `v2.0.0`: Introduced.

#### Examples:

Expand All @@ -586,7 +603,7 @@ This setting is only used to set the <code>version</code> property of saves. Th

#### Since:

* `v2.0.0`
* `v2.0.0`: Introduced.

#### Examples:

Expand All @@ -612,7 +629,7 @@ Determines whether the UI bar (sidebar) starts in the stowed (shut) state initia

#### Since:

* `v2.11.0`
* `v2.11.0`: Introduced.

#### Examples:

Expand All @@ -639,7 +656,7 @@ The story title is not included in updates because SugarCube uses it as the basi

#### Since:

* `v2.0.0`
* `v2.0.0`: Introduced.

#### Examples:

Expand All @@ -666,7 +683,7 @@ You <em>must</em> provide your own styling for the <code>link-visited</code> cla

#### Since:

* `v2.0.0`
* `v2.0.0`: Introduced.

#### Examples:

Expand All @@ -692,7 +709,7 @@ Determines whether the output of the Wikifier is post-processed into more sane m

#### Since:

* `v2.0.0`
* `v2.0.0`: Introduced.

#### Examples:

Expand All @@ -712,7 +729,7 @@ This property is automatically set based on whether you're using a testing mode

#### Since:

* `v2.2.0`
* `v2.2.0`: Introduced.

#### Examples:

Expand All @@ -739,7 +756,7 @@ Sets the integer delay (in milliseconds) before the loading screen is dismissed,

#### Since:

* `v2.0.0`
* `v2.0.0`: Introduced.

#### Examples:

Expand Down
Loading

0 comments on commit ba1a16e

Please sign in to comment.