@storyteller-platform/epub 0.7.0 → 0.8.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/README.md CHANGED
@@ -219,8 +219,7 @@ To get started with developing in the Storyteller monorepo, check out the
219
219
 
220
220
  ## Epub
221
221
 
222
- Defined in:
223
- [libraries/epub/index.ts:267](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L267)
222
+ Defined in: [libraries/epub/index.ts:347](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L347)
224
223
 
225
224
  A single EPUB instance.
226
225
 
@@ -234,21 +233,21 @@ import {
234
233
  getBody,
235
234
  findByName,
236
235
  textContent,
237
- } from "@storyteller-platform/epub"
236
+ } from "@storyteller-platform/epub";
238
237
 
239
- const epub = await Epub.from("./path/to/book.epub")
240
- const title = await epub.getTitle()
241
- const spineItems = await epub.getSpineItems()
242
- const chptOne = spineItems[0]
243
- const chptOneXml = await epub.readXhtmlItemContents(chptOne.id)
238
+ const epub = await Epub.from("./path/to/book.epub");
239
+ const title = await epub.getTitle();
240
+ const spineItems = await epub.getSpineItems();
241
+ const chptOne = spineItems[0];
242
+ const chptOneXml = await epub.readXhtmlItemContents(chptOne.id);
244
243
 
245
- const body = getBody(chptOneXml)
246
- const h1 = Epub.findXmlChildByName("h1", body)
247
- const headingText = textContent(h1)
244
+ const body = getBody(chptOneXml);
245
+ const h1 = Epub.findXmlChildByName("h1", body);
246
+ const headingText = textContent(h1);
248
247
 
