@iebh/tera-fy 1.2.1 → 1.3.0

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.
package/api.md CHANGED
@@ -25,99 +25,102 @@
25
25
  * [getRefs][21]
26
26
  * [setRefs][22]
27
27
  * [Parameters][23]
28
- * [TeraFy][24]
29
- * [settings][25]
30
- * [Properties][26]
31
- * [events][27]
32
- * [dom][28]
28
+ * [serialize][24]
29
+ * [deserialize][25]
30
+ * [Parameters][26]
31
+ * [TeraFy][27]
32
+ * [settings][28]
33
33
  * [Properties][29]
34
- * [methods][30]
35
- * [plugins][31]
36
- * [send][32]
37
- * [Parameters][33]
38
- * [sendRaw][34]
39
- * [Parameters][35]
40
- * [rpc][36]
41
- * [Parameters][37]
42
- * [acceptMessage][38]
43
- * [Parameters][39]
44
- * [acceptPostboxes][40]
45
- * [createProjectStatePatch][41]
34
+ * [events][30]
35
+ * [dom][31]
36
+ * [Properties][32]
37
+ * [methods][33]
38
+ * [plugins][34]
39
+ * [send][35]
40
+ * [Parameters][36]
41
+ * [sendRaw][37]
42
+ * [Parameters][38]
43
+ * [rpc][39]
44
+ * [Parameters][40]
45
+ * [acceptMessage][41]
46
46
  * [Parameters][42]
47
- * [applyProjectStatePatchLocal][43]
48
- * [Parameters][44]
49
- * [init][45]
50
- * [Parameters][46]
51
- * [detectMode][47]
52
- * [injectComms][48]
53
- * [injectStylesheet][49]
54
- * [injectMethods][50]
55
- * [debug][51]
56
- * [Parameters][52]
57
- * [set][53]
58
- * [Parameters][54]
59
- * [setIfDev][55]
60
- * [Parameters][56]
61
- * [use][57]
62
- * [Parameters][58]
63
- * [mixin][59]
64
- * [Parameters][60]
65
- * [toggleDevMode][61]
66
- * [Parameters][62]
67
- * [toggleFocus][63]
68
- * [Parameters][64]
69
- * [selectProjectFile][65]
70
- * [Parameters][66]
71
- * [getProjectFiles][67]
72
- * [Parameters][68]
73
- * [getProjectFile][69]
74
- * [Parameters][70]
75
- * [handshake][71]
76
- * [Properties][72]
77
- * [User][73]
78
- * [Properties][74]
79
- * [getUser][75]
80
- * [requireUser][76]
81
- * [Parameters][77]
82
- * [Project][78]
83
- * [getProject][79]
84
- * [getProjects][80]
85
- * [setActiveProject][81]
86
- * [Parameters][82]
87
- * [requireProject][83]
88
- * [Parameters][84]
89
- * [selectProject][85]
90
- * [Parameters][86]
91
- * [getProjectState][87]
92
- * [Parameters][88]
93
- * [setProjectState][89]
94
- * [Parameters][90]
95
- * [setProjectStateDefaults][91]
96
- * [Parameters][92]
97
- * [saveProjectState][93]
98
- * [replaceProjectState][94]
47
+ * [acceptPostboxes][43]
48
+ * [createProjectStatePatch][44]
49
+ * [Parameters][45]
50
+ * [applyProjectStatePatchLocal][46]
51
+ * [Parameters][47]
52
+ * [init][48]
53
+ * [Parameters][49]
54
+ * [detectMode][50]
55
+ * [injectComms][51]
56
+ * [injectStylesheet][52]
57
+ * [injectMethods][53]
58
+ * [debug][54]
59
+ * [Parameters][55]
60
+ * [set][56]
61
+ * [Parameters][57]
62
+ * [setIfDev][58]
63
+ * [Parameters][59]
64
+ * [use][60]
65
+ * [Parameters][61]
66
+ * [mixin][62]
67
+ * [Parameters][63]
68
+ * [toggleDevMode][64]
69
+ * [Parameters][65]
70
+ * [toggleFocus][66]
71
+ * [Parameters][67]
72
+ * [selectProjectFile][68]
73
+ * [Parameters][69]
74
+ * [getProjectFiles][70]
75
+ * [Parameters][71]
76
+ * [getProjectFile][72]
77
+ * [Parameters][73]
78
+ * [handshake][74]
79
+ * [Properties][75]
80
+ * [User][76]
81
+ * [Properties][77]
82
+ * [getUser][78]
83
+ * [requireUser][79]
84
+ * [Parameters][80]
85
+ * [Project][81]
86
+ * [getProject][82]
87
+ * [getProjects][83]
88
+ * [setActiveProject][84]
89
+ * [Parameters][85]
90
+ * [requireProject][86]
91
+ * [Parameters][87]
92
+ * [selectProject][88]
93
+ * [Parameters][89]
94
+ * [getProjectState][90]
95
+ * [Parameters][91]
96
+ * [setProjectState][92]
97
+ * [Parameters][93]
98
+ * [setProjectStateDefaults][94]
99
99
  * [Parameters][95]
100
- * [applyProjectStatePatch][96]
101
- * [Parameters][97]
102
- * [subscribeProjectState][98]
103
- * [FileFilters][99]
104
- * [Properties][100]
105
- * [selectProjectFile][101]
106
- * [Parameters][102]
107
- * [setProjectFile][103]
108
- * [Parameters][104]
109
- * [selectProjectLibrary][105]
110
- * [Parameters][106]
111
- * [getProjectLibrary][107]
112
- * [Parameters][108]
113
- * [setProjectLibrary][109]
114
- * [Parameters][110]
115
- * [uiAlert][111]
116
- * [Parameters][112]
117
- * [uiSplat][113]
118
- * [Parameters][114]
119
- * [uiWindow][115]
120
- * [Parameters][116]
100
+ * [saveProjectState][96]
101
+ * [replaceProjectState][97]
102
+ * [Parameters][98]
103
+ * [applyProjectStatePatch][99]
104
+ * [Parameters][100]
105
+ * [subscribeProjectState][101]
106
+ * [FileFilters][102]
107
+ * [Properties][103]
108
+ * [selectProjectFile][104]
109
+ * [Parameters][105]
110
+ * [setProjectFile][106]
111
+ * [Parameters][107]
112
+ * [selectProjectLibrary][108]
113
+ * [Parameters][109]
114
+ * [getProjectLibrary][110]
115
+ * [Parameters][111]
116
+ * [setProjectLibrary][112]
117
+ * [Parameters][113]
118
+ * [uiAlert][114]
119
+ * [Parameters][115]
120
+ * [uiSplat][116]
121
+ * [Parameters][117]
122
+ * [uiWindow][118]
123
+ * [Parameters][119]
121
124
 
122
125
  ## ProjectFile
123
126
 
@@ -135,87 +138,87 @@ Parent TeraClient instance used by all helper functions
135
138
 
136
139
  A UUID string representing the unique ID of the file
137
140
 
138
- Type: [String][117]
141
+ Type: [String][120]
139
142
 
140
143
  ### name
141
144
 
142
145
  Relative name path (can contain prefix directories) for the human readable file name
143
146
 
144
- Type: [String][117]
147
+ Type: [String][120]
145
148
 
146
149
  ### path
147
150
 
148
151
  Full path to the file
149
152
  This is also used as the unique identifier within the project
150
153
 
151
- Type: [String][117]
154
+ Type: [String][120]
152
155
 
153
156
  ### parsedName
154
157
 
155
158
  An object representing meta file parts of a file name
156
159
 
157
- Type: [Object][118]
160
+ Type: [Object][121]
158
161
 
159
162
  #### Properties
160
163
 
