@iebh/tera-fy 1.15.9 → 2.0.1

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
@@ -39,122 +39,137 @@
39
39
  * [Properties][35]
40
40
  * [methods][36]
41
41
  * [plugins][37]
42
- * [send][38]
43
- * [Parameters][39]
44
- * [sendRaw][40]
45
- * [Parameters][41]
46
- * [rpc][42]
47
- * [Parameters][43]
48
- * [acceptMessage][44]
49
- * [Parameters][45]
50
- * [acceptPostboxes][46]
51
- * [createProjectStatePatch][47]
52
- * [Parameters][48]
53
- * [applyProjectStatePatch][49]
54
- * [Parameters][50]
55
- * [applyProjectStatePatchLocal][51]
56
- * [Parameters][52]
57
- * [init][53]
58
- * [Parameters][54]
59
- * [detectMode][55]
60
- * [injectComms][56]
61
- * [handshakeLoop][57]
62
- * [Parameters][58]
63
- * [Properties][59]
64
- * [injectStylesheet][60]
65
- * [injectMethods][61]
66
- * [debug][62]
67
- * [Parameters][63]
68
- * [set][64]
69
- * [Parameters][65]
70
- * [setIfDev][66]
71
- * [Parameters][67]
72
- * [use][68]
73
- * [Parameters][69]
74
- * [mixin][70]
75
- * [Parameters][71]
76
- * [toggleDevMode][72]
77
- * [Parameters][73]
78
- * [toggleFocus][74]
79
- * [Parameters][75]
80
- * [getEntropicString][76]
81
- * [Parameters][77]
82
- * [selectProjectFile][78]
83
- * [Parameters][79]
84
- * [handshake][80]
85
- * [Properties][81]
86
- * [setServerVerbosity][82]
87
- * [Parameters][83]
88
- * [User][84]
89
- * [Properties][85]
90
- * [getUser][86]
91
- * [requireUser][87]
42
+ * [namespaces][38]
43
+ * [send][39]
44
+ * [Parameters][40]
45
+ * [sendRaw][41]
46
+ * [Parameters][42]
47
+ * [rpc][43]
48
+ * [Parameters][44]
49
+ * [acceptMessage][45]
50
+ * [Parameters][46]
51
+ * [acceptPostboxes][47]
52
+ * [createProjectStatePatch][48]
53
+ * [Parameters][49]
54
+ * [applyProjectStatePatch][50]
55
+ * [Parameters][51]
56
+ * [applyProjectStatePatchLocal][52]
57
+ * [Parameters][53]
58
+ * [init][54]
59
+ * [Parameters][55]
60
+ * [detectMode][56]
61
+ * [injectComms][57]
62
+ * [handshakeLoop][58]
63
+ * [Parameters][59]
64
+ * [Properties][60]
65
+ * [injectStylesheet][61]
66
+ * [injectMethods][62]
67
+ * [debug][63]
68
+ * [Parameters][64]
69
+ * [set][65]
70
+ * [Parameters][66]
71
+ * [setIfDev][67]
72
+ * [Parameters][68]
73
+ * [use][69]
74
+ * [Parameters][70]
75
+ * [mixin][71]
76
+ * [Parameters][72]
77
+ * [toggleDevMode][73]
78
+ * [Parameters][74]
79
+ * [toggleFocus][75]
80
+ * [Parameters][76]
81
+ * [getEntropicString][77]
82
+ * [Parameters][78]
83
+ * [selectProjectFile][79]
84
+ * [Parameters][80]
85
+ * [mountNamespace][81]
86
+ * [Parameters][82]
87
+ * [Actual namespace mounting function designed to be overriden by plugins][83]
88
+ * [Parameters][84]
89
+ * [unmountNamespace][85]
90
+ * [Parameters][86]
91
+ * [Actual namespace unmounting function designed to be overriden by plugins][87]
92
92
  * [Parameters][88]
93
- * [Project][89]
94
- * [getProject][90]
95
- * [getProjects][91]
96
- * [setActiveProject][92]
97
- * [Parameters][93]
98
- * [requireProject][94]
99
- * [Parameters][95]
100
- * [selectProject][96]
101
- * [Parameters][97]
102
- * [getProjectState][98]
103
- * [Parameters][99]
104
- * [setProjectState][100]
105
- * [Parameters][101]
106
- * [setProjectStateDefaults][102]
93
+ * [handshake][89]
94
+ * [Properties][90]
95
+ * [setServerVerbosity][91]
96
+ * [Parameters][92]
97
+ * [User][93]
98
+ * [Properties][94]
99
+ * [getUser][95]
100
+ * [getCredentials][96]
101
+ * [requireUser][97]
102
+ * [Parameters][98]
103
+ * [Project][99]
104
+ * [getProject][100]
105
+ * [getProjects][101]
106
+ * [setActiveProject][102]
107
107
  * [Parameters][103]
108
- * [setProjectStateFlush][104]
109
- * [setProjectStateRefresh][105]
110
- * [saveProjectState][106]
111
- * [replaceProjectState][107]
112
- * [Parameters][108]
113
- * [applyProjectStatePatch][109]
114
- * [Parameters][110]
115
- * [subscribeProjectState][111]
116
- * [FileFilters][112]
108
+ * [requireProject][104]
109
+ * [Parameters][105]
110
+ * [selectProject][106]
111
+ * [Parameters][107]
112
+ * [getNamespace][108]
113
+ * [Parameters][109]
114
+ * [setNamespace][110]
115
+ * [Parameters][111]
116
+ * [listNamespaces][112]
117
117
  * [Properties][113]
118
- * [selectProjectFile][114]
118
+ * [getProjectState][114]
119
119
  * [Parameters][115]
120
- * [getProjectFiles][116]
120
+ * [setProjectState][116]
121
121
  * [Parameters][117]
122
- * [getProjectFileContents][118]
122
+ * [setProjectStateDefaults][118]
123
123
  * [Parameters][119]
124
- * [getProjectFile][120]
125
- * [Parameters][121]
126
- * [createProjectFile][122]
124
+ * [setProjectStateRefresh][120]
125
+ * [saveProjectState][121]
126
+ * [replaceProjectState][122]
127
127
  * [Parameters][123]
128
- * [deleteProjectFile][124]
128
+ * [applyProjectStatePatch][124]
129
129
  * [Parameters][125]
130
- * [setProjectFileContents][126]
131
- * [Parameters][127]
132
- * [selectProjectLibrary][128]
133
- * [Parameters][129]
134
- * [getProjectLibrary][130]
135
- * [Parameters][131]
136
- * [setProjectLibrary][132]
137
- * [Parameters][133]
138
- * [projectLog][134]
139
- * [Parameters][135]
140
- * [setPage][136]
141
- * [Parameters][137]
142
- * [uiAlert][138]
143
- * [Parameters][139]
144
- * [uiConfirm][140]
145
- * [Parameters][141]
146
- * [uiPanic][142]
147
- * [Parameters][143]
148
- * [uiProgress][144]
149
- * [Parameters][145]
150
- * [uiPrompt][146]
151
- * [Parameters][147]
152
- * [uiThrow][148]
153
- * [Parameters][149]
154
- * [uiWindow][150]
155
- * [Parameters][151]
156
- * [uiSplat][152]
157
- * [Parameters][153]
130
+ * [subscribeProjectState][126]
131
+ * [FileFilters][127]
132
+ * [Properties][128]
133
+ * [selectProjectFile][129]
134
+ * [Parameters][130]
135
+ * [getProjectFiles][131]
136
+ * [Parameters][132]
137
+ * [getProjectFileContents][133]
138
+ * [Parameters][134]
139
+ * [getProjectFile][135]
140
+ * [Parameters][136]
141
+ * [createProjectFile][137]
142
+ * [Parameters][138]
143
+ * [deleteProjectFile][139]
144
+ * [Parameters][140]
145
+ * [setProjectFileContents][141]
146
+ * [Parameters][142]
147
+ * [selectProjectLibrary][143]
148
+ * [Parameters][144]
149
+ * [getProjectLibrary][145]
150
+ * [Parameters][146]
151
+ * [setProjectLibrary][147]
152
+ * [Parameters][148]
153
+ * [projectLog][149]
154
+ * [Parameters][150]
155
+ * [setPage][151]
156
+ * [Parameters][152]
157
+ * [uiAlert][153]
158
+ * [Parameters][154]
159
+ * [uiConfirm][155]
160
+ * [Parameters][156]
161
+ * [uiPanic][157]
162
+ * [Parameters][158]
163
+ * [uiProgress][159]
164
+ * [Parameters][160]
165
+ * [uiPrompt][161]
166
+ * [Parameters][162]
167
+ * [uiThrow][163]
168
+ * [Parameters][164]
169
+ * [uiWindow][165]
170
+ * [Parameters][166]
171
+ * [uiSplat][167]
172
+ * [Parameters][168]
158
173
 
159
174
  ## ProjectFile
160
175
 
@@ -164,113 +179,113 @@ A project file fetched from TERA
164
179
 
165
180
  A UUID string representing the unique ID of the file
166
181
 
167
- Type: [String][154]
182
+ Type: [String][169]
168
183
 
169
184
  ### name
170
185
 
171
186
  Relative name path (can contain prefix directories) for the human readable file name
172
187
 
173
- Type: [String][154]
188
+ Type: [String][169]
174
189
 
175
190
  ### icon
176
191
 
177
192
  CSS class to use as the file icon
178
193
 
179
- Type: [String][154]
194
+ Type: [String][169]
180
195
 
181
196
  ### path
182
197
 
183
198
  Full path to the file
184
199
  This is also used as the unique identifier within the project
185
200
 
186
- Type: [String][154]
201
+ Type: [String][169]
187
202
 
188
203
  ### url
189
204
 
190
205
  Fully qualified URL to view / access / download the file from TERA
191
206
  This will usually open an edit UI within the TERA site
192
207
 
193
- Type: [String][154]
208
+ Type: [String][169]
194
209
 
195
210
  ### teraUrl
196
211
 
197
212
  Rewrite of the URL where the absolute URL has been removed in place of a relative path, assuming the owner project is active
198
213
  This is used to direct to the edit/view/download UI when the files project is active and is usually used in place of URL for TERA related operations
199
214
 
200
- Type: [String][154]
215
+ Type: [String][169]
201
216
 
202
217
  ### parsedName
203
218
 
204
219
  An object representing meta file parts of a file name
205
220
 
206
- Type: [Object][155]
221
+ Type: [Object][170]
207
222
 
208
223
  #### Properties
209
224
 
210
- * `basename` **[String][154]** The filename + extention (i.e. everything without directory name)
211
- * `filename` **[String][154]** The file portion of the name (basename without the extension)
212
- * `ext` **[String][154]** The extension portion of the name (always lower case)
213
- * `dirName` **[String][154]** The directory path portion of the name
225
+ * `basename` **[String][169]** The filename + extention (i.e. everything without directory name)
226
+ * `filename` **[String][169]** The file portion of the name (basename without the extension)
227
+ * `ext` **[String][169]** The extension portion of the name (always lower case)
228
+ * `dirName` **[String][169]** The directory path portion of the name
214
229
 
215
230
  ### created
216
231
 
217
232
  A date representing when the file was created
218
233
 
219
- Type: [Date][156]
234
+ Type: [Date][171]
220
235
 
221
236
  ### createdFormatted
222
237
 
223
238
  A human readable, formatted version of "created"
224
239
 
225
- Type: [String][154]
240
+ Type: [String][169]
226
241
 
227
242
  ### modified
228
243
 
229
244
  A date representing when the file was created
230
245
 
231
- Type: [Date][156]
246
+ Type: [Date][171]
232
247
 
233
248
  ### modifiedFormatted
234
249
 
235
250
  A human readable, formatted version of "modified"
236
251
 