249
- await epub.setTitle(headingText)
250
- await epub.writeToFile("./path/to/updated.epub")
251
- await epub.close()
248
+ await epub.setTitle(headingText);
249
+ await epub.writeToFile("./path/to/updated.epub");
250
+ await epub.close();
252
251
  ```
253
252
 
254
253
  ### Link
@@ -259,16 +258,14 @@ https://www.w3.org/TR/epub-33/
259
258
 
260
259
  #### Constructor
261
260
 
262
- > **new Epub**(`adapterClass`, `adapter`, `inputPath`, `readonlyOverride`):
263
- > [`Epub`](#epub)
261
+ > **new Epub**(`adapterClass`, `adapter`, `inputPath`, `readonlyOverride`): [`Epub`](#epub)
264
262
 
265
- Defined in:
266
- [libraries/epub/index.ts:533](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L533)
263
+ Defined in: [libraries/epub/index.ts:622](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L622)
267
264
 
268
265
  Prefer the static factories ([Epub.using](#using), [Epub.from](#from),
269
266
  [Epub.create](#create), [Epub.upgrade](#upgrade)) over calling this constructor
270
- directly. It's public so [EpubFactory](#epubfactory) can construct instances;
271
- nothing else should need to.
267
+ directly. It's public so [EpubFactory](#epubfactory) can construct instances; nothing
268
+ else should need to.
272
269
 
273
270
  ##### Parameters
274
271
 
@@ -276,7 +273,7 @@ nothing else should need to.
276
273
  | ------------------ | ----------------------------------------------------- | ------------- |
277
274
  | `adapterClass` | [`EpubStorageAdapterClass`](#epubstorageadapterclass) | `undefined` |
278
275
  | `adapter` | [`EpubStorageAdapter`](#epubstorageadapter) | `undefined` |
279
- | `inputPath` | `undefined` \| `string` | `undefined` |
276
+ | `inputPath` | `string` \| `undefined` | `undefined` |
280
277
  | `readonlyOverride` | `boolean` | `false` |
281
278
 
282
279
  ##### Returns
@@ -289,71 +286,61 @@ nothing else should need to.
289
286
 
290
287
  > `protected` **adapter**: [`EpubStorageAdapter`](#epubstorageadapter)
291
288
 
292
- Defined in:
293
- [libraries/epub/index.ts:535](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L535)
289
+ Defined in: [libraries/epub/index.ts:624](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L624)
294
290
 
295
291
  #### adapterClass
296
292
 
297
- > `protected` **adapterClass**:
298
- > [`EpubStorageAdapterClass`](#epubstorageadapterclass)
293
+ > `protected` **adapterClass**: [`EpubStorageAdapterClass`](#epubstorageadapterclass)
299
294
 
300
- Defined in:
301
- [libraries/epub/index.ts:534](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L534)
295
+ Defined in: [libraries/epub/index.ts:623](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L623)
302
296
 
303
297
  #### inputPath
304
298
 
305
- > `protected` **inputPath**: `undefined` \| `string`
299
+ > `protected` **inputPath**: `string` \| `undefined`
306
300
 
307
- Defined in:
308
- [libraries/epub/index.ts:536](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L536)
301
+ Defined in: [libraries/epub/index.ts:625](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L625)
309
302
 
310
303
  #### readonlyOverride
311
304
 
312
305
  > `protected` **readonlyOverride**: `boolean` = `false`
313
306
 
314
- Defined in:
315
- [libraries/epub/index.ts:537](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L537)
307
+ Defined in: [libraries/epub/index.ts:626](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L626)
316
308
 
317
309
  #### storage
318
310
 
319
311
  > `readonly` **storage**: [`EpubStorageKind`](#epubstoragekind)
320
312
 
321
- Defined in:
322
- [libraries/epub/index.ts:525](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L525)
313
+ Defined in: [libraries/epub/index.ts:614](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L614)
323
314
 
324
315
  Storage backend kind in use for this instance
325
316
 
326
- Public so callers can declare type-level requirements via
327
- [InMemoryEpubReader](#inmemoryepubreader) Orthogonal to the read-only / writable
328
- axis (controlled by `readonlyOverride` and the adapter's capability bag)
317
+ Public so callers can declare type-level requirements via [InMemoryEpubReader](#inmemoryepubreader)
318
+ Orthogonal to the read-only / writable axis (controlled by `readonlyOverride`
319
+ and the adapter's capability bag)
329
320
 
330
321
  #### xhtmlBuilder
331
322
 
332
323
  > `static` **xhtmlBuilder**: `XMLBuilder`
333
324
 
334
- Defined in:
335
- [libraries/epub/index.ts:315](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L315)
325
+ Defined in: [libraries/epub/index.ts:403](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L403)
336
326
 
337
327
  #### xhtmlParser
338
328
 
339
329
  > `static` **xhtmlParser**: `XMLParser`
340
330
 
341
- Defined in:
342
- [libraries/epub/index.ts:275](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L275)
331
+ Defined in: [libraries/epub/index.ts:355](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L355)
343
332
 
344
333
  #### xmlBuilder
345
334
 
346
335
  > `static` **xmlBuilder**: `XMLBuilder`
347
336
 
348
- Defined in:
349
- [libraries/epub/index.ts:308](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L308)
337
+ Defined in: [libraries/epub/index.ts:396](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L396)
350
338
 
351
339
  #### xmlParser
352
340
 
353
341
  > `static` **xmlParser**: `XMLParser`
354
342
 
355
- Defined in:
356
- [libraries/epub/index.ts:268](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L268)
343
+ Defined in: [libraries/epub/index.ts:348](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L348)
357
344
 
358
345
  ### Methods
359
346
 
@@ -361,8 +348,7 @@ Defined in:
361
348
 
362
349
  > **\[dispose\]**(): `void`
363
350
 
364
- Defined in:
365
- [libraries/epub/index.ts:3461](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3461)
351
+ Defined in: [libraries/epub/index.ts:3583](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3583)
366
352
 
367
353
  ##### Returns
368
354
 
@@ -372,13 +358,13 @@ Defined in:
372
358
 
373
359
  > **addCollection**(`collection`, `index?`): `Promise`\<`void`\>
374
360
 
375
- Defined in:
376
- [libraries/epub/index.ts:2159](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2159)
361
+ Defined in: [libraries/epub/index.ts:2233](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2233)
377
362
 
378
363
  Add a collection to the EPUB metadata.
379
364
 
380
- If index is provided, the collection will be placed at that index in the list of
381
- collections. Otherwise, it will be added to the end of the list.
365
+ If index is provided, the collection will be placed at
366
+ that index in the list of collections. Otherwise, it
367
+ will be added to the end of the list.
382
368
 
383
369
  ##### Parameters
384
370
 
@@ -395,13 +381,13 @@ collections. Otherwise, it will be added to the end of the list.
395
381
 
396
382
  > **addContributor**(`contributor`, `index?`): `Promise`\<`void`\>
397
383
 
398
- Defined in:
399
- [libraries/epub/index.ts:2504](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2504)
384
+ Defined in: [libraries/epub/index.ts:2578](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2578)
400
385
 
401
386
  Add a contributor to the EPUB metadata.
402
387
 
403
- If index is provided, the creator will be placed at that index in the list of
404
- creators. Otherwise, it will be added to the end of the list.
388
+ If index is provided, the creator will be placed at
389
+ that index in the list of creators. Otherwise, it
390
+ will be added to the end of the list.
405
391
 
406
392
  This is a convenience method for
407
393
  `epub.addCreator(contributor, index, 'contributor')`.
@@ -425,13 +411,13 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccreator
425
411
 
426
412
  > **addCreator**(`creator`, `index?`, `type?`): `Promise`\<`void`\>
427
413
 
428
- Defined in:
429
- [libraries/epub/index.ts:2349](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2349)
414
+ Defined in: [libraries/epub/index.ts:2423](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2423)
430
415
 
431
416
  Add a creator to the EPUB metadata.
432
417
 
433
- If index is provided, the creator will be placed at that index in the list of
434
- creators. Otherwise, it will be added to the end of the list.
418
+ If index is provided, the creator will be placed at
419
+ that index in the list of creators. Otherwise, it
420
+ will be added to the end of the list.
435
421
 
436
422
  ##### Parameters
437
423
 
@@ -455,10 +441,10 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccreator
455
441
 
456
442
  > **addManifestItem**(`item`, `contents`, `encoding`): `Promise`\<`void`\>
457
443
 
458
- Defined in:
459
- [libraries/epub/index.ts:3047](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3047)
444
+ Defined in: [libraries/epub/index.ts:3170](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3170)
460
445
 
461
- Create a new manifest item and write its contents to a new entry.
446
+ Create a new manifest item and write its contents to a
447
+ new entry.
462
448
 
463
449
  ###### Parameters
464
450
 
@@ -484,10 +470,10 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
484
470
 
485
471
  > **addManifestItem**(`item`, `contents`, `encoding`): `Promise`\<`void`\>
486
472
 
487
- Defined in:
488
- [libraries/epub/index.ts:3052](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3052)
473
+ Defined in: [libraries/epub/index.ts:3175](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3175)
489
474
 
490
- Create a new manifest item and write its contents to a new entry.
475
+ Create a new manifest item and write its contents to a
476
+ new entry.
491
477
 
492
478
  ###### Parameters
493
479
 
@@ -513,10 +499,10 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
513
499
 
514
500
  > **addManifestItem**(`item`, `contents`): `Promise`\<`void`\>
515
501
 
516
- Defined in:
517
- [libraries/epub/index.ts:3057](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3057)
502
+ Defined in: [libraries/epub/index.ts:3180](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3180)
518
503
 
519
- Create a new manifest item and write its contents to a new entry.
504
+ Create a new manifest item and write its contents to a
505
+ new entry.
520
506
 
521
507
  ###### Parameters
522
508
 
@@ -541,14 +527,14 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
541
527
 
542
528
  > **addMetadata**(`entry`): `Promise`\<`void`\>
543
529
 
544
- Defined in:
545
- [libraries/epub/index.ts:3168](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3168)
530
+ Defined in: [libraries/epub/index.ts:3291](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3291)
546
531
 
547
532
  Add a new metadata entry to the Epub.
548
533
 
549
- This method, like `epub.getMetadata()`, operates on metadata entries. For more
550
- useful semantic representations of metadata, use specific methods such as
551
- `setTitle()` and `setLanguage()`.
534
+ This method, like `epub.getMetadata()`, operates on
535
+ metadata entries. For more useful semantic representations
536
+ of metadata, use specific methods such as `setTitle()` and
537
+ `setLanguage()`.
552
538
 
553
539
  ##### Parameters
554
540
 
@@ -568,16 +554,16 @@ https://www.w3.org/TR/epub-33/#sec-pkg-metadata
568
554
 
569
555
  > **addSpineItem**(`manifestId`, `index?`): `Promise`\<`void`\>
570
556
 
571
- Defined in:
572
- [libraries/epub/index.ts:2558](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2558)
557
+ Defined in: [libraries/epub/index.ts:2632](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2632)
573
558
 
574
559
  Add an item to the spine of the EPUB.
575
560
 
576
- If `index` is undefined, the item will be added to the end of the spine.
577
- Otherwise it will be inserted at the specified index.
561
+ If `index` is undefined, the item will be added
562
+ to the end of the spine. Otherwise it will be
563
+ inserted at the specified index.
578
564
 
579
- If the manifestId does not correspond to an item in the manifest, this will
580
- throw an error.
565
+ If the manifestId does not correspond to an item
566
+ in the manifest, this will throw an error.
581
567
 
582
568
  ##### Parameters
583
569
 
@@ -598,8 +584,7 @@ https://www.w3.org/TR/epub-33/#sec-spine-elem
598
584
 
599
585
  > **addSubject**(`subject`): `Promise`\<`void`\>
600
586
 
601
- Defined in:
602
- [libraries/epub/index.ts:1688](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1688)
587
+ Defined in: [libraries/epub/index.ts:1762](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1762)
603
588
 
604
589
  Add a subject to the EPUB metadata.
605
590
 
@@ -621,8 +606,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcsubject
621
606
 
622
607
  > **copy**(`path?`): `Promise`\<[`Epub`](#epub)\>
623
608
 
624
- Defined in:
625
- [libraries/epub/index.ts:630](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L630)
609
+ Defined in: [libraries/epub/index.ts:719](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L719)
626
610
 
627
611
  ##### Parameters
628
612
 
@@ -636,14 +620,12 @@ Defined in:
636
620
 
637
621
  #### createXhtmlDocument()
638
622
 
639
- > **createXhtmlDocument**(`body`, `head?`, `language?`):
640
- > `Promise`\<([`XmlElement`](#xmlelement)\<`"?xml"`\> \|
641
- > [`XmlElement`](#xmlelement)\<`"html"`\>)[]\>
623
+ > **createXhtmlDocument**(`body`, `head?`, `language?`): `Promise`\<([`XmlElement`](#xmlelement)\<`"?xml"`\> \| [`XmlElement`](#xmlelement)\<`"html"`\>)[]\>
642
624
 
643
- Defined in:
644
- [libraries/epub/index.ts:2864](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2864)
625
+ Defined in: [libraries/epub/index.ts:2991](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2991)
645
626
 
646
- Create a new XHTML document with the given body and head.
627
+ Create a new XHTML document with the given body
628
+ and head.
647
629
 
648
630
  ##### Parameters
649
631
 
@@ -655,15 +637,13 @@ Create a new XHTML document with the given body and head.
655
637
 
656
638
  ##### Returns
657
639
 
658
- `Promise`\<([`XmlElement`](#xmlelement)\<`"?xml"`\> \|
659
- [`XmlElement`](#xmlelement)\<`"html"`\>)[]\>
640
+ `Promise`\<([`XmlElement`](#xmlelement)\<`"?xml"`\> \| [`XmlElement`](#xmlelement)\<`"html"`\>)[]\>
660
641
 
661
642
  #### discardAndClose()
662
643
 
663
644
  > **discardAndClose**(): `void`
664
645
 
665
- Defined in:
666
- [libraries/epub/index.ts:3411](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3411)
646
+ Defined in: [libraries/epub/index.ts:3533](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3533)
667
647
 
668
648
  ##### Returns
669
649
 
@@ -673,11 +653,10 @@ Defined in:
673
653
 
674
654
  > **findAllMetadataItems**(`predicate`): `Promise`\<`object`[]\>
675
655
 
676
- Defined in:
677
- [libraries/epub/index.ts:895](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L895)
656
+ Defined in: [libraries/epub/index.ts:969](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L969)
678
657
 
679
- Returns the item in the metadata element's children array that matches the
680
- provided predicate.
658
+ Returns the item in the metadata element's children array
659
+ that matches the provided predicate.
681
660
 
682
661
  ##### Parameters
683
662
 
@@ -691,33 +670,12 @@ provided predicate.
691
670
 
692
671
  #### findMetadataItem()
693
672
 
694
- > **findMetadataItem**(`predicate`): `Promise`\<`null` \| \{ `id`: `undefined`
695
- > \| `string`; `properties`: \{[`k`: `string`]: `string`; \}; `type`:
696
- > `` `a${string}` `` \| `` `b${string}` `` \| `` `c${string}` `` \|
697
- > `` `d${string}` `` \| `` `e${string}` `` \| `` `f${string}` `` \|
698
- > `` `g${string}` `` \| `` `h${string}` `` \| `` `i${string}` `` \|
699
- > `` `j${string}` `` \| `` `k${string}` `` \| `` `l${string}` `` \|
700
- > `` `m${string}` `` \| `` `n${string}` `` \| `` `o${string}` `` \|
701
- > `` `p${string}` `` \| `` `q${string}` `` \| `` `r${string}` `` \|
702
- > `` `s${string}` `` \| `` `t${string}` `` \| `` `u${string}` `` \|
703
- > `` `v${string}` `` \| `` `w${string}` `` \| `` `x${string}` `` \|
704
- > `` `y${string}` `` \| `` `z${string}` `` \| `` `A${string}` `` \|
705
- > `` `B${string}` `` \| `` `C${string}` `` \| `` `D${string}` `` \|
706
- > `` `E${string}` `` \| `` `F${string}` `` \| `` `G${string}` `` \|
707
- > `` `H${string}` `` \| `` `I${string}` `` \| `` `J${string}` `` \|
708
- > `` `K${string}` `` \| `` `L${string}` `` \| `` `M${string}` `` \|
709
- > `` `N${string}` `` \| `` `O${string}` `` \| `` `P${string}` `` \|
710
- > `` `Q${string}` `` \| `` `R${string}` `` \| `` `S${string}` `` \|
711
- > `` `T${string}` `` \| `` `U${string}` `` \| `` `V${string}` `` \|
712
- > `` `W${string}` `` \| `` `X${string}` `` \| `` `Y${string}` `` \|
713
- > `` `Z${string}` `` \| `` `?${string}` ``; `value`: `undefined` \| `string`;
714
- > \}\>
715
-
716
- Defined in:
717
- [libraries/epub/index.ts:886](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L886)
718
-
719
- Returns the item in the metadata element's children array that matches the
720
- provided predicate.
673
+ > **findMetadataItem**(`predicate`): `Promise`\<\{ `id`: `string` \| `undefined`; `properties`: \{[`k`: `string`]: `string`; \}; `type`: `` `r${string}` `` \| `` `a${string}` `` \| `` `b${string}` `` \| `` `c${string}` `` \| `` `d${string}` `` \| `` `e${string}` `` \| `` `f${string}` `` \| `` `g${string}` `` \| `` `h${string}` `` \| `` `i${string}` `` \| `` `j${string}` `` \| `` `k${string}` `` \| `` `l${string}` `` \| `` `m${string}` `` \| `` `n${string}` `` \| `` `o${string}` `` \| `` `p${string}` `` \| `` `q${string}` `` \| `` `s${string}` `` \| `` `t${string}` `` \| `` `u${string}` `` \| `` `v${string}` `` \| `` `w${string}` `` \| `` `x${string}` `` \| `` `y${string}` `` \| `` `z${string}` `` \| `` `R${string}` `` \| `` `A${string}` `` \| `` `B${string}` `` \| `` `C${string}` `` \| `` `D${string}` `` \| `` `E${string}` `` \| `` `F${string}` `` \| `` `G${string}` `` \| `` `H${string}` `` \| `` `I${string}` `` \| `` `J${string}` `` \| `` `K${string}` `` \| `` `L${string}` `` \| `` `M${string}` `` \| `` `N${string}` `` \| `` `O${string}` `` \| `` `P${string}` `` \| `` `Q${string}` `` \| `` `S${string}` `` \| `` `T${string}` `` \| `` `U${string}` `` \| `` `V${string}` `` \| `` `W${string}` `` \| `` `X${string}` `` \| `` `Y${string}` `` \| `` `Z${string}` `` \| `` `?${string}` ``; `value`: `string` \| `undefined`; \} \| `null`\>
674
+
675
+ Defined in: [libraries/epub/index.ts:960](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L960)
676
+
677
+ Returns the item in the metadata element's children array
678
+ that matches the provided predicate.
721
679
 
722
680
  ##### Parameters
723
681
 
@@ -727,37 +685,18 @@ provided predicate.
727
685
 
728
686
  ##### Returns
729
687
 
730
- `Promise`\<`null` \| \{ `id`: `undefined` \| `string`; `properties`: \{[`k`:
731
- `string`]: `string`; \}; `type`: `` `a${string}` `` \| `` `b${string}` `` \|
732
- `` `c${string}` `` \| `` `d${string}` `` \| `` `e${string}` `` \|
733
- `` `f${string}` `` \| `` `g${string}` `` \| `` `h${string}` `` \|
734
- `` `i${string}` `` \| `` `j${string}` `` \| `` `k${string}` `` \|
735
- `` `l${string}` `` \| `` `m${string}` `` \| `` `n${string}` `` \|
736
- `` `o${string}` `` \| `` `p${string}` `` \| `` `q${string}` `` \|
737
- `` `r${string}` `` \| `` `s${string}` `` \| `` `t${string}` `` \|
738
- `` `u${string}` `` \| `` `v${string}` `` \| `` `w${string}` `` \|
739
- `` `x${string}` `` \| `` `y${string}` `` \| `` `z${string}` `` \|
740
- `` `A${string}` `` \| `` `B${string}` `` \| `` `C${string}` `` \|
741
- `` `D${string}` `` \| `` `E${string}` `` \| `` `F${string}` `` \|
742
- `` `G${string}` `` \| `` `H${string}` `` \| `` `I${string}` `` \|
743
- `` `J${string}` `` \| `` `K${string}` `` \| `` `L${string}` `` \|
744
- `` `M${string}` `` \| `` `N${string}` `` \| `` `O${string}` `` \|
745
- `` `P${string}` `` \| `` `Q${string}` `` \| `` `R${string}` `` \|
746
- `` `S${string}` `` \| `` `T${string}` `` \| `` `U${string}` `` \|
747
- `` `V${string}` `` \| `` `W${string}` `` \| `` `X${string}` `` \|
748
- `` `Y${string}` `` \| `` `Z${string}` `` \| `` `?${string}` ``; `value`:
749
- `undefined` \| `string`; \}\>
688
+ `Promise`\<\{ `id`: `string` \| `undefined`; `properties`: \{[`k`: `string`]: `string`; \}; `type`: `` `r${string}` `` \| `` `a${string}` `` \| `` `b${string}` `` \| `` `c${string}` `` \| `` `d${string}` `` \| `` `e${string}` `` \| `` `f${string}` `` \| `` `g${string}` `` \| `` `h${string}` `` \| `` `i${string}` `` \| `` `j${string}` `` \| `` `k${string}` `` \| `` `l${string}` `` \| `` `m${string}` `` \| `` `n${string}` `` \| `` `o${string}` `` \| `` `p${string}` `` \| `` `q${string}` `` \| `` `s${string}` `` \| `` `t${string}` `` \| `` `u${string}` `` \| `` `v${string}` `` \| `` `w${string}` `` \| `` `x${string}` `` \| `` `y${string}` `` \| `` `z${string}` `` \| `` `R${string}` `` \| `` `A${string}` `` \| `` `B${string}` `` \| `` `C${string}` `` \| `` `D${string}` `` \| `` `E${string}` `` \| `` `F${string}` `` \| `` `G${string}` `` \| `` `H${string}` `` \| `` `I${string}` `` \| `` `J${string}` `` \| `` `K${string}` `` \| `` `L${string}` `` \| `` `M${string}` `` \| `` `N${string}` `` \| `` `O${string}` `` \| `` `P${string}` `` \| `` `Q${string}` `` \| `` `S${string}` `` \| `` `T${string}` `` \| `` `U${string}` `` \| `` `V${string}` `` \| `` `W${string}` `` \| `` `X${string}` `` \| `` `Y${string}` `` \| `` `Z${string}` `` \| `` `?${string}` ``; `value`: `string` \| `undefined`; \} \| `null`\>
750
689
 
751
690
  #### getBaseDirection()
752
691
 
753
692
  > **getBaseDirection**(): `Promise`\<`"auto"` \| `"rtl"` \| `"ltr"`\>
754
693
 
755
- Defined in:
756
- [libraries/epub/index.ts:1642](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1642)
694
+ Defined in: [libraries/epub/index.ts:1716](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1716)
757
695
 
758
696
  Retrieve the base direction from the package element.
759
697
 
760
- If there is no `dir` attribute on the package element, returns 'auto'.
698
+ If there is no `dir` attribute on the package element,
699
+ returns 'auto'.
761
700
 
762
701
  ##### Returns
763
702
 
@@ -771,8 +710,7 @@ https://www.w3.org/TR/epub-33/#attrdef-dir
771
710
 
772
711
  > **getCollections**(): `Promise`\<[`Collection`](#collection)[]\>
773
712
 
774
- Defined in:
775
- [libraries/epub/index.ts:2119](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2119)
713
+ Defined in: [libraries/epub/index.ts:2193](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2193)
776
714
 
777
715
  Retrieve the list of collections.
778
716
 
@@ -784,12 +722,12 @@ Retrieve the list of collections.
784
722
 
785
723
  > **getContributors**(): `Promise`\<[`DcCreator`](#dccreator)[]\>
786
724
 
787
- Defined in:
788
- [libraries/epub/index.ts:2336](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2336)
725
+ Defined in: [libraries/epub/index.ts:2410](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2410)
789
726
 
790
727
  Retrieve the list of contributors.
791
728
 
792
- This is a convenience method for `epub.getCreators('contributor')`.
729
+ This is a convenience method for
730
+ `epub.getCreators('contributor')`.
793
731
 
794
732
  ##### Returns
795
733
 
@@ -801,19 +739,19 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccontributor
801
739
 
802
740
  #### getCoverImage()
803
741
 
804
- > **getCoverImage**(): `Promise`\<`null` \| `Uint8Array`\<`ArrayBufferLike`\>\>
742
+ > **getCoverImage**(): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\> \| `null`\>
805
743
 
806
- Defined in:
807
- [libraries/epub/index.ts:1538](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1538)
744
+ Defined in: [libraries/epub/index.ts:1612](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1612)
808
745
 
809
746
  Retrieve the cover image data as a byte array.
810
747
 
811
- This does not include, for example, the cover image's filename or mime type. To
812
- retrieve the image manifest item, use epub.getCoverImageItem().
748
+ This does not include, for example, the cover image's
749
+ filename or mime type. To retrieve the image manifest
750
+ item, use epub.getCoverImageItem().
813
751
 
814
752
  ##### Returns
815
753
 
816
- `Promise`\<`null` \| `Uint8Array`\<`ArrayBufferLike`\>\>
754
+ `Promise`\<`Uint8Array`\<`ArrayBufferLike`\> \| `null`\>
817
755
 
818
756
  ##### Link
819
757
 
@@ -821,20 +759,20 @@ https://www.w3.org/TR/epub-33/#sec-cover-image
821
759
 
822
760
  #### getCoverImageItem()
823
761
 
824
- > **getCoverImageItem**(): `Promise`\<`null` \|
825
- > [`ManifestItem`](#manifestitem)\>
762
+ > **getCoverImageItem**(): `Promise`\<[`ManifestItem`](#manifestitem) \| `null`\>
826
763
 
827
- Defined in:
828
- [libraries/epub/index.ts:1519](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1519)
764
+ Defined in: [libraries/epub/index.ts:1593](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1593)
829
765
 
830
766
  Retrieve the cover image manifest item.
831
767
 
832
- This does not return the actual image data. To retrieve the image data, pass
833
- this item's id to epub.readItemContents, or use epub.getCoverImage() instead.
768
+ This does not return the actual image data. To
769
+ retrieve the image data, pass this item's id to
770
+ epub.readItemContents, or use epub.getCoverImage()
771
+ instead.
834
772
 
835
773
  ##### Returns
836
774
 
837
- `Promise`\<`null` \| [`ManifestItem`](#manifestitem)\>
775
+ `Promise`\<[`ManifestItem`](#manifestitem) \| `null`\>
838
776
 
839
777
  ##### Link
840
778
 
@@ -844,8 +782,7 @@ https://www.w3.org/TR/epub-33/#sec-cover-image
844
782
 
845
783
  > **getCreators**(`type`): `Promise`\<[`DcCreator`](#dccreator)[]\>
846
784
 
847
- Defined in:
848
- [libraries/epub/index.ts:2272](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2272)
785
+ Defined in: [libraries/epub/index.ts:2346](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2346)
849
786
 
850
787
  Retrieve the list of creators.
851
788
 
@@ -865,31 +802,31 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccreator
865
802
 
866
803
  #### getDescription()
867
804
 
868
- > **getDescription**(): `Promise`\<`null` \| `string`\>
805
+ > **getDescription**(): `Promise`\<`string` \| `null`\>
869
806
 
870
- Defined in:
871
- [libraries/epub/index.ts:1970](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1970)
807
+ Defined in: [libraries/epub/index.ts:2044](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2044)
872
808
 
873
- Retrieve the Epub's description as specified in its package document metadata.
809
+ Retrieve the Epub's description as specified in its
810
+ package document metadata.
874
811
 
875
- If no description metadata is specified, returns null. Returns the description
876
- as a string. Descriptions may include HTML markup.
812
+ If no description metadata is specified, returns null.
813
+ Returns the description as a string. Descriptions may
814
+ include HTML markup.
877
815
 
878
816
  ##### Returns
879
817
 
880
- `Promise`\<`null` \| `string`\>
818
+ `Promise`\<`string` \| `null`\>
881
819
 
882
820
  #### getGuideEntries()
883
821
 
884
822
  > **getGuideEntries**(): `Promise`\<`GuideItem`[]\>
885
823
 
886
- Defined in:
887
- [libraries/epub/index.ts:3388](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3388)
824
+ Defined in: [libraries/epub/index.ts:3510](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3510)
888
825
 
889
826
  Retrieve the guide entries from the package document.
890
827
 
891
- The guide element is deprecated in EPUB 3 in favor of the landmarks nav, but
892
- many publications still include it.
828
+ The guide element is deprecated in EPUB 3 in favor of
829
+ the landmarks nav, but many publications still include it.
893
830
 
894
831
  ##### Returns
895
832
 
@@ -897,19 +834,18 @@ many publications still include it.
897
834
 
898
835
  #### ~~getIdentifier()~~
899
836
 
900
- > **getIdentifier**(): `Promise`\<`null` \| `string`\>
837
+ > **getIdentifier**(): `Promise`\<`string` \| `null`\>
901
838
 
902
- Defined in:
903
- [libraries/epub/index.ts:993](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L993)
839
+ Defined in: [libraries/epub/index.ts:1067](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1067)
904
840
 
905
- Retrieve the first identifier from the dc:identifier element in the EPUB
906
- metadata.
841
+ Retrieve the first identifier from the dc:identifier element
842
+ in the EPUB metadata.
907
843
 
908
844
  If there is no dc:identifier element, returns null.
909
845
 
910
846
  ##### Returns
911
847
 
912
- `Promise`\<`null` \| `string`\>
848
+ `Promise`\<`string` \| `null`\>
913
849
 
914
850
  ##### Link
915
851
 
@@ -917,21 +853,20 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcidentifier
917
853
 
918
854
  ##### Deprecated
919
855
 
920
- Use [getUniqueIdentifier](#getuniqueidentifier) instead to get the unique
921
- identifier, or [getIdentifiers](#getidentifiers) to get all identifiers.
856
+ Use [getUniqueIdentifier](#getuniqueidentifier) instead to get the unique identifier,
857
+ or [getIdentifiers](#getidentifiers) to get all identifiers.
922
858
 
923
859
  #### getIdentifiers()
924
860
 
925
861
  > **getIdentifiers**(): `Promise`\<[`EpubIdentifier`](#epubidentifier)[]\>
926
862
 
927
- Defined in:
928
- [libraries/epub/index.ts:1168](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1168)
863
+ Defined in: [libraries/epub/index.ts:1242](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1242)
929
864
 
930
865
  Retrieve every `dc:identifier` entry, returned as found.
931
866
 
932
- Values are not interpreted. Any refining `identifier-type` meta (spec D.3.8) or
933
- legacy `opf:scheme` attribute is surfaced on the entry, but no parsing of the
934
- value itself is attempted. To read `dc:source` entries, use
867
+ Values are not interpreted. Any refining `identifier-type` meta (spec
868
+ D.3.8) or legacy `opf:scheme` attribute is surfaced on the entry, but no
869
+ parsing of the value itself is attempted. To read `dc:source` entries, use
935
870
  [getSources](#getsources).
936
871
 
937
872
  ##### Returns
@@ -946,11 +881,10 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcidentifier
946
881
 
947
882
  > **getItemArchiveLength**(`id`): `Promise`\<`number`\>
948
883
 
949
- Defined in:
950
- [libraries/epub/index.ts:672](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L672)
884
+ Defined in: [libraries/epub/index.ts:745](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L745)
951
885
 
952
- Length of the underlying archive entry for a manifest item, in bytes Necessary
953
- to compute the readium page count which is for COMPRESSED content
886
+ Length of the underlying archive entry for a manifest item, in bytes
887
+ Necessary to compute the readium page count which is for COMPRESSED content
954
888
 
955
889
  ##### Parameters
956
890
 
@@ -968,13 +902,12 @@ to compute the readium page count which is for COMPRESSED content
968
902
 
969
903
  #### getLandmarks()
970
904
 
971
- > **getLandmarks**(`__namedParameters`): `Promise`\<`null` \|
972
- > [`Navigation`](#navigation)\>
905
+ > **getLandmarks**(`__namedParameters`): `Promise`\<[`Navigation`](#navigation) \| `null`\>
973
906
 
974
- Defined in:
975
- [libraries/epub/index.ts:2737](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2737)
907
+ Defined in: [libraries/epub/index.ts:2811](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2811)
976
908
 
977
- Returns the structured landmarks navigation document as a Navigation object
909
+ Returns the structured landmarks navigation document
910
+ as a Navigation object
978
911
 
979
912
  ##### Parameters
980
913
 
@@ -985,7 +918,7 @@ Returns the structured landmarks navigation document as a Navigation object
985
918
 
986
919
  ##### Returns
987
920
 
988
- `Promise`\<`null` \| [`Navigation`](#navigation)\>
921
+ `Promise`\<[`Navigation`](#navigation) \| `null`\>
989
922
 
990
923
  ##### Link
991
924
 
@@ -993,19 +926,19 @@ https://www.w3.org/TR/epub-33/#sec-nav-landmarks
993
926
 
994
927
  #### getLanguage()
995
928
 
996
- > **getLanguage**(): `Promise`\<`null` \| `Locale`\>
929
+ > **getLanguage**(): `Promise`\<`Locale` \| `null`\>
997
930
 
998
- Defined in:
999
- [libraries/epub/index.ts:1807](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1807)
931
+ Defined in: [libraries/epub/index.ts:1881](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1881)
1000
932
 
1001
- Retrieve the Epub's language as specified in its package document metadata.
933
+ Retrieve the Epub's language as specified in its
934
+ package document metadata.
1002
935
 
1003
- If no language metadata is specified, returns null. Returns the language as an
1004
- Intl.Locale instance.
936
+ If no language metadata is specified, returns null.
937
+ Returns the language as an Intl.Locale instance.
1005
938
 
1006
939
  ##### Returns
1007
940
 
1008
- `Promise`\<`null` \| `Locale`\>
941
+ `Promise`\<`Locale` \| `null`\>
1009
942
 
1010
943
  ##### Link
1011
944
 
@@ -1015,10 +948,10 @@ https://www.w3.org/TR/epub-33/#sec-opf-dclanguage
1015
948
 
1016
949
  > **getLayout**(): `Promise`\<`"pre-paginated"` \| `"reflowable"`\>
1017
950
 
1018
- Defined in:
1019
- [libraries/epub/index.ts:1623](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1623)
951
+ Defined in: [libraries/epub/index.ts:1697](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1697)
1020
952
 
1021
- Retrieve the layout from the rendition:layout meta element in the EPUB metadata.
953
+ Retrieve the layout from the rendition:layout meta element
954
+ in the EPUB metadata.
1022
955
 
1023
956
  If there is no meta element, returns 'reflowable'.
1024
957
 
@@ -1032,16 +965,14 @@ https://www.w3.org/TR/epub-33/#layout
1032
965
 
1033
966
  #### getManifest()
1034
967
 
1035
- > **getManifest**(): `Promise`\<`Record`\<`string`,
1036
- > [`ManifestItem`](#manifestitem)\>\>
968
+ > **getManifest**(): `Promise`\<`Record`\<`string`, [`ManifestItem`](#manifestitem)\>\>
1037
969
 
1038
- Defined in:
1039
- [libraries/epub/index.ts:811](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L811)
970
+ Defined in: [libraries/epub/index.ts:885](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L885)
1040
971
 
1041
972
  Retrieve the manifest for the Epub.
1042
973
 
1043
- This is represented as a map from each manifest items' id to the rest of its
1044
- properties.
974
+ This is represented as a map from each manifest items'
975
+ id to the rest of its properties.
1045
976
 
1046
977
  ##### Returns
1047
978
 
@@ -1055,16 +986,15 @@ https://www.w3.org/TR/epub-33/#sec-pkg-manifest
1055
986
 
1056
987
  > **getMetadata**(): `Promise`\<[`EpubMetadata`](#epubmetadata)\>
1057
988
 
1058
- Defined in:
1059
- [libraries/epub/index.ts:962](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L962)
989
+ Defined in: [libraries/epub/index.ts:1036](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1036)
1060
990
 
1061
991
  Retrieve the metadata entries for the Epub.
1062
992
 
1063
- This is represented as an array of metadata entries, in the order that they're
1064
- presented in the Epub package document.
993
+ This is represented as an array of metadata entries,
994
+ in the order that they're presented in the Epub package document.
1065
995
 
1066
- For more useful semantic representations of metadata, use specific methods such
1067
- as `getTitle()` and `getAuthors()`.
996
+ For more useful semantic representations of metadata, use
997
+ specific methods such as `getTitle()` and `getAuthors()`.
1068
998
 
1069
999
  ##### Returns
1070
1000
 
@@ -1076,19 +1006,18 @@ https://www.w3.org/TR/epub-33/#sec-pkg-metadata
1076
1006
 
1077
1007
  #### getModifiedDate()
1078
1008
 
1079
- > **getModifiedDate**(): `Promise`\<`null` \| `Date`\>
1009
+ > **getModifiedDate**(): `Promise`\<`Date` \| `null`\>
1080
1010
 
1081
- Defined in:
1082
- [libraries/epub/index.ts:1606](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1606)
1011
+ Defined in: [libraries/epub/index.ts:1680](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1680)
1083
1012
 
1084
- Retrieve the modified date from the dcterms:modified metadata in the EPUB
1085
- metadata as a Date object.
1013
+ Retrieve the modified date from the dcterms:modified metadata
1014
+ in the EPUB metadata as a Date object.
1086
1015
 
1087
1016
  If there is no meta element with dcterms:modified, returns null.
1088
1017
 
1089
1018
  ##### Returns
1090
1019
 
1091
- `Promise`\<`null` \| `Date`\>
1020
+ `Promise`\<`Date` \| `null`\>
1092
1021
 
1093
1022
  ##### Link
1094
1023
 
@@ -1098,14 +1027,14 @@ https://www.w3.org/TR/epub-33/#sec-metadata-last-modified
1098
1027
 
1099
1028
  > **getNcxTableOfContents**(): `Promise`\<[`NavigationList`](#navigationlist)\>
1100
1029
 
1101
- Defined in:
1102
- [libraries/epub/index.ts:3293](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3293)
1030
+ Defined in: [libraries/epub/index.ts:3416](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3416)
1103
1031
 
1104
- Parse the NCX table of contents, if one exists, and return a tree of TocEntry
1105
- nodes.
1032
+ Parse the NCX table of contents, if one exists, and return
1033
+ a tree of TocEntry nodes.
1106
1034
 
1107
- Useful for both EPUB 2 publications (where the NCX is the primary navigation)
1108
- and EPUB 3 publications that retain an NCX for backwards compatibility.
1035
+ Useful for both EPUB 2 publications (where the NCX is the
1036
+ primary navigation) and EPUB 3 publications that retain an
1037
+ NCX for backwards compatibility.
1109
1038
 
1110
1039
  ##### Returns
1111
1040
 
@@ -1113,11 +1042,9 @@ and EPUB 3 publications that retain an NCX for backwards compatibility.
1113
1042
 
1114
1043
  #### getPackageElement()
1115
1044
 
1116
- > **getPackageElement**():
1117
- > `Promise`\<[`XmlElement`](#xmlelement)\<`"package"`\>\>
1045
+ > **getPackageElement**(): `Promise`\<[`XmlElement`](#xmlelement)\<`"package"`\>\>
1118
1046
 
1119
- Defined in:
1120
- [libraries/epub/index.ts:746](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L746)
1047
+ Defined in: [libraries/epub/index.ts:820](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L820)
1121
1048
 
1122
1049
  ##### Returns
1123
1050
 
@@ -1125,14 +1052,12 @@ Defined in:
1125
1052
 
1126
1053
  #### getPackageVocabularyPrefixes()
1127
1054
 
1128
- > **getPackageVocabularyPrefixes**(): `Promise`\<`Record`\<`string`,
1129
- > `string`\>\>
1055
+ > **getPackageVocabularyPrefixes**(): `Promise`\<`Record`\<`string`, `string`\>\>
1130
1056
 
1131
- Defined in:
1132
- [libraries/epub/index.ts:1987](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1987)
1057
+ Defined in: [libraries/epub/index.ts:2061](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2061)
1133
1058
 
1134
- Return the set of custom vocabulary prefixes set on this publication's root
1135
- package element.
1059
+ Return the set of custom vocabulary prefixes set on this publication's
1060
+ root package element.
1136
1061
 
1137
1062
  Returns a map from prefix to URI
1138
1063
 
@@ -1146,21 +1071,20 @@ https://www.w3.org/TR/epub-33/#sec-prefix-attr
1146
1071
 
1147
1072
  #### getPageBreakSource()
1148
1073
 
1149
- > **getPageBreakSource**(): `Promise`\<`null` \| [`EpubSource`](#epubsource)\>
1074
+ > **getPageBreakSource**(): `Promise`\<[`EpubSource`](#epubsource) \| `null`\>
1150
1075
 
1151
- Defined in:
1152
- [libraries/epub/index.ts:1205](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1205)
1076
+ Defined in: [libraries/epub/index.ts:1279](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1279)
1153
1077
 
1154
1078
  Retrieve the `pageBreakSource` property (EPUB 3.4, spec D.2.9), the
1155
1079
  publication-level source for the source of its page break markers.
1156
1080
 
1157
- This property replaces the refining `source-of="pagination"` meta (spec D.3.11),
1158
- see EpubSource.sourceOf. If no `pageBreakSource` property is found, we fall back
1159
- to finding a `dc:source` with a `source-of="pagination"` refinement.
1081
+ This property replaces the refining `source-of="pagination"` meta (spec
1082
+ D.3.11), see EpubSource.sourceOf. If no `pageBreakSource` property is found,
1083
+ we fall back to finding a `dc:source` with a `source-of="pagination"` refinement.
1160
1084
 
1161
1085
  ##### Returns
1162
1086
 
1163
- `Promise`\<`null` \| [`EpubSource`](#epubsource)\>
1087
+ `Promise`\<[`EpubSource`](#epubsource) \| `null`\>
1164
1088
 
1165
1089
  ##### Link
1166
1090
 
@@ -1168,13 +1092,12 @@ https://www.w3.org/TR/epub/#pageBreakSource
1168
1092
 
1169
1093
  #### getPageList()
1170
1094
 
1171
- > **getPageList**(`__namedParameters`): `Promise`\<`null` \|
1172
- > [`Navigation`](#navigation)\>
1095
+ > **getPageList**(`__namedParameters`): `Promise`\<[`Navigation`](#navigation) \| `null`\>
1173
1096
 
1174
- Defined in:
1175
- [libraries/epub/index.ts:2749](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2749)
1097
+ Defined in: [libraries/epub/index.ts:2823](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2823)
1176
1098
 
1177
- Returns the structured page list navigation document as a Navigation object
1099
+ Returns the structured page list navigation document
1100
+ as a Navigation object
1178
1101
 
1179
1102
  ##### Parameters
1180
1103
 
@@ -1185,7 +1108,7 @@ Returns the structured page list navigation document as a Navigation object
1185
1108
 
1186
1109
  ##### Returns
1187
1110
 
1188
- `Promise`\<`null` \| [`Navigation`](#navigation)\>
1111
+ `Promise`\<[`Navigation`](#navigation) \| `null`\>
1189
1112
 
1190
1113
  ##### Link
1191
1114
 
@@ -1193,19 +1116,18 @@ https://www.w3.org/TR/epub-33/#sec-nav-landmarks
1193
1116
 
1194
1117
  #### getPublicationDate()
1195
1118
 
1196
- > **getPublicationDate**(): `Promise`\<`null` \| `Date`\>
1119
+ > **getPublicationDate**(): `Promise`\<`Date` \| `null`\>
1197
1120
 
1198
- Defined in:
1199
- [libraries/epub/index.ts:1575](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1575)
1121
+ Defined in: [libraries/epub/index.ts:1649](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1649)
1200
1122
 
1201
- Retrieve the publication date from the dc:date element in the EPUB metadata as a
1202
- Date object.
1123
+ Retrieve the publication date from the dc:date element
1124
+ in the EPUB metadata as a Date object.
1203
1125
 
1204
1126
  If there is no dc:date element, returns null.
1205
1127
 
1206
1128
  ##### Returns
1207
1129
 
1208
- `Promise`\<`null` \| `Date`\>
1130
+ `Promise`\<`Date` \| `null`\>
1209
1131
 
1210
1132
  ##### Link
1211
1133
 
@@ -1215,8 +1137,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcdate
1215
1137
 
1216
1138
  > **getRootfile**(): `Promise`\<`string`\>
1217
1139
 
1218
- Defined in:
1219
- [libraries/epub/index.ts:682](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L682)
1140
+ Defined in: [libraries/epub/index.ts:756](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L756)
1220
1141
 
1221
1142
  ##### Returns
1222
1143
 
@@ -1226,13 +1147,12 @@ Defined in:
1226
1147
 
1227
1148
  > **getSources**(): `Promise`\<[`EpubSource`](#epubsource)[]\>
1228
1149
 
1229
- Defined in:
1230
- [libraries/epub/index.ts:1182](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1182)
1150
+ Defined in: [libraries/epub/index.ts:1256](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1256)
1231
1151
 
1232
1152
  Retrieve every `dc:source` entry, returned as found.
1233
1153
 
1234
- Like [getIdentifiers](#getidentifiers), values are not interpreted. In addition
1235
- to a refining `identifier-type`, a refining `source-of` meta (spec D.3.11) is
1154
+ Like [getIdentifiers](#getidentifiers), values are not interpreted. In addition to a
1155
+ refining `identifier-type`, a refining `source-of` meta (spec D.3.11) is
1236
1156
  surfaced as `sourceOf`.
1237
1157
 
1238
1158
  ##### Returns
@@ -1247,13 +1167,12 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcsource
1247
1167
 
1248
1168
  > **getSpineItems**(): `Promise`\<[`ManifestItem`](#manifestitem)[]\>
1249
1169
 
1250
- Defined in:
1251
- [libraries/epub/index.ts:2539](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2539)
1170
+ Defined in: [libraries/epub/index.ts:2613](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2613)
1252
1171
 
1253
1172
  Retrieve the manifest items that make up the Epub's spine.
1254
1173
 
1255
- The spine specifies the order that the contents of the Epub should be displayed
1256
- to users by default.
1174
+ The spine specifies the order that the contents of the Epub
1175
+ should be displayed to users by default.
1257
1176
 
1258
1177
  ##### Returns
1259
1178
 
@@ -1267,13 +1186,13 @@ https://www.w3.org/TR/epub-33/#sec-spine-elem
1267
1186
 
1268
1187
  > **getSubjects**(): `Promise`\<(`string` \| [`DcSubject`](#dcsubject))[]\>
1269
1188
 
1270
- Defined in:
1271
- [libraries/epub/index.ts:1762](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1762)
1189
+ Defined in: [libraries/epub/index.ts:1836](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1836)
1272
1190
 
1273
1191
  Retrieve the list of subjects for this EPUB.
1274
1192
 
1275
- Subjects without associated authority and term metadata will be returned as
1276
- strings. Otherwise, they will be represented as DcSubject objects, with a value,
1193
+ Subjects without associated authority and term metadata
1194
+ will be returned as strings. Otherwise, they will
1195
+ be represented as DcSubject objects, with a value,
1277
1196
  authority, and term.
1278
1197
 
1279
1198
  ##### Returns
@@ -1286,16 +1205,15 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcsubject
1286
1205
 
1287
1206
  #### getSubtitle()
1288
1207
 
1289
- > **getSubtitle**(): `Promise`\<`null` \| `string`\>
1208
+ > **getSubtitle**(): `Promise`\<`string` \| `null`\>
1290
1209
 
1291
- Defined in:
1292
- [libraries/epub/index.ts:1877](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1877)
1210
+ Defined in: [libraries/epub/index.ts:1951](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1951)
1293
1211
 
1294
1212
  Retrieve the subtitle of the Epub, if it exists.
1295
1213
 
1296
1214
  ##### Returns
1297
1215
 
1298
- `Promise`\<`null` \| `string`\>
1216
+ `Promise`\<`string` \| `null`\>
1299
1217
 
1300
1218
  ##### Link
1301
1219
 
@@ -1303,14 +1221,12 @@ https://www.w3.org/TR/epub-33/#sec-opf-dctitle
1303
1221
 
1304
1222
  #### getTableOfContents()
1305
1223
 
1306
- > **getTableOfContents**(`__namedParameters`): `Promise`\<`null` \|
1307
- > [`Navigation`](#navigation)\>
1224
+ > **getTableOfContents**(`__namedParameters`): `Promise`\<[`Navigation`](#navigation) \| `null`\>
1308
1225
 
1309
- Defined in:
1310
- [libraries/epub/index.ts:2720](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2720)
1226
+ Defined in: [libraries/epub/index.ts:2794](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2794)
1311
1227
 
1312
- Returns the structured table of contents navigation document as a Navigation
1313
- object.
1228
+ Returns the structured table of contents navigation document
1229
+ as a Navigation object.
1314
1230
 
1315
1231
  ##### Parameters
1316
1232
 
@@ -1321,7 +1237,7 @@ object.
1321
1237
 
1322
1238
  ##### Returns
1323
1239
 
1324
- `Promise`\<`null` \| [`Navigation`](#navigation)\>
1240
+ `Promise`\<[`Navigation`](#navigation) \| `null`\>
1325
1241
 
1326
1242
  ##### Link
1327
1243
 
@@ -1329,10 +1245,9 @@ https://www.w3.org/TR/epub-33/#sec-nav-toc
1329
1245
 
1330
1246
  #### getTitle()
1331
1247
 
1332
- > **getTitle**(`expanded`): `Promise`\<`null` \| `string`\>
1248
+ > **getTitle**(`expanded`): `Promise`\<`string` \| `null`\>
1333
1249
 
1334
- Defined in:
1335
- [libraries/epub/index.ts:1853](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1853)
1250
+ Defined in: [libraries/epub/index.ts:1927](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1927)
1336
1251
 
1337
1252
  Retrieve the title of the Epub.
1338
1253
 
@@ -1344,7 +1259,7 @@ Retrieve the title of the Epub.
1344
1259
 
1345
1260
  ##### Returns
1346
1261
 
1347
- `Promise`\<`null` \| `string`\>
1262
+ `Promise`\<`string` \| `null`\>
1348
1263
 
1349
1264
  ##### Link
1350
1265
 
@@ -1354,8 +1269,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dctitle
1354
1269
 
1355
1270
  > **getTitles**(): `Promise`\<`object`[]\>
1356
1271
 
1357
- Defined in:
1358
- [libraries/epub/index.ts:1889](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1889)
1272
+ Defined in: [libraries/epub/index.ts:1963](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1963)
1359
1273
 
1360
1274
  Retrieve all title entries of the Epub.
1361
1275
 
@@ -1369,18 +1283,18 @@ https://www.w3.org/TR/epub-33/#sec-opf-dctitle
1369
1283
 
1370
1284
  #### getType()
1371
1285
 
1372
- > **getType**(): `Promise`\<`null` \| [`MetadataEntry`](#metadataentry)\>
1286
+ > **getType**(): `Promise`\<[`MetadataEntry`](#metadataentry) \| `null`\>
1373
1287
 
1374
- Defined in:
1375
- [libraries/epub/index.ts:1675](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1675)
1288
+ Defined in: [libraries/epub/index.ts:1749](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1749)
1376
1289
 
1377
- Retrieve the publication type from the dc:type element in the EPUB metadata.
1290
+ Retrieve the publication type from the dc:type element
1291
+ in the EPUB metadata.
1378
1292
 
1379
1293
  If there is no dc:type element, returns null.
1380
1294
 
1381
1295
  ##### Returns
1382
1296
 
1383
- `Promise`\<`null` \| [`MetadataEntry`](#metadataentry)\>
1297
+ `Promise`\<[`MetadataEntry`](#metadataentry) \| `null`\>
1384
1298
 
1385
1299
  ##### Link
1386
1300
 
@@ -1388,18 +1302,18 @@ https://www.w3.org/TR/epub-33/#sec-opf-dctype
1388
1302
 
1389
1303
  #### getUniqueIdentifier()
1390
1304
 
1391
- > **getUniqueIdentifier**(): `Promise`\<`null` \| `string`\>
1305
+ > **getUniqueIdentifier**(): `Promise`\<`string` \| `null`\>
1392
1306
 
1393
- Defined in:
1394
- [libraries/epub/index.ts:1025](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1025)
1307
+ Defined in: [libraries/epub/index.ts:1099](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1099)
1395
1308
 
1396
- Retrieve the identifier with the unique identifier id in the EPUB metadata.
1309
+ Retrieve the identifier with the unique identifier id
1310
+ in the EPUB metadata.
1397
1311
 
1398
1312
  If there is no unique identifier id, returns the first dc:identifier element.
1399
1313
 
1400
1314
  ##### Returns
1401
1315
 
1402
- `Promise`\<`null` \| `string`\>
1316
+ `Promise`\<`string` \| `null`\>
1403
1317
 
1404
1318
  ##### Link
1405
1319
 
@@ -1407,17 +1321,16 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcidentifier
1407
1321
 
1408
1322
  #### getUniqueIdentifierId()
1409
1323
 
1410
- > **getUniqueIdentifierId**(): `Promise`\<`null` \| `string`\>
1324
+ > **getUniqueIdentifierId**(): `Promise`\<`string` \| `null`\>
1411
1325
 
1412
- Defined in:
1413
- [libraries/epub/index.ts:1106](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1106)
1326
+ Defined in: [libraries/epub/index.ts:1180](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1180)
1414
1327
 
1415
1328
  Retrieve the id of the publication's unique identifier, as declared by the
1416
1329
  package element's `unique-identifier` attribute.
1417
1330
 
1418
1331
  ##### Returns
1419
1332
 
1420
- `Promise`\<`null` \| `string`\>
1333
+ `Promise`\<`string` \| `null`\>
1421
1334
 
1422
1335
  ##### Link
1423
1336
 
@@ -1427,8 +1340,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcidentifier
1427
1340
 
1428
1341
  > **getVersion**(): `Promise`\<`string`\>
1429
1342
 
1430
- Defined in:
1431
- [libraries/epub/index.ts:3280](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3280)
1343
+ Defined in: [libraries/epub/index.ts:3403](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3403)
1432
1344
 
1433
1345
  Returns the EPUB version declared on the package element.
1434
1346
 
@@ -1440,16 +1352,14 @@ Returns the EPUB version declared on the package element.
1440
1352
 
1441
1353
  ##### Call Signature
1442
1354
 
1443
- > **readFileContents**(`href`, `relativeTo?`):
1444
- > `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\>
1355
+ > **readFileContents**(`href`, `relativeTo?`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\>
1445
1356
 
1446
- Defined in:
1447
- [libraries/epub/index.ts:2803](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2803)
1357
+ Defined in: [libraries/epub/index.ts:2930](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2930)
1448
1358
 
1449
1359
  Retrieve the contents of a file, given its href.
1450
1360
 
1451
- Optionally takes the href that this href should be resolved relative to, and an
1452
- encoding parameter.
1361
+ Optionally takes the href that this href should be resolved relative to,
1362
+ and an encoding parameter.
1453
1363
 
1454
1364
  ###### Parameters
1455
1365
 
@@ -1466,20 +1376,19 @@ encoding parameter.
1466
1376
 
1467
1377
  > **readFileContents**(`href`, `relativeTo`, `encoding`): `Promise`\<`string`\>
1468
1378
 
1469
- Defined in:
1470
- [libraries/epub/index.ts:2804](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2804)
1379
+ Defined in: [libraries/epub/index.ts:2931](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2931)
1471
1380
 
1472
1381
  Retrieve the contents of a file, given its href.
1473
1382
 
1474
- Optionally takes the href that this href should be resolved relative to, and an
1475
- encoding parameter.
1383
+ Optionally takes the href that this href should be resolved relative to,
1384
+ and an encoding parameter.
1476
1385
 
1477
1386
  ###### Parameters
1478
1387
 
1479
1388
  | Parameter | Type | Description |
1480
1389
  | ------------ | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
1481
1390
  | `href` | `string` | The href of the file to retrieve |
1482
- | `relativeTo` | `undefined` \| `string` | - |
1391
+ | `relativeTo` | `string` \| `undefined` | - |
1483
1392
  | `encoding` | `"utf-8"` | Optional - Must be the string "utf-8". If provided, the function will encode the data into a unicode string. Otherwise, the data will be returned as a byte array. |
1484
1393
 
1485
1394
  ###### Returns
@@ -1492,8 +1401,7 @@ encoding parameter.
1492
1401
 
1493
1402
  > **readItemContents**(`id`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\>
1494
1403
 
1495
- Defined in:
1496
- [libraries/epub/index.ts:2836](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2836)
1404
+ Defined in: [libraries/epub/index.ts:2963](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2963)
1497
1405
 
1498
1406
  Retrieve the contents of a manifest item, given its id.
1499
1407
 
@@ -1515,8 +1423,7 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
1515
1423
 
1516
1424
  > **readItemContents**(`id`, `encoding`): `Promise`\<`string`\>
1517
1425
 
1518
- Defined in:
1519
- [libraries/epub/index.ts:2837](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2837)
1426
+ Defined in: [libraries/epub/index.ts:2964](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2964)
1520
1427
 
1521
1428
  Retrieve the contents of a manifest item, given its id.
1522
1429
 
@@ -1541,8 +1448,7 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
1541
1448
 
1542
1449
  > **readXhtmlItemContents**(`id`, `as?`): `Promise`\<[`ParsedXml`](#parsedxml)\>
1543
1450
 
1544
- Defined in:
1545
- [libraries/epub/index.ts:2899](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2899)
1451
+ Defined in: [libraries/epub/index.ts:3026](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3026)
1546
1452
 
1547
1453
  Retrieves the contents of an XHTML item, given its manifest id.
1548
1454
 
@@ -1565,8 +1471,7 @@ https://www.w3.org/TR/epub-33/#sec-xhtml
1565
1471
 
1566
1472
  > **readXhtmlItemContents**(`id`, `as`): `Promise`\<`string`\>
1567
1473
 
1568
- Defined in:
1569
- [libraries/epub/index.ts:2900](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2900)
1474
+ Defined in: [libraries/epub/index.ts:3027](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3027)
1570
1475
 
1571
1476
  Retrieves the contents of an XHTML item, given its manifest id.
1572
1477
 
@@ -1589,13 +1494,12 @@ https://www.w3.org/TR/epub-33/#sec-xhtml
1589
1494
 
1590
1495
  > **removeCollection**(`index`): `Promise`\<`void`\>
1591
1496
 
1592
- Defined in:
1593
- [libraries/epub/index.ts:2228](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2228)
1497
+ Defined in: [libraries/epub/index.ts:2302](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2302)
1594
1498
 
1595
1499
  Remove a collection from the EPUB metadata.
1596
1500
 
1597
- Removes the collection at the provided index. This index refers to the array
1598
- returned by `epub.getCollections()`.
1501
+ Removes the collection at the provided index. This index
1502
+ refers to the array returned by `epub.getCollections()`.
1599
1503
 
1600
1504
  ##### Parameters
1601
1505
 
@@ -1611,15 +1515,15 @@ returned by `epub.getCollections()`.
1611
1515
 
1612
1516
  > **removeContributor**(`index`): `Promise`\<`void`\>
1613
1517
 
1614
- Defined in:
1615
- [libraries/epub/index.ts:2488](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2488)
1518
+ Defined in: [libraries/epub/index.ts:2562](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2562)
1616
1519
 
1617
1520
  Remove a contributor from the EPUB metadata.
1618
1521
 
1619
- Removes the contributor at the provided index. This index refers to the array
1620
- returned by `epub.getContributors()`.
1522
+ Removes the contributor at the provided index. This index
1523
+ refers to the array returned by `epub.getContributors()`.
1621
1524
 
1622
- This is a convenience method for `epub.removeCreator(index, 'contributor')`.
1525
+ This is a convenience method for
1526
+ `epub.removeCreator(index, 'contributor')`.
1623
1527
 
1624
1528
  ##### Parameters
1625
1529
 
@@ -1639,13 +1543,12 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccreator
1639
1543
 
1640
1544
  > **removeCreator**(`index`, `type`): `Promise`\<`void`\>
1641
1545
 
1642
- Defined in:
1643
- [libraries/epub/index.ts:2436](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2436)
1546
+ Defined in: [libraries/epub/index.ts:2510](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2510)
1644
1547
 
1645
1548
  Remove a creator from the EPUB metadata.
1646
1549
 
1647
- Removes the creator at the provided index. This index refers to the array
1648
- returned by `epub.getCreators()`.
1550
+ Removes the creator at the provided index. This index
1551
+ refers to the array returned by `epub.getCreators()`.
1649
1552
 
1650
1553
  ##### Parameters
1651
1554
 
@@ -1666,8 +1569,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccreator
1666
1569
 
1667
1570
  > **removeManifestItem**(`id`): `Promise`\<`void`\>
1668
1571
 
1669
- Defined in:
1670
- [libraries/epub/index.ts:3004](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3004)
1572
+ Defined in: [libraries/epub/index.ts:3127](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3127)
1671
1573
 
1672
1574
  ##### Parameters
1673
1575
 
@@ -1683,13 +1585,13 @@ Defined in:
1683
1585
 
1684
1586
  > **removeMetadata**(`predicate`): `Promise`\<`void`\>
1685
1587
 
1686
- Defined in:
1687
- [libraries/epub/index.ts:3252](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3252)
1588
+ Defined in: [libraries/epub/index.ts:3375](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3375)
1688
1589
 
1689
1590
  Remove one or more metadata entries.
1690
1591
 
1691
- The `predicate` argument will be used to determine which entries to remove. The
1692
- all metadata entries that match the predicate will be removed.
1592
+ The `predicate` argument will be used to determine which entries
1593
+ to remove. The all metadata entries that match the
1594
+ predicate will be removed.
1693
1595
 
1694
1596
  ##### Parameters
1695
1597
 
@@ -1709,8 +1611,7 @@ https://www.w3.org/TR/epub-33/#sec-pkg-metadata
1709
1611
 
1710
1612
  > **removeSpineItem**(`index`): `Promise`\<`void`\>
1711
1613
 
1712
- Defined in:
1713
- [libraries/epub/index.ts:2594](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2594)
1614
+ Defined in: [libraries/epub/index.ts:2668](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2668)
1714
1615
 
1715
1616
  Remove the spine item at the specified index.
1716
1617
 
@@ -1732,13 +1633,12 @@ https://www.w3.org/TR/epub-33/#sec-spine-elem
1732
1633
 
1733
1634
  > **removeSubject**(`index`): `Promise`\<`void`\>
1734
1635
 
1735
- Defined in:
1736
- [libraries/epub/index.ts:1725](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1725)
1636
+ Defined in: [libraries/epub/index.ts:1799](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1799)
1737
1637
 
1738
1638
  Remove a subject from the EPUB metadata.
1739
1639
 
1740
- Removes the subject at the provided index. This index refers to the array
1741
- returned by `epub.getSubjects()`.
1640
+ Removes the subject at the provided index. This index
1641
+ refers to the array returned by `epub.getSubjects()`.
1742
1642
 
1743
1643
  ##### Parameters
1744
1644
 
@@ -1758,13 +1658,13 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccreator
1758
1658
 
1759
1659
  > **replaceMetadata**(`predicate`, `entry`): `Promise`\<`void`\>
1760
1660
 
1761
- Defined in:
1762
- [libraries/epub/index.ts:3207](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3207)
1661
+ Defined in: [libraries/epub/index.ts:3330](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3330)
1763
1662
 
1764
1663
  Replace a metadata entry with a new one.
1765
1664
 
1766
- The `predicate` argument will be used to determine which entry to replace. The
1767
- first metadata entry that matches the predicate will be replaced.
1665
+ The `predicate` argument will be used to determine which entry
1666
+ to replace. The first metadata entry that matches the
1667
+ predicate will be replaced.
1768
1668
 
1769
1669
  ##### Parameters
1770
1670
 
@@ -1783,13 +1683,15 @@ https://www.w3.org/TR/epub-33/#sec-pkg-metadata
1783
1683
 
1784
1684
  #### resolveHref()
1785
1685
 
1786
- > **resolveHref**(`href`, `relativeTo?`, `__namedParameters?`):
1787
- > `Promise`\<`string`\>
1686
+ > **resolveHref**(`href`, `relativeTo?`, `__namedParameters?`): `Promise`\<`string`\>
1687
+
1688
+ Defined in: [libraries/epub/index.ts:2886](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2886)
1788
1689
 
1789
- Defined in:
1790
- [libraries/epub/index.ts:2775](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2775)
1690
+ Returns a path-relative-scheme-less URL, relative to the
1691
+ container root.
1791
1692
 
1792
- Returns a path-relative-scheme-less URL, relative to the container root.
1693
+ An href that points outside the publication, such as an external link in
1694
+ a navigation document, is handed back unchanged.
1793
1695
 
1794
1696
  ##### Parameters
1795
1697
 
@@ -1808,13 +1710,14 @@ Returns a path-relative-scheme-less URL, relative to the container root.
1808
1710
 
1809
1711
  > **saveAndClose**(): `Promise`\<`void`\>
1810
1712
 
1811
- Defined in:
1812
- [libraries/epub/index.ts:3426](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3426)
1713
+ Defined in: [libraries/epub/index.ts:3548](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3548)
1813
1714
 
1814
- Write the current contents of the Epub to a new EPUB archive on disk.
1715
+ Write the current contents of the Epub to a new
1716
+ EPUB archive on disk.
1815
1717
 
1816
- When this method is called, the "dcterms:modified" meta tag is automatically
1817
- updated to the current UTC timestamp.
1718
+ When this method is called, the "dcterms:modified"
1719
+ meta tag is automatically updated to the current UTC
1720
+ timestamp.
1818
1721
 
1819
1722
  ##### Returns
1820
1723
 
@@ -1824,13 +1727,13 @@ updated to the current UTC timestamp.
1824
1727
 
1825
1728
  > **setCoverImage**(`href`, `data`): `Promise`\<`void`\>
1826
1729
 
1827
- Defined in:
1828
- [libraries/epub/index.ts:1552](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1552)
1730
+ Defined in: [libraries/epub/index.ts:1626](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1626)
1829
1731
 
1830
1732
  Set the cover image for the EPUB.
1831
1733
 
1832
- Adds a manifest item with the `cover-image` property, per the EPUB 3 spec, and
1833
- then writes the provided image data to the provided href within the publication.
1734
+ Adds a manifest item with the `cover-image` property, per
1735
+ the EPUB 3 spec, and then writes the provided image data to
1736
+ the provided href within the publication.
1834
1737
 
1835
1738
  ##### Parameters
1836
1739
 
@@ -1847,14 +1750,13 @@ then writes the provided image data to the provided href within the publication.
1847
1750
 
1848
1751
  > **setDescription**(`description`): `Promise`\<`void`\>
1849
1752
 
1850
- Defined in:
1851
- [libraries/epub/index.ts:1954](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1954)
1753
+ Defined in: [libraries/epub/index.ts:2028](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2028)
1852
1754
 
1853
1755
  Update the Epub's description metadata entry.
1854
1756
 
1855
- Updates the existing dc:description element if one exists. Otherwise creates a
1856
- new element. Any non-ASCII symbols, `&`, `<`, `>`, `"`, `'`, and ```` will be
1857
- encoded as HTML entities.
1757
+ Updates the existing dc:description element if one exists.
1758
+ Otherwise creates a new element. Any non-ASCII symbols,
1759
+ `&`, `<`, `>`, `"`, `'`, and ```` will be encoded as HTML entities.
1858
1760
 
1859
1761
  ##### Parameters
1860
1762
 
@@ -1870,13 +1772,12 @@ encoded as HTML entities.
1870
1772
 
1871
1773
  > **setIdentifier**(`identifier`): `Promise`\<`void`\>
1872
1774
 
1873
- Defined in:
1874
- [libraries/epub/index.ts:1009](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1009)
1775
+ Defined in: [libraries/epub/index.ts:1083](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1083)
1875
1776
 
1876
1777
  Set the dc:identifier metadata element with the provided string.
1877
1778
 
1878
- Updates the existing dc:identifier element if one exists. Otherwise creates a
1879
- new element
1779
+ Updates the existing dc:identifier element if one exists.
1780
+ Otherwise creates a new element
1880
1781
 
1881
1782
  ##### Parameters
1882
1783
 
@@ -1900,8 +1801,7 @@ Use [setUniqueIdentifier](#setuniqueidentifier) instead.
1900
1801
 
1901
1802
  > **setIdentifiers**(`identifiers`): `Promise`\<`void`\>
1902
1803
 
1903
- Defined in:
1904
- [libraries/epub/index.ts:1274](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1274)
1804
+ Defined in: [libraries/epub/index.ts:1348](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1348)
1905
1805
 
1906
1806
  Replace the publication's `dc:identifier` entries.
1907
1807
 
@@ -1915,10 +1815,10 @@ Identifiers are placed in the order they are provided.
1915
1815
 
1916
1816
  `dc:source` entries are not touched, use [setSources](#setsources) for those.
1917
1817
 
1918
- When an entry has an `identifierType`, it is written in the refining form (a
1919
- `meta` with `property="identifier-type"`, carrying the `scheme` attribute when
1920
- provided). An entry with only a `scheme` is written using the legacy
1921
- `opf:scheme` attribute.
1818
+ When an entry has an `identifierType`, it is written in the refining form
1819
+ (a `meta` with `property="identifier-type"`, carrying the `scheme`
1820
+ attribute when provided). An entry with only a `scheme` is written using
1821
+ the legacy `opf:scheme` attribute.
1922
1822
 
1923
1823
  ##### Parameters
1924
1824
 
@@ -1938,13 +1838,12 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcidentifier
1938
1838
 
1939
1839
  > **setLanguage**(`locale`): `Promise`\<`void`\>
1940
1840
 
1941
- Defined in:
1942
- [libraries/epub/index.ts:1836](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1836)
1841
+ Defined in: [libraries/epub/index.ts:1910](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1910)
1943
1842
 
1944
1843
  Update the Epub's language metadata entry.
1945
1844
 
1946
- Updates the existing dc:language element if one exists. Otherwise creates a new
1947
- element
1845
+ Updates the existing dc:language element if one exists.
1846
+ Otherwise creates a new element
1948
1847
 
1949
1848
  ##### Parameters
1950
1849
 
@@ -1964,8 +1863,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dclanguage
1964
1863
 
1965
1864
  > **setPackageVocabularyPrefix**(`prefix`, `uri`): `Promise`\<`void`\>
1966
1865
 
1967
- Defined in:
1968
- [libraries/epub/index.ts:2005](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2005)
1866
+ Defined in: [libraries/epub/index.ts:2079](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2079)
1969
1867
 
1970
1868
  Set a custom vocabulary prefix on the root package element.
1971
1869
 
@@ -1988,8 +1886,7 @@ https://www.w3.org/TR/epub-33/#sec-prefix-attr
1988
1886
 
1989
1887
  > **setPageBreakSource**(`value`): `Promise`\<`void`\>
1990
1888
 
1991
- Defined in:
1992
- [libraries/epub/index.ts:1241](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1241)
1889
+ Defined in: [libraries/epub/index.ts:1315](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1315)
1993
1890
 
1994
1891
  Set the `pageBreakSource` property (EPUB 3.4, spec D.2.9), or remove it when
1995
1892
  passed null. Replaces an existing `pageBreakSource` meta if present.
@@ -2000,7 +1897,7 @@ Pass `none` to indicate the pagination is unique to this publication.
2000
1897
 
2001
1898
  | Parameter | Type |
2002
1899
  | --------- | ------------------ |
2003
- | `value` | `null` \| `string` |
1900
+ | `value` | `string` \| `null` |
2004
1901
 
2005
1902
  ##### Returns
2006
1903
 
@@ -2014,13 +1911,12 @@ https://www.w3.org/TR/epub/#pageBreakSource
2014
1911
 
2015
1912
  > **setPublicationDate**(`date`): `Promise`\<`void`\>
2016
1913
 
2017
- Defined in:
2018
- [libraries/epub/index.ts:1590](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1590)
1914
+ Defined in: [libraries/epub/index.ts:1664](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1664)
2019
1915
 
2020
1916
  Set the dc:date metadata element with the provided date.
2021
1917
 
2022
- Updates the existing dc:date element if one exists. Otherwise creates a new
2023
- element
1918
+ Updates the existing dc:date element if one exists.
1919
+ Otherwise creates a new element
2024
1920
 
2025
1921
  ##### Parameters
2026
1922
 
@@ -2040,19 +1936,18 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcdate
2040
1936
 
2041
1937
  > **setSources**(`sources`): `Promise`\<`void`\>
2042
1938
 
2043
- Defined in:
2044
- [libraries/epub/index.ts:1392](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1392)
1939
+ Defined in: [libraries/epub/index.ts:1466](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1466)
2045
1940
 
2046
1941
  Replace the publication's `dc:source` entries.
2047
1942
 
2048
1943
  This replaces ALL existing `dc:source` elements (and their refining
2049
- `identifier-type` / `source-of` metas). `dc:identifier` entries are not touched;
2050
- use [setIdentifiers](#setidentifiers) for those. Pass an empty array to remove
2051
- all sources.
1944
+ `identifier-type` / `source-of` metas). `dc:identifier` entries are not
1945
+ touched; use [setIdentifiers](#setidentifiers) for those. Pass an empty array to
1946
+ remove all sources.
2052
1947
 
2053
- When an entry has an `identifierType`, it is written in the refining form. A
2054
- `sourceOf` value is written as a refining `source-of` meta (spec D.3.11). An
2055
- entry with only a `scheme` uses the legacy `opf:scheme` attribute.
1948
+ When an entry has an `identifierType`, it is written in the refining form.
1949
+ A `sourceOf` value is written as a refining `source-of` meta (spec D.3.11).
1950
+ An entry with only a `scheme` uses the legacy `opf:scheme` attribute.
2056
1951
 
2057
1952
  ##### Parameters
2058
1953
 
@@ -2072,13 +1967,12 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcsource
2072
1967
 
2073
1968
  > **setTitle**(`title`): `Promise`\<`void`\>
2074
1969
 
2075
- Defined in:
2076
- [libraries/epub/index.ts:2029](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2029)
1970
+ Defined in: [libraries/epub/index.ts:2103](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2103)
2077
1971
 
2078
1972
  Set the title of the Epub.
2079
1973
 
2080
- This will replace all existing dc:title elements with this title. It will be
2081
- given title-type "main".
1974
+ This will replace all existing dc:title elements with
1975
+ this title. It will be given title-type "main".
2082
1976
 
2083
1977
  To set specific titles and their types, use epub.setTitles().
2084
1978
 
@@ -2100,8 +1994,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dctitle
2100
1994
 
2101
1995
  > **setTitles**(`entries`): `Promise`\<`void`\>
2102
1996
 
2103
- Defined in:
2104
- [libraries/epub/index.ts:2057](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2057)
1997
+ Defined in: [libraries/epub/index.ts:2131](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2131)
2105
1998
 
2106
1999
  ##### Parameters
2107
2000
 
@@ -2117,13 +2010,12 @@ Defined in:
2117
2010
 
2118
2011
  > **setType**(`type`): `Promise`\<`void`\>
2119
2012
 
2120
- Defined in:
2121
- [libraries/epub/index.ts:1659](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1659)
2013
+ Defined in: [libraries/epub/index.ts:1733](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1733)
2122
2014
 
2123
2015
  Set the dc:type metadata element.
2124
2016
 
2125
- Updates the existing dc:type element if one exists. Otherwise creates a new
2126
- element.
2017
+ Updates the existing dc:type element if one exists.
2018
+ Otherwise creates a new element.
2127
2019
 
2128
2020
  ##### Parameters
2129
2021
 
@@ -2143,17 +2035,14 @@ https://www.w3.org/TR/epub-33/#sec-opf-dctype
2143
2035
 
2144
2036
  > **setUniqueIdentifier**(`identifier`): `Promise`\<`void`\>
2145
2037
 
2146
- Defined in:
2147
- [libraries/epub/index.ts:1050](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1050)
2038
+ Defined in: [libraries/epub/index.ts:1124](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1124)
2148
2039
 
2149
2040
  Set the unique identifier id for the EPUB.
2150
2041
 
2151
- Updates the existing dc:identifier element referenced by the unique identifier
2152
- id if one exists. Otherwise creates a new element with the provided identifier,
2153
- and sets the unique identifier id to the new element's id.
2042
+ Updates the existing dc:identifier element referenced by the unique identifier id if one exists.
2043
+ Otherwise creates a new element with the provided identifier, and sets the unique identifier id to the new element's id.
2154
2044
 
2155
- Note: you likely shouldn't change the unique identifier id unless you are
2156
- producing a new EPUB.
2045
+ Note: you likely shouldn't change the unique identifier id unless you are producing a new EPUB.
2157
2046
 
2158
2047
  ##### Parameters
2159
2048
 
@@ -2173,13 +2062,12 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcidentifier
2173
2062
 
2174
2063
  > **updateManifestItem**(`id`, `newItem`): `Promise`\<`void`\>
2175
2064
 
2176
- Defined in:
2177
- [libraries/epub/index.ts:3119](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3119)
2065
+ Defined in: [libraries/epub/index.ts:3242](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3242)
2178
2066
 
2179
2067
  Update the manifest entry for an existing item.
2180
2068
 
2181
- To update the contents of an entry, use `epub.writeItemContents()` or
2182
- `epub.writeXhtmlItemContents()`
2069
+ To update the contents of an entry, use `epub.writeItemContents()`
2070
+ or `epub.writeXhtmlItemContents()`
2183
2071
 
2184
2072
  ##### Parameters
2185
2073
 
@@ -2200,15 +2088,14 @@ https://www.w3.org/TR/epub-33/#sec-pkg-manifest
2200
2088
 
2201
2089
  > **withPackage**(`producer`): `Promise`\<`void`\>
2202
2090
 
2203
- Defined in:
2204
- [libraries/epub/index.ts:772](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L772)
2091
+ Defined in: [libraries/epub/index.ts:846](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L846)
2205
2092
 
2206
2093
  Safely modify the package document, without race conditions.
2207
2094
 
2208
- Since the reading the package document is an async process, multiple
2209
- simultaneously dispatched function calls that all attempt to modify it can
2210
- clobber each other's changes. This method uses a mutex to ensure that each
2211
- update runs exclusively.
2095
+ Since the reading the package document is an async process,
2096
+ multiple simultaneously dispatched function calls that all
2097
+ attempt to modify it can clobber each other's changes. This
2098
+ method uses a mutex to ensure that each update runs exclusively.
2212
2099
 
2213
2100
  ##### Parameters
2214
2101
 
@@ -2226,13 +2113,13 @@ update runs exclusively.
2226
2113
 
2227
2114
  > **writeItemContents**(`id`, `contents`): `Promise`\<`void`\>
2228
2115
 
2229
- Defined in:
2230
- [libraries/epub/index.ts:2956](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2956)
2116
+ Defined in: [libraries/epub/index.ts:3083](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3083)
2231
2117
 
2232
- Write new contents for an existing manifest item, specified by its id.
2118
+ Write new contents for an existing manifest item,
2119
+ specified by its id.
2233
2120
 
2234
- The id must reference an existing manifest item. If creating a new item, use
2235
- `epub.addManifestItem()` instead.
2121
+ The id must reference an existing manifest item. If
2122
+ creating a new item, use `epub.addManifestItem()` instead.
2236
2123
 
2237
2124
  ###### Parameters
2238
2125
 
@@ -2253,13 +2140,13 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
2253
2140
 
2254
2141
  > **writeItemContents**(`id`, `contents`, `encoding`): `Promise`\<`void`\>
2255
2142
 
2256
- Defined in:
2257
- [libraries/epub/index.ts:2957](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2957)
2143
+ Defined in: [libraries/epub/index.ts:3084](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3084)
2258
2144
 
2259
- Write new contents for an existing manifest item, specified by its id.
2145
+ Write new contents for an existing manifest item,
2146
+ specified by its id.
2260
2147
 
2261
- The id must reference an existing manifest item. If creating a new item, use
2262
- `epub.addManifestItem()` instead.
2148
+ The id must reference an existing manifest item. If
2149
+ creating a new item, use `epub.addManifestItem()` instead.
2263
2150
 
2264
2151
  ###### Parameters
2265
2152
 
@@ -2281,13 +2168,13 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
2281
2168
 
2282
2169
  > **writeXhtmlItemContents**(`id`, `contents`): `Promise`\<`void`\>
2283
2170
 
2284
- Defined in:
2285
- [libraries/epub/index.ts:2996](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2996)
2171
+ Defined in: [libraries/epub/index.ts:3123](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3123)
2286
2172
 
2287
- Write new contents for an existing XHTML item, specified by its id.
2173
+ Write new contents for an existing XHTML item,
2174
+ specified by its id.
2288
2175
 
2289
- The id must reference an existing manifest item. If creating a new item, use
2290
- `epub.addManifestItem()` instead.
2176
+ The id must reference an existing manifest item. If
2177
+ creating a new item, use `epub.addManifestItem()` instead.
2291
2178
 
2292
2179
  ##### Parameters
2293
2180
 
@@ -2308,11 +2195,10 @@ https://www.w3.org/TR/epub-33/#sec-xhtml
2308
2195
 
2309
2196
  > `static` **addLinkToXhtmlHead**(`xml`, `link`): `void`
2310
2197
 
2311
- Defined in:
2312
- [libraries/epub/index.ts:345](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L345)
2198
+ Defined in: [libraries/epub/index.ts:434](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L434)
2313
2199
 
2314
- Given an XML structure representing a complete XHTML document, add a `link`
2315
- element to the `head` of the document.
2200
+ Given an XML structure representing a complete XHTML document,
2201
+ add a `link` element to the `head` of the document.
2316
2202
 
2317
2203
  This method modifies the provided XML structure.
2318
2204
 
@@ -2334,8 +2220,7 @@ This method modifies the provided XML structure.
2334
2220
 
2335
2221
  > `static` **assertEpub3**(`epub`): `Promise`\<`void`\>
2336
2222
 
2337
- Defined in:
2338
- [libraries/epub/index.ts:620](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L620)
2223
+ Defined in: [libraries/epub/index.ts:709](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L709)
2339
2224
 
2340
2225
  ##### Parameters
2341
2226
 
@@ -2349,14 +2234,13 @@ Defined in:
2349
2234
 
2350
2235
  #### create()
2351
2236
 
2352
- > `static` **create**(`path`, `dublinCore`, `additionalMetadata`):
2353
- > `Promise`\<[`Epub`](#epub)\>
2237
+ > `static` **create**(`path`, `dublinCore`, `additionalMetadata`): `Promise`\<[`Epub`](#epub)\>
2354
2238
 
2355
- Defined in:
2356
- [libraries/epub/index.ts:568](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L568)
2239
+ Defined in: [libraries/epub/index.ts:657](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L657)
2357
2240
 
2358
- Construct a new EPUB on a writable backend, optionally seeded with the provided
2359
- metadata. Equivalent to `Epub.using(TmpFsAdapter).create(...)`.
2241
+ Construct a new EPUB on a writable backend, optionally seeded
2242
+ with the provided metadata. Equivalent to
2243
+ `Epub.using(TmpFsAdapter).create(...)`.
2360
2244
 
2361
2245
  ##### Parameters
2362
2246
 
@@ -2372,17 +2256,15 @@ metadata. Equivalent to `Epub.using(TmpFsAdapter).create(...)`.
2372
2256
 
2373
2257
  #### createXmlElement()
2374
2258
 
2375
- > `static` **createXmlElement**\<`Name`\>(`name`, `properties`, `children`):
2376
- > [`XmlElement`](#xmlelement)\<`Name`\>
2259
+ > `static` **createXmlElement**\<`Name`\>(`name`, `properties`, `children`): [`XmlElement`](#xmlelement)\<`Name`\>
2377
2260
 
2378
- Defined in:
2379
- [libraries/epub/index.ts:380](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L380)
2261
+ Defined in: [libraries/epub/index.ts:469](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L469)
2380
2262
 
2381
2263
  ##### Type Parameters
2382
2264
 
2383
2265
  | Type Parameter |
2384
2266
  | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
2385
- | `Name` _extends_ `` `a${string}` `` \| `` `b${string}` `` \| `` `c${string}` `` \| `` `d${string}` `` \| `` `e${string}` `` \| `` `f${string}` `` \| `` `g${string}` `` \| `` `h${string}` `` \| `` `i${string}` `` \| `` `j${string}` `` \| `` `k${string}` `` \| `` `l${string}` `` \| `` `m${string}` `` \| `` `n${string}` `` \| `` `o${string}` `` \| `` `p${string}` `` \| `` `q${string}` `` \| `` `r${string}` `` \| `` `s${string}` `` \| `` `t${string}` `` \| `` `u${string}` `` \| `` `v${string}` `` \| `` `w${string}` `` \| `` `x${string}` `` \| `` `y${string}` `` \| `` `z${string}` `` \| `` `A${string}` `` \| `` `B${string}` `` \| `` `C${string}` `` \| `` `D${string}` `` \| `` `E${string}` `` \| `` `F${string}` `` \| `` `G${string}` `` \| `` `H${string}` `` \| `` `I${string}` `` \| `` `J${string}` `` \| `` `K${string}` `` \| `` `L${string}` `` \| `` `M${string}` `` \| `` `N${string}` `` \| `` `O${string}` `` \| `` `P${string}` `` \| `` `Q${string}` `` \| `` `R${string}` `` \| `` `S${string}` `` \| `` `T${string}` `` \| `` `U${string}` `` \| `` `V${string}` `` \| `` `W${string}` `` \| `` `X${string}` `` \| `` `Y${string}` `` \| `` `Z${string}` `` \| `` `?${string}` `` |
2267
+ | `Name` _extends_ `` `r${string}` `` \| `` `a${string}` `` \| `` `b${string}` `` \| `` `c${string}` `` \| `` `d${string}` `` \| `` `e${string}` `` \| `` `f${string}` `` \| `` `g${string}` `` \| `` `h${string}` `` \| `` `i${string}` `` \| `` `j${string}` `` \| `` `k${string}` `` \| `` `l${string}` `` \| `` `m${string}` `` \| `` `n${string}` `` \| `` `o${string}` `` \| `` `p${string}` `` \| `` `q${string}` `` \| `` `s${string}` `` \| `` `t${string}` `` \| `` `u${string}` `` \| `` `v${string}` `` \| `` `w${string}` `` \| `` `x${string}` `` \| `` `y${string}` `` \| `` `z${string}` `` \| `` `R${string}` `` \| `` `A${string}` `` \| `` `B${string}` `` \| `` `C${string}` `` \| `` `D${string}` `` \| `` `E${string}` `` \| `` `F${string}` `` \| `` `G${string}` `` \| `` `H${string}` `` \| `` `I${string}` `` \| `` `J${string}` `` \| `` `K${string}` `` \| `` `L${string}` `` \| `` `M${string}` `` \| `` `N${string}` `` \| `` `O${string}` `` \| `` `P${string}` `` \| `` `Q${string}` `` \| `` `S${string}` `` \| `` `T${string}` `` \| `` `U${string}` `` \| `` `V${string}` `` \| `` `W${string}` `` \| `` `X${string}` `` \| `` `Y${string}` `` \| `` `Z${string}` `` \| `` `?${string}` `` |
2386
2268
 
2387
2269
  ##### Parameters
2388
2270
 
@@ -2400,8 +2282,7 @@ Defined in:
2400
2282
 
2401
2283
  > `static` **createXmlTextNode**(`text`): [`XmlTextNode`](#xmltextnode)
2402
2284
 
2403
- Defined in:
2404
- [libraries/epub/index.ts:393](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L393)
2285
+ Defined in: [libraries/epub/index.ts:482](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L482)
2405
2286
 
2406
2287
  ##### Parameters
2407
2288
 
@@ -2415,20 +2296,18 @@ Defined in:
2415
2296
 
2416
2297
  #### findXmlChildByName()
2417
2298
 
2418
- > `static` **findXmlChildByName**\<`Name`\>(`name`, `xml`, `filter?`):
2419
- > `undefined` \| [`XmlElement`](#xmlelement)\<`Name`\>
2299
+ > `static` **findXmlChildByName**\<`Name`\>(`name`, `xml`, `filter?`): [`XmlElement`](#xmlelement)\<`Name`\> \| `undefined`
2420
2300
 
2421
- Defined in:
2422
- [libraries/epub/index.ts:466](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L466)
2301
+ Defined in: [libraries/epub/index.ts:555](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L555)
2423
2302
 
2424
- Given an XML structure, find the first child matching the provided name and
2425
- optional filter.
2303
+ Given an XML structure, find the first child matching
2304
+ the provided name and optional filter.
2426
2305
 
2427
2306
  ##### Type Parameters
2428
2307
 
2429
2308
  | Type Parameter |
2430
2309
  | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
2431
- | `Name` _extends_ `` `a${string}` `` \| `` `b${string}` `` \| `` `c${string}` `` \| `` `d${string}` `` \| `` `e${string}` `` \| `` `f${string}` `` \| `` `g${string}` `` \| `` `h${string}` `` \| `` `i${string}` `` \| `` `j${string}` `` \| `` `k${string}` `` \| `` `l${string}` `` \| `` `m${string}` `` \| `` `n${string}` `` \| `` `o${string}` `` \| `` `p${string}` `` \| `` `q${string}` `` \| `` `r${string}` `` \| `` `s${string}` `` \| `` `t${string}` `` \| `` `u${string}` `` \| `` `v${string}` `` \| `` `w${string}` `` \| `` `x${string}` `` \| `` `y${string}` `` \| `` `z${string}` `` \| `` `A${string}` `` \| `` `B${string}` `` \| `` `C${string}` `` \| `` `D${string}` `` \| `` `E${string}` `` \| `` `F${string}` `` \| `` `G${string}` `` \| `` `H${string}` `` \| `` `I${string}` `` \| `` `J${string}` `` \| `` `K${string}` `` \| `` `L${string}` `` \| `` `M${string}` `` \| `` `N${string}` `` \| `` `O${string}` `` \| `` `P${string}` `` \| `` `Q${string}` `` \| `` `R${string}` `` \| `` `S${string}` `` \| `` `T${string}` `` \| `` `U${string}` `` \| `` `V${string}` `` \| `` `W${string}` `` \| `` `X${string}` `` \| `` `Y${string}` `` \| `` `Z${string}` `` \| `` `?${string}` `` |
2310
+ | `Name` _extends_ `` `r${string}` `` \| `` `a${string}` `` \| `` `b${string}` `` \| `` `c${string}` `` \| `` `d${string}` `` \| `` `e${string}` `` \| `` `f${string}` `` \| `` `g${string}` `` \| `` `h${string}` `` \| `` `i${string}` `` \| `` `j${string}` `` \| `` `k${string}` `` \| `` `l${string}` `` \| `` `m${string}` `` \| `` `n${string}` `` \| `` `o${string}` `` \| `` `p${string}` `` \| `` `q${string}` `` \| `` `s${string}` `` \| `` `t${string}` `` \| `` `u${string}` `` \| `` `v${string}` `` \| `` `w${string}` `` \| `` `x${string}` `` \| `` `y${string}` `` \| `` `z${string}` `` \| `` `R${string}` `` \| `` `A${string}` `` \| `` `B${string}` `` \| `` `C${string}` `` \| `` `D${string}` `` \| `` `E${string}` `` \| `` `F${string}` `` \| `` `G${string}` `` \| `` `H${string}` `` \| `` `I${string}` `` \| `` `J${string}` `` \| `` `K${string}` `` \| `` `L${string}` `` \| `` `M${string}` `` \| `` `N${string}` `` \| `` `O${string}` `` \| `` `P${string}` `` \| `` `Q${string}` `` \| `` `S${string}` `` \| `` `T${string}` `` \| `` `U${string}` `` \| `` `V${string}` `` \| `` `W${string}` `` \| `` `X${string}` `` \| `` `Y${string}` `` \| `` `Z${string}` `` \| `` `?${string}` `` |
2432
2311
 
2433
2312
  ##### Parameters
2434
2313
 
@@ -2440,27 +2319,25 @@ optional filter.
2440
2319
 
2441
2320
  ##### Returns
2442
2321
 
2443
- `undefined` \| [`XmlElement`](#xmlelement)\<`Name`\>
2322
+ [`XmlElement`](#xmlelement)\<`Name`\> \| `undefined`
2444
2323
 
2445
2324
  #### findXmlDescendantByName()
2446
2325
 
2447
- > `static` **findXmlDescendantByName**\<`Name`\>(`name`, `xml`, `filter?`):
2448
- > `undefined` \| [`XmlElement`](#xmlelement)\<`Name`\>
2326
+ > `static` **findXmlDescendantByName**\<`Name`\>(`name`, `xml`, `filter?`): [`XmlElement`](#xmlelement)\<`Name`\> \| `undefined`
2449
2327
 
2450
- Defined in:
2451
- [libraries/epub/index.ts:484](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L484)
2328
+ Defined in: [libraries/epub/index.ts:573](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L573)
2452
2329
 
2453
- Given an XML structure, find the first descendant matching the provided name and
2454
- optional filter.
2330
+ Given an XML structure, find the first descendant matching
2331
+ the provided name and optional filter.
2455
2332
 
2456
- Will perform a breadth first search for the element, returning the highest
2457
- element in the tree matching the name and filter.
2333
+ Will perform a breadth first search for the element, returning
2334
+ the highest element in the tree matching the name and filter.
2458
2335
 
2459
2336
  ##### Type Parameters
2460
2337
 
2461
2338
  | Type Parameter |
2462
2339
  | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
2463
- | `Name` _extends_ `` `a${string}` `` \| `` `b${string}` `` \| `` `c${string}` `` \| `` `d${string}` `` \| `` `e${string}` `` \| `` `f${string}` `` \| `` `g${string}` `` \| `` `h${string}` `` \| `` `i${string}` `` \| `` `j${string}` `` \| `` `k${string}` `` \| `` `l${string}` `` \| `` `m${string}` `` \| `` `n${string}` `` \| `` `o${string}` `` \| `` `p${string}` `` \| `` `q${string}` `` \| `` `r${string}` `` \| `` `s${string}` `` \| `` `t${string}` `` \| `` `u${string}` `` \| `` `v${string}` `` \| `` `w${string}` `` \| `` `x${string}` `` \| `` `y${string}` `` \| `` `z${string}` `` \| `` `A${string}` `` \| `` `B${string}` `` \| `` `C${string}` `` \| `` `D${string}` `` \| `` `E${string}` `` \| `` `F${string}` `` \| `` `G${string}` `` \| `` `H${string}` `` \| `` `I${string}` `` \| `` `J${string}` `` \| `` `K${string}` `` \| `` `L${string}` `` \| `` `M${string}` `` \| `` `N${string}` `` \| `` `O${string}` `` \| `` `P${string}` `` \| `` `Q${string}` `` \| `` `R${string}` `` \| `` `S${string}` `` \| `` `T${string}` `` \| `` `U${string}` `` \| `` `V${string}` `` \| `` `W${string}` `` \| `` `X${string}` `` \| `` `Y${string}` `` \| `` `Z${string}` `` \| `` `?${string}` `` |
2340
+ | `Name` _extends_ `` `r${string}` `` \| `` `a${string}` `` \| `` `b${string}` `` \| `` `c${string}` `` \| `` `d${string}` `` \| `` `e${string}` `` \| `` `f${string}` `` \| `` `g${string}` `` \| `` `h${string}` `` \| `` `i${string}` `` \| `` `j${string}` `` \| `` `k${string}` `` \| `` `l${string}` `` \| `` `m${string}` `` \| `` `n${string}` `` \| `` `o${string}` `` \| `` `p${string}` `` \| `` `q${string}` `` \| `` `s${string}` `` \| `` `t${string}` `` \| `` `u${string}` `` \| `` `v${string}` `` \| `` `w${string}` `` \| `` `x${string}` `` \| `` `y${string}` `` \| `` `z${string}` `` \| `` `R${string}` `` \| `` `A${string}` `` \| `` `B${string}` `` \| `` `C${string}` `` \| `` `D${string}` `` \| `` `E${string}` `` \| `` `F${string}` `` \| `` `G${string}` `` \| `` `H${string}` `` \| `` `I${string}` `` \| `` `J${string}` `` \| `` `K${string}` `` \| `` `L${string}` `` \| `` `M${string}` `` \| `` `N${string}` `` \| `` `O${string}` `` \| `` `P${string}` `` \| `` `Q${string}` `` \| `` `S${string}` `` \| `` `T${string}` `` \| `` `U${string}` `` \| `` `V${string}` `` \| `` `W${string}` `` \| `` `X${string}` `` \| `` `Y${string}` `` \| `` `Z${string}` `` \| `` `?${string}` `` |
2464
2341
 
2465
2342
  ##### Parameters
2466
2343
 
@@ -2472,17 +2349,16 @@ element in the tree matching the name and filter.
2472
2349
 
2473
2350
  ##### Returns
2474
2351
 
2475
- `undefined` \| [`XmlElement`](#xmlelement)\<`Name`\>
2352
+ [`XmlElement`](#xmlelement)\<`Name`\> \| `undefined`
2476
2353
 
2477
2354
  #### formatSmilDuration()
2478
2355
 
2479
2356
  > `static` **formatSmilDuration**(`duration`): `string`
2480
2357
 
2481
- Defined in:
2482
- [libraries/epub/index.ts:328](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L328)
2358
+ Defined in: [libraries/epub/index.ts:417](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L417)
2483
2359
 
2484
- Format a duration, provided as a number of seconds, as a SMIL clock value, to be
2485
- used for Media Overlays.
2360
+ Format a duration, provided as a number of seconds, as
2361
+ a SMIL clock value, to be used for Media Overlays.
2486
2362
 
2487
2363
  ##### Parameters
2488
2364
 
@@ -2504,11 +2380,10 @@ https://www.w3.org/TR/epub-33/#sec-duration
2504
2380
 
2505
2381
  > `static` **from**(`pathOrData`): `Promise`\<[`Epub`](#epub)\>
2506
2382
 
2507
- Defined in:
2508
- [libraries/epub/index.ts:604](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L604)
2383
+ Defined in: [libraries/epub/index.ts:693](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L693)
2509
2384
 
2510
- Open an existing EPUB publication, extracting it to a temp directory so writes
2511
- can mutate the unpacked tree and rezip with `saveAndClose`.
2385
+ Open an existing EPUB publication, extracting it to a temp directory
2386
+ so writes can mutate the unpacked tree and rezip with `saveAndClose`.
2512
2387
 
2513
2388
  Pass `{ readonly: true }` to gate mutations at runtime.
2514
2389
 
@@ -2531,14 +2406,12 @@ when the archive is not a valid EPUB 3
2531
2406
 
2532
2407
  ##### Call Signature
2533
2408
 
2534
- > `static` **from**(`pathOrData`, `options`):
2535
- > `Promise`\<[`EpubReader`](#epubreader)\>
2409
+ > `static` **from**(`pathOrData`, `options`): `Promise`\<[`EpubReader`](#epubreader)\>
2536
2410
 
2537
- Defined in:
2538
- [libraries/epub/index.ts:605](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L605)
2411
+ Defined in: [libraries/epub/index.ts:694](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L694)
2539
2412
 
2540
- Open an existing EPUB publication, extracting it to a temp directory so writes
2541
- can mutate the unpacked tree and rezip with `saveAndClose`.
2413
+ Open an existing EPUB publication, extracting it to a temp directory
2414
+ so writes can mutate the unpacked tree and rezip with `saveAndClose`.
2542
2415
 
2543
2416
  Pass `{ readonly: true }` to gate mutations at runtime.
2544
2417
 
@@ -2562,14 +2435,12 @@ when the archive is not a valid EPUB 3
2562
2435
 
2563
2436
  ##### Call Signature
2564
2437
 
2565
- > `static` **from**(`pathOrData`, `options?`): `Promise`\<[`Epub`](#epub) \|
2566
- > [`EpubReader`](#epubreader)\>
2438
+ > `static` **from**(`pathOrData`, `options?`): `Promise`\<[`Epub`](#epub) \| [`EpubReader`](#epubreader)\>
2567
2439
 
2568
- Defined in:
2569
- [libraries/epub/index.ts:609](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L609)
2440
+ Defined in: [libraries/epub/index.ts:698](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L698)
2570
2441
 
2571
- Open an existing EPUB publication, extracting it to a temp directory so writes
2572
- can mutate the unpacked tree and rezip with `saveAndClose`.
2442
+ Open an existing EPUB publication, extracting it to a temp directory
2443
+ so writes can mutate the unpacked tree and rezip with `saveAndClose`.
2573
2444
 
2574
2445
  Pass `{ readonly: true }` to gate mutations at runtime.
2575
2446
 
@@ -2595,11 +2466,11 @@ when the archive is not a valid EPUB 3
2595
2466
 
2596
2467
  > `static` **getXhtmlBody**(`xml`): [`ParsedXml`](#parsedxml)
2597
2468
 
2598
- Defined in:
2599
- [libraries/epub/index.ts:370](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L370)
2469
+ Defined in: [libraries/epub/index.ts:459](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L459)
2600
2470
 
2601
- Given an XML structure representing a complete XHTML document, return the
2602
- sub-structure representing the children of the document's body element.
2471
+ Given an XML structure representing a complete XHTML document,
2472
+ return the sub-structure representing the children of the
2473
+ document's body element.
2603
2474
 
2604
2475
  ##### Parameters
2605
2476
 
@@ -2615,11 +2486,11 @@ sub-structure representing the children of the document's body element.
2615
2486
 
2616
2487
  > `static` **getXhtmlTextContent**(`xml`): `string`
2617
2488
 
2618
- Defined in:
2619
- [libraries/epub/index.ts:402](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L402)
2489
+ Defined in: [libraries/epub/index.ts:491](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L491)
2620
2490
 
2621
- Given an XML structure representing a complete XHTML document, return a string
2622
- representing the concatenation of all text nodes in the document.
2491
+ Given an XML structure representing a complete XHTML document,
2492
+ return a string representing the concatenation of all text nodes
2493
+ in the document.
2623
2494
 
2624
2495
  ##### Parameters
2625
2496
 
@@ -2635,8 +2506,7 @@ representing the concatenation of all text nodes in the document.
2635
2506
 
2636
2507
  > `static` **getXmlAttributes**(`element`): `Record`\<`string`, `string`\>
2637
2508
 
2638
- Defined in:
2639
- [libraries/epub/index.ts:419](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L419)
2509
+ Defined in: [libraries/epub/index.ts:508](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L508)
2640
2510
 
2641
2511
  Given an XMLElement, return its attributes.
2642
2512
 
@@ -2654,8 +2524,7 @@ Given an XMLElement, return its attributes.
2654
2524
 
2655
2525
  > `static` **getXmlChildren**\<`Name`\>(`element`): [`ParsedXml`](#parsedxml)
2656
2526
 
2657
- Defined in:
2658
- [libraries/epub/index.ts:446](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L446)
2527
+ Defined in: [libraries/epub/index.ts:535](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L535)
2659
2528
 
2660
2529
  Given an XMLElement, return a list of its children
2661
2530
 
@@ -2663,7 +2532,7 @@ Given an XMLElement, return a list of its children
2663
2532
 
2664
2533
  | Type Parameter |
2665
2534
  | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
2666
- | `Name` _extends_ `` `a${string}` `` \| `` `b${string}` `` \| `` `c${string}` `` \| `` `d${string}` `` \| `` `e${string}` `` \| `` `f${string}` `` \| `` `g${string}` `` \| `` `h${string}` `` \| `` `i${string}` `` \| `` `j${string}` `` \| `` `k${string}` `` \| `` `l${string}` `` \| `` `m${string}` `` \| `` `n${string}` `` \| `` `o${string}` `` \| `` `p${string}` `` \| `` `q${string}` `` \| `` `r${string}` `` \| `` `s${string}` `` \| `` `t${string}` `` \| `` `u${string}` `` \| `` `v${string}` `` \| `` `w${string}` `` \| `` `x${string}` `` \| `` `y${string}` `` \| `` `z${string}` `` \| `` `A${string}` `` \| `` `B${string}` `` \| `` `C${string}` `` \| `` `D${string}` `` \| `` `E${string}` `` \| `` `F${string}` `` \| `` `G${string}` `` \| `` `H${string}` `` \| `` `I${string}` `` \| `` `J${string}` `` \| `` `K${string}` `` \| `` `L${string}` `` \| `` `M${string}` `` \| `` `N${string}` `` \| `` `O${string}` `` \| `` `P${string}` `` \| `` `Q${string}` `` \| `` `R${string}` `` \| `` `S${string}` `` \| `` `T${string}` `` \| `` `U${string}` `` \| `` `V${string}` `` \| `` `W${string}` `` \| `` `X${string}` `` \| `` `Y${string}` `` \| `` `Z${string}` `` \| `` `?${string}` `` |
2535
+ | `Name` _extends_ `` `r${string}` `` \| `` `a${string}` `` \| `` `b${string}` `` \| `` `c${string}` `` \| `` `d${string}` `` \| `` `e${string}` `` \| `` `f${string}` `` \| `` `g${string}` `` \| `` `h${string}` `` \| `` `i${string}` `` \| `` `j${string}` `` \| `` `k${string}` `` \| `` `l${string}` `` \| `` `m${string}` `` \| `` `n${string}` `` \| `` `o${string}` `` \| `` `p${string}` `` \| `` `q${string}` `` \| `` `s${string}` `` \| `` `t${string}` `` \| `` `u${string}` `` \| `` `v${string}` `` \| `` `w${string}` `` \| `` `x${string}` `` \| `` `y${string}` `` \| `` `z${string}` `` \| `` `R${string}` `` \| `` `A${string}` `` \| `` `B${string}` `` \| `` `C${string}` `` \| `` `D${string}` `` \| `` `E${string}` `` \| `` `F${string}` `` \| `` `G${string}` `` \| `` `H${string}` `` \| `` `I${string}` `` \| `` `J${string}` `` \| `` `K${string}` `` \| `` `L${string}` `` \| `` `M${string}` `` \| `` `N${string}` `` \| `` `O${string}` `` \| `` `P${string}` `` \| `` `Q${string}` `` \| `` `S${string}` `` \| `` `T${string}` `` \| `` `U${string}` `` \| `` `V${string}` `` \| `` `W${string}` `` \| `` `X${string}` `` \| `` `Y${string}` `` \| `` `Z${string}` `` \| `` `?${string}` `` |
2667
2536
 
2668
2537
  ##### Parameters
2669
2538
 
@@ -2679,8 +2548,7 @@ Given an XMLElement, return a list of its children
2679
2548
 
2680
2549
  > `static` **getXmlElementName**\<`Name`\>(`element`): `Name`
2681
2550
 
2682
- Defined in:
2683
- [libraries/epub/index.ts:431](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L431)
2551
+ Defined in: [libraries/epub/index.ts:520](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L520)
2684
2552
 
2685
2553
  Given an XMLElement, return its tag name.
2686
2554
 
@@ -2688,7 +2556,7 @@ Given an XMLElement, return its tag name.
2688
2556
 
2689
2557
  | Type Parameter |
2690
2558
  | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
2691
- | `Name` _extends_ `` `a${string}` `` \| `` `b${string}` `` \| `` `c${string}` `` \| `` `d${string}` `` \| `` `e${string}` `` \| `` `f${string}` `` \| `` `g${string}` `` \| `` `h${string}` `` \| `` `i${string}` `` \| `` `j${string}` `` \| `` `k${string}` `` \| `` `l${string}` `` \| `` `m${string}` `` \| `` `n${string}` `` \| `` `o${string}` `` \| `` `p${string}` `` \| `` `q${string}` `` \| `` `r${string}` `` \| `` `s${string}` `` \| `` `t${string}` `` \| `` `u${string}` `` \| `` `v${string}` `` \| `` `w${string}` `` \| `` `x${string}` `` \| `` `y${string}` `` \| `` `z${string}` `` \| `` `A${string}` `` \| `` `B${string}` `` \| `` `C${string}` `` \| `` `D${string}` `` \| `` `E${string}` `` \| `` `F${string}` `` \| `` `G${string}` `` \| `` `H${string}` `` \| `` `I${string}` `` \| `` `J${string}` `` \| `` `K${string}` `` \| `` `L${string}` `` \| `` `M${string}` `` \| `` `N${string}` `` \| `` `O${string}` `` \| `` `P${string}` `` \| `` `Q${string}` `` \| `` `R${string}` `` \| `` `S${string}` `` \| `` `T${string}` `` \| `` `U${string}` `` \| `` `V${string}` `` \| `` `W${string}` `` \| `` `X${string}` `` \| `` `Y${string}` `` \| `` `Z${string}` `` \| `` `?${string}` `` |
2559
+ | `Name` _extends_ `` `r${string}` `` \| `` `a${string}` `` \| `` `b${string}` `` \| `` `c${string}` `` \| `` `d${string}` `` \| `` `e${string}` `` \| `` `f${string}` `` \| `` `g${string}` `` \| `` `h${string}` `` \| `` `i${string}` `` \| `` `j${string}` `` \| `` `k${string}` `` \| `` `l${string}` `` \| `` `m${string}` `` \| `` `n${string}` `` \| `` `o${string}` `` \| `` `p${string}` `` \| `` `q${string}` `` \| `` `s${string}` `` \| `` `t${string}` `` \| `` `u${string}` `` \| `` `v${string}` `` \| `` `w${string}` `` \| `` `x${string}` `` \| `` `y${string}` `` \| `` `z${string}` `` \| `` `R${string}` `` \| `` `A${string}` `` \| `` `B${string}` `` \| `` `C${string}` `` \| `` `D${string}` `` \| `` `E${string}` `` \| `` `F${string}` `` \| `` `G${string}` `` \| `` `H${string}` `` \| `` `I${string}` `` \| `` `J${string}` `` \| `` `K${string}` `` \| `` `L${string}` `` \| `` `M${string}` `` \| `` `N${string}` `` \| `` `O${string}` `` \| `` `P${string}` `` \| `` `Q${string}` `` \| `` `S${string}` `` \| `` `T${string}` `` \| `` `U${string}` `` \| `` `V${string}` `` \| `` `W${string}` `` \| `` `X${string}` `` \| `` `Y${string}` `` \| `` `Z${string}` `` \| `` `?${string}` `` |
2692
2560
 
2693
2561
  ##### Parameters
2694
2562
 
@@ -2704,10 +2572,10 @@ Given an XMLElement, return its tag name.
2704
2572
 
2705
2573
  > `static` **isXmlTextNode**(`node`): `node is XmlTextNode`
2706
2574
 
2707
- Defined in:
2708
- [libraries/epub/index.ts:506](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L506)
2575
+ Defined in: [libraries/epub/index.ts:595](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L595)
2709
2576
 
2710
- Given an XMLNode, determine whether it represents a text node or an XML element.
2577
+ Given an XMLNode, determine whether it represents
2578
+ a text node or an XML element.
2711
2579
 
2712
2580
  ##### Parameters
2713
2581
 
@@ -2723,14 +2591,13 @@ Given an XMLNode, determine whether it represents a text node or an XML element.
2723
2591
 
2724
2592
  > `static` **replaceXmlChildren**\<`Name`\>(`element`, `children`): `void`
2725
2593
 
2726
- Defined in:
2727
- [libraries/epub/index.ts:454](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L454)
2594
+ Defined in: [libraries/epub/index.ts:543](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L543)
2728
2595
 
2729
2596
  ##### Type Parameters
2730
2597
 
2731
2598
  | Type Parameter |
2732
2599
  | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
2733
- | `Name` _extends_ `` `a${string}` `` \| `` `b${string}` `` \| `` `c${string}` `` \| `` `d${string}` `` \| `` `e${string}` `` \| `` `f${string}` `` \| `` `g${string}` `` \| `` `h${string}` `` \| `` `i${string}` `` \| `` `j${string}` `` \| `` `k${string}` `` \| `` `l${string}` `` \| `` `m${string}` `` \| `` `n${string}` `` \| `` `o${string}` `` \| `` `p${string}` `` \| `` `q${string}` `` \| `` `r${string}` `` \| `` `s${string}` `` \| `` `t${string}` `` \| `` `u${string}` `` \| `` `v${string}` `` \| `` `w${string}` `` \| `` `x${string}` `` \| `` `y${string}` `` \| `` `z${string}` `` \| `` `A${string}` `` \| `` `B${string}` `` \| `` `C${string}` `` \| `` `D${string}` `` \| `` `E${string}` `` \| `` `F${string}` `` \| `` `G${string}` `` \| `` `H${string}` `` \| `` `I${string}` `` \| `` `J${string}` `` \| `` `K${string}` `` \| `` `L${string}` `` \| `` `M${string}` `` \| `` `N${string}` `` \| `` `O${string}` `` \| `` `P${string}` `` \| `` `Q${string}` `` \| `` `R${string}` `` \| `` `S${string}` `` \| `` `T${string}` `` \| `` `U${string}` `` \| `` `V${string}` `` \| `` `W${string}` `` \| `` `X${string}` `` \| `` `Y${string}` `` \| `` `Z${string}` `` \| `` `?${string}` `` |
2600
+ | `Name` _extends_ `` `r${string}` `` \| `` `a${string}` `` \| `` `b${string}` `` \| `` `c${string}` `` \| `` `d${string}` `` \| `` `e${string}` `` \| `` `f${string}` `` \| `` `g${string}` `` \| `` `h${string}` `` \| `` `i${string}` `` \| `` `j${string}` `` \| `` `k${string}` `` \| `` `l${string}` `` \| `` `m${string}` `` \| `` `n${string}` `` \| `` `o${string}` `` \| `` `p${string}` `` \| `` `q${string}` `` \| `` `s${string}` `` \| `` `t${string}` `` \| `` `u${string}` `` \| `` `v${string}` `` \| `` `w${string}` `` \| `` `x${string}` `` \| `` `y${string}` `` \| `` `z${string}` `` \| `` `R${string}` `` \| `` `A${string}` `` \| `` `B${string}` `` \| `` `C${string}` `` \| `` `D${string}` `` \| `` `E${string}` `` \| `` `F${string}` `` \| `` `G${string}` `` \| `` `H${string}` `` \| `` `I${string}` `` \| `` `J${string}` `` \| `` `K${string}` `` \| `` `L${string}` `` \| `` `M${string}` `` \| `` `N${string}` `` \| `` `O${string}` `` \| `` `P${string}` `` \| `` `Q${string}` `` \| `` `S${string}` `` \| `` `T${string}` `` \| `` `U${string}` `` \| `` `V${string}` `` \| `` `W${string}` `` \| `` `X${string}` `` \| `` `Y${string}` `` \| `` `Z${string}` `` \| `` `?${string}` `` |
2734
2601
 
2735
2602
  ##### Parameters
2736
2603
 
@@ -2747,11 +2614,11 @@ Defined in:
2747
2614
 
2748
2615
  > `static` **upgrade**(`path`, `options`): `Promise`\<[`Epub`](#epub)\>
2749
2616
 
2750
- Defined in:
2751
- [libraries/epub/index.ts:3454](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3454)
2617
+ Defined in: [libraries/epub/index.ts:3576](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3576)
2752
2618
 
2753
- Upgrade an EPUB 2 publication to EPUB 3 in place, returning a new, valid Epub 3
2754
- instance. Equivalent to `Epub.using(TmpFsAdapter).upgrade(...)`.
2619
+ Upgrade an EPUB 2 publication to EPUB 3 in place, returning a new,
2620
+ valid Epub 3 instance. Equivalent to
2621
+ `Epub.using(TmpFsAdapter).upgrade(...)`.
2755
2622
 
2756
2623
  ##### Parameters
2757
2624
 
@@ -2766,16 +2633,14 @@ instance. Equivalent to `Epub.using(TmpFsAdapter).upgrade(...)`.
2766
2633
 
2767
2634
  #### using()
2768
2635
 
2769
- > `static` **using**\<`A`\>(`adapterClass`):
2770
- > [`EpubFactory`](#epubfactory)\<`A`\>
2636
+ > `static` **using**\<`A`\>(`adapterClass`): [`EpubFactory`](#epubfactory)\<`A`\>
2771
2637
 
2772
- Defined in:
2773
- [libraries/epub/index.ts:588](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L588)
2638
+ Defined in: [libraries/epub/index.ts:677](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L677)
2774
2639
 
2775
2640
  Specify the storage backend to use for the EPUB
2776
2641
 
2777
- The returned factory exposes `from`, `create`, and `upgrade`, which route
2778
- through the supplied adapter.
2642
+ The returned factory exposes `from`, `create`, and `upgrade`,
2643
+ which route through the supplied adapter.
2779
2644
 
2780
2645
  ##### Type Parameters
2781
2646
 
@@ -2796,23 +2661,22 @@ through the supplied adapter.
2796
2661
  ##### Example
2797
2662
 
2798
2663
  ```ts
2799
- using epub = await Epub.using(TmpFsAdapter).from(path)
2800
- using reader = await Epub.using(MemoryAdapter).from(buffer, { cache: false })
2664
+ using epub = await Epub.using(TmpFsAdapter).from(path);
2665
+ using reader = await Epub.using(MemoryAdapter).from(buffer, { cache: false });
2801
2666
  ```
2802
2667
 
2803
2668
  ---
2804
2669
 
2805
2670
  ## EpubFactory\<A\>
2806
2671
 
2807
- Defined in:
2808
- [libraries/epub/index.ts:3483](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3483)
2672
+ Defined in: [libraries/epub/index.ts:3605](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3605)
2809
2673
 
2810
2674
  Adapter-bound factory returned by [Epub.using](#using).
2811
2675
 
2812
- Mirrors the static factory surface (`from`, `create`, `upgrade`) but routes all
2813
- I/O through the supplied adapter. Each method's signature degrades gracefully
2814
- when the adapter doesn't support the operation: `create` and `upgrade` throw at
2815
- runtime if the adapter is read-only or lacks `initEmpty`.
2676
+ Mirrors the static factory surface (`from`, `create`, `upgrade`) but routes
2677
+ all I/O through the supplied adapter. Each method's signature degrades
2678
+ gracefully when the adapter doesn't support the operation: `create` and
2679
+ `upgrade` throw at runtime if the adapter is read-only or lacks `initEmpty`.
2816
2680
 
2817
2681
  ### Type Parameters
2818
2682
 
@@ -2824,11 +2688,9 @@ runtime if the adapter is read-only or lacks `initEmpty`.
2824
2688
 
2825
2689
  #### Constructor
2826
2690
 
2827
- > **new EpubFactory**\<`A`\>(`adapterClass`):
2828
- > [`EpubFactory`](#epubfactory)\<`A`\>
2691
+ > **new EpubFactory**\<`A`\>(`adapterClass`): [`EpubFactory`](#epubfactory)\<`A`\>
2829
2692
 
2830
- Defined in:
2831
- [libraries/epub/index.ts:3484](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3484)
2693
+ Defined in: [libraries/epub/index.ts:3606](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3606)
2832
2694
 
2833
2695
  ##### Parameters
2834
2696
 
@@ -2846,22 +2708,19 @@ Defined in:
2846
2708
 
2847
2709
  > `readonly` **adapterClass**: `A`
2848
2710
 
2849
- Defined in:
2850
- [libraries/epub/index.ts:3484](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3484)
2711
+ Defined in: [libraries/epub/index.ts:3606](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3606)
2851
2712
 
2852
2713
  ### Methods
2853
2714
 
2854
2715
  #### create()
2855
2716
 
2856
- > **create**(`path`, `__namedParameters`, `additionalMetadata`):
2857
- > `Promise`\<[`EpubInstanceFor`](#epubinstancefor)\<`A`\>\>
2717
+ > **create**(`path`, `__namedParameters`, `additionalMetadata`): `Promise`\<[`EpubInstanceFor`](#epubinstancefor)\<`A`\>\>
2858
2718
 
2859
- Defined in:
2860
- [libraries/epub/index.ts:3540](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3540)
2719
+ Defined in: [libraries/epub/index.ts:3667](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3667)
2861
2720
 
2862
- Construct a new EPUB on this factory's adapter, optionally seeded with the
2863
- provided metadata. Requires a writable adapter that implements `initEmpty`
2864
- (today: [TmpFsAdapter](#tmpfsadapter)).
2721
+ Construct a new EPUB on this factory's adapter, optionally seeded
2722
+ with the provided metadata. Requires a writable adapter that
2723
+ implements `initEmpty` (today: [TmpFsAdapter](#tmpfsadapter)).
2865
2724
 
2866
2725
  ##### Parameters
2867
2726
 
@@ -2883,24 +2742,9 @@ when the adapter is read-only or does not implement initEmpty
2883
2742
 
2884
2743
  ##### Call Signature
2885
2744
 
2886
- > **from**(`source`, `options`): `Promise`\<`Pick`\<[`Epub`](#epub), `"storage"`
2887
- > \| `"getItemArchiveLength"` \| `"getRootfile"` \| `"getPackageElement"` \|
2888
- > `"getManifest"` \| `"findMetadataItem"` \| `"findAllMetadataItems"` \|
2889
- > `"getMetadata"` \| `"getIdentifier"` \| `"getUniqueIdentifier"` \|
2890
- > `"getUniqueIdentifierId"` \| `"getIdentifiers"` \| `"getSources"` \|
2891
- > `"getPageBreakSource"` \| `"getCoverImageItem"` \| `"getCoverImage"` \|
2892
- > `"getPublicationDate"` \| `"getModifiedDate"` \| `"getLayout"` \|
2893
- > `"getBaseDirection"` \| `"getType"` \| `"getSubjects"` \| `"getLanguage"` \|
2894
- > `"getTitle"` \| `"getSubtitle"` \| `"getTitles"` \| `"getDescription"` \|
2895
- > `"getPackageVocabularyPrefixes"` \| `"getCollections"` \| `"getCreators"` \|
2896
- > `"getContributors"` \| `"getSpineItems"` \| `"getTableOfContents"` \|
2897
- > `"getLandmarks"` \| `"getPageList"` \| `"resolveHref"` \| `"readFileContents"`
2898
- > \| `"readItemContents"` \| `"readXhtmlItemContents"` \| `"getVersion"` \|
2899
- > `"getNcxTableOfContents"` \| `"getGuideEntries"` \| `"discardAndClose"`\> &
2900
- > `Disposable` & `object`\>
2901
-
2902
- Defined in:
2903
- [libraries/epub/index.ts:3491](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3491)
2745
+ > **from**(`source`, `options`): `Promise`\<`Pick`\<[`Epub`](#epub), `"storage"` \| `"getItemArchiveLength"` \| `"getRootfile"` \| `"getPackageElement"` \| `"getManifest"` \| `"findMetadataItem"` \| `"findAllMetadataItems"` \| `"getMetadata"` \| `"getIdentifier"` \| `"getUniqueIdentifier"` \| `"getUniqueIdentifierId"` \| `"getIdentifiers"` \| `"getSources"` \| `"getPageBreakSource"` \| `"getCoverImageItem"` \| `"getCoverImage"` \| `"getPublicationDate"` \| `"getModifiedDate"` \| `"getLayout"` \| `"getBaseDirection"` \| `"getType"` \| `"getSubjects"` \| `"getLanguage"` \| `"getTitle"` \| `"getSubtitle"` \| `"getTitles"` \| `"getDescription"` \| `"getPackageVocabularyPrefixes"` \| `"getCollections"` \| `"getCreators"` \| `"getContributors"` \| `"getSpineItems"` \| `"getTableOfContents"` \| `"getLandmarks"` \| `"getPageList"` \| `"resolveHref"` \| `"readFileContents"` \| `"readItemContents"` \| `"readXhtmlItemContents"` \| `"getVersion"` \| `"getNcxTableOfContents"` \| `"getGuideEntries"` \| `"discardAndClose"`\> & `Disposable` & `object`\>
2746
+
2747
+ Defined in: [libraries/epub/index.ts:3613](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3613)
2904
2748
 
2905
2749
  Open an existing EPUB through this factory's adapter
2906
2750
 
@@ -2913,21 +2757,7 @@ Open an existing EPUB through this factory's adapter
2913
2757
 
2914
2758
  ###### Returns
2915
2759
 
2916
- `Promise`\<`Pick`\<[`Epub`](#epub), `"storage"` \| `"getItemArchiveLength"` \|
2917
- `"getRootfile"` \| `"getPackageElement"` \| `"getManifest"` \|
2918
- `"findMetadataItem"` \| `"findAllMetadataItems"` \| `"getMetadata"` \|
2919
- `"getIdentifier"` \| `"getUniqueIdentifier"` \| `"getUniqueIdentifierId"` \|
2920
- `"getIdentifiers"` \| `"getSources"` \| `"getPageBreakSource"` \|
2921
- `"getCoverImageItem"` \| `"getCoverImage"` \| `"getPublicationDate"` \|
2922
- `"getModifiedDate"` \| `"getLayout"` \| `"getBaseDirection"` \| `"getType"` \|
2923
- `"getSubjects"` \| `"getLanguage"` \| `"getTitle"` \| `"getSubtitle"` \|
2924
- `"getTitles"` \| `"getDescription"` \| `"getPackageVocabularyPrefixes"` \|
2925
- `"getCollections"` \| `"getCreators"` \| `"getContributors"` \|
2926
- `"getSpineItems"` \| `"getTableOfContents"` \| `"getLandmarks"` \|
2927
- `"getPageList"` \| `"resolveHref"` \| `"readFileContents"` \|
2928
- `"readItemContents"` \| `"readXhtmlItemContents"` \| `"getVersion"` \|
2929
- `"getNcxTableOfContents"` \| `"getGuideEntries"` \| `"discardAndClose"`\> &
2930
- `Disposable` & `object`\>
2760
+ `Promise`\<`Pick`\<[`Epub`](#epub), `"storage"` \| `"getItemArchiveLength"` \| `"getRootfile"` \| `"getPackageElement"` \| `"getManifest"` \| `"findMetadataItem"` \| `"findAllMetadataItems"` \| `"getMetadata"` \| `"getIdentifier"` \| `"getUniqueIdentifier"` \| `"getUniqueIdentifierId"` \| `"getIdentifiers"` \| `"getSources"` \| `"getPageBreakSource"` \| `"getCoverImageItem"` \| `"getCoverImage"` \| `"getPublicationDate"` \| `"getModifiedDate"` \| `"getLayout"` \| `"getBaseDirection"` \| `"getType"` \| `"getSubjects"` \| `"getLanguage"` \| `"getTitle"` \| `"getSubtitle"` \| `"getTitles"` \| `"getDescription"` \| `"getPackageVocabularyPrefixes"` \| `"getCollections"` \| `"getCreators"` \| `"getContributors"` \| `"getSpineItems"` \| `"getTableOfContents"` \| `"getLandmarks"` \| `"getPageList"` \| `"resolveHref"` \| `"readFileContents"` \| `"readItemContents"` \| `"readXhtmlItemContents"` \| `"getVersion"` \| `"getNcxTableOfContents"` \| `"getGuideEntries"` \| `"discardAndClose"`\> & `Disposable` & `object`\>
2931
2761
 
2932
2762
  ###### Throws
2933
2763
 
@@ -2935,11 +2765,9 @@ when the archive is not a valid EPUB 3
2935
2765
 
2936
2766
  ##### Call Signature
2937
2767
 
2938
- > **from**(`source`, `options?`):
2939
- > `Promise`\<[`EpubInstanceFor`](#epubinstancefor)\<`A`\> & `object`\>
2768
+ > **from**(`source`, `options?`): `Promise`\<[`EpubInstanceFor`](#epubinstancefor)\<`A`\> & `object`\>
2940
2769
 
2941
- Defined in:
2942
- [libraries/epub/index.ts:3495](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3495)
2770
+ Defined in: [libraries/epub/index.ts:3617](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3617)
2943
2771
 
2944
2772
  Open an existing EPUB through this factory's adapter
2945
2773
 
@@ -2960,14 +2788,12 @@ when the archive is not a valid EPUB 3
2960
2788
 
2961
2789
  #### upgrade()
2962
2790
 
2963
- > **upgrade**(`path`, `options`):
2964
- > `Promise`\<[`EpubInstanceFor`](#epubinstancefor)\<`A`\>\>
2791
+ > **upgrade**(`path`, `options`): `Promise`\<[`EpubInstanceFor`](#epubinstancefor)\<`A`\>\>
2965
2792
 
2966
- Defined in:
2967
- [libraries/epub/index.ts:3653](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3653)
2793
+ Defined in: [libraries/epub/index.ts:3774](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3774)
2968
2794
 
2969
- Upgrade an EPUB 2 publication to EPUB 3 in place using this factory's adapter,
2970
- returning a new, valid Epub 3 instance.
2795
+ Upgrade an EPUB 2 publication to EPUB 3 in place using this
2796
+ factory's adapter, returning a new, valid Epub 3 instance.
2971
2797
 
2972
2798
  Performs the following transformations:
2973
2799
 
@@ -2977,13 +2803,11 @@ Performs the following transformations:
2977
2803
  - removes the NCX file and the guide element (configurable)
2978
2804
  - fixes common font MIME types
2979
2805
  - bumps the package version to 3.0
2980
- - goes over each xhtml item and rewrites it using XMLParser to make sure the
2981
- output is valid XHTML
2806
+ - goes over each xhtml item and rewrites it using XMLParser to make sure the output is valid XHTML
2982
2807
 
2983
- Requires a writable adapter. When
2984
- [Upgrade.Epub2UpgradeOptions.outputPath](#outputpath) is set, the source file is
2985
- copied to that path on disk first; this only makes sense for adapters whose
2986
- `source` is a real fs path.
2808
+ Requires a writable adapter. When [Upgrade.Epub2UpgradeOptions.outputPath](#outputpath)
2809
+ is set, the source file is copied to that path on disk first; this
2810
+ only makes sense for adapters whose `source` is a real fs path.
2987
2811
 
2988
2812
  ##### Parameters
2989
2813
 
@@ -3004,8 +2828,7 @@ when the adapter is read-only
3004
2828
 
3005
2829
  ## EpubReadOnlyError
3006
2830
 
3007
- Defined in:
3008
- [libraries/epub/index.ts:238](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L238)
2831
+ Defined in: [libraries/epub/index.ts:234](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L234)
3009
2832
 
3010
2833
  ### Extends
3011
2834
 
@@ -3015,10 +2838,9 @@ Defined in:
3015
2838
 
3016
2839
  #### Constructor
3017
2840
 
3018
- > **new EpubReadOnlyError**(`message?`):
3019
- > [`EpubReadOnlyError`](#epubreadonlyerror)
2841
+ > **new EpubReadOnlyError**(`message?`): [`EpubReadOnlyError`](#epubreadonlyerror)
3020
2842
 
3021
- Defined in: node_modules/typescript/lib/lib.es5.d.ts:1082
2843
+ Defined in: node_modules/@typescript/old/lib/lib.es5.d.ts:1080
3022
2844
 
3023
2845
  ##### Parameters
3024
2846
 
@@ -3036,10 +2858,9 @@ Defined in: node_modules/typescript/lib/lib.es5.d.ts:1082
3036
2858
 
3037
2859
  #### Constructor
3038
2860
 
3039
- > **new EpubReadOnlyError**(`message?`, `options?`):
3040
- > [`EpubReadOnlyError`](#epubreadonlyerror)
2861
+ > **new EpubReadOnlyError**(`message?`, `options?`): [`EpubReadOnlyError`](#epubreadonlyerror)
3041
2862
 
3042
- Defined in: node_modules/typescript/lib/lib.es5.d.ts:1082
2863
+ Defined in: node_modules/@typescript/old/lib/lib.es5.d.ts:1080
3043
2864
 
3044
2865
  ##### Parameters
3045
2866
 
@@ -3062,7 +2883,7 @@ Defined in: node_modules/typescript/lib/lib.es5.d.ts:1082
3062
2883
 
3063
2884
  > `optional` **cause**: `unknown`
3064
2885
 
3065
- Defined in: node_modules/typescript/lib/lib.es2022.error.d.ts:26
2886
+ Defined in: node_modules/@typescript/old/lib/lib.es2022.error.d.ts:24
3066
2887
 
3067
2888
  ##### Inherited from
3068
2889
 
@@ -3072,7 +2893,7 @@ Defined in: node_modules/typescript/lib/lib.es2022.error.d.ts:26
3072
2893
 
3073
2894
  > **message**: `string`
3074
2895
 
3075
- Defined in: node_modules/typescript/lib/lib.es5.d.ts:1077
2896
+ Defined in: node_modules/@typescript/old/lib/lib.es5.d.ts:1075
3076
2897
 
3077
2898
  ##### Inherited from
3078
2899
 
@@ -3082,7 +2903,7 @@ Defined in: node_modules/typescript/lib/lib.es5.d.ts:1077
3082
2903
 
3083
2904
  > **name**: `string`
3084
2905
 
3085
- Defined in: node_modules/typescript/lib/lib.es5.d.ts:1076
2906
+ Defined in: node_modules/@typescript/old/lib/lib.es5.d.ts:1074
3086
2907
 
3087
2908
  ##### Inherited from
3088
2909
 
@@ -3092,7 +2913,7 @@ Defined in: node_modules/typescript/lib/lib.es5.d.ts:1076
3092
2913
 
3093
2914
  > `optional` **stack**: `string`
3094
2915
 
3095
- Defined in: node_modules/typescript/lib/lib.es5.d.ts:1078
2916
+ Defined in: node_modules/@typescript/old/lib/lib.es5.d.ts:1076
3096
2917
 
3097
2918
  ##### Inherited from
3098
2919
 
@@ -3111,8 +2932,8 @@ collected by a stack trace (whether generated by `new Error().stack` or
3111
2932
  The default value is `10` but may be set to any valid JavaScript number. Changes
3112
2933
  will affect any stack trace captured _after_ the value has been changed.
3113
2934
 
3114
- If set to a non-number value, or set to a negative number, stack traces will not
3115
- capture any frames.
2935
+ If set to a non-number value, or set to a negative number, stack traces will
2936
+ not capture any frames.
3116
2937
 
3117
2938
  ##### Inherited from
3118
2939
 
@@ -3126,14 +2947,14 @@ capture any frames.
3126
2947
 
3127
2948
  Defined in: node_modules/@types/node/globals.d.ts:52
3128
2949
 
3129
- Creates a `.stack` property on `targetObject`, which when accessed returns a
3130
- string representing the location in the code at which
2950
+ Creates a `.stack` property on `targetObject`, which when accessed returns
2951
+ a string representing the location in the code at which
3131
2952
  `Error.captureStackTrace()` was called.
3132
2953
 
3133
2954
  ```js
3134
- const myObject = {}
3135
- Error.captureStackTrace(myObject)
3136
- myObject.stack // Similar to `new Error().stack`
2955
+ const myObject = {};
2956
+ Error.captureStackTrace(myObject);
2957
+ myObject.stack; // Similar to `new Error().stack`
3137
2958
  ```
3138
2959
 
3139
2960
  The first line of the trace will be prefixed with
@@ -3143,31 +2964,31 @@ The optional `constructorOpt` argument accepts a function. If given, all frames
3143
2964
  above `constructorOpt`, including `constructorOpt`, will be omitted from the
3144
2965
  generated stack trace.
3145
2966
 
3146
- The `constructorOpt` argument is useful for hiding implementation details of
3147
- error generation from the user. For instance:
2967
+ The `constructorOpt` argument is useful for hiding implementation
2968
+ details of error generation from the user. For instance:
3148
2969
 
3149
2970
  ```js
3150
2971
  function a() {
3151
- b()
2972
+ b();
3152
2973
  }
3153
2974
 
3154
2975
  function b() {
3155
- c()
2976
+ c();
3156
2977
  }
3157
2978
 
3158
2979
  function c() {
3159
2980
  // Create an error without stack trace to avoid calculating the stack trace twice.
3160
- const { stackTraceLimit } = Error
3161
- Error.stackTraceLimit = 0
3162
- const error = new Error()
3163
- Error.stackTraceLimit = stackTraceLimit
2981
+ const { stackTraceLimit } = Error;
2982
+ Error.stackTraceLimit = 0;
2983
+ const error = new Error();
2984
+ Error.stackTraceLimit = stackTraceLimit;
3164
2985
 
3165
2986
  // Capture the stack trace above function b
3166
- Error.captureStackTrace(error, b) // Neither function c, nor b is included in the stack trace
3167
- throw error
2987
+ Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
2988
+ throw error;
3168
2989
  }
3169
2990
 
3170
- a()
2991
+ a();
3171
2992
  ```
3172
2993
 
3173
2994
  ##### Parameters
@@ -3189,7 +3010,7 @@ a()
3189
3010
 
3190
3011
  > `static` **isError**(`error`): `error is Error`
3191
3012
 
3192
- Defined in: node_modules/typescript/lib/lib.esnext.error.d.ts:23
3013
+ Defined in: node_modules/@typescript/old/lib/lib.esnext.error.d.ts:21
3193
3014
 
3194
3015
  Indicates whether the argument provided is a built-in Error instance or not.
3195
3016
 
@@ -3236,8 +3057,7 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces
3236
3057
 
3237
3058
  ## EpubVersionError
3238
3059
 
3239
- Defined in:
3240
- [libraries/epub/index.ts:237](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L237)
3060
+ Defined in: [libraries/epub/index.ts:233](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L233)
3241
3061
 
3242
3062
  ### Extends
3243
3063
 
@@ -3249,7 +3069,7 @@ Defined in:
3249
3069
 
3250
3070
  > **new EpubVersionError**(`message?`): [`EpubVersionError`](#epubversionerror)
3251
3071
 
3252
- Defined in: node_modules/typescript/lib/lib.es5.d.ts:1082
3072
+ Defined in: node_modules/@typescript/old/lib/lib.es5.d.ts:1080
3253
3073
 
3254
3074
  ##### Parameters
3255
3075
 
@@ -3267,10 +3087,9 @@ Defined in: node_modules/typescript/lib/lib.es5.d.ts:1082
3267
3087
 
3268
3088
  #### Constructor
3269
3089
 
3270
- > **new EpubVersionError**(`message?`, `options?`):
3271
- > [`EpubVersionError`](#epubversionerror)
3090
+ > **new EpubVersionError**(`message?`, `options?`): [`EpubVersionError`](#epubversionerror)
3272
3091
 
3273
- Defined in: node_modules/typescript/lib/lib.es5.d.ts:1082
3092
+ Defined in: node_modules/@typescript/old/lib/lib.es5.d.ts:1080
3274
3093
 
3275
3094
  ##### Parameters
3276
3095
 
@@ -3293,7 +3112,7 @@ Defined in: node_modules/typescript/lib/lib.es5.d.ts:1082
3293
3112
 
3294
3113
  > `optional` **cause**: `unknown`
3295
3114
 
3296
- Defined in: node_modules/typescript/lib/lib.es2022.error.d.ts:26
3115
+ Defined in: node_modules/@typescript/old/lib/lib.es2022.error.d.ts:24
3297
3116
 
3298
3117
  ##### Inherited from
3299
3118
 
@@ -3303,7 +3122,7 @@ Defined in: node_modules/typescript/lib/lib.es2022.error.d.ts:26
3303
3122
 
3304
3123
  > **message**: `string`
3305
3124
 
3306
- Defined in: node_modules/typescript/lib/lib.es5.d.ts:1077
3125
+ Defined in: node_modules/@typescript/old/lib/lib.es5.d.ts:1075
3307
3126
 
3308
3127
  ##### Inherited from
3309
3128
 
@@ -3313,7 +3132,7 @@ Defined in: node_modules/typescript/lib/lib.es5.d.ts:1077
3313
3132
 
3314
3133
  > **name**: `string`
3315
3134
 
3316
- Defined in: node_modules/typescript/lib/lib.es5.d.ts:1076
3135
+ Defined in: node_modules/@typescript/old/lib/lib.es5.d.ts:1074
3317
3136
 
3318
3137
  ##### Inherited from
3319
3138
 
@@ -3323,7 +3142,7 @@ Defined in: node_modules/typescript/lib/lib.es5.d.ts:1076
3323
3142
 
3324
3143
  > `optional` **stack**: `string`
3325
3144
 
3326
- Defined in: node_modules/typescript/lib/lib.es5.d.ts:1078
3145
+ Defined in: node_modules/@typescript/old/lib/lib.es5.d.ts:1076
3327
3146
 
3328
3147
  ##### Inherited from
3329
3148
 
@@ -3342,8 +3161,8 @@ collected by a stack trace (whether generated by `new Error().stack` or
3342
3161
  The default value is `10` but may be set to any valid JavaScript number. Changes
3343
3162
  will affect any stack trace captured _after_ the value has been changed.
3344
3163
 
3345
- If set to a non-number value, or set to a negative number, stack traces will not
3346
- capture any frames.
3164
+ If set to a non-number value, or set to a negative number, stack traces will
3165
+ not capture any frames.
3347
3166
 
3348
3167
  ##### Inherited from
3349
3168
 
@@ -3357,14 +3176,14 @@ capture any frames.
3357
3176
 
3358
3177
  Defined in: node_modules/@types/node/globals.d.ts:52
3359
3178
 
3360
- Creates a `.stack` property on `targetObject`, which when accessed returns a
3361
- string representing the location in the code at which
3179
+ Creates a `.stack` property on `targetObject`, which when accessed returns
3180
+ a string representing the location in the code at which
3362
3181
  `Error.captureStackTrace()` was called.
3363
3182
 
3364
3183
  ```js
3365
- const myObject = {}
3366
- Error.captureStackTrace(myObject)
3367
- myObject.stack // Similar to `new Error().stack`
3184
+ const myObject = {};
3185
+ Error.captureStackTrace(myObject);
3186
+ myObject.stack; // Similar to `new Error().stack`
3368
3187
  ```
3369
3188
 
3370
3189
  The first line of the trace will be prefixed with
@@ -3374,31 +3193,31 @@ The optional `constructorOpt` argument accepts a function. If given, all frames
3374
3193
  above `constructorOpt`, including `constructorOpt`, will be omitted from the
3375
3194
  generated stack trace.
3376
3195
 
3377
- The `constructorOpt` argument is useful for hiding implementation details of
3378
- error generation from the user. For instance:
3196
+ The `constructorOpt` argument is useful for hiding implementation
3197
+ details of error generation from the user. For instance:
3379
3198
 
3380
3199
  ```js
3381
3200
  function a() {
3382
- b()
3201
+ b();
3383
3202
  }
3384
3203
 
3385
3204
  function b() {
3386
- c()
3205
+ c();
3387
3206
  }
3388
3207
 
3389
3208
  function c() {
3390
3209
  // Create an error without stack trace to avoid calculating the stack trace twice.
3391
- const { stackTraceLimit } = Error
3392
- Error.stackTraceLimit = 0
3393
- const error = new Error()
3394
- Error.stackTraceLimit = stackTraceLimit
3210
+ const { stackTraceLimit } = Error;
3211
+ Error.stackTraceLimit = 0;
3212
+ const error = new Error();
3213
+ Error.stackTraceLimit = stackTraceLimit;
3395
3214
 
3396
3215
  // Capture the stack trace above function b
3397
- Error.captureStackTrace(error, b) // Neither function c, nor b is included in the stack trace
3398
- throw error
3216
+ Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
3217
+ throw error;
3399
3218
  }
3400
3219
 
3401
- a()
3220
+ a();
3402
3221
  ```
3403
3222
 
3404
3223
  ##### Parameters
@@ -3420,7 +3239,7 @@ a()
3420
3239
 
3421
3240
  > `static` **isError**(`error`): `error is Error`
3422
3241
 
3423
- Defined in: node_modules/typescript/lib/lib.esnext.error.d.ts:23
3242
+ Defined in: node_modules/@typescript/old/lib/lib.esnext.error.d.ts:21
3424
3243
 
3425
3244
  Indicates whether the argument provided is a built-in Error instance or not.
3426
3245
 
@@ -3467,11 +3286,9 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces
3467
3286
 
3468
3287
  ## MemoryAdapter
3469
3288
 
3470
- Defined in:
3471
- [libraries/epub/adapters/memory.ts:32](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/memory.ts#L32)
3289
+ Defined in: [libraries/epub/adapters/memory.ts:27](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/memory.ts#L27)
3472
3290
 
3473
- Loads an EPUB archive into memory and serves all I/O off the in-memory zip
3474
- handle.
3291
+ Loads an EPUB archive into memory and serves all I/O off the in-memory zip handle.
3475
3292
 
3476
3293
  read only
3477
3294
 
@@ -3481,27 +3298,11 @@ read only
3481
3298
 
3482
3299
  ### Properties
3483
3300
 
3484
- #### rootPath
3485
-
3486
- > `readonly` **rootPath**: `string`
3487
-
3488
- Defined in:
3489
- [libraries/epub/adapters/memory.ts:71](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/memory.ts#L71)
3490
-
3491
- Opaque path prefix used by `resolveInternalHref` to anchor absolute paths within
3492
- the archive. For TmpFsAdapter this is the tmp dir; for MemoryAdapter it's a
3493
- virtual prefix that's never written to disk
3494
-
3495
- ##### Implementation of
3496
-
3497
- [`EpubStorageAdapter`](#epubstorageadapter).[`rootPath`](#rootpath-2)
3498
-
3499
3301
  #### capabilities
3500
3302
 
3501
3303
  > `readonly` `static` **capabilities**: `object`
3502
3304
 
3503
- Defined in:
3504
- [libraries/epub/adapters/memory.ts:34](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/memory.ts#L34)
3305
+ Defined in: [libraries/epub/adapters/memory.ts:29](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/memory.ts#L29)
3505
3306
 
3506
3307
  ##### writable
3507
3308
 
@@ -3511,26 +3312,24 @@ Defined in:
3511
3312
 
3512
3313
  > `readonly` `static` **kind**: `"in-memory"`
3513
3314
 
3514
- Defined in:
3515
- [libraries/epub/adapters/memory.ts:33](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/memory.ts#L33)
3315
+ Defined in: [libraries/epub/adapters/memory.ts:28](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/memory.ts#L28)
3516
3316
 
3517
3317
  ### Methods
3518
3318
 
3519
3319
  #### archiveLength()
3520
3320
 
3521
- > **archiveLength**(`path`): `Promise`\<`number`\>
3321
+ > **archiveLength**(`entry`): `Promise`\<`number`\>
3522
3322
 
3523
- Defined in:
3524
- [libraries/epub/adapters/memory.ts:114](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/memory.ts#L114)
3323
+ Defined in: [libraries/epub/adapters/memory.ts:94](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/memory.ts#L94)
3525
3324
 
3526
- Length of an entry in bytes, for the readium page-count heuristic which expects
3527
- compressed size when available
3325
+ Length of an entry in bytes, for the readium page-count heuristic
3326
+ which expects compressed size when available
3528
3327
 
3529
3328
  ##### Parameters
3530
3329
 
3531
3330
  | Parameter | Type |
3532
3331
  | --------- | -------- |
3533
- | `path` | `string` |
3332
+ | `entry` | `string` |
3534
3333
 
3535
3334
  ##### Returns
3536
3335
 
@@ -3544,8 +3343,7 @@ compressed size when available
3544
3343
 
3545
3344
  > **dispose**(): `void`
3546
3345
 
3547
- Defined in:
3548
- [libraries/epub/adapters/memory.ts:120](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/memory.ts#L120)
3346
+ Defined in: [libraries/epub/adapters/memory.ts:100](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/memory.ts#L100)
3549
3347
 
3550
3348
  Always called on close or error
3551
3349
 
@@ -3557,20 +3355,43 @@ Always called on close or error
3557
3355
 
3558
3356
  [`EpubStorageAdapter`](#epubstorageadapter).[`dispose`](#dispose-6)
3559
3357
 
3358
+ #### exists()
3359
+
3360
+ > **exists**(`entry`): `Promise`\<`boolean`\>
3361
+
3362
+ Defined in: [libraries/epub/adapters/memory.ts:89](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/memory.ts#L89)
3363
+
3364
+ Whether the archive holds an entry under exactly this name.
3365
+ Used to choose between different canditates for an href
3366
+ so should be exact
3367
+
3368
+ ##### Parameters
3369
+
3370
+ | Parameter | Type |
3371
+ | --------- | -------- |
3372
+ | `entry` | `string` |
3373
+
3374
+ ##### Returns
3375
+
3376
+ `Promise`\<`boolean`\>
3377
+
3378
+ ##### Implementation of
3379
+
3380
+ [`EpubStorageAdapter`](#epubstorageadapter).[`exists`](#exists-4)
3381
+
3560
3382
  #### read()
3561
3383
 
3562
3384
  ##### Call Signature
3563
3385
 
3564
- > **read**(`path`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\>
3386
+ > **read**(`entry`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\>
3565
3387
 
3566
- Defined in:
3567
- [libraries/epub/adapters/memory.ts:85](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/memory.ts#L85)
3388
+ Defined in: [libraries/epub/adapters/memory.ts:61](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/memory.ts#L61)
3568
3389
 
3569
3390
  ###### Parameters
3570
3391
 
3571
3392
  | Parameter | Type |
3572
3393
  | --------- | -------- |
3573
- | `path` | `string` |
3394
+ | `entry` | `string` |
3574
3395
 
3575
3396
  ###### Returns
3576
3397
 
@@ -3582,16 +3403,15 @@ Defined in:
3582
3403
 
3583
3404
  ##### Call Signature
3584
3405
 
3585
- > **read**(`path`, `encoding`): `Promise`\<`string`\>
3406
+ > **read**(`entry`, `encoding`): `Promise`\<`string`\>
3586
3407
 
3587
- Defined in:
3588
- [libraries/epub/adapters/memory.ts:86](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/memory.ts#L86)
3408
+ Defined in: [libraries/epub/adapters/memory.ts:62](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/memory.ts#L62)
3589
3409
 
3590
3410
  ###### Parameters
3591
3411
 
3592
3412
  | Parameter | Type |
3593
3413
  | ---------- | --------- |
3594
- | `path` | `string` |
3414
+ | `entry` | `string` |
3595
3415
  | `encoding` | `"utf-8"` |
3596
3416
 
3597
3417
  ###### Returns
@@ -3604,11 +3424,9 @@ Defined in:
3604
3424
 
3605
3425
  #### init()
3606
3426
 
3607
- > `static` **init**(`source`, `opts`):
3608
- > `Promise`\<[`MemoryAdapter`](#memoryadapter)\>
3427
+ > `static` **init**(`source`, `opts`): `Promise`\<[`MemoryAdapter`](#memoryadapter)\>
3609
3428
 
3610
- Defined in:
3611
- [libraries/epub/adapters/memory.ts:36](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/memory.ts#L36)
3429
+ Defined in: [libraries/epub/adapters/memory.ts:31](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/memory.ts#L31)
3612
3430
 
3613
3431
  ##### Parameters
3614
3432
 
@@ -3625,12 +3443,11 @@ Defined in:
3625
3443
 
3626
3444
  ## TmpFsAdapter
3627
3445
 
3628
- Defined in:
3629
- [libraries/epub/adapters/tmpfs.ts:59](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/tmpfs.ts#L59)
3446
+ Defined in: [libraries/epub/adapters/tmpfs.ts:53](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/tmpfs.ts#L53)
3630
3447
 
3631
- Extracts an EPUB archive to a temp directory and serves all I/O off the real
3632
- filesystem. `Epub.using(TmpFsAdapter).from(...)` returns a writable
3633
- [Epub](#epub).
3448
+ Extracts an EPUB archive to a temp directory and serves all I/O off
3449
+ the real filesystem.
3450
+ `Epub.using(TmpFsAdapter).from(...)` returns a writable [Epub](#epub).
3634
3451
 
3635
3452
  ### Implements
3636
3453
 
@@ -3638,27 +3455,11 @@ filesystem. `Epub.using(TmpFsAdapter).from(...)` returns a writable
3638
3455
 
3639
3456
  ### Properties
3640
3457
 
3641
- #### rootPath
3642
-
3643
- > `readonly` **rootPath**: `string`
3644
-
3645
- Defined in:
3646
- [libraries/epub/adapters/tmpfs.ts:102](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/tmpfs.ts#L102)
3647
-
3648
- Opaque path prefix used by `resolveInternalHref` to anchor absolute paths within
3649
- the archive. For TmpFsAdapter this is the tmp dir; for MemoryAdapter it's a
3650
- virtual prefix that's never written to disk
3651
-
3652
- ##### Implementation of
3653
-
3654
- [`EpubStorageAdapter`](#epubstorageadapter).[`rootPath`](#rootpath-2)
3655
-
3656
3458
  #### capabilities
3657
3459
 
3658
3460
  > `readonly` `static` **capabilities**: `object`
3659
3461
 
3660
- Defined in:
3661
- [libraries/epub/adapters/tmpfs.ts:61](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/tmpfs.ts#L61)
3462
+ Defined in: [libraries/epub/adapters/tmpfs.ts:55](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/tmpfs.ts#L55)
3662
3463
 
3663
3464
  ##### writable
3664
3465
 
@@ -3668,26 +3469,24 @@ Defined in:
3668
3469
 
3669
3470
  > `readonly` `static` **kind**: `"extracted-dir"`
3670
3471
 
3671
- Defined in:
3672
- [libraries/epub/adapters/tmpfs.ts:60](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/tmpfs.ts#L60)
3472
+ Defined in: [libraries/epub/adapters/tmpfs.ts:54](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/tmpfs.ts#L54)
3673
3473
 
3674
3474
  ### Methods
3675
3475
 
3676
3476
  #### archiveLength()
3677
3477
 
3678
- > **archiveLength**(`path`): `Promise`\<`number`\>
3478
+ > **archiveLength**(`entry`): `Promise`\<`number`\>
3679
3479
 
3680
- Defined in:
3681
- [libraries/epub/adapters/tmpfs.ts:125](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/tmpfs.ts#L125)
3480
+ Defined in: [libraries/epub/adapters/tmpfs.ts:136](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/tmpfs.ts#L136)
3682
3481
 
3683
- Length of an entry in bytes, for the readium page-count heuristic which expects
3684
- compressed size when available
3482
+ Length of an entry in bytes, for the readium page-count heuristic
3483
+ which expects compressed size when available
3685
3484
 
3686
3485
  ##### Parameters
3687
3486
 
3688
3487
  | Parameter | Type |
3689
3488
  | --------- | -------- |
3690
- | `path` | `string` |
3489
+ | `entry` | `string` |
3691
3490
 
3692
3491
  ##### Returns
3693
3492
 
@@ -3701,8 +3500,7 @@ compressed size when available
3701
3500
 
3702
3501
  > **dispose**(): `void`
3703
3502
 
3704
- Defined in:
3705
- [libraries/epub/adapters/tmpfs.ts:198](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/tmpfs.ts#L198)
3503
+ Defined in: [libraries/epub/adapters/tmpfs.ts:213](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/tmpfs.ts#L213)
3706
3504
 
3707
3505
  Always called on close or error
3708
3506
 
@@ -3718,8 +3516,7 @@ Always called on close or error
3718
3516
 
3719
3517
  > **duplicate**(): `Promise`\<[`TmpFsAdapter`](#tmpfsadapter)\>
3720
3518
 
3721
- Defined in:
3722
- [libraries/epub/adapters/tmpfs.ts:149](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/tmpfs.ts#L149)
3519
+ Defined in: [libraries/epub/adapters/tmpfs.ts:163](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/tmpfs.ts#L163)
3723
3520
 
3724
3521
  Required for Epub.copy
3725
3522
 
@@ -3731,12 +3528,35 @@ Required for Epub.copy
3731
3528
 
3732
3529
  [`EpubStorageAdapter`](#epubstorageadapter).[`duplicate`](#duplicate-2)
3733
3530
 
3531
+ #### exists()
3532
+
3533
+ > **exists**(`entry`): `Promise`\<`boolean`\>
3534
+
3535
+ Defined in: [libraries/epub/adapters/tmpfs.ts:127](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/tmpfs.ts#L127)
3536
+
3537
+ Whether the archive holds an entry under exactly this name.
3538
+ Used to choose between different canditates for an href
3539
+ so should be exact
3540
+
3541
+ ##### Parameters
3542
+
3543
+ | Parameter | Type |
3544
+ | --------- | -------- |
3545
+ | `entry` | `string` |
3546
+
3547
+ ##### Returns
3548
+
3549
+ `Promise`\<`boolean`\>
3550
+
3551
+ ##### Implementation of
3552
+
3553
+ [`EpubStorageAdapter`](#epubstorageadapter).[`exists`](#exists-4)
3554
+
3734
3555
  #### list()
3735
3556
 
3736
3557
  > **list**(): `AsyncIterable`\<[`EpubListEntry`](#epublistentry)\>
3737
3558
 
3738
- Defined in:
3739
- [libraries/epub/adapters/tmpfs.ts:134](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/tmpfs.ts#L134)
3559
+ Defined in: [libraries/epub/adapters/tmpfs.ts:145](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/tmpfs.ts#L145)
3740
3560
 
3741
3561
  Required for Epub.saveAndClose to walk the contents
3742
3562
 
@@ -3752,16 +3572,15 @@ Required for Epub.saveAndClose to walk the contents
3752
3572
 
3753
3573
  ##### Call Signature
3754
3574
 
3755
- > **read**(`path`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\>
3575
+ > **read**(`entry`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\>
3756
3576
 
3757
- Defined in:
3758
- [libraries/epub/adapters/tmpfs.ts:104](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/tmpfs.ts#L104)
3577
+ Defined in: [libraries/epub/adapters/tmpfs.ts:105](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/tmpfs.ts#L105)
3759
3578
 
3760
3579
  ###### Parameters
3761
3580
 
3762
3581
  | Parameter | Type |
3763
3582
  | --------- | -------- |
3764
- | `path` | `string` |
3583
+ | `entry` | `string` |
3765
3584
 
3766
3585
  ###### Returns
3767
3586
 
@@ -3773,16 +3592,15 @@ Defined in:
3773
3592
 
3774
3593
  ##### Call Signature
3775
3594
 
3776
- > **read**(`path`, `encoding`): `Promise`\<`string`\>
3595
+ > **read**(`entry`, `encoding`): `Promise`\<`string`\>
3777
3596
 
3778
- Defined in:
3779
- [libraries/epub/adapters/tmpfs.ts:105](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/tmpfs.ts#L105)
3597
+ Defined in: [libraries/epub/adapters/tmpfs.ts:106](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/tmpfs.ts#L106)
3780
3598
 
3781
3599
  ###### Parameters
3782
3600
 
3783
3601
  | Parameter | Type |
3784
3602
  | ---------- | --------- |
3785
- | `path` | `string` |
3603
+ | `entry` | `string` |
3786
3604
  | `encoding` | `"utf-8"` |
3787
3605
 
3788
3606
  ###### Returns
@@ -3795,10 +3613,9 @@ Defined in:
3795
3613
 
3796
3614
  #### remove()
3797
3615
 
3798
- > **remove**(`path`): `Promise`\<`void`\>
3616
+ > **remove**(`entry`): `Promise`\<`void`\>
3799
3617
 
3800
- Defined in:
3801
- [libraries/epub/adapters/tmpfs.ts:121](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/tmpfs.ts#L121)
3618
+ Defined in: [libraries/epub/adapters/tmpfs.ts:123](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/tmpfs.ts#L123)
3802
3619
 
3803
3620
  Required for removeManifestItem / setCoverImage replacement
3804
3621
 
@@ -3806,7 +3623,7 @@ Required for removeManifestItem / setCoverImage replacement
3806
3623
 
3807
3624
  | Parameter | Type |
3808
3625
  | --------- | -------- |
3809
- | `path` | `string` |
3626
+ | `entry` | `string` |
3810
3627
 
3811
3628
  ##### Returns
3812
3629
 
@@ -3820,8 +3637,7 @@ Required for removeManifestItem / setCoverImage replacement
3820
3637
 
3821
3638
  > **serialize**(`targetPath`): `Promise`\<`void`\>
3822
3639
 
3823
- Defined in:
3824
- [libraries/epub/adapters/tmpfs.ts:160](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/tmpfs.ts#L160)
3640
+ Defined in: [libraries/epub/adapters/tmpfs.ts:174](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/tmpfs.ts#L174)
3825
3641
 
3826
3642
  Required for Epub.saveAndClose
3827
3643
 
@@ -3843,10 +3659,9 @@ Required for Epub.saveAndClose
3843
3659
 
3844
3660
  ##### Call Signature
3845
3661
 
3846
- > **write**(`path`, `data`): `Promise`\<`void`\>
3662
+ > **write**(`entry`, `data`): `Promise`\<`void`\>
3847
3663
 
3848
- Defined in:
3849
- [libraries/epub/adapters/tmpfs.ts:110](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/tmpfs.ts#L110)
3664
+ Defined in: [libraries/epub/adapters/tmpfs.ts:111](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/tmpfs.ts#L111)
3850
3665
 
3851
3666
  Required for any mutation method on Epub
3852
3667
 
@@ -3854,7 +3669,7 @@ Required for any mutation method on Epub
3854
3669
 
3855
3670
  | Parameter | Type |
3856
3671
  | --------- | ------------ |
3857
- | `path` | `string` |
3672
+ | `entry` | `string` |
3858
3673
  | `data` | `Uint8Array` |
3859
3674
 
3860
3675
  ###### Returns
@@ -3867,16 +3682,15 @@ Required for any mutation method on Epub
3867
3682
 
3868
3683
  ##### Call Signature
3869
3684
 
3870
- > **write**(`path`, `data`, `encoding`): `Promise`\<`void`\>
3685
+ > **write**(`entry`, `data`, `encoding`): `Promise`\<`void`\>
3871
3686
 
3872
- Defined in:
3873
- [libraries/epub/adapters/tmpfs.ts:111](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/tmpfs.ts#L111)
3687
+ Defined in: [libraries/epub/adapters/tmpfs.ts:112](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/tmpfs.ts#L112)
3874
3688
 
3875
3689
  ###### Parameters
3876
3690
 
3877
3691
  | Parameter | Type |
3878
3692
  | ---------- | --------- |
3879
- | `path` | `string` |
3693
+ | `entry` | `string` |
3880
3694
  | `data` | `string` |
3881
3695
  | `encoding` | `"utf-8"` |
3882
3696
 
@@ -3892,8 +3706,7 @@ Defined in:
3892
3706
 
3893
3707
  > `static` **init**(`source`): `Promise`\<[`TmpFsAdapter`](#tmpfsadapter)\>
3894
3708
 
3895
- Defined in:
3896
- [libraries/epub/adapters/tmpfs.ts:63](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/tmpfs.ts#L63)
3709
+ Defined in: [libraries/epub/adapters/tmpfs.ts:57](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/tmpfs.ts#L57)
3897
3710
 
3898
3711
  ##### Parameters
3899
3712
 
@@ -3909,8 +3722,7 @@ Defined in:
3909
3722
 
3910
3723
  > `static` **initEmpty**(): `Promise`\<[`TmpFsAdapter`](#tmpfsadapter)\>
3911
3724
 
3912
- Defined in:
3913
- [libraries/epub/adapters/tmpfs.ts:96](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/tmpfs.ts#L96)
3725
+ Defined in: [libraries/epub/adapters/tmpfs.ts:88](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/tmpfs.ts#L88)
3914
3726
 
3915
3727
  ##### Returns
3916
3728
 
@@ -3920,8 +3732,7 @@ Defined in:
3920
3732
 
3921
3733
  ## AlternateScript
3922
3734
 
3923
- Defined in:
3924
- [libraries/epub/index.ts:154](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L154)
3735
+ Defined in: [libraries/epub/index.ts:150](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L150)
3925
3736
 
3926
3737
  ### Properties
3927
3738
 
@@ -3929,22 +3740,19 @@ Defined in:
3929
3740
 
3930
3741
  > **locale**: `Locale`
3931
3742
 
3932
- Defined in:
3933
- [libraries/epub/index.ts:156](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L156)
3743
+ Defined in: [libraries/epub/index.ts:152](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L152)
3934
3744
 
3935
3745
  #### name
3936
3746
 
3937
3747
  > **name**: `string`
3938
3748
 
3939
- Defined in:
3940
- [libraries/epub/index.ts:155](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L155)
3749
+ Defined in: [libraries/epub/index.ts:151](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L151)
3941
3750
 
3942
3751
  ---
3943
3752
 
3944
3753
  ## Collection
3945
3754
 
3946
- Defined in:
3947
- [libraries/epub/index.ts:178](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L178)
3755
+ Defined in: [libraries/epub/index.ts:174](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L174)
3948
3756
 
3949
3757
  ### Properties
3950
3758
 
@@ -3952,29 +3760,25 @@ Defined in:
3952
3760
 
3953
3761
  > **name**: `string`
3954
3762
 
3955
- Defined in:
3956
- [libraries/epub/index.ts:179](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L179)
3763
+ Defined in: [libraries/epub/index.ts:175](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L175)
3957
3764
 
3958
3765
  #### position?
3959
3766
 
3960
3767
  > `optional` **position**: `string`
3961
3768
 
3962
- Defined in:
3963
- [libraries/epub/index.ts:181](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L181)
3769
+ Defined in: [libraries/epub/index.ts:177](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L177)
3964
3770
 
3965
3771
  #### type?
3966
3772
 
3967
3773
  > `optional` **type**: `string`
3968
3774
 
3969
- Defined in:
3970
- [libraries/epub/index.ts:180](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L180)
3775
+ Defined in: [libraries/epub/index.ts:176](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L176)
3971
3776
 
3972
3777
  ---
3973
3778
 
3974
3779
  ## DcCreator
3975
3780
 
3976
- Defined in:
3977
- [libraries/epub/index.ts:159](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L159)
3781
+ Defined in: [libraries/epub/index.ts:155](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L155)
3978
3782
 
3979
3783
  ### Properties
3980
3784
 
@@ -3982,43 +3786,37 @@ Defined in:
3982
3786
 
3983
3787
  > `optional` **alternateScripts**: [`AlternateScript`](#alternatescript)[]
3984
3788
 
3985
- Defined in:
3986
- [libraries/epub/index.ts:164](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L164)
3789
+ Defined in: [libraries/epub/index.ts:160](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L160)
3987
3790
 
3988
3791
  #### fileAs?
3989
3792
 
3990
3793
  > `optional` **fileAs**: `string`
3991
3794
 
3992
- Defined in:
3993
- [libraries/epub/index.ts:163](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L163)
3795
+ Defined in: [libraries/epub/index.ts:159](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L159)
3994
3796
 
3995
3797
  #### name
3996
3798
 
3997
3799
  > **name**: `string`
3998
3800
 
3999
- Defined in:
4000
- [libraries/epub/index.ts:160](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L160)
3801
+ Defined in: [libraries/epub/index.ts:156](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L156)
4001
3802
 
4002
3803
  #### role?
4003
3804
 
4004
3805
  > `optional` **role**: `string`
4005
3806
 
4006
- Defined in:
4007
- [libraries/epub/index.ts:161](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L161)
3807
+ Defined in: [libraries/epub/index.ts:157](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L157)
4008
3808
 
4009
3809
  #### roleScheme?
4010
3810
 
4011
3811
  > `optional` **roleScheme**: `string`
4012
3812
 
4013
- Defined in:
4014
- [libraries/epub/index.ts:162](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L162)
3813
+ Defined in: [libraries/epub/index.ts:158](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L158)
4015
3814
 
4016
3815
  ---
4017
3816
 
4018
3817
  ## DcSubject
4019
3818
 
4020
- Defined in:
4021
- [libraries/epub/index.ts:121](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L121)
3819
+ Defined in: [libraries/epub/index.ts:117](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L117)
4022
3820
 
4023
3821
  ### Properties
4024
3822
 
@@ -4026,29 +3824,25 @@ Defined in:
4026
3824
 
4027
3825
  > **authority**: `string`
4028
3826
 
4029
- Defined in:
4030
- [libraries/epub/index.ts:123](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L123)
3827
+ Defined in: [libraries/epub/index.ts:119](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L119)
4031
3828
 
4032
3829
  #### term
4033
3830
 
4034
3831
  > **term**: `string`
4035
3832
 
4036
- Defined in:
4037
- [libraries/epub/index.ts:124](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L124)
3833
+ Defined in: [libraries/epub/index.ts:120](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L120)
4038
3834
 
4039
3835
  #### value
4040
3836
 
4041
3837
  > **value**: `string`
4042
3838
 
4043
- Defined in:
4044
- [libraries/epub/index.ts:122](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L122)
3839
+ Defined in: [libraries/epub/index.ts:118](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L118)
4045
3840
 
4046
3841
  ---
4047
3842
 
4048
3843
  ## DublinCore
4049
3844
 
4050
- Defined in:
4051
- [libraries/epub/index.ts:167](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L167)
3845
+ Defined in: [libraries/epub/index.ts:163](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L163)
4052
3846
 
4053
3847
  ### Properties
4054
3848
 
@@ -4056,64 +3850,55 @@ Defined in:
4056
3850
 
4057
3851
  > `optional` **contributors**: [`DcCreator`](#dccreator)[]
4058
3852
 
4059
- Defined in:
4060
- [libraries/epub/index.ts:174](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L174)
3853
+ Defined in: [libraries/epub/index.ts:170](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L170)
4061
3854
 
4062
3855
  #### creators?
4063
3856
 
4064
3857
  > `optional` **creators**: [`DcCreator`](#dccreator)[]
4065
3858
 
4066
- Defined in:
4067
- [libraries/epub/index.ts:173](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L173)
3859
+ Defined in: [libraries/epub/index.ts:169](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L169)
4068
3860
 
4069
3861
  #### date?
4070
3862
 
4071
3863
  > `optional` **date**: `Date`
4072
3864
 
4073
- Defined in:
4074
- [libraries/epub/index.ts:171](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L171)
3865
+ Defined in: [libraries/epub/index.ts:167](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L167)
4075
3866
 
4076
3867
  #### identifier
4077
3868
 
4078
3869
  > **identifier**: `string`
4079
3870
 
4080
- Defined in:
4081
- [libraries/epub/index.ts:170](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L170)
3871
+ Defined in: [libraries/epub/index.ts:166](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L166)
4082
3872
 
4083
3873
  #### language
4084
3874
 
4085
3875
  > **language**: `Locale`
4086
3876
 
4087
- Defined in:
4088
- [libraries/epub/index.ts:169](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L169)
3877
+ Defined in: [libraries/epub/index.ts:165](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L165)
4089
3878
 
4090
3879
  #### subjects?
4091
3880
 
4092
3881
  > `optional` **subjects**: (`string` \| [`DcSubject`](#dcsubject))[]
4093
3882
 
4094
- Defined in:
4095
- [libraries/epub/index.ts:172](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L172)
3883
+ Defined in: [libraries/epub/index.ts:168](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L168)
4096
3884
 
4097
3885
  #### title
4098
3886
 
4099
3887
  > **title**: `string`
4100
3888
 
4101
- Defined in:
4102
- [libraries/epub/index.ts:168](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L168)
3889
+ Defined in: [libraries/epub/index.ts:164](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L164)
4103
3890
 
4104
3891
  #### type?
4105
3892
 
4106
3893
  > `optional` **type**: `string`
4107
3894
 
4108
- Defined in:
4109
- [libraries/epub/index.ts:175](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L175)
3895
+ Defined in: [libraries/epub/index.ts:171](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L171)
4110
3896
 
4111
3897
  ---
4112
3898
 
4113
3899
  ## Epub2UpgradeOptions
4114
3900
 
4115
- Defined in:
4116
- [libraries/epub/upgrade.ts:93](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/upgrade.ts#L93)
3901
+ Defined in: [libraries/epub/upgrade.ts:69](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/upgrade.ts#L69)
4117
3902
 
4118
3903
  ### Properties
4119
3904
 
@@ -4121,18 +3906,15 @@ Defined in:
4121
3906
 
4122
3907
  > `optional` **outputPath**: `string`
4123
3908
 
4124
- Defined in:
4125
- [libraries/epub/upgrade.ts:97](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/upgrade.ts#L97)
3909
+ Defined in: [libraries/epub/upgrade.ts:73](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/upgrade.ts#L73)
4126
3910
 
4127
- The path to the output file. If provided, the input file will be copied to the
4128
- output path.
3911
+ The path to the output file. If provided, the input file will be copied to the output path.
4129
3912
 
4130
3913
  #### removeNcx?
4131
3914
 
4132
3915
  > `optional` **removeNcx**: `boolean`
4133
3916
 
4134
- Defined in:
4135
- [libraries/epub/upgrade.ts:101](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/upgrade.ts#L101)
3917
+ Defined in: [libraries/epub/upgrade.ts:77](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/upgrade.ts#L77)
4136
3918
 
4137
3919
  Whether to remove the NCX file, as it's technically optional in EPUB 3.
4138
3920
 
@@ -4140,8 +3922,7 @@ Whether to remove the NCX file, as it's technically optional in EPUB 3.
4140
3922
 
4141
3923
  ## EpubIdentifier
4142
3924
 
4143
- Defined in:
4144
- [libraries/epub/index.ts:127](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L127)
3925
+ Defined in: [libraries/epub/index.ts:123](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L123)
4145
3926
 
4146
3927
  ### Properties
4147
3928
 
@@ -4149,15 +3930,13 @@ Defined in:
4149
3930
 
4150
3931
  > `optional` **id**: `string`
4151
3932
 
4152
- Defined in:
4153
- [libraries/epub/index.ts:129](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L129)
3933
+ Defined in: [libraries/epub/index.ts:125](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L125)
4154
3934
 
4155
3935
  #### identifierType?
4156
3936
 
4157
3937
  > `optional` **identifierType**: `string`
4158
3938
 
4159
- Defined in:
4160
- [libraries/epub/index.ts:131](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L131)
3939
+ Defined in: [libraries/epub/index.ts:127](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L127)
4161
3940
 
4162
3941
  the value of a refining `identifier-type` meta, if present
4163
3942
 
@@ -4165,25 +3944,21 @@ the value of a refining `identifier-type` meta, if present
4165
3944
 
4166
3945
  > `optional` **scheme**: `string`
4167
3946
 
4168
- Defined in:
4169
- [libraries/epub/index.ts:133](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L133)
3947
+ Defined in: [libraries/epub/index.ts:129](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L129)
4170
3948
 
4171
- the `scheme` of a refining `identifier-type` meta, or a legacy `opf:scheme`
4172
- attribute
3949
+ the `scheme` of a refining `identifier-type` meta, or a legacy `opf:scheme` attribute
4173
3950
 
4174
3951
  #### value
4175
3952
 
4176
3953
  > **value**: `string`
4177
3954
 
4178
- Defined in:
4179
- [libraries/epub/index.ts:128](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L128)
3955
+ Defined in: [libraries/epub/index.ts:124](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L124)
4180
3956
 
4181
3957
  ---
4182
3958
 
4183
3959
  ## EpubListEntry
4184
3960
 
4185
- Defined in:
4186
- [libraries/epub/adapters/interface.ts:17](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L17)
3961
+ Defined in: [libraries/epub/adapters/interface.ts:17](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L17)
4187
3962
 
4188
3963
  ### Properties
4189
3964
 
@@ -4191,26 +3966,23 @@ Defined in:
4191
3966
 
4192
3967
  > **absolutePath**: `string`
4193
3968
 
4194
- Defined in:
4195
- [libraries/epub/adapters/interface.ts:19](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L19)
3969
+ Defined in: [libraries/epub/adapters/interface.ts:19](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L19)
4196
3970
 
4197
- absolute path under [EpubStorageAdapter.rootPath](#rootpath-2)
3971
+ location the adapter can read the entry back from, in whatever form it stores
4198
3972
 
4199
3973
  #### relativePath
4200
3974
 
4201
3975
  > **relativePath**: `string`
4202
3976
 
4203
- Defined in:
4204
- [libraries/epub/adapters/interface.ts:21](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L21)
3977
+ Defined in: [libraries/epub/adapters/interface.ts:21](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L21)
4205
3978
 
4206
- path relative to [EpubStorageAdapter.rootPath](#rootpath-2), slash-separated
3979
+ the entry name, as it appears in the archive
4207
3980
 
4208
3981
  ---
4209
3982
 
4210
3983
  ## EpubSource
4211
3984
 
4212
- Defined in:
4213
- [libraries/epub/index.ts:136](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L136)
3985
+ Defined in: [libraries/epub/index.ts:132](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L132)
4214
3986
 
4215
3987
  ### Properties
4216
3988
 
@@ -4218,15 +3990,13 @@ Defined in:
4218
3990
 
4219
3991
  > `optional` **id**: `string`
4220
3992
 
4221
- Defined in:
4222
- [libraries/epub/index.ts:138](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L138)
3993
+ Defined in: [libraries/epub/index.ts:134](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L134)
4223
3994
 
4224
3995
  #### identifierType?
4225
3996
 
4226
3997
  > `optional` **identifierType**: `string`
4227
3998
 
4228
- Defined in:
4229
- [libraries/epub/index.ts:140](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L140)
3999
+ Defined in: [libraries/epub/index.ts:136](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L136)
4230
4000
 
4231
4001
  the value of a refining `identifier-type` meta, if present
4232
4002
 
@@ -4234,70 +4004,61 @@ the value of a refining `identifier-type` meta, if present
4234
4004
 
4235
4005
  > `optional` **isPageBreakSource**: `boolean`
4236
4006
 
4237
- Defined in:
4238
- [libraries/epub/index.ts:151](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L151)
4007
+ Defined in: [libraries/epub/index.ts:147](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L147)
4239
4008
 
4240
- whether this source has a `source-of="pagination"` refinement or of a
4241
- `<meta property="pageBreakSource">` element
4009
+ whether this source has a `source-of="pagination"` refinement
4010
+ or of a `<meta property="pageBreakSource">` element
4242
4011
 
4243
4012
  as of EPUB 3.4 `source-of` is advised-deprecated in favour of the
4244
- publication-level `pageBreakSource` property. if you want to be sure to get the
4245
- source of pagination, use [Epub.getPageBreakSource](#getpagebreaksource)
4013
+ publication-level `pageBreakSource` property. if you want to
4014
+ be sure to get the source of pagination, use [Epub.getPageBreakSource](#getpagebreaksource)
4246
4015
 
4247
4016
  #### scheme?
4248
4017
 
4249
4018
  > `optional` **scheme**: `string`
4250
4019
 
4251
- Defined in:
4252
- [libraries/epub/index.ts:142](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L142)
4020
+ Defined in: [libraries/epub/index.ts:138](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L138)
4253
4021
 
4254
- the `scheme` of a refining `identifier-type` meta, or a legacy `opf:scheme`
4255
- attribute
4022
+ the `scheme` of a refining `identifier-type` meta, or a legacy `opf:scheme` attribute
4256
4023
 
4257
4024
  #### value
4258
4025
 
4259
4026
  > **value**: `string`
4260
4027
 
4261
- Defined in:
4262
- [libraries/epub/index.ts:137](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L137)
4028
+ Defined in: [libraries/epub/index.ts:133](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L133)
4263
4029
 
4264
4030
  ---
4265
4031
 
4266
4032
  ## EpubStorageAdapter
4267
4033
 
4268
- Defined in:
4269
- [libraries/epub/adapters/interface.ts:24](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L24)
4034
+ Defined in: [libraries/epub/adapters/interface.ts:34](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L34)
4270
4035
 
4271
- ### Properties
4272
-
4273
- #### rootPath
4036
+ Adapters only receive entry names, which is:
4274
4037
 
4275
- > `readonly` **rootPath**: `string`
4038
+ - the name a file has in the archive itself
4039
+ - relative to the container root, slash-separated,
4040
+ - already percent-decoded (eg `OEBPS/a b.xhtml`, not `OEBPS/a%20b.xhtml`)
4276
4041
 
4277
- Defined in:
4278
- [libraries/epub/adapters/interface.ts:30](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L30)
4279
-
4280
- Opaque path prefix used by `resolveInternalHref` to anchor absolute paths within
4281
- the archive. For TmpFsAdapter this is the tmp dir; for MemoryAdapter it's a
4282
- virtual prefix that's never written to disk
4042
+ Adapter decides where to store files under what name
4043
+ In previous versions of the EPUB lib, this was a little bit more muddled, leading to
4044
+ eg the TmpFsAdapter trying to read `OEBPS/a%20b.xhtml`, whereas it was stored as `OEBPS/a b.xhtml`
4283
4045
 
4284
4046
  ### Methods
4285
4047
 
4286
4048
  #### archiveLength()
4287
4049
 
4288
- > **archiveLength**(`path`): `Promise`\<`number`\>
4050
+ > **archiveLength**(`entry`): `Promise`\<`number`\>
4289
4051
 
4290
- Defined in:
4291
- [libraries/epub/adapters/interface.ts:39](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L39)
4052
+ Defined in: [libraries/epub/adapters/interface.ts:49](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L49)
4292
4053
 
4293
- Length of an entry in bytes, for the readium page-count heuristic which expects
4294
- compressed size when available
4054
+ Length of an entry in bytes, for the readium page-count heuristic
4055
+ which expects compressed size when available
4295
4056
 
4296
4057
  ##### Parameters
4297
4058
 
4298
4059
  | Parameter | Type |
4299
4060
  | --------- | -------- |
4300
- | `path` | `string` |
4061
+ | `entry` | `string` |
4301
4062
 
4302
4063
  ##### Returns
4303
4064
 
@@ -4307,8 +4068,7 @@ compressed size when available
4307
4068
 
4308
4069
  > **dispose**(): `void` \| `Promise`\<`void`\>
4309
4070
 
4310
- Defined in:
4311
- [libraries/epub/adapters/interface.ts:58](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L58)
4071
+ Defined in: [libraries/epub/adapters/interface.ts:68](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L68)
4312
4072
 
4313
4073
  Always called on close or error
4314
4074
 
@@ -4318,11 +4078,9 @@ Always called on close or error
4318
4078
 
4319
4079
  #### duplicate()?
4320
4080
 
4321
- > `optional` **duplicate**():
4322
- > `Promise`\<[`EpubStorageAdapter`](#epubstorageadapter)\>
4081
+ > `optional` **duplicate**(): `Promise`\<[`EpubStorageAdapter`](#epubstorageadapter)\>
4323
4082
 
4324
- Defined in:
4325
- [libraries/epub/adapters/interface.ts:52](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L52)
4083
+ Defined in: [libraries/epub/adapters/interface.ts:62](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L62)
4326
4084
 
4327
4085
  Required for Epub.copy
4328
4086
 
@@ -4330,12 +4088,31 @@ Required for Epub.copy
4330
4088
 
4331
4089
  `Promise`\<[`EpubStorageAdapter`](#epubstorageadapter)\>
4332
4090
 
4091
+ #### exists()
4092
+
4093
+ > **exists**(`entry`): `Promise`\<`boolean`\>
4094
+
4095
+ Defined in: [libraries/epub/adapters/interface.ts:43](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L43)
4096
+
4097
+ Whether the archive holds an entry under exactly this name.
4098
+ Used to choose between different canditates for an href
4099
+ so should be exact
4100
+
4101
+ ##### Parameters
4102
+
4103
+ | Parameter | Type |
4104
+ | --------- | -------- |
4105
+ | `entry` | `string` |
4106
+
4107
+ ##### Returns
4108
+
4109
+ `Promise`\<`boolean`\>
4110
+
4333
4111
  #### list()?
4334
4112
 
4335
4113
  > `optional` **list**(): `AsyncIterable`\<[`EpubListEntry`](#epublistentry)\>
4336
4114
 
4337
- Defined in:
4338
- [libraries/epub/adapters/interface.ts:49](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L49)
4115
+ Defined in: [libraries/epub/adapters/interface.ts:59](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L59)
4339
4116
 
4340
4117
  Required for Epub.saveAndClose to walk the contents
4341
4118
 
@@ -4347,16 +4124,15 @@ Required for Epub.saveAndClose to walk the contents
4347
4124
 
4348
4125
  ##### Call Signature
4349
4126
 
4350
- > **read**(`path`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\>
4127
+ > **read**(`entry`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\>
4351
4128
 
4352
- Defined in:
4353
- [libraries/epub/adapters/interface.ts:32](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L32)
4129
+ Defined in: [libraries/epub/adapters/interface.ts:35](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L35)
4354
4130
 
4355
4131
  ###### Parameters
4356
4132
 
4357
4133
  | Parameter | Type |
4358
4134
  | --------- | -------- |
4359
- | `path` | `string` |
4135
+ | `entry` | `string` |
4360
4136
 
4361
4137
  ###### Returns
4362
4138
 
@@ -4364,16 +4140,15 @@ Defined in:
4364
4140
 
4365
4141
  ##### Call Signature
4366
4142
 
4367
- > **read**(`path`, `encoding`): `Promise`\<`string`\>
4143
+ > **read**(`entry`, `encoding`): `Promise`\<`string`\>
4368
4144
 
4369
- Defined in:
4370
- [libraries/epub/adapters/interface.ts:33](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L33)
4145
+ Defined in: [libraries/epub/adapters/interface.ts:36](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L36)
4371
4146
 
4372
4147
  ###### Parameters
4373
4148
 
4374
4149
  | Parameter | Type |
4375
4150
  | ---------- | --------- |
4376
- | `path` | `string` |
4151
+ | `entry` | `string` |
4377
4152
  | `encoding` | `"utf-8"` |
4378
4153
 
4379
4154
  ###### Returns
@@ -4382,10 +4157,9 @@ Defined in:
4382
4157
 
4383
4158
  #### remove()?
4384
4159
 
4385
- > `optional` **remove**(`path`): `Promise`\<`void`\>
4160
+ > `optional` **remove**(`entry`): `Promise`\<`void`\>
4386
4161
 
4387
- Defined in:
4388
- [libraries/epub/adapters/interface.ts:46](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L46)
4162
+ Defined in: [libraries/epub/adapters/interface.ts:56](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L56)
4389
4163
 
4390
4164
  Required for removeManifestItem / setCoverImage replacement
4391
4165
 
@@ -4393,7 +4167,7 @@ Required for removeManifestItem / setCoverImage replacement
4393
4167
 
4394
4168
  | Parameter | Type |
4395
4169
  | --------- | -------- |
4396
- | `path` | `string` |
4170
+ | `entry` | `string` |
4397
4171
 
4398
4172
  ##### Returns
4399
4173
 
@@ -4403,8 +4177,7 @@ Required for removeManifestItem / setCoverImage replacement
4403
4177
 
4404
4178
  > `optional` **serialize**(`targetPath`): `Promise`\<`void`\>
4405
4179
 
4406
- Defined in:
4407
- [libraries/epub/adapters/interface.ts:55](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L55)
4180
+ Defined in: [libraries/epub/adapters/interface.ts:65](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L65)
4408
4181
 
4409
4182
  Required for Epub.saveAndClose
4410
4183
 
@@ -4422,10 +4195,9 @@ Required for Epub.saveAndClose
4422
4195
 
4423
4196
  ##### Call Signature
4424
4197
 
4425
- > `optional` **write**(`path`, `data`): `Promise`\<`void`\>
4198
+ > `optional` **write**(`entry`, `data`): `Promise`\<`void`\>
4426
4199
 
4427
- Defined in:
4428
- [libraries/epub/adapters/interface.ts:42](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L42)
4200
+ Defined in: [libraries/epub/adapters/interface.ts:52](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L52)
4429
4201
 
4430
4202
  Required for any mutation method on Epub
4431
4203
 
@@ -4433,7 +4205,7 @@ Required for any mutation method on Epub
4433
4205
 
4434
4206
  | Parameter | Type |
4435
4207
  | --------- | ------------ |
4436
- | `path` | `string` |
4208
+ | `entry` | `string` |
4437
4209
  | `data` | `Uint8Array` |
4438
4210
 
4439
4211
  ###### Returns
@@ -4442,16 +4214,15 @@ Required for any mutation method on Epub
4442
4214
 
4443
4215
  ##### Call Signature
4444
4216
 
4445
- > `optional` **write**(`path`, `data`, `encoding`): `Promise`\<`void`\>
4217
+ > `optional` **write**(`entry`, `data`, `encoding`): `Promise`\<`void`\>
4446
4218
 
4447
- Defined in:
4448
- [libraries/epub/adapters/interface.ts:43](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L43)
4219
+ Defined in: [libraries/epub/adapters/interface.ts:53](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L53)
4449
4220
 
4450
4221
  ###### Parameters
4451
4222
 
4452
4223
  | Parameter | Type |
4453
4224
  | ---------- | --------- |
4454
- | `path` | `string` |
4225
+ | `entry` | `string` |
4455
4226
  | `data` | `string` |
4456
4227
  | `encoding` | `"utf-8"` |
4457
4228
 
@@ -4463,8 +4234,7 @@ Defined in:
4463
4234
 
4464
4235
  ## EpubStorageAdapterClass\<Opts\>
4465
4236
 
4466
- Defined in:
4467
- [libraries/epub/adapters/interface.ts:61](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L61)
4237
+ Defined in: [libraries/epub/adapters/interface.ts:71](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L71)
4468
4238
 
4469
4239
  ### Type Parameters
4470
4240
 
@@ -4476,31 +4246,26 @@ Defined in:
4476
4246
 
4477
4247
  #### capabilities
4478
4248
 
4479
- > `readonly` **capabilities**:
4480
- > [`EpubStorageCapabilities`](#epubstoragecapabilities)
4249
+ > `readonly` **capabilities**: [`EpubStorageCapabilities`](#epubstoragecapabilities)
4481
4250
 
4482
- Defined in:
4483
- [libraries/epub/adapters/interface.ts:63](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L63)
4251
+ Defined in: [libraries/epub/adapters/interface.ts:73](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L73)
4484
4252
 
4485
4253
  #### kind
4486
4254
 
4487
4255
  > `readonly` **kind**: [`EpubStorageKind`](#epubstoragekind)
4488
4256
 
4489
- Defined in:
4490
- [libraries/epub/adapters/interface.ts:62](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L62)
4257
+ Defined in: [libraries/epub/adapters/interface.ts:72](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L72)
4491
4258
 
4492
4259
  ### Methods
4493
4260
 
4494
4261
  #### init()
4495
4262
 
4496
- > **init**(`source`, `opts?`):
4497
- > `Promise`\<[`EpubStorageAdapter`](#epubstorageadapter)\>
4263
+ > **init**(`source`, `opts?`): `Promise`\<[`EpubStorageAdapter`](#epubstorageadapter)\>
4498
4264
 
4499
- Defined in:
4500
- [libraries/epub/adapters/interface.ts:70](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L70)
4265
+ Defined in: [libraries/epub/adapters/interface.ts:79](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L79)
4501
4266
 
4502
- Open an archive from a path or buffer. The returned adapter is ready to read;
4503
- the Epub class will assert it's a valid EPUB 3 afterwards.
4267
+ Open an archive from a path or buffer.
4268
+ Will throw if the archive is not a valid EPUB 3
4504
4269
 
4505
4270
  ##### Parameters
4506
4271
 
@@ -4515,16 +4280,12 @@ the Epub class will assert it's a valid EPUB 3 afterwards.
4515
4280
 
4516
4281
  #### initEmpty()?
4517
4282
 
4518
- > `optional` **initEmpty**(`opts?`):
4519
- > `Promise`\<[`EpubStorageAdapter`](#epubstorageadapter)\>
4283
+ > `optional` **initEmpty**(`opts?`): `Promise`\<[`EpubStorageAdapter`](#epubstorageadapter)\>
4520
4284
 
4521
- Defined in:
4522
- [libraries/epub/adapters/interface.ts:79](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L79)
4285
+ Defined in: [libraries/epub/adapters/interface.ts:85](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L85)
4523
4286
 
4524
4287
  Initialize an empty extract root for [Epub.create](#create).
4525
-
4526
- Optional — adapters that can't be written to from scratch (e.g. read-only zip
4527
- handles) should leave this off, and `Epub.using(...).create(...)` will throw.
4288
+ Only necessary for adapters that can write
4528
4289
 
4529
4290
  ##### Parameters
4530
4291
 
@@ -4540,8 +4301,7 @@ handles) should leave this off, and `Epub.using(...).create(...)` will throw.
4540
4301
 
4541
4302
  ## EpubStorageCapabilities
4542
4303
 
4543
- Defined in:
4544
- [libraries/epub/adapters/interface.ts:12](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L12)
4304
+ Defined in: [libraries/epub/adapters/interface.ts:12](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L12)
4545
4305
 
4546
4306
  ### Properties
4547
4307
 
@@ -4549,8 +4309,7 @@ Defined in:
4549
4309
 
4550
4310
  > `readonly` **writable**: `boolean`
4551
4311
 
4552
- Defined in:
4553
- [libraries/epub/adapters/interface.ts:14](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L14)
4312
+ Defined in: [libraries/epub/adapters/interface.ts:14](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L14)
4554
4313
 
4555
4314
  when false, the Epub class refuses every mutation method at runtime
4556
4315
 
@@ -4558,8 +4317,7 @@ when false, the Epub class refuses every mutation method at runtime
4558
4317
 
4559
4318
  ## FromOptions
4560
4319
 
4561
- Defined in:
4562
- [libraries/epub/index.ts:205](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L205)
4320
+ Defined in: [libraries/epub/index.ts:201](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L201)
4563
4321
 
4564
4322
  ### Properties
4565
4323
 
@@ -4567,24 +4325,21 @@ Defined in:
4567
4325
 
4568
4326
  > `optional` **readonly**: `boolean`
4569
4327
 
4570
- Defined in:
4571
- [libraries/epub/index.ts:210](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L210)
4328
+ Defined in: [libraries/epub/index.ts:206](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L206)
4572
4329
 
4573
- when true, mutation methods throw [EpubReadOnlyError](#epubreadonlyerror) at
4574
- runtime
4330
+ when true, mutation methods throw [EpubReadOnlyError](#epubreadonlyerror) at runtime
4575
4331
 
4576
4332
  ##### Default
4577
4333
 
4578
4334
  ```ts
4579
- false
4335
+ false;
4580
4336
  ```
4581
4337
 
4582
4338
  ---
4583
4339
 
4584
4340
  ## Landmark
4585
4341
 
4586
- Defined in:
4587
- [libraries/epub/upgrade.ts:87](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/upgrade.ts#L87)
4342
+ Defined in: [libraries/epub/upgrade.ts:63](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/upgrade.ts#L63)
4588
4343
 
4589
4344
  ### Properties
4590
4345
 
@@ -4592,29 +4347,25 @@ Defined in:
4592
4347
 
4593
4348
  > **href**: `string`
4594
4349
 
4595
- Defined in:
4596
- [libraries/epub/upgrade.ts:88](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/upgrade.ts#L88)
4350
+ Defined in: [libraries/epub/upgrade.ts:64](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/upgrade.ts#L64)
4597
4351
 
4598
4352
  #### title
4599
4353
 
4600
4354
  > **title**: `string`
4601
4355
 
4602
- Defined in:
4603
- [libraries/epub/upgrade.ts:89](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/upgrade.ts#L89)
4356
+ Defined in: [libraries/epub/upgrade.ts:65](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/upgrade.ts#L65)
4604
4357
 
4605
4358
  #### type
4606
4359
 
4607
4360
  > **type**: `string`
4608
4361
 
4609
- Defined in:
4610
- [libraries/epub/upgrade.ts:90](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/upgrade.ts#L90)
4362
+ Defined in: [libraries/epub/upgrade.ts:66](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/upgrade.ts#L66)
4611
4363
 
4612
4364
  ---
4613
4365
 
4614
4366
  ## MemoryAdapterOptions
4615
4367
 
4616
- Defined in:
4617
- [libraries/epub/adapters/memory.ts:15](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/memory.ts#L15)
4368
+ Defined in: [libraries/epub/adapters/memory.ts:10](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/memory.ts#L10)
4618
4369
 
4619
4370
  ### Properties
4620
4371
 
@@ -4622,32 +4373,29 @@ Defined in:
4622
4373
 
4623
4374
  > `optional` **cache**: `boolean`
4624
4375
 
4625
- Defined in:
4626
- [libraries/epub/adapters/memory.ts:22](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/memory.ts#L22)
4376
+ Defined in: [libraries/epub/adapters/memory.ts:17](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/memory.ts#L17)
4627
4377
 
4628
- per-entry decompressed buffer cache turn it off when opening many EPUBs and
4629
- reading each entry at most once keeps resident size bounded by the entry index,
4630
- not the decompressed payload sum
4378
+ per-entry decompressed buffer cache
4379
+ turn it off when opening many EPUBs and reading each entry at most once
4380
+ keeps resident size bounded by the entry index, not the decompressed payload sum
4631
4381
 
4632
4382
  ##### Default
4633
4383
 
4634
4384
  ```ts
4635
- true
4385
+ true;
4636
4386
  ```
4637
4387
 
4638
4388
  #### signal?
4639
4389
 
4640
4390
  > `optional` **signal**: `AbortSignal`
4641
4391
 
4642
- Defined in:
4643
- [libraries/epub/adapters/memory.ts:23](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/memory.ts#L23)
4392
+ Defined in: [libraries/epub/adapters/memory.ts:18](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/memory.ts#L18)
4644
4393
 
4645
4394
  ---
4646
4395
 
4647
4396
  ## Navigation
4648
4397
 
4649
- Defined in:
4650
- [libraries/epub/index.ts:192](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L192)
4398
+ Defined in: [libraries/epub/index.ts:188](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L188)
4651
4399
 
4652
4400
  ### Properties
4653
4401
 
@@ -4655,22 +4403,19 @@ Defined in:
4655
4403
 
4656
4404
  > **children**: [`NavigationList`](#navigationlist)
4657
4405
 
4658
- Defined in:
4659
- [libraries/epub/index.ts:194](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L194)
4406
+ Defined in: [libraries/epub/index.ts:190](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L190)
4660
4407
 
4661
4408
  #### title?
4662
4409
 
4663
4410
  > `optional` **title**: `string`
4664
4411
 
4665
- Defined in:
4666
- [libraries/epub/index.ts:193](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L193)
4412
+ Defined in: [libraries/epub/index.ts:189](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L189)
4667
4413
 
4668
4414
  ---
4669
4415
 
4670
4416
  ## NavigationItem
4671
4417
 
4672
- Defined in:
4673
- [libraries/epub/index.ts:184](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L184)
4418
+ Defined in: [libraries/epub/index.ts:180](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L180)
4674
4419
 
4675
4420
  ### Properties
4676
4421
 
@@ -4678,33 +4423,27 @@ Defined in:
4678
4423
 
4679
4424
  > `optional` **children**: [`NavigationList`](#navigationlist)
4680
4425
 
4681
- Defined in:
4682
- [libraries/epub/index.ts:187](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L187)
4426
+ Defined in: [libraries/epub/index.ts:183](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L183)
4683
4427
 
4684
4428
  #### href?
4685
4429
 
4686
4430
  > `optional` **href**: `string`
4687
4431
 
4688
- Defined in:
4689
- [libraries/epub/index.ts:186](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L186)
4432
+ Defined in: [libraries/epub/index.ts:182](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L182)
4690
4433
 
4691
4434
  #### title
4692
4435
 
4693
4436
  > **title**: `string`
4694
4437
 
4695
- Defined in:
4696
- [libraries/epub/index.ts:185](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L185)
4438
+ Defined in: [libraries/epub/index.ts:181](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L181)
4697
4439
 
4698
4440
  ---
4699
4441
 
4700
4442
  ## AdapterOptions\<A\>
4701
4443
 
4702
- > **AdapterOptions**\<`A`\> = `A` _extends_
4703
- > [`EpubStorageAdapterClass`](#epubstorageadapterclass)\<infer Opts\> ? `Opts` :
4704
- > `object`
4444
+ > **AdapterOptions**\<`A`\> = `A` _extends_ [`EpubStorageAdapterClass`](#epubstorageadapterclass)\<infer Opts\> ? `Opts` : `object`
4705
4445
 
4706
- Defined in:
4707
- [libraries/epub/adapters/interface.ts:82](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L82)
4446
+ Defined in: [libraries/epub/adapters/interface.ts:88](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L88)
4708
4447
 
4709
4448
  ### Type Parameters
4710
4449
 
@@ -4716,11 +4455,9 @@ Defined in:
4716
4455
 
4717
4456
  ## ElementName
4718
4457
 
4719
- > **ElementName** =
4720
- > \`$\{Letter \| Uppercase\<Letter\> \| QuestionMark\}$\{string\}\`
4458
+ > **ElementName** = \`$\{Letter \| Uppercase\<Letter\> \| QuestionMark\}$\{string\}\`
4721
4459
 
4722
- Defined in:
4723
- [libraries/epub/index.ts:82](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L82)
4460
+ Defined in: [libraries/epub/index.ts:78](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L78)
4724
4461
 
4725
4462
  A valid name for an XML element (must start with a letter)
4726
4463
 
@@ -4728,14 +4465,11 @@ A valid name for an XML element (must start with a letter)
4728
4465
 
4729
4466
  ## EpubInstanceFor\<A\>
4730
4467
 
4731
- > **EpubInstanceFor**\<`A`\> = `A`\[`"capabilities"`\]\[`"writable"`\] _extends_
4732
- > `true` ? [`Epub`](#epub) : [`EpubReader`](#epubreader)
4468
+ > **EpubInstanceFor**\<`A`\> = `A`\[`"capabilities"`\]\[`"writable"`\] _extends_ `true` ? [`Epub`](#epub) : [`EpubReader`](#epubreader)
4733
4469
 
4734
- Defined in:
4735
- [libraries/epub/index.ts:3472](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3472)
4470
+ Defined in: [libraries/epub/index.ts:3594](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3594)
4736
4471
 
4737
- Resolves to [Epub](#epub) for writable adapters, [EpubReader](#epubreader) for
4738
- read-only ones.
4472
+ Resolves to [Epub](#epub) for writable adapters, [EpubReader](#epubreader) for read-only ones.
4739
4473
 
4740
4474
  The conditional pivots on `capabilities.writable`, which must be a literal
4741
4475
  `true`/`false` on the adapter class (use `as const`) for inference to work.
@@ -4752,23 +4486,18 @@ The conditional pivots on `capabilities.writable`, which must be a literal
4752
4486
 
4753
4487
  > **EpubMetadata** = [`MetadataEntry`](#metadataentry)[]
4754
4488
 
4755
- Defined in:
4756
- [libraries/epub/index.ts:119](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L119)
4489
+ Defined in: [libraries/epub/index.ts:115](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L115)
4757
4490
 
4758
4491
  ---
4759
4492
 
4760
4493
  ## EpubReader
4761
4494
 
4762
- > **EpubReader** = `Pick`\<[`Epub`](#epub), `"storage"` \| `"findMetadataItem"`
4763
- > \| `"findAllMetadataItems"` \| `"resolveHref"` \| `"readFileContents"` \|
4764
- > `"readItemContents"` \| `"readXhtmlItemContents"` \| `"discardAndClose"` \|
4765
- > `Extract`\<keyof [`Epub`](#epub), `` `get${string}` ``\>\> & `Disposable`
4495
+ > **EpubReader** = `Pick`\<[`Epub`](#epub), `"storage"` \| `"findMetadataItem"` \| `"findAllMetadataItems"` \| `"resolveHref"` \| `"readFileContents"` \| `"readItemContents"` \| `"readXhtmlItemContents"` \| `"discardAndClose"` \| `Extract`\<keyof [`Epub`](#epub), `` `get${string}` ``\>\> & `Disposable`
4766
4496
 
4767
- Defined in:
4768
- [libraries/epub/index.ts:217](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L217)
4497
+ Defined in: [libraries/epub/index.ts:213](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L213)
4769
4498
 
4770
- Read-only view of an EPUB Returned by Epub.using(MemoryAdapter).from(...) and by
4771
- Epub.from(path, { readonly: true })
4499
+ Read-only view of an EPUB
4500
+ Returned by Epub.using(MemoryAdapter).from(...) and by Epub.from(path, { readonly: true })
4772
4501
 
4773
4502
  ---
4774
4503
 
@@ -4776,8 +4505,7 @@ Epub.from(path, { readonly: true })
4776
4505
 
4777
4506
  > **EpubStorageKind** = `"tmp-dir"` \| `"in-memory"` \| `string` & `object`
4778
4507
 
4779
- Defined in:
4780
- [libraries/epub/adapters/interface.ts:10](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L10)
4508
+ Defined in: [libraries/epub/adapters/interface.ts:10](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L10)
4781
4509
 
4782
4510
  Pluggable storage backend for an Epub instance
4783
4511
 
@@ -4794,11 +4522,10 @@ Built-in adapters:
4794
4522
 
4795
4523
  > **InMemoryEpubReader** = [`EpubReader`](#epubreader) & `object`
4796
4524
 
4797
- Defined in:
4798
- [libraries/epub/index.ts:235](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L235)
4525
+ Defined in: [libraries/epub/index.ts:231](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L231)
4799
4526
 
4800
- Readonly Epub-instance backed by an in-memory zip handle Returned by
4801
- `Epub.using(MemoryAdapter).from(...)`
4527
+ Readonly Epub-instance backed by an in-memory zip handle
4528
+ Returned by `Epub.using(MemoryAdapter).from(...)`
4802
4529
 
4803
4530
  ### Type Declaration
4804
4531
 
@@ -4812,8 +4539,7 @@ Readonly Epub-instance backed by an in-memory zip handle Returned by
4812
4539
 
4813
4540
  > **ManifestItem** = `object`
4814
4541
 
4815
- Defined in:
4816
- [libraries/epub/index.ts:103](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L103)
4542
+ Defined in: [libraries/epub/index.ts:99](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L99)
4817
4543
 
4818
4544
  ### Properties
4819
4545
 
@@ -4821,43 +4547,37 @@ Defined in:
4821
4547
 
4822
4548
  > `optional` **fallback**: `string`
4823
4549
 
4824
- Defined in:
4825
- [libraries/epub/index.ts:107](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L107)
4550
+ Defined in: [libraries/epub/index.ts:103](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L103)
4826
4551
 
4827
4552
  #### href
4828
4553
 
4829
4554
  > **href**: `string`
4830
4555
 
4831
- Defined in:
4832
- [libraries/epub/index.ts:105](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L105)
4556
+ Defined in: [libraries/epub/index.ts:101](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L101)
4833
4557
 
4834
4558
  #### id
4835
4559
 
4836
4560
  > **id**: `string`
4837
4561
 
4838
- Defined in:
4839
- [libraries/epub/index.ts:104](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L104)
4562
+ Defined in: [libraries/epub/index.ts:100](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L100)
4840
4563
 
4841
4564
  #### mediaOverlay?
4842
4565
 
4843
4566
  > `optional` **mediaOverlay**: `string`
4844
4567
 
4845
- Defined in:
4846
- [libraries/epub/index.ts:108](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L108)
4568
+ Defined in: [libraries/epub/index.ts:104](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L104)
4847
4569
 
4848
4570
  #### mediaType?
4849
4571
 
4850
4572
  > `optional` **mediaType**: `string`
4851
4573
 
4852
- Defined in:
4853
- [libraries/epub/index.ts:106](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L106)
4574
+ Defined in: [libraries/epub/index.ts:102](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L102)
4854
4575
 
4855
4576
  #### properties?
4856
4577
 
4857
4578
  > `optional` **properties**: `string`[]
4858
4579
 
4859
- Defined in:
4860
- [libraries/epub/index.ts:109](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L109)
4580
+ Defined in: [libraries/epub/index.ts:105](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L105)
4861
4581
 
4862
4582
  ---
4863
4583
 
@@ -4865,8 +4585,7 @@ Defined in:
4865
4585
 
4866
4586
  > **MetadataEntry** = `object`
4867
4587
 
4868
- Defined in:
4869
- [libraries/epub/index.ts:112](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L112)
4588
+ Defined in: [libraries/epub/index.ts:108](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L108)
4870
4589
 
4871
4590
  ### Properties
4872
4591
 
@@ -4874,29 +4593,25 @@ Defined in:
4874
4593
 
4875
4594
  > `optional` **id**: `string`
4876
4595
 
4877
- Defined in:
4878
- [libraries/epub/index.ts:113](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L113)
4596
+ Defined in: [libraries/epub/index.ts:109](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L109)
4879
4597
 
4880
4598
  #### properties
4881
4599
 
4882
4600
  > **properties**: `Record`\<`string`, `string`\>
4883
4601
 
4884
- Defined in:
4885
- [libraries/epub/index.ts:115](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L115)
4602
+ Defined in: [libraries/epub/index.ts:111](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L111)
4886
4603
 
4887
4604
  #### type
4888
4605
 
4889
4606
  > **type**: [`ElementName`](#elementname)
4890
4607
 
4891
- Defined in:
4892
- [libraries/epub/index.ts:114](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L114)
4608
+ Defined in: [libraries/epub/index.ts:110](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L110)
4893
4609
 
4894
4610
  #### value
4895
4611
 
4896
4612
  > **value**: `string` \| `undefined`
4897
4613
 
4898
- Defined in:
4899
- [libraries/epub/index.ts:116](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L116)
4614
+ Defined in: [libraries/epub/index.ts:112](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L112)
4900
4615
 
4901
4616
  ---
4902
4617
 
@@ -4904,8 +4619,7 @@ Defined in:
4904
4619
 
4905
4620
  > **NavigationList** = [`NavigationItem`](#navigationitem)[]
4906
4621
 
4907
- Defined in:
4908
- [libraries/epub/index.ts:190](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L190)
4622
+ Defined in: [libraries/epub/index.ts:186](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L186)
4909
4623
 
4910
4624
  ---
4911
4625
 
@@ -4913,8 +4627,7 @@ Defined in:
4913
4627
 
4914
4628
  > **PackageElement** = [`XmlElement`](#xmlelement)\<`"package"`\>
4915
4629
 
4916
- Defined in:
4917
- [libraries/epub/index.ts:203](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L203)
4630
+ Defined in: [libraries/epub/index.ts:199](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L199)
4918
4631
 
4919
4632
  ---
4920
4633
 
@@ -4922,8 +4635,7 @@ Defined in:
4922
4635
 
4923
4636
  > **ParsedXml** = [`XmlNode`](#xmlnode)[]
4924
4637
 
4925
- Defined in:
4926
- [libraries/epub/index.ts:101](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L101)
4638
+ Defined in: [libraries/epub/index.ts:97](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L97)
4927
4639
 
4928
4640
  An XML structure
4929
4641
 
@@ -4933,8 +4645,7 @@ An XML structure
4933
4645
 
4934
4646
  > **XmlElement**\<`Name`\> = `object` & `{ [key in Name]: ParsedXml }`
4935
4647
 
4936
- Defined in:
4937
- [libraries/epub/index.ts:88](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L88)
4648
+ Defined in: [libraries/epub/index.ts:84](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L84)
4938
4649
 
4939
4650
  An XML element
4940
4651
 
@@ -4956,8 +4667,7 @@ An XML element
4956
4667
 
4957
4668
  > **XmlNode** = [`XmlElement`](#xmlelement) \| [`XmlTextNode`](#xmltextnode)
4958
4669
 
4959
- Defined in:
4960
- [libraries/epub/index.ts:98](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L98)
4670
+ Defined in: [libraries/epub/index.ts:94](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L94)
4961
4671
 
4962
4672
  A valid XML node. May be either an element or a text node.
4963
4673
 
@@ -4967,8 +4677,7 @@ A valid XML node. May be either an element or a text node.
4967
4677
 
4968
4678
  > **XmlTextNode** = `object`
4969
4679
 
4970
- Defined in:
4971
- [libraries/epub/index.ts:95](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L95)
4680
+ Defined in: [libraries/epub/index.ts:91](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L91)
4972
4681
 
4973
4682
  A text node in an XML document
4974
4683
 
@@ -4978,5 +4687,4 @@ A text node in an XML document
4978
4687
 
4979
4688
  > **#text**: `string`
4980
4689
 
4981
- Defined in:
4982
- [libraries/epub/index.ts:95](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L95)
4690
+ Defined in: [libraries/epub/index.ts:91](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L91)