161
- * `basename` **[String][117]** The filename + extention (i.e. everything without directory name)
162
- * `filename` **[String][117]** The file portion of the name (basename without the extension)
163
- * `ext` **[String][117]** The extension portion of the name (always lower case)
164
- * `dirName` **[String][117]** The directory path portion of the name
164
+ * `basename` **[String][120]** The filename + extention (i.e. everything without directory name)
165
+ * `filename` **[String][120]** The file portion of the name (basename without the extension)
166
+ * `ext` **[String][120]** The extension portion of the name (always lower case)
167
+ * `dirName` **[String][120]** The directory path portion of the name
165
168
 
166
169
  ### created
167
170
 
168
171
  A date representing when the file was created
169
172
 
170
- Type: [Date][119]
173
+ Type: [Date][122]
171
174
 
172
175
  ### createdFormatted
173
176
 
174
177
  A human readable, formatted version of "created"
175
178
 
176
- Type: [String][117]
179
+ Type: [String][120]
177
180
 
178
181
  ### modified
179
182
 
180
183
  A date representing when the file was created
181
184
 
182
- Type: [Date][119]
185
+ Type: [Date][122]
183
186
 
184
187
  ### modifiedFormatted
185
188
 
186
189
  A human readable, formatted version of "modified"
187
190
 
188
- Type: [String][117]
191
+ Type: [String][120]
189
192
 
190
193
  ### accessed
191
194
 
192
195
  A date representing when the file was last accessed
193
196
 
194
- Type: [Date][119]
197
+ Type: [Date][122]
195
198
 
196
199
  ### accessedFormatted
197
200
 
198
201
  A human readable, formatted version of "accessed"
199
202
 
200
- Type: [String][117]
203
+ Type: [String][120]
201
204
 
202
205
  ### size
203
206
 
204
207
  Size, in bytes, of the file
205
208
 
206
- Type: [Number][120]
209
+ Type: [Number][123]
207
210
 
208
211
  ### sizeFormatted
209
212
 
210
213
  A human readable, formatted version of the file size
211
214
 
212
- Type: [String][117]
215
+ Type: [String][120]
213
216
 
214
217
  ### mime
215
218
 
216
219
  The associated mime type for the file
217
220
 
218
- Type: [String][117]
221
+ Type: [String][120]
219
222
 
220
223
  ### getContents
221
224
 
@@ -233,9 +236,9 @@ Overwrite the contents of a file with new content
233
236
 
234
237
  #### Parameters
235
238
 
236
- * `contents` **(File | [Blob][121] | [FormData][122] | [Object][118] | [Array][123])** The new file contents
239
+ * `contents` **(File | [Blob][124] | [FormData][125] | [Object][121] | [Array][126])** The new file contents
237
240
 
238
- Returns **[Promise][124]** A promise which resolves when the operation has completed
241
+ Returns **[Promise][127]** A promise which resolves when the operation has completed
239
242
 
240
243
  ### getRefs
241
244
 
@@ -243,7 +246,7 @@ Returns **[Promise][124]** A promise which resolves when the operation has compl
243
246
 
244
247
  Fetch the file contents as an array of Reflib refs
245
248
 
246
- Returns **[Promise][124]<[Array][123]\<Ref>>** An eventual array of RefLib references
249
+ Returns **[Promise][127]<[Array][126]\<Ref>>** An eventual array of RefLib references
247
250
 
248
251
  ### setRefs
249
252
 
@@ -254,9 +257,28 @@ Overwrite the contents of a file with a new collection of Reflib refs
254
257
  #### Parameters
255
258
 
256
259
  * `refs` &#x20;
257
- * `Collection` **[Array][123]\<RefLibRef>** of references for the selected library
260
+ * `Collection` **[Array][126]\<RefLibRef>** of references for the selected library
258
261
 