237
- Type: [String][154]
252
+ Type: [String][169]
238
253
 
239
254
  ### accessed
240
255
 
241
256
  A date representing when the file was last accessed
242
257
 
243
- Type: [Date][156]
258
+ Type: [Date][171]
244
259
 
245
260
  ### accessedFormatted
246
261
 
247
262
  A human readable, formatted version of "accessed"
248
263
 
249
- Type: [String][154]
264
+ Type: [String][169]
250
265
 
251
266
  ### size
252
267
 
253
268
  Size, in bytes, of the file
254
269
 
255
- Type: [Number][157]
270
+ Type: [Number][172]
256
271
 
257
272
  ### sizeFormatted
258
273
 
259
274
  A human readable, formatted version of the file size
260
275
 
261
- Type: [String][154]
276
+ Type: [String][169]
262
277
 
263
278
  ### mime
264
279
 
265
280
  The associated mime type for the file
266
281
 
267
- Type: [String][154]
282
+ Type: [String][169]
268
283
 
269
284
  ### meta
270
285
 
271
286
  Additional meta information for the file
272
287
 
273
- Type: [Object][155]
288
+ Type: [Object][170]
274
289
 
275
290
  ### getContents
276
291
 
@@ -280,9 +295,9 @@ Fetch the raw file contents as a Blob
280
295
 
281
296
  #### Parameters
282
297
 
283
- * `options` **[Object][155]?** Additioanl options to mutate behaviour
298
+ * `options` **[Object][170]?** Additioanl options to mutate behaviour
284
299
 
285
- Returns **[Blob][158]** The eventual raw file contents as a Blob
300
+ Returns **[Blob][173]** The eventual raw file contents as a Blob
286
301
 
287
302
  ### setContents
288
303
 
@@ -292,9 +307,9 @@ Overwrite the contents of a file with new content
292
307
 
293
308
  #### Parameters
294
309
 
295
- * `contents` **(File | [Blob][158] | [FormData][159] | [Object][155] | [Array][160])** The new file contents
310
+ * `contents` **(File | [Blob][173] | [FormData][174] | [Object][170] | [Array][175])** The new file contents
296
311
 
297
- Returns **[Promise][161]** A promise which resolves when the operation has completed
312
+ Returns **[Promise][176]** A promise which resolves when the operation has completed
298
313
 
299
314
  ### getRefs
300
315
 
@@ -302,7 +317,7 @@ Returns **[Promise][161]** A promise which resolves when the operation has compl
302
317
 
303
318
  Fetch the file contents as an array of Reflib refs
304
319
 
305
- Returns **[Promise][161]<[Array][160]\<Ref>>** An eventual array of RefLib references
320
+ Returns **[Promise][176]<[Array][175]\<Ref>>** An eventual array of RefLib references
306
321
 
307
322
  ### setRefs
308
323
 
@@ -312,18 +327,18 @@ Overwrite the contents of a file with a new collection of Reflib refs
312
327
 
313
328
  #### Parameters
314
329
 
315
- * `refs` **[Array][160]\<RefLibRef>** Collection of references for the selected library
330
+ * `refs` **[Array][175]\<RefLibRef>** Collection of references for the selected library
316
331
 
317
- Returns **[Promise][161]** A promise which resolves when the operation has completed
332
+ Returns **[Promise][176]** A promise which resolves when the operation has completed
318
333
 
319
334
  ### serialize
320
335
 
