@textadventures/squiffy-packager 7.0.0-beta.4 → 7.0.0-beta.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { CompileSuccess } from 'squiffy-compiler';
1
+ import { CompileSuccess, PageStrings } from 'squiffy-compiler';
2
2
  export interface Package {
3
3
  files: Record<string, string>;
4
4
  zip?: Uint8Array;
@@ -11,8 +11,26 @@ export interface PackageOptions {
11
11
  * e.g. "cat.png" or "images/cat.png". They're added to the zip at those paths. With inlineHtml,
12
12
  * they're embedded in index.html as data: URIs, which the runtime uses via its resolveAssetUrl option.
13
13
  * They're not added to Package.files, as those are text files, and the caller already has the assets.
14
+ * With inlineHtml, the story's own stylesheets and scripts (@import of .css and .js files) are looked
15
+ * for here too, and included in index.html as <style> and <script> elements.
14
16
  */
15
17
  assets?: Record<string, Uint8Array>;
18
+ /**
19
+ * Whether the page has a Back button, which takes the player back a section or passage at a time.
20
+ * On unless this is false: the story's squiffy.json can turn it off with "backButton": false.
21
+ */
22
+ backButton?: boolean;
23
+ /**
24
+ * Whether the page has a Save button, which opens the Saved games dialog, where the player can
25
+ * keep saved games and save them to files. On unless this is false: the story's squiffy.json
26
+ * can turn it off with "saveButton": false.
27
+ */
28
+ saveButton?: boolean;
29
+ /**
30
+ * The page's own text, such as the Restart button's tooltip, from the story's squiffy.json's
31
+ * "strings". Anything left out is in English.
32
+ */
33
+ strings?: PageStrings;
16
34
  }
17
35
  export declare const getMimeType: (path: string) => string;
18
36
  export declare const normaliseAssetPath: (path: string) => string;