259
- Returns **[Promise][124]** A promise which resolves when the operation has completed
262
+ Returns **[Promise][127]** A promise which resolves when the operation has completed
263
+
264
+ ### serialize
265
+
266
+ * **See**: [https://developer.mozilla.org/en-US/docs/Web/API/Web\_Workers\_API/Structured\_clone\_algorithm][128]
267
+
268
+ Compress a file state down into a serializable entity
269
+ By default this computes a Structured Clone which can be stringified
270
+
271
+ Returns **[Object][121]** A Structured Clone compatible representation of this ProjectFile instance
272
+
273
+ ### deserialize
274
+
275
+ Restore an entity created with serialize
276
+
277
+ #### Parameters
278
+
279
+ * `data` **[Object][121]** An input object created via `ProjectFiles.serialize()`
280
+
281
+ Returns **[ProjectFile][1]** A ProjectFile instance setup against the deserializzed data
260
282
 
261
283
  ## TeraFy
262
284
 
@@ -266,18 +288,18 @@ Main Tera-Fy Client (class singleton) to be used in a frontend browser
266
288
 
267
289
  Various settings to configure behaviour
268
290
 
269
- Type: [Object][118]
291
+ Type: [Object][121]
270
292
 
271
293
  #### Properties
272
294
 
273
- * `devMode` **[Boolean][125]** Operate in devMode - i.e. force outer refresh when encountering an existing TeraFy instance
295
+ * `devMode` **[Boolean][129]** Operate in devMode - i.e. force outer refresh when encountering an existing TeraFy instance
274
296
  * `mode` **(`"detect"` | `"parent"` | `"child"` | `"popup"`)** How to communicate with TERA. 'parent' assumes that the parent of the current document is TERA, 'child' spawns an iFrame and uses TERA there, 'detect' tries parent and switches to `modeFallback` if communication fails
275
- * `modeFallback` **[String][117]** Method to use when all method detection fails
276
- * `modeTimeout` **[Number][120]** How long entities have in 'detect' mode to identify themselves
277
- * `siteUrl` **[String][117]** The TERA URL to connect to
278
- * `restrictOrigin` **[String][117]** URL to restrict communications to
279
- * `List` **[Array][123]<[String][117]>** of sandbox allowables for the embedded if in embed mode
280
- * `handshakeInterval` **[Number][120]** Interval in milliseconds when sanning for a handshake
297
+ * `modeFallback` **[String][120]** Method to use when all method detection fails
298
+ * `modeTimeout` **[Number][123]** How long entities have in 'detect' mode to identify themselves
299
+ * `siteUrl` **[String][120]** The TERA URL to connect to
300
+ * `restrictOrigin` **[String][120]** URL to restrict communications to
301
+ * `List` **[Array][126]<[String][120]>** of sandbox allowables for the embedded if in embed mode
302
+ * `handshakeInterval` **[Number][123]** Interval in milliseconds when sanning for a handshake
281
303
 
282
304
  ### events
283
305
 
@@ -289,13 +311,13 @@ Type: Mitt
289
311
 
290
312
  DOMElements for this TeraFy instance
291
313
 
292
- Type: [Object][118]
314
+ Type: [Object][121]
293
315
 
294
316
  #### Properties
295
317
 
296
318
  * `el` **DOMElement** The main tera-fy div wrapper
297
319
  * `iframe` **DOMElement** The internal iFrame element (if `settings.mode == 'child'`)
298
- * `popup` **[Window][126]** The popup window context (if `settings.mode == 'popup'`)
320
+ * `popup` **[Window][130]** The popup window context (if `settings.mode == 'popup'`)
299
321
  * `stylesheet` **DOMElement** The corresponding stylesheet
300
322
 
301
323
  ### methods
@@ -303,13 +325,13 @@ Type: [Object][118]
303
325
  List of function stubs mapped from the server to here
304
326
  This array is forms the reference of `TeraFy.METHOD()` objects to provide locally which will be mapped via `TeraFy.rpc(METHOD, ...args)`
305
327
 
306
- Type: [Array][123]<[String][117]>
328
+ Type: [Array][126]<[String][120]>
307
329
 
308
330
  ### plugins
309
331
 
310
332
  Loaded plugins via Use()
311
333
 
312
- Type: [Array][123]\<TeraFyPlugin>
334
+ Type: [Array][126]\<TeraFyPlugin>
313
335
 
314
336
  ### send
315
337
 
@@ -317,9 +339,9 @@ Send a message + wait for a response object
317
339
 
318
340
  #### Parameters
319
341
 
320
- * `message` **[Object][118]** Message object to send
342
+ * `message` **[Object][121]** Message object to send
321
343
 
322
- Returns **[Promise][124]\<any>** A promise which resolves when the operation has completed with the remote reply
344
+ Returns **[Promise][127]\<any>** A promise which resolves when the operation has completed with the remote reply
323
345
 
324
346
  ### sendRaw
325
347
 
@@ -328,7 +350,7 @@ This function does not return or wait for a reply - use `send()` for that
328
350
 
329
351
  #### Parameters
330
352
 
331
- * `message` **[Object][118]** Message object to send
353
+ * `message` **[Object][121]** Message object to send
332
354
 
333
355
  ### rpc
334
356
 
@@ -336,10 +358,10 @@ Call an RPC function in the server instance
336
358
 
337
359
  #### Parameters
338
360
 
339
- * `method` **[String][117]** The method name to call
361
+ * `method` **[String][120]** The method name to call
340
362
  * `args` **...any**&#x20;
341
363
 
342
- Returns **[Promise][124]\<any>** The resolved output of the server function
364
+ Returns **[Promise][127]\<any>** The resolved output of the server function
343
365
 
344
366
  ### acceptMessage
345
367
 
@@ -348,7 +370,7 @@ Accept an incoming message
348
370
  #### Parameters
349
371
 
350
372
  * `rawMessage` &#x20;
351
- * `Raw` **[MessageEvent][127]** message event to process
373
+ * `Raw` **[MessageEvent][131]** message event to process
352
374
 
353
375
  ### acceptPostboxes
354
376
 
@@ -357,27 +379,27 @@ Listening postboxes, these correspond to outgoing message IDs that expect a resp
357
379
  ### createProjectStatePatch
358
380
 
359
381
  Create + transmit a new project state patch base on the current and previous states
360
- The transmitted patch follows the [JSPatch][128] standard
382
+ The transmitted patch follows the [JSPatch][132] standard
361
383
  This function accepts an entire projectState instance, computes the delta and transmits that to the server for merging
362
384
 
363
385
  #### Parameters
364
386
 
365
- * `newState` **[Object][118]** The local projectState to accept
366
- * `oldState` **[Object][118]** The previous projectState to examine against
387
+ * `newState` **[Object][121]** The local projectState to accept
388
+ * `oldState` **[Object][121]** The previous projectState to examine against
367
389
 
368
- Returns **[Promise][124]** A promise which will resolve when the operation has completed
390
+ Returns **[Promise][127]** A promise which will resolve when the operation has completed
369
391
 
370
392
  ### applyProjectStatePatchLocal
371
393
 
372
394
  Client function which accepts a patch from the server and applies it to local project state
373
- The patch should follow the [JSPatch][128] standard
395
+ The patch should follow the [JSPatch][132] standard
374
396
  This function is expected to be sub-classed by a plugin
375
397
 
376
398
  #### Parameters
377
399
 
378
- * `patch` **[Array][123]** A JSPatch patch to apply
400
+ * `patch` **[Array][126]** A JSPatch patch to apply
379
401
 
380
- Returns **[Promise][124]** A promise which will resolve when the operation has completed
402
+ Returns **[Promise][127]** A promise which will resolve when the operation has completed
381
403
 
382
404
  ### init
383
405
 
@@ -386,27 +408,29 @@ This function can only be called once and will return the existing init() worker
386
408
 
387
409
  #### Parameters
388
410
 
389
- * `options` **[Object][118]?** Additional options to merge into `settings` via `set`
411
+ * `options` **[Object][121]?** Additional options to merge into `settings` via `set`
390
412
 
391
- Returns **[Promise][124]<[TeraFy][24]>** An eventual promise which will resovle with this terafy instance
413
+ Returns **[Promise][127]<[TeraFy][27]>** An eventual promise which will resovle with this terafy instance
392
414
 
393
415
  ### detectMode
394
416
 
395
417
  Populate `settings.mode`
396
418
  Try to communicate with a parent frame, if none assume we need to fallback to child mode
397
419
 
398
- Returns **[Promise][124]<[String][117]>** A promise which will resolve with the detected mode to use
420
+ Returns **[Promise][127]<[String][120]>** A promise which will resolve with the detected mode to use
399
421
 
400
422
  ### injectComms
401
423
 
402
424
  Find an existing active TERA server OR initalize one
403
425
 
404
- Returns **[Promise][124]** A promise which will resolve when the loading has completed and we have found a parent TERA instance or initiallized a child
426
+ Returns **[Promise][127]** A promise which will resolve when the loading has completed and we have found a parent TERA instance or initiallized a child
405
427
 
406
428
  ### injectStylesheet
407
429
 
408
430
  Inject a local stylesheet to handle TERA server functionality
409
431
 
432
+ Returns **[Promise][127]** A promise which will resolve when the loading has completed and we have found a parent TERA instance or initiallized a child
433
+
410
434
  ### injectMethods
411
435
 
412
436
  Inject all server methods defined in `methods` as local functions wrapped in the `rpc` function
@@ -428,10 +452,10 @@ This function also routes 'special' keys like `devMode` to their internal handle
428
452
 
429
453
  #### Parameters
430
454
 
431
- * `key` **([String][117] | [Object][118])** Either a single setting key to set or an object to merge
455
+ * `key` **([String][120] | [Object][121])** Either a single setting key to set or an object to merge
432
456
  * `value` **any** The value to set if `key` is a string
433
457
 
434
- Returns **[TeraFy][24]** This chainable terafy instance
458
+ Returns **[TeraFy][27]** This chainable terafy instance
435
459
 
436
460
  ### setIfDev
437
461
 
@@ -441,10 +465,10 @@ Set or merge settings - but only in dev mode and only if the value is not undefi
441
465
 
442
466
  #### Parameters
443
467
 
444
- * `key` **([String][117] | [Object][118])** Either a single setting key to set or an object to merge
468
+ * `key` **([String][120] | [Object][121])** Either a single setting key to set or an object to merge
445
469
  * `value` **any** The value to set if `key` is a string
446
470
 
447
- Returns **[TeraFy][24]** This chainable terafy instance
471
+ Returns **[TeraFy][27]** This chainable terafy instance
448
472
 
449
473
  ### use
450
474
 
@@ -453,10 +477,10 @@ Include a TeraFy client plugin
453
477
  #### Parameters
454
478
 
455
479
  * `mod` &#x20;
456
- * `options` **[Object][118]?** Additional options to mutate behaviour during construction (pass options to init() to intialize later options)
457
- * `The` **[Object][118]** module function to include. Invoked as `(teraClient:TeraFy, options:Object)`
480
+ * `options` **[Object][121]?** Additional options to mutate behaviour during construction (pass options to init() to intialize later options)
481
+ * `The` **[Object][121]** module function to include. Invoked as `(teraClient:TeraFy, options:Object)`
458
482
 
459
- Returns **[TeraFy][24]** This chainable terafy instance
483
+ Returns **[TeraFy][27]** This chainable terafy instance
460
484
 
461
485
  ### mixin
462
486
 
@@ -464,8 +488,8 @@ Internal function used by use() to merge an external declared singleton against
464
488
 
465
489
  #### Parameters
466
490
 
467
- * `target` **[Object][118]** Initalied class instance to extend
468
- * `source` **[Object][118]** Initalized source object to extend from
491
+ * `target` **[Object][121]** Initalied class instance to extend
492
+ * `source` **[Object][121]** Initalized source object to extend from
469
493
 
470
494
  ### toggleDevMode
471
495
 
@@ -473,9 +497,9 @@ Set or toggle devMode
473
497
 
474
498
  #### Parameters
475
499
 
476
- * `devModeEnabled` **([String][117] | [Boolean][125])** Optional boolean to force dev mode (optional, default `'toggle'`)
500
+ * `devModeEnabled` **([String][120] | [Boolean][129])** Optional boolean to force dev mode (optional, default `'toggle'`)
477
501
 
478
- Returns **[TeraFy][24]** This chainable terafy instance
502
+ Returns **[TeraFy][27]** This chainable terafy instance
479
503
 
480
504
  ### toggleFocus
481
505
 
@@ -484,7 +508,7 @@ This is usually because the server component wants to perform some user activity
484
508
 
485
509
  #### Parameters
486
510
 
487
- * `isFocused` **([String][117] | [Boolean][125])** Whether to fullscreen the embedded component (optional, default `'toggle'`)
511
+ * `isFocused` **([String][120] | [Boolean][129])** Whether to fullscreen the embedded component (optional, default `'toggle'`)
488
512
 
489
513
  ### selectProjectFile
490
514
 
@@ -496,7 +520,7 @@ This is an pre-requisite step for requireProject()
496
520
 
497
521
  * `options` &#x20;
498
522
 
499
- Returns **[Promise][124]** A promise which will resolve if the there is a user and they are logged in
523
+ Returns **[Promise][127]** A promise which will resolve if the there is a user and they are logged in
500
524
 
501
525
  ### getProjectFiles
502
526
 
@@ -504,12 +528,12 @@ Fetch the files associated with a given project
504
528
 
505
529
  #### Parameters
506
530
 
507
- * `options` **[Object][118]** Options which mutate behaviour
531
+ * `options` **[Object][121]** Options which mutate behaviour
508
532
 
509
- * `options.autoRequire` **[Boolean][125]** Run `requireProject()` automatically before continuing (optional, default `true`)
510
- * `options.meta` **[Boolean][125]** Pull meta information for each file entity (optional, default `true`)
533
+ * `options.autoRequire` **[Boolean][129]** Run `requireProject()` automatically before continuing (optional, default `true`)
534
+ * `options.meta` **[Boolean][129]** Pull meta information for each file entity (optional, default `true`)
511
535
 
512
- Returns **[Promise][124]<[Array][123]<[ProjectFile][1]>>** A collection of project files for the given project
536
+ Returns **[Promise][127]<[Array][126]<[ProjectFile][1]>>** A collection of project files for the given project
513
537
 
514
538
  ### getProjectFile
515
539
 
@@ -517,9 +541,9 @@ Fetch a project file
517
541
 
518
542
  #### Parameters
519
543
 
520
- * `path` **[String][117]** File path to read
544
+ * `path` **[String][120]** File path to read
521
545
 
522
- Returns **[Promise][124]<[Blob][121]>** The eventual fetched file as a blob
546
+ Returns **[Promise][127]<[Blob][124]>** The eventual fetched file as a blob
523
547
 
524
548
  ## handshake
525
549
 
@@ -527,9 +551,9 @@ Return basic server information as a form of validation
527
551
 
528
552
  ### Properties
529
553
 
530
- * `date` **[Date][119]** Server date
554
+ * `date` **[Date][122]** Server date
531
555
 
532
- Returns **[Promise][124]<[Object][118]>** Basic promise result
556
+ Returns **[Promise][127]<[Object][121]>** Basic promise result
533
557
 
534
558
  ## User
535
559
 
@@ -537,16 +561,16 @@ User / active session within TERA
537
561
 
538
562
  ### Properties
539
563
 
540
- * `id` **[String][117]** Unique identifier of the user
541
- * `email` **[String][117]** The email address of the current user
542
- * `name` **[String][117]** The provided full name of the user
543
- * `isSubscribed` **[Boolean][125]** Whether the active user has a TERA subscription
564
+ * `id` **[String][120]** Unique identifier of the user
565
+ * `email` **[String][120]** The email address of the current user
566
+ * `name` **[String][120]** The provided full name of the user
567
+ * `isSubscribed` **[Boolean][129]** Whether the active user has a TERA subscription
544
568
 
545
569
  ## getUser
546
570
 
547
571
  Fetch the current session user
548
572
 
549
- Returns **[Promise][124]<[User][73]>** The current logged in user or null if none
573
+ Returns **[Promise][127]<[User][76]>** The current logged in user or null if none
550
574
 
551
575
  ## requireUser
552
576
 
@@ -556,11 +580,11 @@ This is an pre-requisite step for requireProject()
556
580
 
557
581
  ### Parameters
558
582
 
559
- * `options` **[Object][118]?** Additional options to mutate behaviour
583
+ * `options` **[Object][121]?** Additional options to mutate behaviour
560
584
 
561
- * `options.forceRetry` **[Boolean][125]** Forcabily try to refresh the user state (optional, default `false`)
585
+ * `options.forceRetry` **[Boolean][129]** Forcabily try to refresh the user state (optional, default `false`)
562
586
 
563
- Returns **[Promise][124]<[User][73]>** The current logged in user or null if none
587
+ Returns **[Promise][127]<[User][76]>** The current logged in user or null if none
564
588
 
565
589
  ## Project
566
590
 
@@ -570,13 +594,13 @@ Project entry within TERA
570
594
 
571
595
  Get the currently active project, if any
572
596
 
573
- Returns **[Promise][124]<([Project][78] | null)>** The currently active project, if any
597
+ Returns **[Promise][127]<([Project][81] | null)>** The currently active project, if any
574
598
 
575
599
  ## getProjects
576
600
 
577
601
  Get a list of projects the current session user has access to
578
602
 
579
- Returns **[Promise][124]<[Array][123]<[Project][78]>>** Collection of projects the user has access to
603
+ Returns **[Promise][127]<[Array][126]<[Project][81]>>** Collection of projects the user has access to
580
604
 
581
605
  ## setActiveProject
582
606
 
@@ -584,7 +608,7 @@ Set the currently active project within TERA
584
608
 
585
609
  ### Parameters
586
610
 
587
- * `project` **([Object][118] | [String][117])** The project to set as active - either the full Project object or its ID
611
+ * `project` **([Object][121] | [String][120])** The project to set as active - either the full Project object or its ID
588
612
 
589
613
  ## requireProject
590
614
 
@@ -593,14 +617,14 @@ Note that this function will percist in asking the uesr even if they try to canc
593
617
 
594
618
  ### Parameters
595
619
 
596
- * `options` **[Object][118]?** Additional options to mutate behaviour
620
+ * `options` **[Object][121]?** Additional options to mutate behaviour
597
621
 
598
- * `options.autoSetActiveProject` **[Boolean][125]** After selecting a project set that project as active in TERA (optional, default `true`)
599
- * `options.title` **[String][117]** The title of the dialog to display (optional, default `"Select a project to work with"`)
600
- * `options.noSelectTitle` **[String][117]** Dialog title when warning the user they need to select something (optional, default `'Select project'`)
601
- * `options.noSelectBody` **[String][117]** Dialog body when warning the user they need to select something (optional, default `'A project needs to be selected to continue'`)
622
+ * `options.autoSetActiveProject` **[Boolean][129]** After selecting a project set that project as active in TERA (optional, default `true`)
623
+ * `options.title` **[String][120]** The title of the dialog to display (optional, default `"Select a project to work with"`)
624
+ * `options.noSelectTitle` **[String][120]** Dialog title when warning the user they need to select something (optional, default `'Select project'`)
625
+ * `options.noSelectBody` **[String][120]** Dialog body when warning the user they need to select something (optional, default `'A project needs to be selected to continue'`)
602
626
 
603
- Returns **[Promise][124]<[Project][78]>** The active project
627
+ Returns **[Promise][127]<[Project][81]>** The active project
604
628
 
605
629
  ## selectProject
606
630
 
@@ -608,13 +632,13 @@ Prompt the user to select a project from those available
608
632
 
609
633
  ### Parameters
610
634
 
611
- * `options` **[Object][118]?** Additional options to mutate behaviour
635
+ * `options` **[Object][121]?** Additional options to mutate behaviour
612
636
 
613
- * `options.title` **[String][117]** The title of the dialog to display (optional, default `"Select a project to work with"`)
614
- * `options.allowCancel` **[Boolean][125]** Advertise cancelling the operation, the dialog can still be cancelled by closing it (optional, default `true`)
615
- * `options.setActive` **[Boolean][125]** Also set the project as active when selected (optional, default `false`)
637
+ * `options.title` **[String][120]** The title of the dialog to display (optional, default `"Select a project to work with"`)
638
+ * `options.allowCancel` **[Boolean][129]** Advertise cancelling the operation, the dialog can still be cancelled by closing it (optional, default `true`)
639
+ * `options.setActive` **[Boolean][129]** Also set the project as active when selected (optional, default `false`)
616
640
 
617
- Returns **[Promise][124]<[Project][78]>** The active project
641
+ Returns **[Promise][127]<[Project][81]>** The active project
618
642
 
619
643
  ## getProjectState
620
644
 
@@ -622,12 +646,12 @@ Return the current, full snapshot state of the active project
622
646
 
623
647
  ### Parameters
624
648
 
625
- * `options` **[Object][118]?** Additional options to mutate behaviour
649
+ * `options` **[Object][121]?** Additional options to mutate behaviour
626
650
 
627
- * `options.autoRequire` **[Boolean][125]** Run `requireProject()` automatically before continuing (optional, default `true`)
628
- * `Paths` **[Array][123]<[String][117]>** to subscribe to e.g. \['/users/'],
651
+ * `options.autoRequire` **[Boolean][129]** Run `requireProject()` automatically before continuing (optional, default `true`)
652
+ * `Paths` **[Array][126]<[String][120]>** to subscribe to e.g. \['/users/'],
629
653
 
630
- Returns **[Promise][124]<[Object][118]>** The current project state snapshot
654
+ Returns **[Promise][127]<[Object][121]>** The current project state snapshot
631
655
 
632
656
  ## setProjectState
633
657
 
@@ -639,13 +663,13 @@ Paths can be any valid Lodash.set() value such as:
639
663
 
640
664
  ### Parameters
641
665
 
642
- * `path` **([String][117] | [Array][123]<[String][117]>)** The sub-path within the project state to set
666
+ * `path` **([String][120] | [Array][126]<[String][120]>)** The sub-path within the project state to set
643
667
  * `value` **any** The value to set
644
- * `options` **[Object][118]?** Additional options to mutate behaviour
668
+ * `options` **[Object][121]?** Additional options to mutate behaviour
645
669
 
646
- * `options.save` **[Boolean][125]** Save the changes to the server immediately, disable to queue up multiple writes (optional, default `true`)
670
+ * `options.save` **[Boolean][129]** Save the changes to the server immediately, disable to queue up multiple writes (optional, default `true`)
647
671
 
648
- Returns **[Promise][124]** A promise which resolves when the operation has been dispatched to the server
672
+ Returns **[Promise][127]** A promise which resolves when the operation has been dispatched to the server
649
673
 
650
674
  ## setProjectStateDefaults
651
675
 
@@ -655,17 +679,17 @@ Set a nested value within the project state - just like `setProjectState()` - bu
655
679
 
656
680
  ### Parameters
657
681
 
658
- * `path` **([String][117] | [Array][123]<[String][117]>)** The sub-path within the project state to set
682
+ * `path` **([String][120] | [Array][126]<[String][120]>)** The sub-path within the project state to set
659
683
  * `value` **any** The value to set
660
- * `options` **[Object][118]?** Additional options to mutate behaviour, see setProjectState() for the full list of supported options
684
+ * `options` **[Object][121]?** Additional options to mutate behaviour, see setProjectState() for the full list of supported options
661
685
 
662
- Returns **[Promise][124]<[Boolean][125]>** A promise which resolves to whether any changes were made - True if defaults were applied, false otherwise
686
+ Returns **[Promise][127]<[Boolean][129]>** A promise which resolves to whether any changes were made - True if defaults were applied, false otherwise
663
687
 
664
688
  ## saveProjectState
665
689
 
666
690
  Force-Save the currently active project state
667
691
 
668
- Returns **[Promise][124]** A promise which resolves when the operation has completed
692
+ Returns **[Promise][127]** A promise which resolves when the operation has completed
669
693
 
670
694
  ## replaceProjectState
671
695
 
@@ -676,9 +700,9 @@ You almost never want to use this function directly, see `setProjectState(path,
676
700
 
677
701
  ### Parameters
678
702
 
679
- * `newState` **[Object][118]** The new state to replace the current state with
703
+ * `newState` **[Object][121]** The new state to replace the current state with
680
704
 
681
- Returns **[Promise][124]** A promise which resolves when the operation has completed
705
+ Returns **[Promise][127]** A promise which resolves when the operation has completed
682
706
 
683
707
  ## applyProjectStatePatch
684
708
 
@@ -686,9 +710,9 @@ Apply a computed `just-diff` patch to the current project state
686
710
 
687
711
  ### Parameters
688
712
 
689
- * `Patch` **[Object][118]** to apply
713
+ * `Patch` **[Object][121]** to apply
690
714
 
691
- Returns **[Promise][124]** A promise which resolves when the operation has completed
715
+ Returns **[Promise][127]** A promise which resolves when the operation has completed
692
716
 
693
717
  ## subscribeProjectState
694
718
 
@@ -696,7 +720,7 @@ Subscribe to project state changes
696
720
  This will dispatch an RPC call to the source object `applyProjectStatePatchLocal()` function with the patch
697
721
  If the above call fails the subscriber is assumed as dead and unsubscribed from the polling list
698
722
 
699
- Returns **[Promise][124]<[Function][129]>** A promise which resolves when a subscription has been created, call the resulting function to unsubscribe
723
+ Returns **[Promise][127]<[Function][133]>** A promise which resolves when a subscription has been created, call the resulting function to unsubscribe
700
724
 
701
725
  ## FileFilters
702
726
 
@@ -704,10 +728,10 @@ Data structure for a file filter
704
728
 
705
729
  ### Properties
706
730
 
707
- * `library` **[Boolean][125]?** Restrict to library files only
708
- * `filename` **[String][117]?** CSV of @momsfriendlydevco/match expressions to filter the filename by (filenames are the basename sans extension)
709
- * `basename` **[String][117]?** CSV of @momsfriendlydevco/match expressions to filter the basename by
710
- * `ext` **[String][117]?** CSV of @momsfriendlydevco/match expressions to filter the file extension by
731
+ * `library` **[Boolean][129]?** Restrict to library files only
732
+ * `filename` **[String][120]?** CSV of @momsfriendlydevco/match expressions to filter the filename by (filenames are the basename sans extension)
733
+ * `basename` **[String][120]?** CSV of @momsfriendlydevco/match expressions to filter the basename by
734
+ * `ext` **[String][120]?** CSV of @momsfriendlydevco/match expressions to filter the file extension by
711
735
 
712
736
  ## selectProjectFile
713
737
 
@@ -715,20 +739,20 @@ Prompt the user to select a library to operate on
715
739
 
716
740
  ### Parameters
717
741
 
718
- * `options` **[Object][118]?** Additional options to mutate behaviour
742
+ * `options` **[Object][121]?** Additional options to mutate behaviour
719
743
 
720
- * `options.title` **[String][117]** The title of the dialog to display (optional, default `"Select a file"`)
721
- * `options.hint` **([String][117] | [Array][123]<[String][117]>)?** Hints to identify the file to select in array order of preference
722
- * `options.save` **[Boolean][125]** Set to truthy if saving a new file, UI will adjust to allowing overwrite OR new file name input (optional, default `false`)
723
- * `options.filters` **[FileFilters][99]?** Optional file filters
724
- * `options.allowUpload` **[Boolean][125]** Allow uploading new files (optional, default `true`)
725
- * `options.allowRefresh` **[Boolean][125]** Allow the user to manually refresh the file list (optional, default `true`)
726
- * `options.allowDownloadZip` **[Boolean][125]** Allow the user to download a Zip of all files (optional, default `true`)
727
- * `options.allowCancel` **[Boolean][125]** Allow cancelling the operation. Will throw `'CANCEL'` as the promise rejection if acationed (optional, default `true`)
728
- * `options.autoRequire` **[Boolean][125]** Run `requireProject()` automatically before continuing (optional, default `true`)
729
- * `options.filter` **[FileFilters][99]?** Optional file filters
744
+ * `options.title` **[String][120]** The title of the dialog to display (optional, default `"Select a file"`)
745
+ * `options.hint` **([String][120] | [Array][126]<[String][120]>)?** Hints to identify the file to select in array order of preference
746
+ * `options.save` **[Boolean][129]** Set to truthy if saving a new file, UI will adjust to allowing overwrite OR new file name input (optional, default `false`)
747
+ * `options.filters` **[FileFilters][102]?** Optional file filters
748
+ * `options.allowUpload` **[Boolean][129]** Allow uploading new files (optional, default `true`)
749
+ * `options.allowRefresh` **[Boolean][129]** Allow the user to manually refresh the file list (optional, default `true`)
750
+ * `options.allowDownloadZip` **[Boolean][129]** Allow the user to download a Zip of all files (optional, default `true`)
751
+ * `options.allowCancel` **[Boolean][129]** Allow cancelling the operation. Will throw `'CANCEL'` as the promise rejection if acationed (optional, default `true`)
752
+ * `options.autoRequire` **[Boolean][129]** Run `requireProject()` automatically before continuing (optional, default `true`)
753
+ * `options.filter` **[FileFilters][102]?** Optional file filters
730
754
 
731
- Returns **[Promise][124]<[ProjectFile][1]>** The eventually selected file
755
+ Returns **[Promise][127]<[ProjectFile][1]>** The eventually selected file
732
756
 
733
757
  ## setProjectFile
734
758
 
@@ -736,10 +760,10 @@ Replace a project files contents
736
760
 
737
761
  ### Parameters
738
762
 
739
- * `path` **[String][117]** File path to write
740
- * `contents` **(File | [Blob][121] | [FormData][122] | [Object][118] | [Array][123])** The new file contents
763
+ * `path` **[String][120]** File path to write
764
+ * `contents` **(File | [Blob][124] | [FormData][125] | [Object][121] | [Array][126])** The new file contents
741
765
 
742
- Returns **[Promise][124]** A promise which will resolve when the write operation has completed
766
+ Returns **[Promise][127]** A promise which will resolve when the write operation has completed
743
767
 
744
768
  ## selectProjectLibrary
745
769
 
@@ -747,18 +771,18 @@ Prompt the user to select a library to operate on and return a array of referenc
747
771
 
748
772
  ### Parameters
749
773
 
750
- * `options` **[Object][118]?** Additional options to mutate behaviour
774
+ * `options` **[Object][121]?** Additional options to mutate behaviour
751
775
 
752
- * `options.title` **[String][117]** The title of the dialog to display (optional, default `"Select a citation library"`)
753
- * `options.hint` **([String][117] | [Array][123]<[String][117]>)?** Hints to identify the library to select in array order of preference. Generally corresponds to the previous stage - e.g. 'deduped', 'review1', 'review2', 'dedisputed'
754
- * `options.allowUpload` **[Boolean][125]** Allow uploading new files (optional, default `true`)
755
- * `options.allowRefresh` **[Boolean][125]** Allow the user to manually refresh the file list (optional, default `true`)
756
- * `options.allowDownloadZip` **[Boolean][125]** Allow the user to download a Zip of all files (optional, default `true`)
757
- * `options.allowCancel` **[Boolean][125]** Allow cancelling the operation. Will throw `'CANCEL'` as the promise rejection if acationed (optional, default `true`)
758
- * `options.autoRequire` **[Boolean][125]** Run `requireProject()` automatically before continuing (optional, default `true`)
759
- * `options.filters` **[FileFilters][99]?** Optional file filters, defaults to citation library selection only
776
+ * `options.title` **[String][120]** The title of the dialog to display (optional, default `"Select a citation library"`)
777
+ * `options.hint` **([String][120] | [Array][126]<[String][120]>)?** Hints to identify the library to select in array order of preference. Generally corresponds to the previous stage - e.g. 'deduped', 'review1', 'review2', 'dedisputed'
778
+ * `options.allowUpload` **[Boolean][129]** Allow uploading new files (optional, default `true`)
779
+ * `options.allowRefresh` **[Boolean][129]** Allow the user to manually refresh the file list (optional, default `true`)
780
+ * `options.allowDownloadZip` **[Boolean][129]** Allow the user to download a Zip of all files (optional, default `true`)
781
+ * `options.allowCancel` **[Boolean][129]** Allow cancelling the operation. Will throw `'CANCEL'` as the promise rejection if acationed (optional, default `true`)
782
+ * `options.autoRequire` **[Boolean][129]** Run `requireProject()` automatically before continuing (optional, default `true`)
783
+ * `options.filters` **[FileFilters][102]?** Optional file filters, defaults to citation library selection only
760
784
 
761
- Returns **[Promise][124]<[Array][123]\<Ref>>** A collection of references from the selected file
785
+ Returns **[Promise][127]<[Array][126]\<Ref>>** A collection of references from the selected file
762
786
 
763
787
  ## getProjectLibrary
764
788
 
@@ -766,15 +790,15 @@ Fetch + convert a project file into a library of citations
766
790
 
767
791
  ### Parameters
768
792
 
769
- * `path` **[String][117]** File path to read, if omitted the contents of `options` are used to guess at a suitable file
770
- * `options` **[Object][118]?** Additional options to mutate behaviour
793
+ * `path` **[String][120]** File path to read, if omitted the contents of `options` are used to guess at a suitable file
794
+ * `options` **[Object][121]?** Additional options to mutate behaviour
771
795
 
772
- * `options.format` **[String][117]** Format for the file. ENUM: 'pojo' (return a parsed JS collection), 'blob' (raw JS Blob object), 'file' (named JS File object) (optional, default `'json'`)
773
- * `options.autoRequire` **[Boolean][125]** Run `requireProject()` automatically before continuing (optional, default `true`)
774
- * `options.filter` **[Function][129]?** Optional async file filter, called each time as `(File:ProjectFile)`
775
- * `options.find` **[Function][129]?** Optional async final stage file filter to reduce all candidates down to one subject file
796
+ * `options.format` **[String][120]** Format for the file. ENUM: 'pojo' (return a parsed JS collection), 'blob' (raw JS Blob object), 'file' (named JS File object) (optional, default `'json'`)
797
+ * `options.autoRequire` **[Boolean][129]** Run `requireProject()` automatically before continuing (optional, default `true`)
798
+ * `options.filter` **[Function][133]?** Optional async file filter, called each time as `(File:ProjectFile)`
799
+ * `options.find` **[Function][133]?** Optional async final stage file filter to reduce all candidates down to one subject file
776
800
 
777
- Returns **([Promise][124]<[Array][123]\<Ref>> | [Promise][124]\<any>)** A collection of references (default bevahiour) or a whatever format was requested
801
+ Returns **([Promise][127]<[Array][126]\<Ref>> | [Promise][127]\<any>)** A collection of references (default bevahiour) or a whatever format was requested
778
802
 
779
803
  ## setProjectLibrary
780
804
 
@@ -782,21 +806,21 @@ Save back a citation library from some input
782
806
 
783
807
  ### Parameters
784
808
 
785
- * `path` **[String][117]?** File path to save back to, if omitted one will be prompted for
786
- * `refs` **([Array][123]\<RefLibRef> | [Blob][121] | File)?** Collection of references for the selected library or the raw Blob/File
787
- * `options` **[Object][118]?** Additional options to mutate behaviour
809
+ * `path` **[String][120]?** File path to save back to, if omitted one will be prompted for
810
+ * `refs` **([Array][126]\<RefLibRef> | [Blob][124] | File)?** Collection of references for the selected library or the raw Blob/File
811
+ * `options` **[Object][121]?** Additional options to mutate behaviour
788
812
 
789
- * `options.path` **[String][117]?** Alternate method to specify the path to save as, if omitted one will be prompted for
790
- * `options.refs` **([Array][123]\<RefLibRef> | [Blob][121] | File)?** Alternate method to specify the refs to save as an array or raw Blob/File
791
- * `options.format` **[String][117]** Input format used. ENUM: 'pojo' (return a parsed JS collection), 'blob' (raw JS Blob object), 'file' (named JS File object) (optional, default `'json'`)
792
- * `options.autoRequire` **[Boolean][125]** Run `requireProject()` automatically before continuing (optional, default `true`)
793
- * `options.hint` **[String][117]?** Hint to store against the library. Generally corresponds to the current operation being performed - e.g. 'deduped'
794
- * `options.filename` **[String][117]?** Suggested filename if path is unspecified
795
- * `options.title` **[String][117]** Dialog title if path is unspecified and we need to prompt (optional, default `'Save citation library'`)
796
- * `options.overwrite` **[Boolean][125]** Allow existing file upsert (optional, default `true`)
797
- * `options.meta` **[Object][118]?** Optional meta data to merge into the file data
813
+ * `options.path` **[String][120]?** Alternate method to specify the path to save as, if omitted one will be prompted for
814
+ * `options.refs` **([Array][126]\<RefLibRef> | [Blob][124] | File)?** Alternate method to specify the refs to save as an array or raw Blob/File
815
+ * `options.format` **[String][120]** Input format used. ENUM: 'pojo' (return a parsed JS collection), 'blob' (raw JS Blob object), 'file' (named JS File object) (optional, default `'json'`)
816
+ * `options.autoRequire` **[Boolean][129]** Run `requireProject()` automatically before continuing (optional, default `true`)
817
+ * `options.hint` **[String][120]?** Hint to store against the library. Generally corresponds to the current operation being performed - e.g. 'deduped'
818
+ * `options.filename` **[String][120]?** Suggested filename if path is unspecified
819
+ * `options.title` **[String][120]** Dialog title if path is unspecified and we need to prompt (optional, default `'Save citation library'`)
820
+ * `options.overwrite` **[Boolean][129]** Allow existing file upsert (optional, default `true`)
821
+ * `options.meta` **[Object][121]?** Optional meta data to merge into the file data
798
822
 
799
- Returns **[Promise][124]** A promise which resolves when the save operation has completed
823
+ Returns **[Promise][127]** A promise which resolves when the save operation has completed
800
824
 
801
825
  ## uiAlert
802
826
 
@@ -804,13 +828,13 @@ Display simple text within TERA
804
828
 
805
829
  ### Parameters
806
830
 
807
- * `text` **[String][117]** The text to display
808
- * `options` **[Object][118]?** Additional options to mutate behaviour
831
+ * `text` **[String][120]** The text to display
832
+ * `options` **[Object][121]?** Additional options to mutate behaviour
809
833
 
810
- * `options.title` **[String][117]** The title of the alert box (optional, default `'TERA'`)
811
- * `options.isHtml` **[Boolean][125]** If falsy the text is rendered as plain-text otherwise it will be assumed as HTML content (optional, default `false`)
834
+ * `options.title` **[String][120]** The title of the alert box (optional, default `'TERA'`)
835
+ * `options.isHtml` **[Boolean][129]** If falsy the text is rendered as plain-text otherwise it will be assumed as HTML content (optional, default `false`)
812
836
 
813
- Returns **[Promise][124]** A promise which resolves when the alert has been dismissed
837
+ Returns **[Promise][127]** A promise which resolves when the alert has been dismissed
814
838
 
815
839
  ## uiSplat
816
840
 
@@ -819,10 +843,10 @@ This function is ideally called within a requestFocus() wrapper
819
843
 
820
844
  ### Parameters
821
845
 
822
- * `content` **(DOMElement | [String][117] | `false`)** Either a prepared DOM element or string to compile, set to falsy to remove existing content
823
- * `options` **[Object][118]?** Additional options to mutate behaviour
846
+ * `content` **(DOMElement | [String][120] | `false`)** Either a prepared DOM element or string to compile, set to falsy to remove existing content
847
+ * `options` **[Object][121]?** Additional options to mutate behaviour
824
848
 
825
- * `options.logo` **([Boolean][125] | [String][117])** Add a logo to the output, if boolean true the Tera-tools logo is used otherwise specify a path or URL (optional, default `false`)
849
+ * `options.logo` **([Boolean][129] | [String][120])** Add a logo to the output, if boolean true the Tera-tools logo is used otherwise specify a path or URL (optional, default `false`)
826
850
 
827
851
  ## uiWindow
828
852
 
@@ -830,13 +854,13 @@ Open a popup window containing a new site
830
854
 
831
855
  ### Parameters
832
856
 
833
- * `url` **[String][117]** The URL to open
834
- * `options` **[Object][118]?** Additional options to mutate behaviour
857
+ * `url` **[String][120]** The URL to open
858
+ * `options` **[Object][121]?** Additional options to mutate behaviour
835
859
 
836
- * `options.width` **[Number][120]** The desired width of the window (optional, default `500`)
837
- * `options.height` **[Number][120]** The desired height of the window (optional, default `600`)
838
- * `options.center` **[Boolean][125]** Attempt to center the window on the screen (optional, default `true`)
839
- * `options.permissions` **[Object][118]?** Additional permissions to set on opening, defaults to a suitable set of permission for popups (see code)
860
+ * `options.width` **[Number][123]** The desired width of the window (optional, default `500`)
861
+ * `options.height` **[Number][123]** The desired height of the window (optional, default `600`)
862
+ * `options.center` **[Boolean][129]** Attempt to center the window on the screen (optional, default `true`)
863
+ * `options.permissions` **[Object][121]?** Additional permissions to set on opening, defaults to a suitable set of permission for popups (see code)
840
864
 
841
865
  Returns **WindowProxy** The opened window object (if `noopener` is not set in permissions)
842
866
 
@@ -886,214 +910,222 @@ Returns **WindowProxy** The opened window object (if `noopener` is not set in pe
886
910
 
887
911
  [23]: #parameters-2
888
912
 
889
- [24]: #terafy
913
+ [24]: #serialize
890
914
 
891
- [25]: #settings
915
+ [25]: #deserialize
892
916
 
893
- [26]: #properties-1
917
+ [26]: #parameters-3
894
918
 
895
- [27]: #events
919
+ [27]: #terafy
896
920
 
897
- [28]: #dom
921
+ [28]: #settings
898
922
 
899
- [29]: #properties-2
923
+ [29]: #properties-1
900
924
 
901
- [30]: #methods
925
+ [30]: #events
902
926
 
903
- [31]: #plugins
927
+ [31]: #dom
904
928
 
905
- [32]: #send
929
+ [32]: #properties-2
906
930
 
907
- [33]: #parameters-3
931
+ [33]: #methods
908
932
 
909
- [34]: #sendraw
933
+ [34]: #plugins
910
934
 
911
- [35]: #parameters-4
935
+ [35]: #send
912
936
 
913
- [36]: #rpc
937
+ [36]: #parameters-4
914
938
 
915
- [37]: #parameters-5
939
+ [37]: #sendraw
916
940
 
917
- [38]: #acceptmessage
941
+ [38]: #parameters-5
918
942
 
919
- [39]: #parameters-6
943
+ [39]: #rpc
920
944
 
921
- [40]: #acceptpostboxes
945
+ [40]: #parameters-6
922
946
 
923
- [41]: #createprojectstatepatch
947
+ [41]: #acceptmessage
924
948
 
925
949
  [42]: #parameters-7
926
950
 
927
- [43]: #applyprojectstatepatchlocal
951
+ [43]: #acceptpostboxes
928
952
 
929
- [44]: #parameters-8
953
+ [44]: #createprojectstatepatch
930
954
 
931
- [45]: #init
955
+ [45]: #parameters-8
932
956
 
933
- [46]: #parameters-9
957
+ [46]: #applyprojectstatepatchlocal
934
958
 
935
- [47]: #detectmode
959
+ [47]: #parameters-9
936
960
 
937
- [48]: #injectcomms
961
+ [48]: #init
938
962
 
939
- [49]: #injectstylesheet
963
+ [49]: #parameters-10
940
964
 
941
- [50]: #injectmethods
965
+ [50]: #detectmode
942
966
 
943
- [51]: #debug
967
+ [51]: #injectcomms
944
968
 
945
- [52]: #parameters-10
969
+ [52]: #injectstylesheet
946
970
 
947
- [53]: #set
971
+ [53]: #injectmethods
948
972
 
949
- [54]: #parameters-11
973
+ [54]: #debug
950
974
 
951
- [55]: #setifdev
975
+ [55]: #parameters-11
952
976
 
953
- [56]: #parameters-12
977
+ [56]: #set
954
978
 
955
- [57]: #use
979
+ [57]: #parameters-12
956
980
 
957
- [58]: #parameters-13
981
+ [58]: #setifdev
958
982
 
959
- [59]: #mixin
983
+ [59]: #parameters-13
960
984
 
961
- [60]: #parameters-14
985
+ [60]: #use
962
986
 
963
- [61]: #toggledevmode
987
+ [61]: #parameters-14
964
988
 
965
- [62]: #parameters-15
989
+ [62]: #mixin
966
990
 
967
- [63]: #togglefocus
991
+ [63]: #parameters-15
968
992
 
969
- [64]: #parameters-16
993
+ [64]: #toggledevmode
970
994
 
971
- [65]: #selectprojectfile
995
+ [65]: #parameters-16
972
996
 
973
- [66]: #parameters-17
997
+ [66]: #togglefocus
974
998
 
975
- [67]: #getprojectfiles
999
+ [67]: #parameters-17
976
1000
 
977
- [68]: #parameters-18
1001
+ [68]: #selectprojectfile
978
1002
 
979
- [69]: #getprojectfile
1003
+ [69]: #parameters-18
980
1004
 
981
- [70]: #parameters-19
1005
+ [70]: #getprojectfiles
982
1006
 
983
- [71]: #handshake
1007
+ [71]: #parameters-19
984
1008
 
985
- [72]: #properties-3
1009
+ [72]: #getprojectfile
986
1010
 
987
- [73]: #user
1011
+ [73]: #parameters-20
988
1012
 
989
- [74]: #properties-4
1013
+ [74]: #handshake
990
1014
 
991
- [75]: #getuser
1015
+ [75]: #properties-3
992
1016
 
993
- [76]: #requireuser
1017
+ [76]: #user
994
1018
 
995
- [77]: #parameters-20
1019
+ [77]: #properties-4
996
1020
 
997
- [78]: #project
1021
+ [78]: #getuser
998
1022
 
999
- [79]: #getproject
1023
+ [79]: #requireuser
1000
1024
 
1001
- [80]: #getprojects
1025
+ [80]: #parameters-21
1002
1026
 
1003
- [81]: #setactiveproject
1027
+ [81]: #project
1004
1028
 
1005
- [82]: #parameters-21
1029
+ [82]: #getproject
1006
1030
 
1007
- [83]: #requireproject
1031
+ [83]: #getprojects
1008
1032
 
1009
- [84]: #parameters-22
1033
+ [84]: #setactiveproject
1010
1034
 
1011
- [85]: #selectproject
1035
+ [85]: #parameters-22
1012
1036
 
1013
- [86]: #parameters-23
1037
+ [86]: #requireproject
1014
1038
 
1015
- [87]: #getprojectstate
1039
+ [87]: #parameters-23
1016
1040
 
1017
- [88]: #parameters-24
1041
+ [88]: #selectproject
1018
1042
 
1019
- [89]: #setprojectstate
1043
+ [89]: #parameters-24
1020
1044
 
1021
- [90]: #parameters-25
1045
+ [90]: #getprojectstate
1022
1046
 
1023
- [91]: #setprojectstatedefaults
1047
+ [91]: #parameters-25
1024
1048
 
1025
- [92]: #parameters-26
1049
+ [92]: #setprojectstate
1026
1050
 
1027
- [93]: #saveprojectstate
1051
+ [93]: #parameters-26
1028
1052
 
1029
- [94]: #replaceprojectstate
1053
+ [94]: #setprojectstatedefaults
1030
1054
 
1031
1055
  [95]: #parameters-27
1032
1056
 
1033
- [96]: #applyprojectstatepatch
1057
+ [96]: #saveprojectstate
1058
+
1059
+ [97]: #replaceprojectstate
1060
+
1061
+ [98]: #parameters-28
1062
+
1063
+ [99]: #applyprojectstatepatch
1064
+
1065
+ [100]: #parameters-29
1034
1066
 
1035
- [97]: #parameters-28
1067
+ [101]: #subscribeprojectstate
1036
1068
 
1037
- [98]: #subscribeprojectstate
1069
+ [102]: #filefilters
1038
1070
 
1039
- [99]: #filefilters
1071
+ [103]: #properties-5
1040
1072
 
1041
- [100]: #properties-5
1073
+ [104]: #selectprojectfile-1
1042
1074
 
1043
- [101]: #selectprojectfile-1
1075
+ [105]: #parameters-30
1044
1076
 
1045
- [102]: #parameters-29
1077
+ [106]: #setprojectfile
1046
1078
 
1047
- [103]: #setprojectfile
1079
+ [107]: #parameters-31
1048
1080
 
1049
- [104]: #parameters-30
1081
+ [108]: #selectprojectlibrary
1050
1082
 
1051
- [105]: #selectprojectlibrary
1083
+ [109]: #parameters-32
1052
1084
 
1053
- [106]: #parameters-31
1085
+ [110]: #getprojectlibrary
1054
1086
 
1055
- [107]: #getprojectlibrary
1087
+ [111]: #parameters-33
1056
1088
 
1057
- [108]: #parameters-32
1089
+ [112]: #setprojectlibrary
1058
1090
 
1059
- [109]: #setprojectlibrary
1091
+ [113]: #parameters-34
1060
1092
 
1061
- [110]: #parameters-33
1093
+ [114]: #uialert
1062
1094
 
1063
- [111]: #uialert
1095
+ [115]: #parameters-35
1064
1096
 
1065
- [112]: #parameters-34
1097
+ [116]: #uisplat
1066
1098
 
1067
- [113]: #uisplat
1099
+ [117]: #parameters-36
1068
1100
 
1069
- [114]: #parameters-35
1101
+ [118]: #uiwindow
1070
1102
 
1071
- [115]: #uiwindow
1103
+ [119]: #parameters-37
1072
1104
 
1073
- [116]: #parameters-36
1105
+ [120]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
1074
1106
 
1075
- [117]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
1107
+ [121]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
1076
1108
 
1077
- [118]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
1109
+ [122]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date
1078
1110
 
1079
- [119]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date
1111
+ [123]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
1080
1112
 
1081
- [120]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
1113
+ [124]: https://developer.mozilla.org/docs/Web/API/Blob
1082
1114
 
1083
- [121]: https://developer.mozilla.org/docs/Web/API/Blob
1115
+ [125]: https://developer.mozilla.org/docs/Web/API/FormData
1084
1116
 
1085
- [122]: https://developer.mozilla.org/docs/Web/API/FormData
1117
+ [126]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array
1086
1118
 
1087
- [123]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array
1119
+ [127]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise
1088
1120
 
1089
- [124]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise
1121
+ [128]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm
1090
1122
 
1091
- [125]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
1123
+ [129]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
1092
1124
 
1093
- [126]: https://developer.mozilla.org/docs/Web/API/Window
1125
+ [130]: https://developer.mozilla.org/docs/Web/API/Window
1094
1126
 
1095
- [127]: https://developer.mozilla.org/docs/Web/API/MessageEvent
1127
+ [131]: https://developer.mozilla.org/docs/Web/API/MessageEvent
1096
1128
 
1097
- [128]: http://jsonpatch.com
1129
+ [132]: http://jsonpatch.com
1098
1130
 
1099
- [129]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function
1131
+ [133]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function