321
- * **See**: [https://developer.mozilla.org/en-US/docs/Web/API/Web\_Workers\_API/Structured\_clone\_algorithm][162]
336
+ * **See**: [https://developer.mozilla.org/en-US/docs/Web/API/Web\_Workers\_API/Structured\_clone\_algorithm][177]
322
337
 
323
338
  Compress a file state down into a serializable entity
324
339
  By default this computes a Structured Clone which can be stringified
325
340
 
326
- Returns **[Object][155]** A Structured Clone compatible representation of this ProjectFile instance
341
+ Returns **[Object][170]** A Structured Clone compatible representation of this ProjectFile instance
327
342
 
328
343
  ### deserialize
329
344
 
@@ -331,7 +346,7 @@ Restore an entity created with serialize
331
346
 
332
347
  #### Parameters
333
348
 
334
- * `data` **[Object][155]** An input object created via `ProjectFiles.serialize()`
349
+ * `data` **[Object][170]** An input object created via `ProjectFiles.serialize()`
335
350
 
336
351
  Returns **[ProjectFile][1]** A ProjectFile instance setup against the deserializzed data
337
352
 
@@ -343,23 +358,23 @@ Main Tera-Fy Client (class singleton) to be used in a frontend browser
343
358
 
344
359
  Various settings to configure behaviour
345
360
 
346
- Type: [Object][155]
361
+ Type: [Object][170]
347
362
 
348
363
  #### Properties
349
364
 
350
- * `session` **[String][154]** Unique session signature for this instance of TeraFy, used to sign server messages, if falsy `getEntropicString(16)` is used to populate
351
- * `devMode` **[Boolean][163]** Operate in Dev-Mode - i.e. force outer refresh when encountering an existing TeraFy instance + be more tolerent of weird iframe origins
352
- * `verbosity` **[Number][157]** Verbosity level, the higher the more chatty TeraFY will be. Set to zero to disable all `debug()` call output
365
+ * `session` **[String][169]** Unique session signature for this instance of TeraFy, used to sign server messages, if falsy `getEntropicString(16)` is used to populate
366
+ * `devMode` **[Boolean][178]** Operate in Dev-Mode - i.e. force outer refresh when encountering an existing TeraFy instance + be more tolerent of weird iframe origins
367
+ * `verbosity` **[Number][172]** Verbosity level, the higher the more chatty TeraFY will be. Set to zero to disable all `debug()` call output
353
368
  * `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
354
- * `modeFallback` **[String][154]** Method to use when all method detection fails
355
- * `modeOverrides` **[Object][155]<[Object][155]<[Function][164]>>** Functions to run when switching to specific modes, these are typically used to augment config. Called as `(config:Object)`
356
- * `modeTimeout` **[Number][157]** How long entities have in 'detect' mode to identify themselves
357
- * `siteUrl` **[String][154]** The TERA URL to connect to
358
- * `restrictOrigin` **[String][154]** URL to restrict communications to
359
- * `List` **[Array][160]<[String][154]>** of sandbox allowables for the embedded if in embed mode
360
- * `handshakeInterval` **[Number][157]** Interval in milliseconds when sanning for a handshake
361
- * `handshakeTimeout` **[Number][157]** Interval in milliseconds for when to give up trying to handshake
362
- * `debugPaths` **[Array][160]<([String][154] | [Array][160]<[String][154]>)>?** List of paths (in either dotted or array notation) to enter debugging mode if a change is detected in dev mode e.g. `{debugPaths: ['foo.bar.baz']}`. This really slows down state writes so should only be used for debugging
369
+ * `modeFallback` **[String][169]** Method to use when all method detection fails
370
+ * `modeOverrides` **[Object][170]<[Object][170]<[Function][179]>>** Functions to run when switching to specific modes, these are typically used to augment config. Called as `(config:Object)`
371
+ * `modeTimeout` **[Number][172]** How long entities have in 'detect' mode to identify themselves
372
+ * `siteUrl` **[String][169]** The TERA URL to connect to
373
+ * `restrictOrigin` **[String][169]** URL to restrict communications to
374
+ * `List` **[Array][175]<[String][169]>** of sandbox allowables for the embedded if in embed mode
375
+ * `handshakeInterval` **[Number][172]** Interval in milliseconds when sanning for a handshake
376
+ * `handshakeTimeout` **[Number][172]** Interval in milliseconds for when to give up trying to handshake
377
+ * `debugPaths` **[Array][175]<([String][169] | [Array][175]<[String][169]>)>?** List of paths (in either dotted or array notation) to enter debugging mode if a change is detected in dev mode e.g. `{debugPaths: ['foo.bar.baz']}`. This really slows down state writes so should only be used for debugging
363
378
 
364
379
  ### events
365
380
 
@@ -371,13 +386,13 @@ Type: Mitt
371
386
 
372
387
  DOMElements for this TeraFy instance
373
388
 
374
- Type: [Object][155]
389
+ Type: [Object][170]
375
390
 
376
391
  #### Properties
377
392
 
378
393
  * `el` **DOMElement** The main tera-fy div wrapper
379
394
  * `iframe` **DOMElement** The internal iFrame element (if `settings.mode == 'child'`)
380
- * `popup` **[Window][165]** The popup window context (if `settings.mode == 'popup'`)
395
+ * `popup` **[Window][180]** The popup window context (if `settings.mode == 'popup'`)
381
396
  * `stylesheet` **DOMElement** The corresponding stylesheet
382
397
 
383
398
  ### methods
@@ -385,13 +400,21 @@ Type: [Object][155]
385
400
  List of function stubs mapped from the server to here
386
401
  This array is forms the reference of `TeraFy.METHOD()` objects to provide locally which will be mapped via `TeraFy.rpc(METHOD, ...args)`
387
402
 
388
- Type: [Array][160]<[String][154]>
403
+ Type: [Array][175]<[String][169]>
389
404
 
390
405
  ### plugins
391
406
 
392
407
  Loaded plugins via Use()
393
408
 
394
- Type: [Array][160]\<TeraFyPlugin>
409
+ Type: [Array][175]\<TeraFyPlugin>
410
+
411
+ ### namespaces
412
+
413
+ Active namespaces we are subscribed to
414
+ Each key is the namespace name with the value as the local reactive \ observer \ object equivelent
415
+ The key string is always of the form `${ENTITY}::${ID}` e.g. `projects:1234`
416
+
417
+ Type: [Object][170]<[Object][170]>
395
418
 
396
419
  ### send
397
420
 
@@ -399,9 +422,9 @@ Send a message + wait for a response object
399
422
 
400
423
  #### Parameters
401
424
 
402
- * `message` **[Object][155]** Message object to send
425
+ * `message` **[Object][170]** Message object to send
403
426
 
404
- Returns **[Promise][161]\<any>** A promise which resolves when the operation has completed with the remote reply
427
+ Returns **[Promise][176]\<any>** A promise which resolves when the operation has completed with the remote reply
405
428
 
406
429
  ### sendRaw
407
430
 
@@ -410,7 +433,7 @@ This function does not return or wait for a reply - use `send()` for that
410
433
 
411
434
  #### Parameters
412
435
 
413
- * `message` **[Object][155]** Message object to send
436
+ * `message` **[Object][170]** Message object to send
414
437
 
415
438
  ### rpc
416
439
 
@@ -418,10 +441,10 @@ Call an RPC function in the server instance
418
441
 
419
442
  #### Parameters
420
443
 
421
- * `method` **[String][154]** The method name to call
444
+ * `method` **[String][169]** The method name to call
422
445
  * `args` **...any?** Optional arguments to pass to the function
423
446
 
424
- Returns **[Promise][161]\<any>** The resolved output of the server function
447
+ Returns **[Promise][176]\<any>** The resolved output of the server function
425
448
 
426
449
  ### acceptMessage
427
450
 
@@ -429,9 +452,9 @@ Accept an incoming message
429
452
 
430
453
  #### Parameters
431
454
 
432
- * `rawMessage` **[MessageEvent][166]** Raw message event to process
455
+ * `rawMessage` **[MessageEvent][181]** Raw message event to process
433
456
 
434
- Returns **[Promise][161]** A promise which will resolve when the message has been processed
457
+ Returns **[Promise][176]** A promise which will resolve when the message has been processed
435
458
 
436
459
  ### acceptPostboxes
437
460
 
@@ -440,15 +463,15 @@ Listening postboxes, these correspond to outgoing message IDs that expect a resp
440
463
  ### createProjectStatePatch
441
464
 
442
465
  Create + transmit a new project state patch base on the current and previous states
443
- The transmitted patch follows the [JSPatch][167] standard
466
+ The transmitted patch follows the [JSPatch][182] standard
444
467
  This function accepts an entire projectState instance, computes the delta and transmits that to the server for merging
445
468
 
446
469
  #### Parameters
447
470
 
448
- * `newState` **[Object][155]** The local projectState to accept
449
- * `oldState` **[Object][155]** The previous projectState to examine against
471
+ * `newState` **[Object][170]** The local projectState to accept
472
+ * `oldState` **[Object][170]** The previous projectState to examine against
450
473
 
451
- Returns **[Promise][161]** A promise which will resolve when the operation has completed
474
+ Returns **[Promise][176]** A promise which will resolve when the operation has completed
452
475
 
453
476
  ### applyProjectStatePatch
454
477
 
@@ -457,21 +480,21 @@ This function also enters debugging mode if any of the `settings.debugPaths` are
457
480
 
458
481
  #### Parameters
459
482
 
460
- * `patch` **[Array][160]** Patch to apply
483
+ * `patch` **[Array][175]** Patch to apply
461
484
 
462
- Returns **[Promise][161]** A promise which resolves when the operation has completed
485
+ Returns **[Promise][176]** A promise which resolves when the operation has completed
463
486
 
464
487
  ### applyProjectStatePatchLocal
465
488
 
466
489
  Client function which accepts a patch from the server and applies it to local project state
467
- The patch should follow the [JSPatch][167] standard
490
+ The patch should follow the [JSPatch][182] standard
468
491
  This function is expected to be sub-classed by a plugin
469
492
 
470
493
  #### Parameters
471
494
 
472
- * `patch` **[Array][160]** A JSPatch patch to apply
495
+ * `patch` **[Array][175]** A JSPatch patch to apply
473
496
 
474
- Returns **[Promise][161]** A promise which will resolve when the operation has completed
497
+ Returns **[Promise][176]** A promise which will resolve when the operation has completed
475
498
 
476
499
  ### init
477
500
 
@@ -480,22 +503,22 @@ This function can only be called once and will return the existing init() worker
480
503
 
481
504
  #### Parameters
482
505
 
483
- * `options` **[Object][155]?** Additional options to merge into `settings` via `set`
506
+ * `options` **[Object][170]?** Additional options to merge into `settings` via `set`
484
507
 
485
- Returns **[Promise][161]<[TeraFy][30]>** An eventual promise which will resovle with this terafy instance
508
+ Returns **[Promise][176]<[TeraFy][30]>** An eventual promise which will resovle with this terafy instance
486
509
 
487
510
  ### detectMode
488
511
 
489
512
  Populate `settings.mode`
490
513
  Try to communicate with a parent frame, if none assume we need to fallback to child mode
491
514
 
492
- Returns **[Promise][161]<[String][154]>** A promise which will resolve with the detected mode to use
515
+ Returns **[Promise][176]<[String][169]>** A promise which will resolve with the detected mode to use
493
516
 
494
517
  ### injectComms
495
518
 
496
519
  Find an existing active TERA server OR initalize one
497
520
 
498
- Returns **[Promise][161]** A promise which will resolve when the loading has completed and we have found a parent TERA instance or initiallized a child
521
+ Returns **[Promise][176]** A promise which will resolve when the loading has completed and we have found a parent TERA instance or initiallized a child
499
522
 
500
523
  ### handshakeLoop
501
524
 
@@ -503,20 +526,20 @@ Keep trying to handshake until the target responds
503
526
 
504
527
  #### Parameters
505
528
 
506
- * `options` **[Object][155]?** Additional options to mutate behaviour
529
+ * `options` **[Object][170]?** Additional options to mutate behaviour
507
530
 
508
531
  #### Properties
509
532
 
510
- * `handshakeInterval` **[Number][157]?** Interval in milliseconds when sanning for a handshake, defaults to global setting
511
- * `handshakeTimeout` **[Number][157]?** Interval in milliseconds for when to give up trying to handshake, defaults to global setting
533
+ * `handshakeInterval` **[Number][172]?** Interval in milliseconds when sanning for a handshake, defaults to global setting
534
+ * `handshakeTimeout` **[Number][172]?** Interval in milliseconds for when to give up trying to handshake, defaults to global setting
512
535
 
513
- Returns **[Promise][161]** A promise which will either resolve when the handshake is successful OR fail with 'TIMEOUT'
536
+ Returns **[Promise][176]** A promise which will either resolve when the handshake is successful OR fail with 'TIMEOUT'
514
537
 
515
538
  ### injectStylesheet
516
539
 
517
540
  Inject a local stylesheet to handle TERA server functionality
518
541
 
519
- Returns **[Promise][161]** A promise which will resolve when the loading has completed and we have found a parent TERA instance or initiallized a child
542
+ Returns **[Promise][176]** A promise which will resolve when the loading has completed and we have found a parent TERA instance or initiallized a child
520
543
 
521
544
  ### injectMethods
522
545
 
@@ -531,7 +554,7 @@ This function will only act if `settings.devMode` is truthy
531
554
 
532
555
  * `msg` **...any?** Output to show
533
556
  * `method` **(`"INFO"` | `"LOG"` | `"WARN"` | `"ERROR"`)** Logging method to use (optional, default `'LOG'`)
534
- * `verboseLevel` **[Number][157]** The verbosity level to trigger at. If `settings.verbosity` is lower than this, the message is ignored (optional, default `1`)
557
+ * `verboseLevel` **[Number][172]** The verbosity level to trigger at. If `settings.verbosity` is lower than this, the message is ignored (optional, default `1`)
535
558
 
536
559
  ### set
537
560
 
@@ -540,11 +563,11 @@ This function also routes 'special' keys like `devMode` to their internal handle
540
563
 
541
564
  #### Parameters
542
565
 
543
- * `key` **([String][154] | [Object][155])** Either a single setting key to set or an object to merge
566
+ * `key` **([String][169] | [Object][170])** Either a single setting key to set or an object to merge
544
567
  * `value` **any** The value to set if `key` is a string
545
- * `options` **[Object][155]?** Additional options to mutate behaviour
568
+ * `options` **[Object][170]?** Additional options to mutate behaviour
546
569
 
547
- * `options.ignoreNullish` **[Boolean][163]** If falsy, this forces the setting of undefined or null values rather than ignoring them when specifying values by string (optional, default `true`)
570
+ * `options.ignoreNullish` **[Boolean][178]** If falsy, this forces the setting of undefined or null values rather than ignoring them when specifying values by string (optional, default `true`)
548
571
 
549
572
  Returns **[TeraFy][30]** This chainable terafy instance
550
573
 
@@ -556,9 +579,9 @@ Set or merge settings - but only in dev mode and only if the value is not undefi
556
579
 
557
580
  #### Parameters
558
581
 
559
- * `key` **([String][154] | [Object][155])** Either a single setting key to set or an object to merge
582
+ * `key` **([String][169] | [Object][170])** Either a single setting key to set or an object to merge
560
583
  * `value` **any** The value to set if `key` is a string
561
- * `options` **[Object][155]?** Additional options to mutate behaviour
584
+ * `options` **[Object][170]?** Additional options to mutate behaviour
562
585
 
563
586
  Returns **[TeraFy][30]** This chainable terafy instance
564
587
 
@@ -568,8 +591,8 @@ Include a TeraFy client plugin
568
591
 
569
592
  #### Parameters
570
593
 
571
- * `source` **([Function][164] | [Object][155] | [String][154])** Either the JS module class, singleton object or URL to fetch it from. Eventually constructed as invoked as `(teraClient:TeraFy, options:Object)`
572
- * `options` **[Object][155]?** Additional options to mutate behaviour during construction (pass options to init() to intialize later options)
594
+ * `source` **([Function][179] | [Object][170] | [String][169])** Either the JS module class, singleton object or URL to fetch it from. Eventually constructed as invoked as `(teraClient:TeraFy, options:Object)`
595
+ * `options` **[Object][170]?** Additional options to mutate behaviour during construction (pass options to init() to intialize later options)
573
596
 
574
597
  Returns **[TeraFy][30]** This chainable terafy instance
575
598
 
@@ -579,8 +602,8 @@ Internal function used by use() to merge an external declared singleton against
579
602
 
580
603
  #### Parameters
581
604
 
582
- * `target` **[Object][155]** Initalied class instance to extend
583
- * `source` **[Object][155]** Initalized source object to extend from
605
+ * `target` **[Object][170]** Initalied class instance to extend
606
+ * `source` **[Object][170]** Initalized source object to extend from
584
607
 
585
608
  ### toggleDevMode
586
609
 
@@ -592,7 +615,7 @@ This function also accepts meta values:
592
615
 
593
616
  #### Parameters
594
617
 
595
- * `devModeEnabled` **(`"toggle"` | `"proxy"` | [Boolean][163])** Optional boolean to force dev mode or specify other behaviour (optional, default `'toggle'`)
618
+ * `devModeEnabled` **(`"toggle"` | `"proxy"` | [Boolean][178])** Optional boolean to force dev mode or specify other behaviour (optional, default `'toggle'`)
596
619
 
597
620
  Returns **[TeraFy][30]** This chainable terafy instance
598
621
 
@@ -603,7 +626,7 @@ This is usually because the server component wants to perform some user activity
603
626
 
604
627
  #### Parameters
605
628
 
606
- * `isFocused` **([String][154] | [Boolean][163])** Whether to fullscreen the embedded component (optional, default `'toggle'`)
629
+ * `isFocused` **([String][169] | [Boolean][178])** Whether to fullscreen the embedded component (optional, default `'toggle'`)
607
630
 
608
631
  ### getEntropicString
609
632
 
@@ -611,9 +634,9 @@ Generate random entropic character string in Base64
611
634
 
612
635
  #### Parameters
613
636
 
614
- * `maxLength` **[Number][157]** Maximum lengh of the genrated string (optional, default `32`)
637
+ * `maxLength` **[Number][172]** Maximum lengh of the genrated string (optional, default `32`)
615
638
 
616
- Returns **[String][154]**&#x20;
639
+ Returns **[String][169]**&#x20;
617
640
 
618
641
  ### selectProjectFile
619
642
 
@@ -625,7 +648,45 @@ This is an pre-requisite step for requireProject()
625
648
 
626
649
  * `options` &#x20;
627
650
 
628
- Returns **[Promise][161]** A promise which will resolve if the there is a user and they are logged in
651
+ Returns **[Promise][176]** A promise which will resolve if the there is a user and they are logged in
652
+
653
+ ## mountNamespace
654
+
655
+ Make a namespace available locally
656
+ This generally creates whatever framework flavoured reactive/observer/object is supported locally - generally with writes automatically synced with the master state
657
+
658
+ ### Parameters
659
+
660
+ * `name` **[String][169]** The alias of the namespace, this should be alphanumeric + hyphens + underscores
661
+
662
+ Returns **[Promise][176]\<Reactive>** A promise which resolves to the reactive object
663
+
664
+ ## Actual namespace mounting function designed to be overriden by plugins
665
+
666
+ ### Parameters
667
+
668
+ * `name` **[String][169]** The alias of the namespace, this should be alphanumeric + hyphens + underscores
669
+
670
+ Returns **[Promise][176]** A promise which resolves when the mount operation has completed
671
+
672
+ ## unmountNamespace
673
+
674
+ Release a locally mounted namespace
675
+ This function will remove the namespace from `namespaces`, cleaning up any memory / subscription hooks
676
+
677
+ ### Parameters
678
+
679
+ * `name` **[String][169]** The name of the namespace to unmount
680
+
681
+ Returns **[Promise][176]** A promise which resolves when the operation has completed
682
+
683
+ ## Actual namespace unmounting function designed to be overriden by plugins
684
+
685
+ ### Parameters
686
+
687
+ * `name` **[String][169]** The name of the namespace to unmount
688
+
689
+ Returns **[Promise][176]** A promise which resolves when the operation has completed
629
690
 
630
691
  ## handshake
631
692
 
@@ -633,9 +694,9 @@ Return basic server information as a form of validation
633
694
 
634
695
  ### Properties
635
696
 
636
- * `date` **[Date][156]** Server date
697
+ * `date` **[Date][171]** Server date
637
698
 
638
- Returns **[Promise][161]<[Object][155]>** Basic promise result
699
+ Returns **[Promise][176]<[Object][170]>** Basic promise result
639
700
 
640
701
  ## setServerVerbosity
641
702
 
@@ -643,7 +704,7 @@ RPC callback to set the server verbostiy level
643
704
 
644
705
  ### Parameters
645
706
 
646
- * `verbosity` **[Number][157]** The desired server verbosity level
707
+ * `verbosity` **[Number][172]** The desired server verbosity level
647
708
 
648
709
  ## User
649
710
 
@@ -651,16 +712,22 @@ User / active session within TERA
651
712
 
652
713
  ### Properties
653
714
 
654
- * `id` **[String][154]** Unique identifier of the user
655
- * `email` **[String][154]** The email address of the current user
656
- * `name` **[String][154]** The provided full name of the user
657
- * `isSubscribed` **[Boolean][163]** Whether the active user has a TERA subscription
715
+ * `id` **[String][169]** Unique identifier of the user
716
+ * `email` **[String][169]** The email address of the current user
717
+ * `name` **[String][169]** The provided full name of the user
718
+ * `isSubscribed` **[Boolean][178]** Whether the active user has a TERA subscription
658
719
 
659
720
  ## getUser
660
721
 
661
722
  Fetch the current session user
662
723
 
663
- Returns **[Promise][161]<[User][84]>** The current logged in user or null if none
724
+ Returns **[Promise][176]<[User][93]>** The current logged in user or null if none
725
+
726
+ ## getCredentials
727
+
728
+ Provide an object of credentials for 3rd party services like Firebase/Supabase
729
+
730
+ Returns **[Object][170]** An object containing 3rd party service credentials
664
731
 
665
732
  ## requireUser
666
733
 
@@ -670,11 +737,11 @@ This is an pre-requisite step for requireProject()
670
737
 
671
738
  ### Parameters
672
739
 
673
- * `options` **[Object][155]?** Additional options to mutate behaviour
740
+ * `options` **[Object][170]?** Additional options to mutate behaviour
674
741
 
675
- * `options.forceRetry` **[Boolean][163]** Forcabily try to refresh the user state (optional, default `false`)
742
+ * `options.forceRetry` **[Boolean][178]** Forcabily try to refresh the user state (optional, default `false`)
676
743
 
677
- Returns **[Promise][161]<[User][84]>** The current logged in user or null if none
744
+ Returns **[Promise][176]<[User][93]>** The current logged in user or null if none
678
745
 
679
746
  ## Project
680
747
 
@@ -684,13 +751,13 @@ Project entry within TERA
684
751
 
685
752
  Get the currently active project, if any
686
753
 
687
- Returns **[Promise][161]<([Project][89] | null)>** The currently active project, if any
754
+ Returns **[Promise][176]<([Project][99] | null)>** The currently active project, if any
688
755
 
689
756
  ## getProjects
690
757
 
691
758
  Get a list of projects the current session user has access to
692
759
 
693
- Returns **[Promise][161]<[Array][160]<[Project][89]>>** Collection of projects the user has access to
760
+ Returns **[Promise][176]<[Array][175]<[Project][99]>>** Collection of projects the user has access to
694
761
 
695
762
  ## setActiveProject
696
763
 
@@ -698,7 +765,7 @@ Set the currently active project within TERA
698
765
 
699
766
  ### Parameters
700
767
 
701
- * `project` **([Object][155] | [String][154])** The project to set as active - either the full Project object or its ID
768
+ * `project` **([Object][170] | [String][169])** The project to set as active - either the full Project object or its ID
702
769
 
703
770
  ## requireProject
704
771
 
@@ -707,14 +774,14 @@ Note that this function will percist in asking the uesr even if they try to canc
707
774
 
708
775
  ### Parameters
709
776
 
710
- * `options` **[Object][155]?** Additional options to mutate behaviour
777
+ * `options` **[Object][170]?** Additional options to mutate behaviour
711
778
 
712
- * `options.autoSetActiveProject` **[Boolean][163]** After selecting a project set that project as active in TERA (optional, default `true`)
713
- * `options.title` **[String][154]** The title of the dialog to display (optional, default `"Select a project to work with"`)
714
- * `options.noSelectTitle` **[String][154]** Dialog title when warning the user they need to select something (optional, default `'Select project'`)
715
- * `options.noSelectBody` **[String][154]** Dialog body when warning the user they need to select something (optional, default `'A project needs to be selected to continue'`)
779
+ * `options.autoSetActiveProject` **[Boolean][178]** After selecting a project set that project as active in TERA (optional, default `true`)
780
+ * `options.title` **[String][169]** The title of the dialog to display (optional, default `"Select a project to work with"`)
781
+ * `options.noSelectTitle` **[String][169]** Dialog title when warning the user they need to select something (optional, default `'Select project'`)
782
+ * `options.noSelectBody` **[String][169]** Dialog body when warning the user they need to select something (optional, default `'A project needs to be selected to continue'`)
716
783
 
717
- Returns **[Promise][161]<[Project][89]>** The active project
784
+ Returns **[Promise][176]<[Project][99]>** The active project
718
785
 
719
786
  ## selectProject
720
787
 
@@ -722,13 +789,49 @@ Prompt the user to select a project from those available
722
789
 
723
790
  ### Parameters
724
791
 
725
- * `options` **[Object][155]?** Additional options to mutate behaviour
792
+ * `options` **[Object][170]?** Additional options to mutate behaviour
793
+
794
+ * `options.title` **[String][169]** The title of the dialog to display (optional, default `"Select a project to work with"`)
795
+ * `options.allowCancel` **[Boolean][178]** Advertise cancelling the operation, the dialog can still be cancelled by closing it (optional, default `true`)
796
+ * `options.setActive` **[Boolean][178]** Also set the project as active when selected (optional, default `false`)
797
+
798
+ Returns **[Promise][176]<[Project][99]>** The active project
799
+
800
+ ## getNamespace
801
+
802
+ Get a one-off snapshot of a namespace without mounting it
803
+ This can be used for simpler apps which don't have their own reactive / observer equivelent
804
+
805
+ ### Parameters
806
+
807
+ * `name` **[String][169]** The alias of the namespace, this should be alphanumeric + hyphens + underscores
808
+
809
+ Returns **[Promise][176]<[Object][170]>** A promise which resolves to the namespace POJO state
810
+
811
+ ## setNamespace
812
+
813
+ Set (or merge by default) a one-off snapshot over an existing namespace
814
+ This can be used for simpler apps which don't have their own reactive / observer equivelent and just want to quickly set something
815
+
816
+ ### Parameters
817
+
818
+ * `name` **[String][169]** The name of the namespace
819
+ * `state` **[Object][170]** The state to merge
820
+ * `options` **[Object][170]?** Additional options to mutate behaviour
821
+
822
+ * `options.method` **(`"merge"` | `"set"`)** How to handle the state. 'merge' (merge a partial state over the existing namespace state), 'set' (completely overwrite the existing namespace) (optional, default `'merge'`)
726
823
 
727
- * `options.title` **[String][154]** The title of the dialog to display (optional, default `"Select a project to work with"`)
728
- * `options.allowCancel` **[Boolean][163]** Advertise cancelling the operation, the dialog can still be cancelled by closing it (optional, default `true`)
729
- * `options.setActive` **[Boolean][163]** Also set the project as active when selected (optional, default `false`)
824
+ Returns **[Promise][176]<[Object][170]>** A promise which resolves to the namespace POJO state
730
825
 
731
- Returns **[Promise][161]<[Project][89]>** The active project
826
+ ## listNamespaces
827
+
828
+ Return a list of namespaces available to the current project
829
+
830
+ ### Properties
831
+
832
+ * `name` **[String][169]** The name of the namespace
833
+
834
+ Returns **[Promise][176]<[Array][175]<[Object][170]>>** Collection of available namespaces for the current project
732
835
 
733
836
  ## getProjectState
734
837
 
@@ -736,12 +839,12 @@ Return the current, full snapshot state of the active project
736
839
 
737
840
  ### Parameters
738
841
 
739
- * `options` **[Object][155]?** Additional options to mutate behaviour
842
+ * `options` **[Object][170]?** Additional options to mutate behaviour
740
843
 
741
- * `options.autoRequire` **[Boolean][163]** Run `requireProject()` automatically before continuing (optional, default `true`)
742
- * `Paths` **[Array][160]<[String][154]>** to subscribe to e.g. \['/users/'],
844
+ * `options.autoRequire` **[Boolean][178]** Run `requireProject()` automatically before continuing (optional, default `true`)
845
+ * `Paths` **[Array][175]<[String][169]>** to subscribe to e.g. \['/users/'],
743
846
 
744
- Returns **[Promise][161]<[Object][155]>** The current project state snapshot
847
+ Returns **[Promise][176]<[Object][170]>** The current project state snapshot
745
848
 
746
849
  ## setProjectState
747
850
 
@@ -753,13 +856,13 @@ Paths can be any valid Lodash.set() value such as:
753
856
 
754
857
  ### Parameters
755
858
 
756
- * `path` **([String][154] | [Array][160]<[String][154]>)** The sub-path within the project state to set
859
+ * `path` **([String][169] | [Array][175]<[String][169]>)** The sub-path within the project state to set
757
860
  * `value` **any** The value to set
758
- * `options` **[Object][155]?** Additional options to mutate behaviour
861
+ * `options` **[Object][170]?** Additional options to mutate behaviour
759
862
 
760
- * `options.save` **[Boolean][163]** Save the changes to the server immediately, disable to queue up multiple writes (optional, default `true`)
863
+ * `options.save` **[Boolean][178]** Save the changes to the server immediately, disable to queue up multiple writes (optional, default `true`)
761
864
 
762
- Returns **[Promise][161]** A promise which resolves when the operation has been dispatched to the server
865
+ Returns **[Promise][176]** A promise which resolves when the operation has been dispatched to the server
763
866
 
764
867
  ## setProjectStateDefaults
765
868
 
@@ -769,31 +872,24 @@ Set a nested value within the project state - just like `setProjectState()` - bu
769
872
 
770
873
  ### Parameters
771
874
 
772
- * `path` **([String][154] | [Array][160]<[String][154]>)** The sub-path within the project state to set
875
+ * `path` **([String][169] | [Array][175]<[String][169]>)** The sub-path within the project state to set
773
876
  * `value` **any** The value to set
774
- * `options` **[Object][155]?** Additional options to mutate behaviour, see setProjectState() for the full list of supported options
775
-
776
- Returns **[Promise][161]<[Boolean][163]>** A promise which resolves to whether any changes were made - True if defaults were applied, false otherwise
877
+ * `options` **[Object][170]?** Additional options to mutate behaviour, see setProjectState() for the full list of supported options
777
878
 
778
- ## setProjectStateFlush
779
-
780
- Force copying local changes to the server
781
- This is only ever needed when saving large quantities of data that need to be immediately available
782
-
783
- Returns **[Promise][161]** A promise which resolves when the operation has completed
879
+ Returns **[Promise][176]<[Boolean][178]>** A promise which resolves to whether any changes were made - True if defaults were applied, false otherwise
784
880
 
785
881
  ## setProjectStateRefresh
786
882
 
787
883
  Force refetching the remote project state into local
788
884
  This is only ever needed when saving large quantities of data that need to be immediately available
789
885
 
790
- Returns **[Promise][161]** A promise which resolves when the operation has completed
886
+ Returns **[Promise][176]** A promise which resolves when the operation has completed
791
887
 
792
888
  ## saveProjectState
793
889
 
794
890
  Force-Save the currently active project state
795
891
 
796
- Returns **[Promise][161]** A promise which resolves when the operation has completed
892
+ Returns **[Promise][176]** A promise which resolves when the operation has completed
797
893
 
798
894
  ## replaceProjectState
799
895
 
@@ -804,9 +900,9 @@ You almost never want to use this function directly, see `setProjectState(path,
804
900
 
805
901
  ### Parameters
806
902
 
807
- * `newState` **[Object][155]** The new state to replace the current state with
903
+ * `newState` **[Object][170]** The new state to replace the current state with
808
904
 
809
- Returns **[Promise][161]** A promise which resolves when the operation has completed
905
+ Returns **[Promise][176]** A promise which resolves when the operation has completed
810
906
 
811
907
  ## applyProjectStatePatch
812
908
 
@@ -814,9 +910,9 @@ Apply a computed `just-diff` patch to the current project state
814
910
 
815
911
  ### Parameters
816
912
 
817
- * `Patch` **[Object][155]** to apply
913
+ * `Patch` **[Object][170]** to apply
818
914
 
819
- Returns **[Promise][161]** A promise which resolves when the operation has completed
915
+ Returns **[Promise][176]** A promise which resolves when the operation has completed
820
916
 
821
917
  ## subscribeProjectState
822
918
 
@@ -824,7 +920,7 @@ Subscribe to project state changes
824
920
  This will dispatch an RPC call to the source object `applyProjectStatePatchLocal()` function with the patch
825
921
  If the above call fails the subscriber is assumed as dead and unsubscribed from the polling list
826
922
 
827
- Returns **[Promise][161]<[Function][164]>** A promise which resolves when a subscription has been created, call the resulting function to unsubscribe
923
+ Returns **[Promise][176]<[Function][179]>** A promise which resolves when a subscription has been created, call the resulting function to unsubscribe
828
924
 
829
925
  ## FileFilters
830
926
 
@@ -832,10 +928,10 @@ Data structure for a file filter
832
928
 
833
929
  ### Properties
834
930
 
835
- * `library` **[Boolean][163]?** Restrict to library files only
836
- * `filename` **[String][154]?** CSV of @momsfriendlydevco/match expressions to filter the filename by (filenames are the basename sans extension)
837
- * `basename` **[String][154]?** CSV of @momsfriendlydevco/match expressions to filter the basename by
838
- * `ext` **[String][154]?** CSV of @momsfriendlydevco/match expressions to filter the file extension by
931
+ * `library` **[Boolean][178]?** Restrict to library files only
932
+ * `filename` **[String][169]?** CSV of @momsfriendlydevco/match expressions to filter the filename by (filenames are the basename sans extension)
933
+ * `basename` **[String][169]?** CSV of @momsfriendlydevco/match expressions to filter the basename by
934
+ * `ext` **[String][169]?** CSV of @momsfriendlydevco/match expressions to filter the file extension by
839
935
 
840
936
  ## selectProjectFile
841
937
 
@@ -843,20 +939,20 @@ Prompt the user to select a library to operate on
843
939
 
844
940
  ### Parameters
845
941
 
846
- * `options` **[Object][155]?** Additional options to mutate behaviour
942
+ * `options` **[Object][170]?** Additional options to mutate behaviour
847
943
 
848
- * `options.title` **[String][154]** The title of the dialog to display (optional, default `"Select a file"`)
849
- * `options.hint` **([String][154] | [Array][160]<[String][154]>)?** Hints to identify the file to select in array order of preference
850
- * `options.save` **[Boolean][163]** Set to truthy if saving a new file, UI will adjust to allowing overwrite OR new file name input (optional, default `false`)
851
- * `options.filters` **[FileFilters][112]?** Optional file filters
852
- * `options.allowUpload` **[Boolean][163]** Allow uploading new files (optional, default `true`)
853
- * `options.allowRefresh` **[Boolean][163]** Allow the user to manually refresh the file list (optional, default `true`)
854
- * `options.allowDownloadZip` **[Boolean][163]** Allow the user to download a Zip of all files (optional, default `true`)
855
- * `options.allowCancel` **[Boolean][163]** Allow cancelling the operation. Will throw `'CANCEL'` as the promise rejection if acationed (optional, default `true`)
856
- * `options.autoRequire` **[Boolean][163]** Run `requireProject()` automatically before continuing (optional, default `true`)
857
- * `options.filter` **[FileFilters][112]?** Optional file filters
944
+ * `options.title` **[String][169]** The title of the dialog to display (optional, default `"Select a file"`)
945
+ * `options.hint` **([String][169] | [Array][175]<[String][169]>)?** Hints to identify the file to select in array order of preference
946
+ * `options.save` **[Boolean][178]** Set to truthy if saving a new file, UI will adjust to allowing overwrite OR new file name input (optional, default `false`)
947
+ * `options.filters` **[FileFilters][127]?** Optional file filters
948
+ * `options.allowUpload` **[Boolean][178]** Allow uploading new files (optional, default `true`)
949
+ * `options.allowRefresh` **[Boolean][178]** Allow the user to manually refresh the file list (optional, default `true`)
950
+ * `options.allowDownloadZip` **[Boolean][178]** Allow the user to download a Zip of all files (optional, default `true`)
951
+ * `options.allowCancel` **[Boolean][178]** Allow cancelling the operation. Will throw `'CANCEL'` as the promise rejection if acationed (optional, default `true`)
952
+ * `options.autoRequire` **[Boolean][178]** Run `requireProject()` automatically before continuing (optional, default `true`)
953
+ * `options.filter` **[FileFilters][127]?** Optional file filters
858
954
 
859
- Returns **[Promise][161]<[ProjectFile][1]>** The eventually selected file, if in save mode new files are created as stubs
955
+ Returns **[Promise][176]<[ProjectFile][1]>** The eventually selected file, if in save mode new files are created as stubs
860
956
 
861
957
  ## getProjectFiles
862
958
 
@@ -864,13 +960,13 @@ Fetch the files associated with a given project
864
960
 
865
961
  ### Parameters
866
962
 
867
- * `options` **[Object][155]** Options which mutate behaviour
963
+ * `options` **[Object][170]** Options which mutate behaviour
868
964
 
869
- * `options.autoRequire` **[Boolean][163]** Run `requireProject()` automatically before continuing (optional, default `true`)
870
- * `options.lazy` **[Boolean][163]** If true, use the fastest method to retrieve the file list such as the cache. If false, force a refresh each time (optional, default `true`)
871
- * `options.meta` **[Boolean][163]** Pull meta information for each file entity (optional, default `true`)
965
+ * `options.autoRequire` **[Boolean][178]** Run `requireProject()` automatically before continuing (optional, default `true`)
966
+ * `options.lazy` **[Boolean][178]** If true, use the fastest method to retrieve the file list such as the cache. If false, force a refresh each time (optional, default `true`)
967
+ * `options.meta` **[Boolean][178]** Pull meta information for each file entity (optional, default `true`)
872
968
 
873
- Returns **[Promise][161]<[Array][160]<[ProjectFile][1]>>** A collection of project files for the given project
969
+ Returns **[Promise][176]<[Array][175]<[ProjectFile][1]>>** A collection of project files for the given project
874
970
 
875
971
  ## getProjectFileContents
876
972
 
@@ -878,8 +974,8 @@ Fetch the raw contents of a file by its ID
878
974
 
879
975
  ### Parameters
880
976
 
881
- * `id` **[String][154]?** File ID to retrieve the contents of
882
- * `options` **[Object][155]?** Additioanl options to mutate behaviour
977
+ * `id` **[String][169]?** File ID to retrieve the contents of
978
+ * `options` **[Object][170]?** Additioanl options to mutate behaviour
883
979
 
884
980
  * `options.format` **(`"blob"` | `"json"`)** The format to retrieve the file in (optional, default `'blob'`)
885
981
 
@@ -891,13 +987,13 @@ Fetch a project file by its name
891
987
 
892
988
  ### Parameters
893
989
 
894
- * `id` **[String][154]** The name + relative directory path component
895
- * `options` **([Object][155] | [String][154])?** Additional options to mutate behaviour, if a string is given `options.subkey` is assumed
990
+ * `id` **[String][169]** The name + relative directory path component
991
+ * `options` **([Object][170] | [String][169])?** Additional options to mutate behaviour, if a string is given `options.subkey` is assumed
896
992
 
897
- * `options.subkey` **[String][154]?** If specified only the extracted subkey is returned rather than the full object
898
- * `options.cache` **[Boolean][163]** Use the existing file cache if possible, set to false to force a refresh of files from the server first (optional, default `true`)
993
+ * `options.subkey` **[String][169]?** If specified only the extracted subkey is returned rather than the full object
994
+ * `options.cache` **[Boolean][178]** Use the existing file cache if possible, set to false to force a refresh of files from the server first (optional, default `true`)
899
995
 
900
- Returns **[Promise][161]<[ProjectFile][1]>** The eventual fetched ProjectFile (or requested subkey)
996
+ Returns **[Promise][176]<[ProjectFile][1]>** The eventual fetched ProjectFile (or requested subkey)
901
997
 
902
998
  ## createProjectFile
903
999
 
@@ -906,9 +1002,9 @@ This creates an empty file which can then be written to
906
1002
 
907
1003
  ### Parameters
908
1004
 
909
- * `name` **[String][154]** The name + relative directory path component
1005
+ * `name` **[String][169]** The name + relative directory path component
910
1006
 
911
- Returns **[Promise][161]<[ProjectFile][1]>** The eventual ProjectFile created
1007
+ Returns **[Promise][176]<[ProjectFile][1]>** The eventual ProjectFile created
912
1008
 
913
1009
  ## deleteProjectFile
914
1010
 
@@ -916,9 +1012,9 @@ Remove a project file by its ID
916
1012
 
917
1013
  ### Parameters
918
1014
 
919
- * `id` **[String][154]** The File ID to remove
1015
+ * `id` **[String][169]** The File ID to remove
920
1016
 
921
- Returns **[Promise][161]** A promise which resolves when the operation has completed
1017
+ Returns **[Promise][176]** A promise which resolves when the operation has completed
922
1018
 
923
1019
  ## setProjectFileContents
924
1020
 
@@ -926,18 +1022,18 @@ Save (or overwrite) a file within a project
926
1022
 
927
1023
  ### Parameters
928
1024
 
929
- * `id` **([String][154] | [ProjectFile][1])?** ProjectFile or ID of the same to overwrite, if omitted a file is prompted for
930
- * `contents` **(File | [Blob][158] | [FormData][159] | [Object][155] | [Array][160])** The new file contents
931
- * `options` **[Object][155]?** Additional options to mutate behaviour
1025
+ * `id` **([String][169] | [ProjectFile][1])?** ProjectFile or ID of the same to overwrite, if omitted a file is prompted for
1026
+ * `contents` **(File | [Blob][173] | [FormData][174] | [Object][170] | [Array][175])** The new file contents
1027
+ * `options` **[Object][170]?** Additional options to mutate behaviour
932
1028
 
933
- * `options.id` **([String][154] | [ProjectFile][1])?** Alternate method to specify the file ID to save as, if omitted one will be prompted for
934
- * `options.autoRequire` **[Boolean][163]** Run `requireProject()` automatically before continuing (optional, default `true`)
935
- * `options.hint` **([String][154] | [Array][160]<[String][154]>)?** Hint(s) to store against the library. Generally corresponds to the current operation being performed - e.g. 'deduped'
936
- * `options.filename` **[String][154]?** Suggested filename if `id` is unspecified
937
- * `options.title` **[String][154]** Dialog title if `id` is unspecified and a prompt is necessary (optional, default `'Save citation library'`)
938
- * `options.meta` **[Object][155]?** Optional meta data to merge into the file data
1029
+ * `options.id` **([String][169] | [ProjectFile][1])?** Alternate method to specify the file ID to save as, if omitted one will be prompted for
1030
+ * `options.autoRequire` **[Boolean][178]** Run `requireProject()` automatically before continuing (optional, default `true`)
1031
+ * `options.hint` **([String][169] | [Array][175]<[String][169]>)?** Hint(s) to store against the library. Generally corresponds to the current operation being performed - e.g. 'deduped'
1032
+ * `options.filename` **[String][169]?** Suggested filename if `id` is unspecified
1033
+ * `options.title` **[String][169]** Dialog title if `id` is unspecified and a prompt is necessary (optional, default `'Save citation library'`)
1034
+ * `options.meta` **[Object][170]?** Optional meta data to merge into the file data
939
1035
 
940
- Returns **[Promise][161]** A promise which will resolve when the write operation has completed
1036
+ Returns **[Promise][176]** A promise which will resolve when the write operation has completed
941
1037
 
942
1038
  ## selectProjectLibrary
943
1039
 
@@ -945,19 +1041,19 @@ Prompt the user to select a library to operate on and return a array of referenc
945
1041
 
946
1042
  ### Parameters
947
1043
 
948
- * `options` **[Object][155]?** Additional options to mutate behaviour
1044
+ * `options` **[Object][170]?** Additional options to mutate behaviour
949
1045
 
950
- * `options.title` **[String][154]** The title of the dialog to display (optional, default `"Select a citation library"`)
951
- * `options.hint` **([String][154] | [Array][160]<[String][154]>)?** Hints to identify the library to select in array order of preference. Generally corresponds to the previous stage - e.g. 'deduped', 'review1', 'review2', 'dedisputed'
952
- * `options.allowUpload` **[Boolean][163]** Allow uploading new files (optional, default `true`)
953
- * `options.allowRefresh` **[Boolean][163]** Allow the user to manually refresh the file list (optional, default `true`)
954
- * `options.allowDownloadZip` **[Boolean][163]** Allow the user to download a Zip of all files (optional, default `true`)
955
- * `options.allowCancel` **[Boolean][163]** Allow cancelling the operation. Will throw `'CANCEL'` as the promise rejection if acationed (optional, default `true`)
956
- * `options.autoRequire` **[Boolean][163]** Run `requireProject()` automatically before continuing (optional, default `true`)
957
- * `options.filters` **[FileFilters][112]?** Optional file filters, defaults to citation library selection only
1046
+ * `options.title` **[String][169]** The title of the dialog to display (optional, default `"Select a citation library"`)
1047
+ * `options.hint` **([String][169] | [Array][175]<[String][169]>)?** Hints to identify the library to select in array order of preference. Generally corresponds to the previous stage - e.g. 'deduped', 'review1', 'review2', 'dedisputed'
1048
+ * `options.allowUpload` **[Boolean][178]** Allow uploading new files (optional, default `true`)
1049
+ * `options.allowRefresh` **[Boolean][178]** Allow the user to manually refresh the file list (optional, default `true`)
1050
+ * `options.allowDownloadZip` **[Boolean][178]** Allow the user to download a Zip of all files (optional, default `true`)
1051
+ * `options.allowCancel` **[Boolean][178]** Allow cancelling the operation. Will throw `'CANCEL'` as the promise rejection if acationed (optional, default `true`)
1052
+ * `options.autoRequire` **[Boolean][178]** Run `requireProject()` automatically before continuing (optional, default `true`)
1053
+ * `options.filters` **[FileFilters][127]?** Optional file filters, defaults to citation library selection only
958
1054
  * `options` **...any?** Additional options - see `getProjectLibrary()`
959
1055
 
960
- Returns **[Promise][161]<[Array][160]\<Ref>>** A collection of references from the selected file
1056
+ Returns **[Promise][176]<[Array][175]\<Ref>>** A collection of references from the selected file
961
1057
 
962
1058
  ## getProjectLibrary
963
1059
 
@@ -965,15 +1061,15 @@ Fetch + convert a project file into a library of citations
965
1061
 
966
1062
  ### Parameters
967
1063
 
968
- * `id` **[String][154]** File ID to read
969
- * `options` **[Object][155]?** Additional options to mutate behaviour
1064
+ * `id` **[String][169]** File ID to read
1065
+ * `options` **[Object][170]?** Additional options to mutate behaviour
970
1066
 
971
- * `options.format` **[String][154]** Format for the file. ENUM: 'pojo' (return a parsed JS collection), 'blob' (raw JS Blob object), 'file' (named JS File object) (optional, default `'json'`)
972
- * `options.autoRequire` **[Boolean][163]** Run `requireProject()` automatically before continuing (optional, default `true`)
973
- * `options.filter` **[Function][164]?** Optional async file filter, called each time as `(File:ProjectFile)`
974
- * `options.find` **[Function][164]?** Optional async final stage file filter to reduce all candidates down to one subject file
1067
+ * `options.format` **[String][169]** Format for the file. ENUM: 'pojo' (return a parsed JS collection), 'blob' (raw JS Blob object), 'file' (named JS File object) (optional, default `'json'`)
1068
+ * `options.autoRequire` **[Boolean][178]** Run `requireProject()` automatically before continuing (optional, default `true`)
1069
+ * `options.filter` **[Function][179]?** Optional async file filter, called each time as `(File:ProjectFile)`
1070
+ * `options.find` **[Function][179]?** Optional async final stage file filter to reduce all candidates down to one subject file
975
1071
 
976
- Returns **([Promise][161]<[Array][160]\<Ref>> | [Promise][161]\<any>)** A collection of references (default bevahiour) or a whatever format was requested
1072
+ Returns **([Promise][176]<[Array][175]\<Ref>> | [Promise][176]\<any>)** A collection of references (default bevahiour) or a whatever format was requested
977
1073
 
978
1074
  ## setProjectLibrary
979
1075
 
@@ -981,33 +1077,33 @@ Save back a citation library from some input
981
1077
 
982
1078
  ### Parameters
983
1079
 
984
- * `id` **[String][154]?** File ID to save back to, if omitted a file will be prompted for
985
- * `refs` **([Array][160]\<RefLibRef> | [Blob][158] | File)?** Collection of references for the selected library or the raw Blob/File
986
- * `options` **[Object][155]?** Additional options to mutate behaviour
1080
+ * `id` **[String][169]?** File ID to save back to, if omitted a file will be prompted for
1081
+ * `refs` **([Array][175]\<RefLibRef> | [Blob][173] | File)?** Collection of references for the selected library or the raw Blob/File
1082
+ * `options` **[Object][170]?** Additional options to mutate behaviour
987
1083
 
988
- * `options.id` **[String][154]?** Alternate method to specify the file ID to save as, if omitted one will be prompted for
989
- * `options.refs` **([Array][160]\<RefLibRef> | [Blob][158] | File)?** Alternate method to specify the refs to save as an array or raw Blob/File
990
- * `options.format` **[String][154]** Input format used. ENUM: 'pojo' (return a parsed JS collection), 'blob' (raw JS Blob object), 'file' (named JS File object) (optional, default `'json'`)
991
- * `options.autoRequire` **[Boolean][163]** Run `requireProject()` automatically before continuing (optional, default `true`)
992
- * `options.hint` **[String][154]?** Hint to store against the library. Generally corresponds to the current operation being performed - e.g. 'deduped'
993
- * `options.filename` **[String][154]?** Suggested filename if `id` is unspecified
994
- * `options.title` **[String][154]** Dialog title if `id` is unspecified and a prompt is necessary (optional, default `'Save citation library'`)
995
- * `options.overwrite` **[Boolean][163]** Allow existing file upsert (optional, default `true`)
996
- * `options.meta` **[Object][155]?** Optional meta data to merge into the file data
1084
+ * `options.id` **[String][169]?** Alternate method to specify the file ID to save as, if omitted one will be prompted for
1085
+ * `options.refs` **([Array][175]\<RefLibRef> | [Blob][173] | File)?** Alternate method to specify the refs to save as an array or raw Blob/File
1086
+ * `options.format` **[String][169]** Input format used. ENUM: 'pojo' (return a parsed JS collection), 'blob' (raw JS Blob object), 'file' (named JS File object) (optional, default `'json'`)
1087
+ * `options.autoRequire` **[Boolean][178]** Run `requireProject()` automatically before continuing (optional, default `true`)
1088
+ * `options.hint` **[String][169]?** Hint to store against the library. Generally corresponds to the current operation being performed - e.g. 'deduped'
1089
+ * `options.filename` **[String][169]?** Suggested filename if `id` is unspecified
1090
+ * `options.title` **[String][169]** Dialog title if `id` is unspecified and a prompt is necessary (optional, default `'Save citation library'`)
1091
+ * `options.overwrite` **[Boolean][178]** Allow existing file upsert (optional, default `true`)
1092
+ * `options.meta` **[Object][170]?** Optional meta data to merge into the file data
997
1093
 
998
- Returns **[Promise][161]** A promise which resolves when the save operation has completed
1094
+ Returns **[Promise][176]** A promise which resolves when the save operation has completed
999
1095
 
1000
1096
  ## projectLog
1001
1097
 
1002
1098
  Create a log entry for the currently active project
1003
1099
 
1004
- The required log object can be of various forms. See [https://tera-tools.com/api/logs.json][168] for the full list
1100
+ The required log object can be of various forms. See [https://tera-tools.com/api/logs.json][183] for the full list
1005
1101
 
1006
1102
  ### Parameters
1007
1103
 
1008
- * `log` **[Object][155]** The log entry to create
1104
+ * `log` **[Object][170]** The log entry to create
1009
1105
 
1010
- Returns **[Promise][161]** A promise which resolves when the operation has completed
1106
+ Returns **[Promise][176]** A promise which resolves when the operation has completed
1011
1107
 
1012
1108
  ## setPage
1013
1109
 
@@ -1016,10 +1112,10 @@ This is usually called by a tool nested within the tera-tools.com embed
1016
1112
 
1017
1113
  ### Parameters
1018
1114
 
1019
- * `options` **([Object][155] | [String][154])** Context information about the page, if this is a string, its assumed to popupate `url`
1115
+ * `options` **([Object][170] | [String][169])** Context information about the page, if this is a string, its assumed to popupate `url`
1020
1116
 
1021
- * `options.path` **[String][154]?** The URL path segment to restore on next refresh
1022
- * `options.title` **[String][154]?** The page title associated with the path
1117
+ * `options.path` **[String][169]?** The URL path segment to restore on next refresh
1118
+ * `options.title` **[String][169]?** The page title associated with the path
1023
1119
 
1024
1120
  ## uiAlert
1025
1121
 
@@ -1027,15 +1123,15 @@ Display simple text within TERA
1027
1123
 
1028
1124
  ### Parameters
1029
1125
 
1030
- * `text` **[String][154]?** Text to display, if specified this populates `options.body`
1031
- * `options` **[Object][155]?** Additional options to mutate behaviour
1126
+ * `text` **[String][169]?** Text to display, if specified this populates `options.body`
1127
+ * `options` **[Object][170]?** Additional options to mutate behaviour
1032
1128
 
1033
- * `options.body` **[String][154]** The body text to display (optional, default `"Alert!"`)
1034
- * `options.isHtml` **[Boolean][163]** If falsy the text is rendered as plain-text otherwise it will be assumed as HTML content (optional, default `false`)
1035
- * `options.title` **[String][154]** The title of the alert box (optional, default `'TERA'`)
1129
+ * `options.body` **[String][169]** The body text to display (optional, default `"Alert!"`)
1130
+ * `options.isHtml` **[Boolean][178]** If falsy the text is rendered as plain-text otherwise it will be assumed as HTML content (optional, default `false`)
1131
+ * `options.title` **[String][169]** The title of the alert box (optional, default `'TERA'`)
1036
1132
  * `options.buttons` **(`"ok"` | `false`)** Button set to use or falsy to disable (optional, default `'ok'`)
1037
1133
 
1038
- Returns **[Promise][161]** A promise which resolves when the alert has been dismissed
1134
+ Returns **[Promise][176]** A promise which resolves when the alert has been dismissed
1039
1135
 
1040
1136
  ## uiConfirm
1041
1137
 
@@ -1043,14 +1139,14 @@ Present a simple ok/cancel dialog to the user
1043
1139
 
1044
1140
  ### Parameters
1045
1141
 
1046
- * `text` **[String][154]?** Text to display, if specified this populates `options.body`
1047
- * `options` **[Object][155]?** Additional options to mutate behaviour
1142
+ * `text` **[String][169]?** Text to display, if specified this populates `options.body`
1143
+ * `options` **[Object][170]?** Additional options to mutate behaviour
1048
1144
 
1049
- * `options.body` **[String][154]** The body text to display (optional, default `"Confirm?"`)
1050
- * `options.isHtml` **[Boolean][163]** If falsy the text is rendered as plain-text otherwise it will be assumed as HTML content (optional, default `false`)
1051
- * `options.title` **[String][154]** The title of the confirmation box (optional, default `'TERA'`)
1145
+ * `options.body` **[String][169]** The body text to display (optional, default `"Confirm?"`)
1146
+ * `options.isHtml` **[Boolean][178]** If falsy the text is rendered as plain-text otherwise it will be assumed as HTML content (optional, default `false`)
1147
+ * `options.title` **[String][169]** The title of the confirmation box (optional, default `'TERA'`)
1052
1148
 
1053
- Returns **[Promise][161]** A promise which resolves with `Promise.resolve('OK')` or rejects with `Promise.reject('CANCEL')`
1149
+ Returns **[Promise][176]** A promise which resolves with `Promise.resolve('OK')` or rejects with `Promise.reject('CANCEL')`
1054
1150
 
1055
1151
  ## uiPanic
1056
1152
 
@@ -1058,7 +1154,7 @@ Trigger a fatal error, killing the outer TERA site
1058
1154
 
1059
1155
  ### Parameters
1060
1156
 
1061
- * `text` **[String][154]?** Text to display
1157
+ * `text` **[String][169]?** Text to display
1062
1158
 
1063
1159
  ## uiProgress
1064
1160
 
@@ -1067,17 +1163,17 @@ All options are cumulative - i.e. they are merged with other options previously
1067
1163
 
1068
1164
  ### Parameters
1069
1165
 
1070
- * `options` **([Object][155] | [Boolean][163])?** Additional options to mutate behaviour, if boolean false `{close: true}` is assumed
1166
+ * `options` **([Object][170] | [Boolean][178])?** Additional options to mutate behaviour, if boolean false `{close: true}` is assumed
1071
1167
 
1072
- * `options.title` **[String][154]** Window title, can only be set on the initial call (optional, default `'TERA'`)
1073
- * `options.body` **[String][154]** Window body text, can only be set on the initial call (optional, default `''`)
1074
- * `options.bodyHtml` **[Boolean][163]** Treat body text as HTML (optional, default `false`)
1075
- * `options.close` **[Boolean][163]** Close the existing dialog, if true the dialog is disposed and options reset (optional, default `false`)
1076
- * `options.text` **[String][154]?** The text of the task being conducted
1077
- * `options.progress` **[Number][157]?** The current progress of the task being conducted, this is assumed to be a value less than `maxProgress`
1078
- * `options.maxProgress` **[Number][157]?** The maximum value that the progress can be
1168
+ * `options.title` **[String][169]** Window title, can only be set on the initial call (optional, default `'TERA'`)
1169
+ * `options.body` **[String][169]** Window body text, can only be set on the initial call (optional, default `''`)
1170
+ * `options.bodyHtml` **[Boolean][178]** Treat body text as HTML (optional, default `false`)
1171
+ * `options.close` **[Boolean][178]** Close the existing dialog, if true the dialog is disposed and options reset (optional, default `false`)
1172
+ * `options.text` **[String][169]?** The text of the task being conducted
1173
+ * `options.progress` **[Number][172]?** The current progress of the task being conducted, this is assumed to be a value less than `maxProgress`
1174
+ * `options.maxProgress` **[Number][172]?** The maximum value that the progress can be
1079
1175
 
1080
- Returns **[Promise][161]** A promise which resolves when the dialog has been updated
1176
+ Returns **[Promise][176]** A promise which resolves when the dialog has been updated
1081
1177
 
1082
1178
  ## uiPrompt
1083
1179
 
@@ -1085,17 +1181,17 @@ Prompt the user for an input, responding with a Promisable value
1085
1181
 
1086
1182
  ### Parameters
1087
1183
 
1088
- * `text` **[String][154]?** Text to display, if specified this populates `options.body`
1089
- * `options` **[Object][155]?** Additional options to mutate behaviour
1184
+ * `text` **[String][169]?** Text to display, if specified this populates `options.body`
1185
+ * `options` **[Object][170]?** Additional options to mutate behaviour
1090
1186
 
1091
- * `options.body` **[String][154]?** Optional additional body text
1092
- * `options.value` **[String][154]?** Current or default value to display pre-filled
1093
- * `options.title` **[String][154]** The dialog title to display (optional, default `'Input required'`)
1094
- * `options.bodyHtml` **[Boolean][163]** If truthy, treat the body as HTML (optional, default `false`)
1095
- * `options.placeholder` **[String][154]?** Optional placeholder text
1096
- * `options.required` **[Boolean][163]** Treat nullish or empty inputs as a cancel operation (optional, default `true`)
1187
+ * `options.body` **[String][169]?** Optional additional body text
1188
+ * `options.isHtml` **[Boolean][178]** If truthy, treat the body as HTML (optional, default `false`)
1189
+ * `options.value` **[String][169]?** Current or default value to display pre-filled
1190
+ * `options.title` **[String][169]** The dialog title to display (optional, default `'Input required'`)
1191
+ * `options.placeholder` **[String][169]?** Optional placeholder text
1192
+ * `options.required` **[Boolean][178]** Treat nullish or empty inputs as a cancel operation (optional, default `true`)
1097
1193
 
1098
- Returns **[Promise][161]\<any>** Either the eventual user value or a throw with `Promise.reject('CANCEL')`
1194
+ Returns **[Promise][176]\<any>** Either the eventual user value or a throw with `Promise.reject('CANCEL')`
1099
1195
 
1100
1196
  ## uiThrow
1101
1197
 
@@ -1103,7 +1199,7 @@ Catch an error using the TERA error handler
1103
1199
 
1104
1200
  ### Parameters
1105
1201
 
1106
- * `error` **([Error][169] | [Object][155] | [String][154])** Error to handle, generally an Error object but can be a POJO or a scalar string
1202
+ * `error` **([Error][184] | [Object][170] | [String][169])** Error to handle, generally an Error object but can be a POJO or a scalar string
1107
1203
 
1108
1204
  Returns **Void** This function is fatal
1109
1205
 
@@ -1113,13 +1209,13 @@ Open a popup window containing a new site
1113
1209
 
1114
1210
  ### Parameters
1115
1211
 
1116
- * `url` **[String][154]** The URL to open
1117
- * `options` **[Object][155]?** Additional options to mutate behaviour
1212
+ * `url` **[String][169]** The URL to open
1213
+ * `options` **[Object][170]?** Additional options to mutate behaviour
1118
1214
 
1119
- * `options.width` **[Number][157]** The desired width of the window (optional, default `500`)
1120
- * `options.height` **[Number][157]** The desired height of the window (optional, default `600`)
1121
- * `options.center` **[Boolean][163]** Attempt to center the window on the screen (optional, default `true`)
1122
- * `options.permissions` **[Object][155]?** Additional permissions to set on opening, defaults to a suitable set of permission for popups (see code)
1215
+ * `options.width` **[Number][172]** The desired width of the window (optional, default `500`)
1216
+ * `options.height` **[Number][172]** The desired height of the window (optional, default `600`)
1217
+ * `options.center` **[Boolean][178]** Attempt to center the window on the screen (optional, default `true`)
1218
+ * `options.permissions` **[Object][170]?** Additional permissions to set on opening, defaults to a suitable set of permission for popups (see code)
1123
1219
 
1124
1220
  Returns **WindowProxy** The opened window object (if `noopener` is not set in permissions)
1125
1221
 
@@ -1130,10 +1226,10 @@ This function is ideally called within a requestFocus() wrapper
1130
1226
 
1131
1227
  ### Parameters
1132
1228
 
1133
- * `content` **(DOMElement | [String][154] | `false`)** Either a prepared DOM element or string to compile, set to falsy to remove existing content
1134
- * `options` **[Object][155]?** Additional options to mutate behaviour
1229
+ * `content` **(DOMElement | [String][169] | `false`)** Either a prepared DOM element or string to compile, set to falsy to remove existing content
1230
+ * `options` **[Object][170]?** Additional options to mutate behaviour
1135
1231
 
1136
- * `options.logo` **([Boolean][163] | [String][154])** Add a logo to the output, if boolean true the Tera-tools logo is used otherwise specify a path or URL (optional, default `false`)
1232
+ * `options.logo` **([Boolean][178] | [String][169])** Add a logo to the output, if boolean true the Tera-tools logo is used otherwise specify a path or URL (optional, default `false`)
1137
1233
 
1138
1234
  [1]: #projectfile
1139
1235
 
@@ -1209,266 +1305,296 @@ This function is ideally called within a requestFocus() wrapper
1209
1305
 
1210
1306
  [37]: #plugins
1211
1307
 
1212
- [38]: #send
1308
+ [38]: #namespaces
1213
1309
 
1214
- [39]: #parameters-4
1310
+ [39]: #send
1215
1311
 
1216
- [40]: #sendraw
1312
+ [40]: #parameters-4
1217
1313
 
1218
- [41]: #parameters-5
1314
+ [41]: #sendraw
1219
1315
 
1220
- [42]: #rpc
1316
+ [42]: #parameters-5
1221
1317
 
1222
- [43]: #parameters-6
1318
+ [43]: #rpc
1223
1319
 
1224
- [44]: #acceptmessage
1320
+ [44]: #parameters-6
1225
1321
 
1226
- [45]: #parameters-7
1322
+ [45]: #acceptmessage
1227
1323
 
1228
- [46]: #acceptpostboxes
1324
+ [46]: #parameters-7
1229
1325
 
1230
- [47]: #createprojectstatepatch
1326
+ [47]: #acceptpostboxes
1231
1327
 
1232
- [48]: #parameters-8
1328
+ [48]: #createprojectstatepatch
1233
1329
 
1234
- [49]: #applyprojectstatepatch
1330
+ [49]: #parameters-8
1235
1331
 
1236
- [50]: #parameters-9
1332
+ [50]: #applyprojectstatepatch
1237
1333
 
1238
- [51]: #applyprojectstatepatchlocal
1334
+ [51]: #parameters-9
1239
1335
 
1240
- [52]: #parameters-10
1336
+ [52]: #applyprojectstatepatchlocal
1241
1337
 
1242
- [53]: #init
1338
+ [53]: #parameters-10
1243
1339
 
1244
- [54]: #parameters-11
1340
+ [54]: #init
1245
1341
 
1246
- [55]: #detectmode
1342
+ [55]: #parameters-11
1247
1343
 
1248
- [56]: #injectcomms
1344
+ [56]: #detectmode
1249
1345
 
1250
- [57]: #handshakeloop
1346
+ [57]: #injectcomms
1251
1347
 
1252
- [58]: #parameters-12
1348
+ [58]: #handshakeloop
1253
1349
 
1254
- [59]: #properties-3
1350
+ [59]: #parameters-12
1255
1351
 
1256
- [60]: #injectstylesheet
1352
+ [60]: #properties-3
1257
1353
 
1258
- [61]: #injectmethods
1354
+ [61]: #injectstylesheet
1259
1355
 
1260
- [62]: #debug
1356
+ [62]: #injectmethods
1261
1357
 
1262
- [63]: #parameters-13
1358
+ [63]: #debug
1263
1359
 
1264
- [64]: #set
1360
+ [64]: #parameters-13
1265
1361
 
1266
- [65]: #parameters-14
1362
+ [65]: #set
1267
1363
 
1268
- [66]: #setifdev
1364
+ [66]: #parameters-14
1269
1365
 
1270
- [67]: #parameters-15
1366
+ [67]: #setifdev
1271
1367
 
1272
- [68]: #use
1368
+ [68]: #parameters-15
1273
1369
 
1274
- [69]: #parameters-16
1370
+ [69]: #use
1275
1371
 
1276
- [70]: #mixin
1372
+ [70]: #parameters-16
1277
1373
 
1278
- [71]: #parameters-17
1374
+ [71]: #mixin
1279
1375
 
1280
- [72]: #toggledevmode
1376
+ [72]: #parameters-17
1281
1377
 
1282
- [73]: #parameters-18
1378
+ [73]: #toggledevmode
1283
1379
 
1284
- [74]: #togglefocus
1380
+ [74]: #parameters-18
1285
1381
 
1286
- [75]: #parameters-19
1382
+ [75]: #togglefocus
1287
1383
 
1288
- [76]: #getentropicstring
1384
+ [76]: #parameters-19
1289
1385
 
1290
- [77]: #parameters-20
1386
+ [77]: #getentropicstring
1291
1387
 
1292
- [78]: #selectprojectfile
1388
+ [78]: #parameters-20
1293
1389
 
1294
- [79]: #parameters-21
1390
+ [79]: #selectprojectfile
1295
1391
 
1296
- [80]: #handshake
1392
+ [80]: #parameters-21
1297
1393
 
1298
- [81]: #properties-4
1394
+ [81]: #mountnamespace
1299
1395
 
1300
- [82]: #setserververbosity
1396
+ [82]: #parameters-22
1301
1397
 
1302
- [83]: #parameters-22
1398
+ [83]: #actual-namespace-mounting-function-designed-to-be-overriden-by-plugins
1303
1399
 
1304
- [84]: #user
1400
+ [84]: #parameters-23
1305
1401
 
1306
- [85]: #properties-5
1402
+ [85]: #unmountnamespace
1307
1403
 
1308
- [86]: #getuser
1404
+ [86]: #parameters-24
1309
1405
 
1310
- [87]: #requireuser
1406
+ [87]: #actual-namespace-unmounting-function-designed-to-be-overriden-by-plugins
1311
1407
 
1312
- [88]: #parameters-23
1408
+ [88]: #parameters-25
1313
1409
 
1314
- [89]: #project
1410
+ [89]: #handshake
1315
1411
 
1316
- [90]: #getproject
1412
+ [90]: #properties-4
1317
1413
 
1318
- [91]: #getprojects
1414
+ [91]: #setserververbosity
1319
1415
 
1320
- [92]: #setactiveproject
1416
+ [92]: #parameters-26
1321
1417
 
1322
- [93]: #parameters-24
1418
+ [93]: #user
1323
1419
 
1324
- [94]: #requireproject
1420
+ [94]: #properties-5
1325
1421
 
1326
- [95]: #parameters-25
1422
+ [95]: #getuser
1327
1423
 
1328
- [96]: #selectproject
1424
+ [96]: #getcredentials
1329
1425
 
1330
- [97]: #parameters-26
1426
+ [97]: #requireuser
1331
1427
 
1332
- [98]: #getprojectstate
1428
+ [98]: #parameters-27
1333
1429
 
1334
- [99]: #parameters-27
1430
+ [99]: #project
1335
1431
 
1336
- [100]: #setprojectstate
1432
+ [100]: #getproject
1337
1433
 
1338
- [101]: #parameters-28
1434
+ [101]: #getprojects
1339
1435
 
1340
- [102]: #setprojectstatedefaults
1436
+ [102]: #setactiveproject
1341
1437
 
1342
- [103]: #parameters-29
1438
+ [103]: #parameters-28
1343
1439
 
1344
- [104]: #setprojectstateflush
1440
+ [104]: #requireproject
1345
1441
 
1346
- [105]: #setprojectstaterefresh
1442
+ [105]: #parameters-29
1347
1443
 
1348
- [106]: #saveprojectstate
1444
+ [106]: #selectproject
1349
1445
 
1350
- [107]: #replaceprojectstate
1446
+ [107]: #parameters-30
1351
1447
 
1352
- [108]: #parameters-30
1448
+ [108]: #getnamespace
1353
1449
 
1354
- [109]: #applyprojectstatepatch-1
1450
+ [109]: #parameters-31
1355
1451
 
1356
- [110]: #parameters-31
1452
+ [110]: #setnamespace
1357
1453
 
1358
- [111]: #subscribeprojectstate
1454
+ [111]: #parameters-32
1359
1455
 
1360
- [112]: #filefilters
1456
+ [112]: #listnamespaces
1361
1457
 
1362
1458
  [113]: #properties-6
1363
1459
 
1364
- [114]: #selectprojectfile-1
1460
+ [114]: #getprojectstate
1365
1461
 
1366
- [115]: #parameters-32
1462
+ [115]: #parameters-33
1367
1463
 
1368
- [116]: #getprojectfiles
1464
+ [116]: #setprojectstate
1369
1465
 
1370
- [117]: #parameters-33
1466
+ [117]: #parameters-34
1371
1467
 
1372
- [118]: #getprojectfilecontents
1468
+ [118]: #setprojectstatedefaults
1373
1469
 
1374
- [119]: #parameters-34
1470
+ [119]: #parameters-35
1375
1471
 
1376
- [120]: #getprojectfile
1472
+ [120]: #setprojectstaterefresh
1377
1473
 
1378
- [121]: #parameters-35
1474
+ [121]: #saveprojectstate
1379
1475
 
1380
- [122]: #createprojectfile
1476
+ [122]: #replaceprojectstate
1381
1477
 
1382
1478
  [123]: #parameters-36
1383
1479
 
1384
- [124]: #deleteprojectfile
1480
+ [124]: #applyprojectstatepatch-1
1385
1481
 
1386
1482
  [125]: #parameters-37
1387
1483
 
1388
- [126]: #setprojectfilecontents
1484
+ [126]: #subscribeprojectstate
1485
+
1486
+ [127]: #filefilters
1487
+
1488
+ [128]: #properties-7
1489
+
1490
+ [129]: #selectprojectfile-1
1491
+
1492
+ [130]: #parameters-38
1493
+
1494
+ [131]: #getprojectfiles
1495
+
1496
+ [132]: #parameters-39
1497
+
1498
+ [133]: #getprojectfilecontents
1499
+
1500
+ [134]: #parameters-40
1501
+
1502
+ [135]: #getprojectfile
1503
+
1504
+ [136]: #parameters-41
1505
+
1506
+ [137]: #createprojectfile
1507
+
1508
+ [138]: #parameters-42
1509
+
1510
+ [139]: #deleteprojectfile
1511
+
1512
+ [140]: #parameters-43
1513
+
1514
+ [141]: #setprojectfilecontents
1389
1515
 
1390
- [127]: #parameters-38
1516
+ [142]: #parameters-44
1391
1517
 
1392
- [128]: #selectprojectlibrary
1518
+ [143]: #selectprojectlibrary
1393
1519
 
1394
- [129]: #parameters-39
1520
+ [144]: #parameters-45
1395
1521
 
1396
- [130]: #getprojectlibrary
1522
+ [145]: #getprojectlibrary
1397
1523
 
1398
- [131]: #parameters-40
1524
+ [146]: #parameters-46
1399
1525
 
1400
- [132]: #setprojectlibrary
1526
+ [147]: #setprojectlibrary
1401
1527
 
1402
- [133]: #parameters-41
1528
+ [148]: #parameters-47
1403
1529
 
1404
- [134]: #projectlog
1530
+ [149]: #projectlog
1405
1531
 
1406
- [135]: #parameters-42
1532
+ [150]: #parameters-48
1407
1533
 
1408
- [136]: #setpage
1534
+ [151]: #setpage
1409
1535
 
1410
- [137]: #parameters-43
1536
+ [152]: #parameters-49
1411
1537
 
1412
- [138]: #uialert
1538
+ [153]: #uialert
1413
1539
 
1414
- [139]: #parameters-44
1540
+ [154]: #parameters-50
1415
1541
 
1416
- [140]: #uiconfirm
1542
+ [155]: #uiconfirm
1417
1543
 
1418
- [141]: #parameters-45
1544
+ [156]: #parameters-51
1419
1545
 
1420
- [142]: #uipanic
1546
+ [157]: #uipanic
1421
1547
 
1422
- [143]: #parameters-46
1548
+ [158]: #parameters-52
1423
1549
 
1424
- [144]: #uiprogress
1550
+ [159]: #uiprogress
1425
1551
 
1426
- [145]: #parameters-47
1552
+ [160]: #parameters-53
1427
1553
 
1428
- [146]: #uiprompt
1554
+ [161]: #uiprompt
1429
1555
 
1430
- [147]: #parameters-48
1556
+ [162]: #parameters-54
1431
1557
 
1432
- [148]: #uithrow
1558
+ [163]: #uithrow
1433
1559
 
1434
- [149]: #parameters-49
1560
+ [164]: #parameters-55
1435
1561
 
1436
- [150]: #uiwindow
1562
+ [165]: #uiwindow
1437
1563
 
1438
- [151]: #parameters-50
1564
+ [166]: #parameters-56
1439
1565
 
1440
- [152]: #uisplat
1566
+ [167]: #uisplat
1441
1567
 
1442
- [153]: #parameters-51
1568
+ [168]: #parameters-57
1443
1569
 
1444
- [154]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
1570
+ [169]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
1445
1571
 
1446
- [155]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
1572
+ [170]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
1447
1573
 
1448
- [156]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date
1574
+ [171]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date
1449
1575
 
1450
- [157]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
1576
+ [172]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
1451
1577
 
1452
- [158]: https://developer.mozilla.org/docs/Web/API/Blob
1578
+ [173]: https://developer.mozilla.org/docs/Web/API/Blob
1453
1579
 
1454
- [159]: https://developer.mozilla.org/docs/Web/API/FormData
1580
+ [174]: https://developer.mozilla.org/docs/Web/API/FormData
1455
1581
 
1456
- [160]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array
1582
+ [175]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array
1457
1583
 
1458
- [161]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise
1584
+ [176]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise
1459
1585
 
1460
- [162]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm
1586
+ [177]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm
1461
1587
 
1462
- [163]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
1588
+ [178]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
1463
1589
 
1464
- [164]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function
1590
+ [179]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function
1465
1591
 
1466
- [165]: https://developer.mozilla.org/docs/Web/API/Window
1592
+ [180]: https://developer.mozilla.org/docs/Web/API/Window
1467
1593
 
1468
- [166]: https://developer.mozilla.org/docs/Web/API/MessageEvent
1594
+ [181]: https://developer.mozilla.org/docs/Web/API/MessageEvent
1469
1595
 
1470
- [167]: http://jsonpatch.com
1596
+ [182]: http://jsonpatch.com
1471
1597
 
1472
- [168]: https://tera-tools.com/api/logs.json
1598
+ [183]: https://tera-tools.com/api/logs.json
1473
1599
 
1474
- [169]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error
1600
+ [184]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error