extwee 2.3.13 → 2.3.15

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.
@@ -8,22 +8,22 @@
8
8
  * @property {string} format - Story format of Story.
9
9
  * @property {string} formatVersion - Story format version of Story.
10
10
  * @property {number} zoom - Zoom level.
11
- * @property {Array} passages - Array of Passage objects. @see {@link Passage}
11
+ * @property {Array} passages - Array of Passage objects. See {@link Passage}.
12
12
  * @property {string} creator - Program used to create Story.
13
13
  * @property {string} creatorVersion - Version used to create Story.
14
14
  * @property {object} metadata - Metadata of Story.
15
15
  * @property {object} tagColors - Tag Colors
16
16
  * @property {string} storyJavaScript - Story JavaScript
17
17
  * @property {string} storyStylesheet - Story Stylesheet
18
- * @method {number} addPassage - Add a passage to the story and returns the new length of the passages array.
19
- * @method {number} removePassageByName - Remove a passage from the story by name and returns the new length of the passages array.
20
- * @method {Array} getPassagesByTag - Find passages by tag.
21
- * @method {Array} getPassageByName - Find passage by name.
22
- * @method {number} size - Size (number of passages).
23
- * @method {string} toJSON - Export Story as JSON representation.
24
- * @method {string} toTwee - Return Twee representation.
25
- * @method {string} toTwine2HTML - Return Twine 2 HTML representation.
26
- * @method {string} toTwine1HTML - Return Twine 1 HTML representation.
18
+ * @function addPassage - Add a passage to the story and returns the new length of the passages array.
19
+ * @function removePassageByName - Remove a passage from the story by name and returns the new length of the passages array.
20
+ * @function getPassagesByTag - Find passages by tag.
21
+ * @function getPassageByName - Find passage by name.
22
+ * @function size - Size (number of passages).
23
+ * @function toJSON - Export Story as JSON representation.
24
+ * @function toTwee - Return Twee representation.
25
+ * @function toTwine2HTML - Return Twine 2 HTML representation.
26
+ * @function toTwine1HTML - Return Twine 1 HTML representation.
27
27
  * @example
28
28
  * const story = new Story('My Story');
29
29
  * story.IFID = '12345678-1234-5678-1234-567812345678';
@@ -41,6 +41,7 @@ export class Story {
41
41
  */
42
42
  constructor(name?: string);
43
43
  /**
44
+ * Set story name.
44
45
  * @param {string} a - Replacement story name
45
46
  */
46
47
  set name(a: string);
@@ -50,6 +51,7 @@ export class Story {
50
51
  */
51
52
  get name(): string;
52
53
  /**
54
+ * Set tag colors.
53
55
  * @param {object} a - Replacement tag colors
54
56
  */
55
57
  set tagColors(a: object);
@@ -59,6 +61,7 @@ export class Story {
59
61
  */
60
62
  get tagColors(): object;
61
63
  /**
64
+ * Set story IFID.
62
65
  * @param {string} i - Replacement IFID.
63
66
  */
64
67
  set IFID(i: string);
@@ -68,6 +71,7 @@ export class Story {
68
71
  */
69
72
  get IFID(): string;
70
73
  /**
74
+ * Set start passage name.
71
75
  * @param {string} s - Replacement start
72
76
  */
73
77
  set start(s: string);
@@ -77,6 +81,7 @@ export class Story {
77
81
  */
78
82
  get start(): string;
79
83
  /**
84
+ * Set story format version.
80
85
  * @param {string} f - Replacement format version
81
86
  */
82
87
  set formatVersion(f: string);
@@ -86,6 +91,7 @@ export class Story {
86
91
  */
87
92
  get formatVersion(): string;
88
93
  /**
94
+ * Set story metadata.
89
95
  * @param {object} o - Replacement metadata
90
96
  */
91
97
  set metadata(o: object);
@@ -95,6 +101,7 @@ export class Story {
95
101
  */
96
102
  get metadata(): object;
97
103
  /**
104
+ * Set story format.
98
105
  * @param {string} f - Replacement format
99
106
  */
100
107
  set format(f: string);
@@ -104,6 +111,7 @@ export class Story {
104
111
  */
105
112
  get format(): string;
106
113
  /**
114
+ * Set creator program.
107
115
  * @param {string} c - Creator Program of Story
108
116
  */
109
117
  set creator(c: string);
@@ -113,6 +121,7 @@ export class Story {
113
121
  */
114
122
  get creator(): string;
115
123
  /**
124
+ * Set creator version.
116
125
  * @param {string} c - Version of creator program
117
126
  */
118
127
  set creatorVersion(c: string);
@@ -122,6 +131,7 @@ export class Story {
122
131
  */
123
132
  get creatorVersion(): string;
124
133
  /**
134
+ * Set zoom level.
125
135
  * @param {number} n - Replacement zoom level
126
136
  */
127
137
  set zoom(n: number);
@@ -142,9 +152,10 @@ export class Story {
142
152
  * Passages in Story.
143
153
  * @returns {Array} Passages
144
154
  * @property {Array} passages - Passages
145
- */
155
+ */
146
156
  get passages(): any[];
147
157
  /**
158
+ * Set story stylesheet.
148
159
  * @param {string} s - Replacement story stylesheet
149
160
  */
150
161
  set storyStylesheet(s: string);
@@ -166,41 +177,41 @@ export class Story {
166
177
  /**
167
178
  * Add a passage to the story.
168
179
  * Passing `StoryData` will override story metadata and `StoryTitle` will override story name.
169
- * @method addPassage
180
+ * @function addPassage
170
181
  * @param {Passage} p - Passage to add to Story.
171
182
  * @returns {number} Return new length of passages array.
172
183
  */
173
184
  addPassage(p: Passage): number;
174
185
  /**
175
186
  * Remove a passage from the story by name.
176
- * @method removePassageByName
187
+ * @function removePassageByName
177
188
  * @param {string} name - Passage name to remove.
178
189
  * @returns {number} Return new length of passages array.
179
190
  */
180
191
  removePassageByName(name: string): number;
181
192
  /**
182
193
  * Find passages by tag.
183
- * @method getPassagesByTag
194
+ * @function getPassagesByTag
184
195
  * @param {string} t - Passage name to search for
185
196
  * @returns {Array} Return array of passages
186
197
  */
187
198
  getPassagesByTag(t: string): any[];
188
199
  /**
189
200
  * Find passage by name.
190
- * @method getPassageByName
201
+ * @function getPassageByName
191
202
  * @param {string} name - Passage name to search for
192
203
  * @returns {Passage | null} Return passage or null
193
204
  */
194
205
  getPassageByName(name: string): Passage | null;
195
206
  /**
196
207
  * Size (number of passages).
197
- * @method size
208
+ * @function size
198
209
  * @returns {number} Return number of passages
199
210
  */
200
211
  size(): number;
201
212
  /**
202
213
  * Export Story as JSON representation.
203
- * @method toJSON
214
+ * @function toJSON
204
215
  * @returns {string} JSON string.
205
216
  */
206
217
  toJSON(): string;
@@ -209,8 +220,7 @@ export class Story {
209
220
  *
210
221
  * See: Twee 3 Specification
211
222
  * (https://github.com/iftechfoundation/twine-specs/blob/master/twee-3-specification.md)
212
- *
213
- * @method toTwee
223
+ * @function toTwee
214
224
  * @returns {string} Twee String
215
225
  */
216
226
  toTwee(): string;
@@ -233,8 +243,7 @@ export class Story {
233
243
  * Because story stylesheet data can be represented as a passage, property value, or both, all approaches are encoded.
234
244
  *
235
245
  * Because story JavaScript can be represented as a passage, property value, or both, all approaches are encoded.
236
- *
237
- * @method toTwine2HTML
246
+ * @function toTwine2HTML
238
247
  * @returns {string} Twine 2 HTML string
239
248
  */
240
249
  toTwine2HTML(): string;
@@ -243,13 +252,12 @@ export class Story {
243
252
  *
244
253
  * See: Twine 1 HTML Output
245
254
  * (https://github.com/iftechfoundation/twine-specs/blob/master/twine-1-htmloutput-doc.md)
246
- *
247
- * @method toTwine1HTML
255
+ * @function toTwine1HTML
248
256
  * @returns {string} Twine 1 HTML string.
249
257
  */
250
258
  toTwine1HTML(): string;
251
259
  #private;
252
260
  }
253
261
  export const creatorName: "extwee";
254
- export const creatorVersion: "2.3.13";
262
+ export const creatorVersion: "2.3.15";
255
263
  import Passage from './Passage.js';
@@ -3,9 +3,7 @@
3
3
  *
4
4
  * This class has type checking on all of its properties.
5
5
  * If a property is set to a value of the wrong type, a TypeError will be thrown.
6
- *
7
6
  * @see {@link https://github.com/iftechfoundation/twine-specs/blob/master/twine-2-storyformats-spec.md Twine 2 Story Formats Specification}
8
- *
9
7
  * @class
10
8
  * @classdesc A class representing a Twine 2 story format.
11
9
  * @property {string} name - The name of the story format.
@@ -32,6 +30,7 @@
32
30
  export default class StoryFormat {
33
31
  constructor(name?: string, version?: string, description?: string, author?: string, image?: string, url?: string, license?: string, proofing?: boolean, source?: string);
34
32
  /**
33
+ * Set name.
35
34
  * @param {string} n - Replacement name.
36
35
  */
37
36
  set name(n: string);
@@ -41,6 +40,7 @@ export default class StoryFormat {
41
40
  */
42
41
  get name(): string;
43
42
  /**
43
+ * Set version.
44
44
  * @param {string} n - Replacement version.
45
45
  */
46
46
  set version(n: string);
@@ -50,6 +50,7 @@ export default class StoryFormat {
50
50
  */
51
51
  get version(): string;
52
52
  /**
53
+ * Set description.
53
54
  * @param {string} d - Replacement description.
54
55
  */
55
56
  set description(d: string);
@@ -59,6 +60,7 @@ export default class StoryFormat {
59
60
  */
60
61
  get description(): string;
61
62
  /**
63
+ * Set author.
62
64
  * @param {string} a - Replacement author.
63
65
  */
64
66
  set author(a: string);
@@ -68,6 +70,7 @@ export default class StoryFormat {
68
70
  */
69
71
  get author(): string;
70
72
  /**
73
+ * Set image.
71
74
  * @param {string} i - Replacement image.
72
75
  */
73
76
  set image(i: string);
@@ -77,6 +80,7 @@ export default class StoryFormat {
77
80
  */
78
81
  get image(): string;
79
82
  /**
83
+ * Set URL.
80
84
  * @param {string} u - Replacement URL.
81
85
  */
82
86
  set url(u: string);
@@ -86,6 +90,7 @@ export default class StoryFormat {
86
90
  */
87
91
  get url(): string;
88
92
  /**
93
+ * Set license.
89
94
  * @param {string} l - Replacement license.
90
95
  */
91
96
  set license(l: string);
@@ -95,6 +100,7 @@ export default class StoryFormat {
95
100
  */
96
101
  get license(): string;
97
102
  /**
103
+ * Set proofing.
98
104
  * @param {boolean} p - Replacement proofing.
99
105
  */
100
106
  set proofing(p: boolean);
@@ -104,6 +110,7 @@ export default class StoryFormat {
104
110
  */
105
111
  get proofing(): boolean;
106
112
  /**
113
+ * Set source.
107
114
  * @param {string} s - Replacement source.
108
115
  */
109
116
  set source(s: string);
@@ -114,13 +121,13 @@ export default class StoryFormat {
114
121
  get source(): string;
115
122
  /**
116
123
  * Produces a string representation of the story format object.
117
- * @method toString
124
+ * @function toString
118
125
  * @returns {string} - A string representation of the story format.
119
126
  */
120
127
  toString(): string;
121
128
  /**
122
129
  * Produces a JSON representation of the story format object.
123
- * @method toJSON
130
+ * @function toJSON
124
131
  * @returns {object} - A JSON representation of the story format.
125
132
  */
126
133
  toJSON(): object;