@storyteller-platform/epub 0.2.1 → 0.4.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
@@ -220,90 +220,132 @@ To get started with developing in the Storyteller monorepo, check out the
220
220
  ## Epub
221
221
 
222
222
  Defined in:
223
- [epub/node.ts:24](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/node.ts#L24)
223
+ [epub/index.ts:164](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L164)
224
224
 
225
- ### Extends
225
+ A single EPUB instance.
226
226
 
227
- - `Epub`
227
+ The entire EPUB contents will be read into memory.
228
+
229
+ Example usage:
230
+
231
+ ```ts
232
+ import {
233
+ Epub,
234
+ getBody,
235
+ findByName,
236
+ textContent,
237
+ } from "@storyteller-platform/epub"
238
+
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)
244
+
245
+ const body = getBody(chptOneXml)
246
+ const h1 = Epub.findXmlChildByName("h1", body)
247
+ const headingText = textContent(h1)
248
+
249
+ await epub.setTitle(headingText)
250
+ await epub.writeToFile("./path/to/updated.epub")
251
+ await epub.close()
252
+ ```
253
+
254
+ ### Link
255
+
256
+ https://www.w3.org/TR/epub-33/
228
257
 
229
258
  ### Constructors
230
259
 
231
260
  #### Constructor
232
261
 
233
- > `protected` **new Epub**(`entries`, `onClose?`): [`Epub`](#epub)
262
+ > `protected` **new Epub**(`zipFs`, `zipPath`, `inputPath`): [`Epub`](#epub)
234
263
 
235
264
  Defined in:
236
- [epub/index.ts:409](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L409)
265
+ [epub/index.ts:368](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L368)
237
266
 
238
267
  ##### Parameters
239
268
 
240
- | Parameter | Type |
241
- | ---------- | ----------------------------------- |
242
- | `entries` | `EpubEntry`[] |
243
- | `onClose?` | () => `void` \| `Promise`\<`void`\> |
269
+ | Parameter | Type |
270
+ | ----------- | ----------------------- |
271
+ | `zipFs` | `ZipFS` |
272
+ | `zipPath` | `NativePath` |
273
+ | `inputPath` | `undefined` \| `string` |
244
274
 
245
275
  ##### Returns
246
276
 
247
277
  [`Epub`](#epub)
248
278
 
249
- ##### Inherited from
279
+ ### Properties
250
280
 
251
- `BaseEpub.constructor`
281
+ #### inputPath
252
282
 
253
- ### Properties
283
+ > `protected` **inputPath**: `undefined` \| `string`
254
284
 
255
- #### xhtmlBuilder
285
+ Defined in:
286
+ [epub/index.ts:371](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L371)
256
287
 
257
- > `static` **xhtmlBuilder**: `XMLBuilder`
288
+ #### zipFs
289
+
290
+ > `protected` **zipFs**: `ZipFS`
258
291
 
259
292
  Defined in:
260
- [epub/index.ts:241](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L241)
293
+ [epub/index.ts:369](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L369)
261
294
 
262
- ##### Inherited from
295
+ #### zipPath
263
296
 
264
- `BaseEpub.xhtmlBuilder`
297
+ > `protected` **zipPath**: `NativePath`
265
298
 
266
- #### xhtmlParser
299
+ Defined in:
300
+ [epub/index.ts:370](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L370)
267
301
 
268
- > `static` **xhtmlParser**: `XMLParser`
302
+ #### xhtmlBuilder
303
+
304
+ > `static` **xhtmlBuilder**: `XMLBuilder`
269
305
 
270
306
  Defined in:
271
- [epub/index.ts:209](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L209)
307
+ [epub/index.ts:204](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L204)
272
308
 
273
- ##### Inherited from
309
+ #### xhtmlParser
274
310
 
275
- `BaseEpub.xhtmlParser`
311
+ > `static` **xhtmlParser**: `XMLParser`
312
+
313
+ Defined in:
314
+ [epub/index.ts:172](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L172)
276
315
 
277
316
  #### xmlBuilder
278
317
 
279
318
  > `static` **xmlBuilder**: `XMLBuilder`
280
319
 
281
320
  Defined in:
282
- [epub/index.ts:234](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L234)
283
-
284
- ##### Inherited from
285
-
286
- `BaseEpub.xmlBuilder`
321
+ [epub/index.ts:197](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L197)
287
322
 
288
323
  #### xmlParser
289
324
 
290
325
  > `static` **xmlParser**: `XMLParser`
291
326
 
292
327
  Defined in:
293
- [epub/index.ts:202](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L202)
328
+ [epub/index.ts:165](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L165)
329
+
330
+ ### Methods
294
331
 
295
- ##### Inherited from
332
+ #### \[dispose\]()
296
333
 
297
- `BaseEpub.xmlParser`
334
+ > **\[dispose\]**(): `void`
298
335
 
299
- ### Methods
336
+ Defined in:
337
+ [epub/index.ts:2445](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2445)
338
+
339
+ ##### Returns
340
+
341
+ `void`
300
342
 
301
343
  #### addCollection()
302
344
 
303
345
  > **addCollection**(`collection`, `index?`): `Promise`\<`void`\>
304
346
 
305
347
  Defined in:
306
- [epub/index.ts:1518](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1518)
348
+ [epub/index.ts:1494](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1494)
307
349
 
308
350
  Add a collection to the EPUB metadata.
309
351
 
@@ -321,16 +363,12 @@ collections. Otherwise, it will be added to the end of the list.
321
363
 
322
364
  `Promise`\<`void`\>
323
365
 
324
- ##### Inherited from
325
-
326
- `BaseEpub.addCollection`
327
-
328
366
  #### addContributor()
329
367
 
330
368
  > **addContributor**(`contributor`, `index?`): `Promise`\<`void`\>
331
369
 
332
370
  Defined in:
333
- [epub/index.ts:1860](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1860)
371
+ [epub/index.ts:1836](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1836)
334
372
 
335
373
  Add a contributor to the EPUB metadata.
336
374
 
@@ -355,16 +393,12 @@ This is a convenience method for
355
393
 
356
394
  https://www.w3.org/TR/epub-33/#sec-opf-dccreator
357
395
 
358
- ##### Inherited from
359
-
360
- `BaseEpub.addContributor`
361
-
362
396
  #### addCreator()
363
397
 
364
398
  > **addCreator**(`creator`, `index?`, `type?`): `Promise`\<`void`\>
365
399
 
366
400
  Defined in:
367
- [epub/index.ts:1705](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1705)
401
+ [epub/index.ts:1681](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1681)
368
402
 
369
403
  Add a creator to the EPUB metadata.
370
404
 
@@ -387,10 +421,6 @@ creators. Otherwise, it will be added to the end of the list.
387
421
 
388
422
  https://www.w3.org/TR/epub-33/#sec-opf-dccreator
389
423
 
390
- ##### Inherited from
391
-
392
- `BaseEpub.addCreator`
393
-
394
424
  #### addManifestItem()
395
425
 
396
426
  ##### Call Signature
@@ -398,7 +428,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccreator
398
428
  > **addManifestItem**(`item`, `contents`, `encoding`): `Promise`\<`void`\>
399
429
 
400
430
  Defined in:
401
- [epub/index.ts:2196](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2196)
431
+ [epub/index.ts:2163](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2163)
402
432
 
403
433
  Create a new manifest item and write its contents to a new entry.
404
434
 
@@ -422,16 +452,12 @@ https://www.w3.org/TR/epub-33/#sec-pkg-manifest
422
452
 
423
453
  https://www.w3.org/TR/epub-33/#sec-contentdocs
424
454
 
425
- ###### Inherited from
426
-
427
- `BaseEpub.addManifestItem`
428
-
429
455
  ##### Call Signature
430
456
 
431
457
  > **addManifestItem**(`item`, `contents`, `encoding`): `Promise`\<`void`\>
432
458
 
433
459
  Defined in:
434
- [epub/index.ts:2201](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2201)
460
+ [epub/index.ts:2168](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2168)
435
461
 
436
462
  Create a new manifest item and write its contents to a new entry.
437
463
 
@@ -455,16 +481,12 @@ https://www.w3.org/TR/epub-33/#sec-pkg-manifest
455
481
 
456
482
  https://www.w3.org/TR/epub-33/#sec-contentdocs
457
483
 
458
- ###### Inherited from
459
-
460
- `BaseEpub.addManifestItem`
461
-
462
484
  ##### Call Signature
463
485
 
464
486
  > **addManifestItem**(`item`, `contents`): `Promise`\<`void`\>
465
487
 
466
488
  Defined in:
467
- [epub/index.ts:2206](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2206)
489
+ [epub/index.ts:2173](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2173)
468
490
 
469
491
  Create a new manifest item and write its contents to a new entry.
470
492
 
@@ -487,16 +509,12 @@ https://www.w3.org/TR/epub-33/#sec-pkg-manifest
487
509
 
488
510
  https://www.w3.org/TR/epub-33/#sec-contentdocs
489
511
 
490
- ###### Inherited from
491
-
492
- `BaseEpub.addManifestItem`
493
-
494
512
  #### addMetadata()
495
513
 
496
514
  > **addMetadata**(`entry`): `Promise`\<`void`\>
497
515
 
498
516
  Defined in:
499
- [epub/index.ts:2315](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2315)
517
+ [epub/index.ts:2285](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2285)
500
518
 
501
519
  Add a new metadata entry to the Epub.
502
520
 
@@ -518,16 +536,12 @@ useful semantic representations of metadata, use specific methods such as
518
536
 
519
537
  https://www.w3.org/TR/epub-33/#sec-pkg-metadata
520
538
 
521
- ##### Inherited from
522
-
523
- `BaseEpub.addMetadata`
524
-
525
539
  #### addSpineItem()
526
540
 
527
541
  > **addSpineItem**(`manifestId`, `index?`): `Promise`\<`void`\>
528
542
 
529
543
  Defined in:
530
- [epub/index.ts:1914](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1914)
544
+ [epub/index.ts:1890](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1890)
531
545
 
532
546
  Add an item to the spine of the EPUB.
533
547
 
@@ -552,16 +566,12 @@ throw an error.
552
566
 
553
567
  https://www.w3.org/TR/epub-33/#sec-spine-elem
554
568
 
555
- ##### Inherited from
556
-
557
- `BaseEpub.addSpineItem`
558
-
559
569
  #### addSubject()
560
570
 
561
571
  > **addSubject**(`subject`): `Promise`\<`void`\>
562
572
 
563
573
  Defined in:
564
- [epub/index.ts:1051](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1051)
574
+ [epub/index.ts:1027](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1027)
565
575
 
566
576
  Add a subject to the EPUB metadata.
567
577
 
@@ -579,28 +589,6 @@ Add a subject to the EPUB metadata.
579
589
 
580
590
  https://www.w3.org/TR/epub-33/#sec-opf-dcsubject
581
591
 
582
- ##### Inherited from
583
-
584
- `BaseEpub.addSubject`
585
-
586
- #### close()
587
-
588
- > **close**(): `Promise`\<`void`\>
589
-
590
- Defined in:
591
- [epub/index.ts:429](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L429)
592
-
593
- Close the Epub. Must be called before the Epub goes out of scope/is garbage
594
- collected.
595
-
596
- ##### Returns
597
-
598
- `Promise`\<`void`\>
599
-
600
- ##### Inherited from
601
-
602
- `BaseEpub.close`
603
-
604
592
  #### createXhtmlDocument()
605
593
 
606
594
  > **createXhtmlDocument**(`body`, `head?`, `language?`):
@@ -608,7 +596,7 @@ collected.
608
596
  > [`XmlElement`](#xmlelement)\<`"?xml"`\>)[]\>
609
597
 
610
598
  Defined in:
611
- [epub/index.ts:2019](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2019)
599
+ [epub/index.ts:1991](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1991)
612
600
 
613
601
  Create a new XHTML document with the given body and head.
614
602
 
@@ -625,16 +613,23 @@ Create a new XHTML document with the given body and head.
625
613
  `Promise`\<([`XmlElement`](#xmlelement)\<`"html"`\> \|
626
614
  [`XmlElement`](#xmlelement)\<`"?xml"`\>)[]\>
627
615
 
628
- ##### Inherited from
616
+ #### discardAndClose()
617
+
618
+ > **discardAndClose**(): `void`
619
+
620
+ Defined in:
621
+ [epub/index.ts:2394](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2394)
622
+
623
+ ##### Returns
629
624
 
630
- `BaseEpub.createXhtmlDocument`
625
+ `void`
631
626
 
632
627
  #### findAllMetadataItems()
633
628
 
634
629
  > **findAllMetadataItems**(`predicate`): `Promise`\<`object`[]\>
635
630
 
636
631
  Defined in:
637
- [epub/index.ts:804](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L804)
632
+ [epub/index.ts:750](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L750)
638
633
 
639
634
  Returns the item in the metadata element's children array that matches the
640
635
  provided predicate.
@@ -649,10 +644,6 @@ provided predicate.
649
644
 
650
645
  `Promise`\<`object`[]\>
651
646
 
652
- ##### Inherited from
653
-
654
- `BaseEpub.findAllMetadataItems`
655
-
656
647
  #### findMetadataItem()
657
648
 
658
649
  > **findMetadataItem**(`predicate`): `Promise`\<`null` \| \{ `id`: `undefined`
@@ -678,7 +669,7 @@ provided predicate.
678
669
  > \}\>
679
670
 
680
671
  Defined in:
681
- [epub/index.ts:795](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L795)
672
+ [epub/index.ts:741](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L741)
682
673
 
683
674
  Returns the item in the metadata element's children array that matches the
684
675
  provided predicate.
@@ -712,16 +703,12 @@ provided predicate.
712
703
  `` `Y${string}` `` \| `` `Z${string}` `` \| `` `?${string}` ``; `value`:
713
704
  `undefined` \| `string`; \}\>
714
705
 
715
- ##### Inherited from
716
-
717
- `BaseEpub.findMetadataItem`
718
-
719
706
  #### getCollections()
720
707
 
721
708
  > **getCollections**(): `Promise`\<[`Collection`](#collection)[]\>
722
709
 
723
710
  Defined in:
724
- [epub/index.ts:1478](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1478)
711
+ [epub/index.ts:1454](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1454)
725
712
 
726
713
  Retrieve the list of collections.
727
714
 
@@ -729,16 +716,12 @@ Retrieve the list of collections.
729
716
 
730
717
  `Promise`\<[`Collection`](#collection)[]\>
731
718
 
732
- ##### Inherited from
733
-
734
- `BaseEpub.getCollections`
735
-
736
719
  #### getContributors()
737
720
 
738
721
  > **getContributors**(): `Promise`\<[`DcCreator`](#dccreator)[]\>
739
722
 
740
723
  Defined in:
741
- [epub/index.ts:1692](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1692)
724
+ [epub/index.ts:1668](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1668)
742
725
 
743
726
  Retrieve the list of contributors.
744
727
 
@@ -752,16 +735,12 @@ This is a convenience method for `epub.getCreators('contributor')`.
752
735
 
753
736
  https://www.w3.org/TR/epub-33/#sec-opf-dccontributor
754
737
 
755
- ##### Inherited from
756
-
757
- `BaseEpub.getContributors`
758
-
759
738
  #### getCoverImage()
760
739
 
761
740
  > **getCoverImage**(): `Promise`\<`null` \| `Uint8Array`\<`ArrayBufferLike`\>\>
762
741
 
763
742
  Defined in:
764
- [epub/index.ts:954](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L954)
743
+ [epub/index.ts:930](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L930)
765
744
 
766
745
  Retrieve the cover image data as a byte array.
767
746
 
@@ -776,17 +755,13 @@ retrieve the image manifest item, use epub.getCoverImageItem().
776
755
 
777
756
  https://www.w3.org/TR/epub-33/#sec-cover-image
778
757
 
779
- ##### Inherited from
780
-
781
- `BaseEpub.getCoverImage`
782
-
783
758
  #### getCoverImageItem()
784
759
 
785
760
  > **getCoverImageItem**(): `Promise`\<`null` \|
786
761
  > [`ManifestItem`](#manifestitem)\>
787
762
 
788
763
  Defined in:
789
- [epub/index.ts:935](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L935)
764
+ [epub/index.ts:911](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L911)
790
765
 
791
766
  Retrieve the cover image manifest item.
792
767
 
@@ -801,16 +776,12 @@ this item's id to epub.readItemContents, or use epub.getCoverImage() instead.
801
776
 
802
777
  https://www.w3.org/TR/epub-33/#sec-cover-image
803
778
 
804
- ##### Inherited from
805
-
806
- `BaseEpub.getCoverImageItem`
807
-
808
779
  #### getCreators()
809
780
 
810
781
  > **getCreators**(`type`): `Promise`\<[`DcCreator`](#dccreator)[]\>
811
782
 
812
783
  Defined in:
813
- [epub/index.ts:1631](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1631)
784
+ [epub/index.ts:1607](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1607)
814
785
 
815
786
  Retrieve the list of creators.
816
787
 
@@ -828,16 +799,12 @@ Retrieve the list of creators.
828
799
 
829
800
  https://www.w3.org/TR/epub-33/#sec-opf-dccreator
830
801
 
831
- ##### Inherited from
832
-
833
- `BaseEpub.getCreators`
834
-
835
802
  #### getDescription()
836
803
 
837
804
  > **getDescription**(): `Promise`\<`null` \| `string`\>
838
805
 
839
806
  Defined in:
840
- [epub/index.ts:1329](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1329)
807
+ [epub/index.ts:1305](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1305)
841
808
 
842
809
  Retrieve the Epub's description as specified in its package document metadata.
843
810
 
@@ -848,16 +815,31 @@ as a string. Descriptions may include HTML markup.
848
815
 
849
816
  `Promise`\<`null` \| `string`\>
850
817
 
851
- ##### Inherited from
818
+ #### getIdentifier()
819
+
820
+ > **getIdentifier**(): `Promise`\<`null` \| `string`\>
821
+
822
+ Defined in:
823
+ [epub/index.ts:845](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L845)
824
+
825
+ Retrieve the identifier from the dc:identifier element in the EPUB metadata.
826
+
827
+ If there is no dc:identifier element, returns null.
828
+
829
+ ##### Returns
830
+
831
+ `Promise`\<`null` \| `string`\>
832
+
833
+ ##### Link
852
834
 
853
- `BaseEpub.getDescription`
835
+ https://www.w3.org/TR/epub-33/#sec-opf-dcidentifier
854
836
 
855
837
  #### getLanguage()
856
838
 
857
839
  > **getLanguage**(): `Promise`\<`null` \| `Locale`\>
858
840
 
859
841
  Defined in:
860
- [epub/index.ts:1170](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1170)
842
+ [epub/index.ts:1146](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1146)
861
843
 
862
844
  Retrieve the Epub's language as specified in its package document metadata.
863
845
 
@@ -872,17 +854,13 @@ Intl.Locale instance.
872
854
 
873
855
  https://www.w3.org/TR/epub-33/#sec-opf-dclanguage
874
856
 
875
- ##### Inherited from
876
-
877
- `BaseEpub.getLanguage`
878
-
879
857
  #### getManifest()
880
858
 
881
859
  > **getManifest**(): `Promise`\<`Record`\<`string`,
882
860
  > [`ManifestItem`](#manifestitem)\>\>
883
861
 
884
862
  Defined in:
885
- [epub/index.ts:720](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L720)
863
+ [epub/index.ts:666](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L666)
886
864
 
887
865
  Retrieve the manifest for the Epub.
888
866
 
@@ -897,16 +875,12 @@ properties.
897
875
 
898
876
  https://www.w3.org/TR/epub-33/#sec-pkg-manifest
899
877
 
900
- ##### Inherited from
901
-
902
- `BaseEpub.getManifest`
903
-
904
878
  #### getMetadata()
905
879
 
906
880
  > **getMetadata**(): `Promise`\<[`EpubMetadata`](#epubmetadata)\>
907
881
 
908
882
  Defined in:
909
- [epub/index.ts:871](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L871)
883
+ [epub/index.ts:817](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L817)
910
884
 
911
885
  Retrieve the metadata entries for the Epub.
912
886
 
@@ -924,17 +898,13 @@ as `getTitle()` and `getAuthors()`.
924
898
 
925
899
  https://www.w3.org/TR/epub-33/#sec-pkg-metadata
926
900
 
927
- ##### Inherited from
928
-
929
- `BaseEpub.getMetadata`
930
-
931
901
  #### getPackageVocabularyPrefixes()
932
902
 
933
903
  > **getPackageVocabularyPrefixes**(): `Promise`\<`Record`\<`string`,
934
904
  > `string`\>\>
935
905
 
936
906
  Defined in:
937
- [epub/index.ts:1346](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1346)
907
+ [epub/index.ts:1322](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1322)
938
908
 
939
909
  Return the set of custom vocabulary prefixes set on this publication's root
940
910
  package element.
@@ -949,16 +919,12 @@ Returns a map from prefix to URI
949
919
 
950
920
  https://www.w3.org/TR/epub-33/#sec-prefix-attr
951
921
 
952
- ##### Inherited from
953
-
954
- `BaseEpub.getPackageVocabularyPrefixes`
955
-
956
922
  #### getPublicationDate()
957
923
 
958
924
  > **getPublicationDate**(): `Promise`\<`null` \| `Date`\>
959
925
 
960
926
  Defined in:
961
- [epub/index.ts:991](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L991)
927
+ [epub/index.ts:967](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L967)
962
928
 
963
929
  Retrieve the publication date from the dc:date element in the EPUB metadata as a
964
930
  Date object.
@@ -973,16 +939,12 @@ If there is no dc:date element, returns null.
973
939
 
974
940
  https://www.w3.org/TR/epub-33/#sec-opf-dcdate
975
941
 
976
- ##### Inherited from
977
-
978
- `BaseEpub.getPublicationDate`
979
-
980
942
  #### getSpineItems()
981
943
 
982
944
  > **getSpineItems**(): `Promise`\<[`ManifestItem`](#manifestitem)[]\>
983
945
 
984
946
  Defined in:
985
- [epub/index.ts:1895](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1895)
947
+ [epub/index.ts:1871](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1871)
986
948
 
987
949
  Retrieve the manifest items that make up the Epub's spine.
988
950
 
@@ -997,16 +959,12 @@ to users by default.
997
959
 
998
960
  https://www.w3.org/TR/epub-33/#sec-spine-elem
999
961
 
1000
- ##### Inherited from
1001
-
1002
- `BaseEpub.getSpineItems`
1003
-
1004
962
  #### getSubjects()
1005
963
 
1006
964
  > **getSubjects**(): `Promise`\<(`string` \| [`DcSubject`](#dcsubject))[]\>
1007
965
 
1008
966
  Defined in:
1009
- [epub/index.ts:1125](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1125)
967
+ [epub/index.ts:1101](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1101)
1010
968
 
1011
969
  Retrieve the list of subjects for this EPUB.
1012
970
 
@@ -1022,16 +980,12 @@ authority, and term.
1022
980
 
1023
981
  https://www.w3.org/TR/epub-33/#sec-opf-dcsubject
1024
982
 
1025
- ##### Inherited from
1026
-
1027
- `BaseEpub.getSubjects`
1028
-
1029
983
  #### getSubtitle()
1030
984
 
1031
985
  > **getSubtitle**(): `Promise`\<`null` \| `string`\>
1032
986
 
1033
987
  Defined in:
1034
- [epub/index.ts:1236](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1236)
988
+ [epub/index.ts:1212](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1212)
1035
989
 
1036
990
  Retrieve the subtitle of the Epub, if it exists.
1037
991
 
@@ -1043,16 +997,12 @@ Retrieve the subtitle of the Epub, if it exists.
1043
997
 
1044
998
  https://www.w3.org/TR/epub-33/#sec-opf-dctitle
1045
999
 
1046
- ##### Inherited from
1047
-
1048
- `BaseEpub.getSubtitle`
1049
-
1050
1000
  #### getTitle()
1051
1001
 
1052
1002
  > **getTitle**(`expanded`): `Promise`\<`null` \| `string`\>
1053
1003
 
1054
1004
  Defined in:
1055
- [epub/index.ts:1212](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1212)
1005
+ [epub/index.ts:1188](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1188)
1056
1006
 
1057
1007
  Retrieve the title of the Epub.
1058
1008
 
@@ -1070,16 +1020,12 @@ Retrieve the title of the Epub.
1070
1020
 
1071
1021
  https://www.w3.org/TR/epub-33/#sec-opf-dctitle
1072
1022
 
1073
- ##### Inherited from
1074
-
1075
- `BaseEpub.getTitle`
1076
-
1077
1023
  #### getTitles()
1078
1024
 
1079
1025
  > **getTitles**(): `Promise`\<`object`[]\>
1080
1026
 
1081
1027
  Defined in:
1082
- [epub/index.ts:1248](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1248)
1028
+ [epub/index.ts:1224](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1224)
1083
1029
 
1084
1030
  Retrieve all title entries of the Epub.
1085
1031
 
@@ -1091,16 +1037,12 @@ Retrieve all title entries of the Epub.
1091
1037
 
1092
1038
  https://www.w3.org/TR/epub-33/#sec-opf-dctitle
1093
1039
 
1094
- ##### Inherited from
1095
-
1096
- `BaseEpub.getTitles`
1097
-
1098
1040
  #### getType()
1099
1041
 
1100
1042
  > **getType**(): `Promise`\<`null` \| [`MetadataEntry`](#metadataentry)\>
1101
1043
 
1102
1044
  Defined in:
1103
- [epub/index.ts:1038](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1038)
1045
+ [epub/index.ts:1014](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1014)
1104
1046
 
1105
1047
  Retrieve the publication type from the dc:type element in the EPUB metadata.
1106
1048
 
@@ -1114,10 +1056,6 @@ If there is no dc:type element, returns null.
1114
1056
 
1115
1057
  https://www.w3.org/TR/epub-33/#sec-opf-dctype
1116
1058
 
1117
- ##### Inherited from
1118
-
1119
- `BaseEpub.getType`
1120
-
1121
1059
  #### readItemContents()
1122
1060
 
1123
1061
  ##### Call Signature
@@ -1125,7 +1063,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dctype
1125
1063
  > **readItemContents**(`id`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\>
1126
1064
 
1127
1065
  Defined in:
1128
- [epub/index.ts:1991](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1991)
1066
+ [epub/index.ts:1963](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1963)
1129
1067
 
1130
1068
  Retrieve the contents of a manifest item, given its id.
1131
1069
 
@@ -1143,16 +1081,12 @@ Retrieve the contents of a manifest item, given its id.
1143
1081
 
1144
1082
  https://www.w3.org/TR/epub-33/#sec-contentdocs
1145
1083
 
1146
- ###### Inherited from
1147
-
1148
- `BaseEpub.readItemContents`
1149
-
1150
1084
  ##### Call Signature
1151
1085
 
1152
1086
  > **readItemContents**(`id`, `encoding`): `Promise`\<`string`\>
1153
1087
 
1154
1088
  Defined in:
1155
- [epub/index.ts:1992](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1992)
1089
+ [epub/index.ts:1964](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1964)
1156
1090
 
1157
1091
  Retrieve the contents of a manifest item, given its id.
1158
1092
 
@@ -1171,10 +1105,6 @@ Retrieve the contents of a manifest item, given its id.
1171
1105
 
1172
1106
  https://www.w3.org/TR/epub-33/#sec-contentdocs
1173
1107
 
1174
- ###### Inherited from
1175
-
1176
- `BaseEpub.readItemContents`
1177
-
1178
1108
  #### readXhtmlItemContents()
1179
1109
 
1180
1110
  ##### Call Signature
@@ -1182,7 +1112,7 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
1182
1112
  > **readXhtmlItemContents**(`id`, `as?`): `Promise`\<[`ParsedXml`](#parsedxml)\>
1183
1113
 
1184
1114
  Defined in:
1185
- [epub/index.ts:2052](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2052)
1115
+ [epub/index.ts:2024](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2024)
1186
1116
 
1187
1117
  Retrieves the contents of an XHTML item, given its manifest id.
1188
1118
 
@@ -1201,16 +1131,12 @@ Retrieves the contents of an XHTML item, given its manifest id.
1201
1131
 
1202
1132
  https://www.w3.org/TR/epub-33/#sec-xhtml
1203
1133
 
1204
- ###### Inherited from
1205
-
1206
- `BaseEpub.readXhtmlItemContents`
1207
-
1208
1134
  ##### Call Signature
1209
1135
 
1210
1136
  > **readXhtmlItemContents**(`id`, `as`): `Promise`\<`string`\>
1211
1137
 
1212
1138
  Defined in:
1213
- [epub/index.ts:2053](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2053)
1139
+ [epub/index.ts:2025](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2025)
1214
1140
 
1215
1141
  Retrieves the contents of an XHTML item, given its manifest id.
1216
1142
 
@@ -1229,16 +1155,12 @@ Retrieves the contents of an XHTML item, given its manifest id.
1229
1155
 
1230
1156
  https://www.w3.org/TR/epub-33/#sec-xhtml
1231
1157
 
1232
- ###### Inherited from
1233
-
1234
- `BaseEpub.readXhtmlItemContents`
1235
-
1236
1158
  #### removeCollection()
1237
1159
 
1238
1160
  > **removeCollection**(`index`): `Promise`\<`void`\>
1239
1161
 
1240
1162
  Defined in:
1241
- [epub/index.ts:1587](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1587)
1163
+ [epub/index.ts:1563](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1563)
1242
1164
 
1243
1165
  Remove a collection from the EPUB metadata.
1244
1166
 
@@ -1255,16 +1177,12 @@ returned by `epub.getCollections()`.
1255
1177
 
1256
1178
  `Promise`\<`void`\>
1257
1179
 
1258
- ##### Inherited from
1259
-
1260
- `BaseEpub.removeCollection`
1261
-
1262
1180
  #### removeContributor()
1263
1181
 
1264
1182
  > **removeContributor**(`index`): `Promise`\<`void`\>
1265
1183
 
1266
1184
  Defined in:
1267
- [epub/index.ts:1844](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1844)
1185
+ [epub/index.ts:1820](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1820)
1268
1186
 
1269
1187
  Remove a contributor from the EPUB metadata.
1270
1188
 
@@ -1287,16 +1205,12 @@ This is a convenience method for `epub.removeCreator(index, 'contributor')`.
1287
1205
 
1288
1206
  https://www.w3.org/TR/epub-33/#sec-opf-dccreator
1289
1207
 
1290
- ##### Inherited from
1291
-
1292
- `BaseEpub.removeContributor`
1293
-
1294
1208
  #### removeCreator()
1295
1209
 
1296
1210
  > **removeCreator**(`index`, `type`): `Promise`\<`void`\>
1297
1211
 
1298
1212
  Defined in:
1299
- [epub/index.ts:1792](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1792)
1213
+ [epub/index.ts:1768](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1768)
1300
1214
 
1301
1215
  Remove a creator from the EPUB metadata.
1302
1216
 
@@ -1318,16 +1232,12 @@ returned by `epub.getCreators()`.
1318
1232
 
1319
1233
  https://www.w3.org/TR/epub-33/#sec-opf-dccreator
1320
1234
 
1321
- ##### Inherited from
1322
-
1323
- `BaseEpub.removeCreator`
1324
-
1325
1235
  #### removeManifestItem()
1326
1236
 
1327
1237
  > **removeManifestItem**(`id`): `Promise`\<`void`\>
1328
1238
 
1329
1239
  Defined in:
1330
- [epub/index.ts:2153](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2153)
1240
+ [epub/index.ts:2120](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2120)
1331
1241
 
1332
1242
  ##### Parameters
1333
1243
 
@@ -1339,16 +1249,12 @@ Defined in:
1339
1249
 
1340
1250
  `Promise`\<`void`\>
1341
1251
 
1342
- ##### Inherited from
1343
-
1344
- `BaseEpub.removeManifestItem`
1345
-
1346
1252
  #### removeMetadata()
1347
1253
 
1348
1254
  > **removeMetadata**(`predicate`): `Promise`\<`void`\>
1349
1255
 
1350
1256
  Defined in:
1351
- [epub/index.ts:2399](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2399)
1257
+ [epub/index.ts:2369](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2369)
1352
1258
 
1353
1259
  Remove one or more metadata entries.
1354
1260
 
@@ -1369,16 +1275,12 @@ all metadata entries that match the predicate will be removed.
1369
1275
 
1370
1276
  https://www.w3.org/TR/epub-33/#sec-pkg-metadata
1371
1277
 
1372
- ##### Inherited from
1373
-
1374
- `BaseEpub.removeMetadata`
1375
-
1376
1278
  #### removeSpineItem()
1377
1279
 
1378
1280
  > **removeSpineItem**(`index`): `Promise`\<`void`\>
1379
1281
 
1380
1282
  Defined in:
1381
- [epub/index.ts:1950](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1950)
1283
+ [epub/index.ts:1926](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1926)
1382
1284
 
1383
1285
  Remove the spine item at the specified index.
1384
1286
 
@@ -1396,16 +1298,12 @@ Remove the spine item at the specified index.
1396
1298
 
1397
1299
  https://www.w3.org/TR/epub-33/#sec-spine-elem
1398
1300
 
1399
- ##### Inherited from
1400
-
1401
- `BaseEpub.removeSpineItem`
1402
-
1403
1301
  #### removeSubject()
1404
1302
 
1405
1303
  > **removeSubject**(`index`): `Promise`\<`void`\>
1406
1304
 
1407
1305
  Defined in:
1408
- [epub/index.ts:1088](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1088)
1306
+ [epub/index.ts:1064](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1064)
1409
1307
 
1410
1308
  Remove a subject from the EPUB metadata.
1411
1309
 
@@ -1426,16 +1324,12 @@ returned by `epub.getSubjects()`.
1426
1324
 
1427
1325
  https://www.w3.org/TR/epub-33/#sec-opf-dccreator
1428
1326
 
1429
- ##### Inherited from
1430
-
1431
- `BaseEpub.removeSubject`
1432
-
1433
1327
  #### replaceMetadata()
1434
1328
 
1435
1329
  > **replaceMetadata**(`predicate`, `entry`): `Promise`\<`void`\>
1436
1330
 
1437
1331
  Defined in:
1438
- [epub/index.ts:2354](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2354)
1332
+ [epub/index.ts:2324](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2324)
1439
1333
 
1440
1334
  Replace a metadata entry with a new one.
1441
1335
 
@@ -1457,16 +1351,28 @@ first metadata entry that matches the predicate will be replaced.
1457
1351
 
1458
1352
  https://www.w3.org/TR/epub-33/#sec-pkg-metadata
1459
1353
 
1460
- ##### Inherited from
1354
+ #### saveAndClose()
1461
1355
 
1462
- `BaseEpub.replaceMetadata`
1356
+ > **saveAndClose**(): `Promise`\<`void`\>
1357
+
1358
+ Defined in:
1359
+ [epub/index.ts:2411](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2411)
1360
+
1361
+ Write the current contents of the Epub to a new EPUB archive on disk.
1362
+
1363
+ When this method is called, the "dcterms:modified" meta tag is automatically
1364
+ updated to the current UTC timestamp.
1365
+
1366
+ ##### Returns
1367
+
1368
+ `Promise`\<`void`\>
1463
1369
 
1464
1370
  #### setCoverImage()
1465
1371
 
1466
1372
  > **setCoverImage**(`href`, `data`): `Promise`\<`void`\>
1467
1373
 
1468
1374
  Defined in:
1469
- [epub/index.ts:968](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L968)
1375
+ [epub/index.ts:944](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L944)
1470
1376
 
1471
1377
  Set the cover image for the EPUB.
1472
1378
 
@@ -1484,16 +1390,12 @@ then writes the provided image data to the provided href within the publication.
1484
1390
 
1485
1391
  `Promise`\<`void`\>
1486
1392
 
1487
- ##### Inherited from
1488
-
1489
- `BaseEpub.setCoverImage`
1490
-
1491
1393
  #### setDescription()
1492
1394
 
1493
1395
  > **setDescription**(`description`): `Promise`\<`void`\>
1494
1396
 
1495
1397
  Defined in:
1496
- [epub/index.ts:1313](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1313)
1398
+ [epub/index.ts:1289](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1289)
1497
1399
 
1498
1400
  Update the Epub's description metadata entry.
1499
1401
 
@@ -1511,16 +1413,38 @@ encoded as HTML entities.
1511
1413
 
1512
1414
  `Promise`\<`void`\>
1513
1415
 
1514
- ##### Inherited from
1416
+ #### setIdentifier()
1417
+
1418
+ > **setIdentifier**(`identifier`): `Promise`\<`void`\>
1419
+
1420
+ Defined in:
1421
+ [epub/index.ts:859](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L859)
1422
+
1423
+ Set the dc:identifier metadata element with the provided string.
1424
+
1425
+ Updates the existing dc:identifier element if one exists. Otherwise creates a
1426
+ new element
1427
+
1428
+ ##### Parameters
1429
+
1430
+ | Parameter | Type |
1431
+ | ------------ | -------- |
1432
+ | `identifier` | `string` |
1433
+
1434
+ ##### Returns
1435
+
1436
+ `Promise`\<`void`\>
1437
+
1438
+ ##### Link
1515
1439
 
1516
- `BaseEpub.setDescription`
1440
+ https://www.w3.org/TR/epub-33/#sec-opf-dcidentifier
1517
1441
 
1518
1442
  #### setLanguage()
1519
1443
 
1520
1444
  > **setLanguage**(`locale`): `Promise`\<`void`\>
1521
1445
 
1522
1446
  Defined in:
1523
- [epub/index.ts:1195](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1195)
1447
+ [epub/index.ts:1171](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1171)
1524
1448
 
1525
1449
  Update the Epub's language metadata entry.
1526
1450
 
@@ -1541,16 +1465,12 @@ element
1541
1465
 
1542
1466
  https://www.w3.org/TR/epub-33/#sec-opf-dclanguage
1543
1467
 
1544
- ##### Inherited from
1545
-
1546
- `BaseEpub.setLanguage`
1547
-
1548
1468
  #### setPackageVocabularyPrefix()
1549
1469
 
1550
1470
  > **setPackageVocabularyPrefix**(`prefix`, `uri`): `Promise`\<`void`\>
1551
1471
 
1552
1472
  Defined in:
1553
- [epub/index.ts:1364](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1364)
1473
+ [epub/index.ts:1340](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1340)
1554
1474
 
1555
1475
  Set a custom vocabulary prefix on the root package element.
1556
1476
 
@@ -1569,16 +1489,12 @@ Set a custom vocabulary prefix on the root package element.
1569
1489
 
1570
1490
  https://www.w3.org/TR/epub-33/#sec-prefix-attr
1571
1491
 
1572
- ##### Inherited from
1573
-
1574
- `BaseEpub.setPackageVocabularyPrefix`
1575
-
1576
1492
  #### setPublicationDate()
1577
1493
 
1578
1494
  > **setPublicationDate**(`date`): `Promise`\<`void`\>
1579
1495
 
1580
1496
  Defined in:
1581
- [epub/index.ts:1006](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1006)
1497
+ [epub/index.ts:982](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L982)
1582
1498
 
1583
1499
  Set the dc:date metadata element with the provided date.
1584
1500
 
@@ -1599,16 +1515,12 @@ element
1599
1515
 
1600
1516
  https://www.w3.org/TR/epub-33/#sec-opf-dcdate
1601
1517
 
1602
- ##### Inherited from
1603
-
1604
- `BaseEpub.setPublicationDate`
1605
-
1606
1518
  #### setTitle()
1607
1519
 
1608
1520
  > **setTitle**(`title`): `Promise`\<`void`\>
1609
1521
 
1610
1522
  Defined in:
1611
- [epub/index.ts:1388](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1388)
1523
+ [epub/index.ts:1364](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1364)
1612
1524
 
1613
1525
  Set the title of the Epub.
1614
1526
 
@@ -1631,16 +1543,12 @@ To set specific titles and their types, use epub.setTitles().
1631
1543
 
1632
1544
  https://www.w3.org/TR/epub-33/#sec-opf-dctitle
1633
1545
 
1634
- ##### Inherited from
1635
-
1636
- `BaseEpub.setTitle`
1637
-
1638
1546
  #### setTitles()
1639
1547
 
1640
1548
  > **setTitles**(`entries`): `Promise`\<`void`\>
1641
1549
 
1642
1550
  Defined in:
1643
- [epub/index.ts:1416](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1416)
1551
+ [epub/index.ts:1392](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1392)
1644
1552
 
1645
1553
  ##### Parameters
1646
1554
 
@@ -1652,16 +1560,12 @@ Defined in:
1652
1560
 
1653
1561
  `Promise`\<`void`\>
1654
1562
 
1655
- ##### Inherited from
1656
-
1657
- `BaseEpub.setTitles`
1658
-
1659
1563
  #### setType()
1660
1564
 
1661
1565
  > **setType**(`type`): `Promise`\<`void`\>
1662
1566
 
1663
1567
  Defined in:
1664
- [epub/index.ts:1022](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1022)
1568
+ [epub/index.ts:998](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L998)
1665
1569
 
1666
1570
  Set the dc:type metadata element.
1667
1571
 
@@ -1682,16 +1586,12 @@ element.
1682
1586
 
1683
1587
  https://www.w3.org/TR/epub-33/#sec-opf-dctype
1684
1588
 
1685
- ##### Inherited from
1686
-
1687
- `BaseEpub.setType`
1688
-
1689
1589
  #### updateManifestItem()
1690
1590
 
1691
1591
  > **updateManifestItem**(`id`, `newItem`): `Promise`\<`void`\>
1692
1592
 
1693
1593
  Defined in:
1694
- [epub/index.ts:2266](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2266)
1594
+ [epub/index.ts:2236](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2236)
1695
1595
 
1696
1596
  Update the manifest entry for an existing item.
1697
1597
 
@@ -1713,10 +1613,6 @@ To update the contents of an entry, use `epub.writeItemContents()` or
1713
1613
 
1714
1614
  https://www.w3.org/TR/epub-33/#sec-pkg-manifest
1715
1615
 
1716
- ##### Inherited from
1717
-
1718
- `BaseEpub.updateManifestItem`
1719
-
1720
1616
  #### writeItemContents()
1721
1617
 
1722
1618
  ##### Call Signature
@@ -1724,7 +1620,7 @@ https://www.w3.org/TR/epub-33/#sec-pkg-manifest
1724
1620
  > **writeItemContents**(`id`, `contents`): `Promise`\<`void`\>
1725
1621
 
1726
1622
  Defined in:
1727
- [epub/index.ts:2105](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2105)
1623
+ [epub/index.ts:2072](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2072)
1728
1624
 
1729
1625
  Write new contents for an existing manifest item, specified by its id.
1730
1626
 
@@ -1746,16 +1642,12 @@ The id must reference an existing manifest item. If creating a new item, use
1746
1642
 
1747
1643
  https://www.w3.org/TR/epub-33/#sec-contentdocs
1748
1644
 
1749
- ###### Inherited from
1750
-
1751
- `BaseEpub.writeItemContents`
1752
-
1753
1645
  ##### Call Signature
1754
1646
 
1755
1647
  > **writeItemContents**(`id`, `contents`, `encoding`): `Promise`\<`void`\>
1756
1648
 
1757
1649
  Defined in:
1758
- [epub/index.ts:2106](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2106)
1650
+ [epub/index.ts:2073](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2073)
1759
1651
 
1760
1652
  Write new contents for an existing manifest item, specified by its id.
1761
1653
 
@@ -1778,64 +1670,12 @@ The id must reference an existing manifest item. If creating a new item, use
1778
1670
 
1779
1671
  https://www.w3.org/TR/epub-33/#sec-contentdocs
1780
1672
 
1781
- ###### Inherited from
1782
-
1783
- `BaseEpub.writeItemContents`
1784
-
1785
- #### writeToArray()
1786
-
1787
- > **writeToArray**(): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\>
1788
-
1789
- Defined in:
1790
- [epub/index.ts:2436](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2436)
1791
-
1792
- Write the current contents of the Epub to a new Uint8Array.
1793
-
1794
- This _does not_ close the Epub. It can continue to be modified after it has been
1795
- written to disk. Use `epub.close()` to close the Epub.
1796
-
1797
- When this method is called, the "dcterms:modified" meta tag is automatically
1798
- updated to the current UTC timestamp.
1799
-
1800
- ##### Returns
1801
-
1802
- `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\>
1803
-
1804
- ##### Inherited from
1805
-
1806
- `BaseEpub.writeToArray`
1807
-
1808
- #### writeToFile()
1809
-
1810
- > **writeToFile**(`path`): `Promise`\<`void`\>
1811
-
1812
- Defined in:
1813
- [epub/node.ts:56](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/node.ts#L56)
1814
-
1815
- Write the current contents of the Epub to a new EPUB archive on disk.
1816
-
1817
- This _does not_ close the Epub. It can continue to be modified after it has been
1818
- written to disk. Use `epub.close()` to close the Epub.
1819
-
1820
- When this method is called, the "dcterms:modified" meta tag is automatically
1821
- updated to the current UTC timestamp.
1822
-
1823
- ##### Parameters
1824
-
1825
- | Parameter | Type | Description |
1826
- | --------- | -------- | ------------------------------------------------------------------------------------------------------------------------------- |
1827
- | `path` | `string` | The file path to write the new archive to. The parent directory does not need te exist -- the path will be recursively created. |
1828
-
1829
- ##### Returns
1830
-
1831
- `Promise`\<`void`\>
1832
-
1833
1673
  #### writeXhtmlItemContents()
1834
1674
 
1835
1675
  > **writeXhtmlItemContents**(`id`, `contents`): `Promise`\<`void`\>
1836
1676
 
1837
1677
  Defined in:
1838
- [epub/index.ts:2145](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2145)
1678
+ [epub/index.ts:2112](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2112)
1839
1679
 
1840
1680
  Write new contents for an existing XHTML item, specified by its id.
1841
1681
 
@@ -1857,16 +1697,12 @@ The id must reference an existing manifest item. If creating a new item, use
1857
1697
 
1858
1698
  https://www.w3.org/TR/epub-33/#sec-xhtml
1859
1699
 
1860
- ##### Inherited from
1861
-
1862
- `BaseEpub.writeXhtmlItemContents`
1863
-
1864
1700
  #### addLinkToXhtmlHead()
1865
1701
 
1866
1702
  > `static` **addLinkToXhtmlHead**(`xml`, `link`): `void`
1867
1703
 
1868
1704
  Defined in:
1869
- [epub/index.ts:271](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L271)
1705
+ [epub/index.ts:234](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L234)
1870
1706
 
1871
1707
  Given an XML structure representing a complete XHTML document, add a `link`
1872
1708
  element to the `head` of the document.
@@ -1887,40 +1723,35 @@ This method modifies the provided XML structure.
1887
1723
 
1888
1724
  `void`
1889
1725
 
1890
- ##### Inherited from
1891
-
1892
- `BaseEpub.addLinkToXhtmlHead`
1893
-
1894
1726
  #### create()
1895
1727
 
1896
- > `static` **create**(...`args`): `Promise`\<[`Epub`](#epub)\>
1728
+ > `static` **create**(`path`, `__namedParameters`, `additionalMetadata`):
1729
+ > `Promise`\<[`Epub`](#epub)\>
1897
1730
 
1898
1731
  Defined in:
1899
- [epub/node.ts:25](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/node.ts#L25)
1732
+ [epub/index.ts:389](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L389)
1900
1733
 
1901
1734
  Construct an Epub instance, optionally beginning with the provided metadata.
1902
1735
 
1903
1736
  ##### Parameters
1904
1737
 
1905
- | Parameter | Type |
1906
- | --------- | ---------------------------------------------------------------- |
1907
- | ...`args` | \[[`DublinCore`](#dublincore), [`EpubMetadata`](#epubmetadata)\] |
1738
+ | Parameter | Type | Default value | Description |
1739
+ | -------------------- | ------------------------------- | ------------- | --------------------------------------- |
1740
+ | `path` | `string` | `undefined` | - |
1741
+ | `__namedParameters` | [`DublinCore`](#dublincore) | `undefined` | - |
1742
+ | `additionalMetadata` | [`EpubMetadata`](#epubmetadata) | `[]` | An array of additional metadata entries |
1908
1743
 
1909
1744
  ##### Returns
1910
1745
 
1911
1746
  `Promise`\<[`Epub`](#epub)\>
1912
1747
 
1913
- ##### Overrides
1914
-
1915
- `BaseEpub.create`
1916
-
1917
1748
  #### createXmlElement()
1918
1749
 
1919
1750
  > `static` **createXmlElement**\<`Name`\>(`name`, `properties`, `children`):
1920
1751
  > [`XmlElement`](#xmlelement)\<`Name`\>
1921
1752
 
1922
1753
  Defined in:
1923
- [epub/index.ts:306](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L306)
1754
+ [epub/index.ts:269](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L269)
1924
1755
 
1925
1756
  ##### Type Parameters
1926
1757
 
@@ -1940,16 +1771,12 @@ Defined in:
1940
1771
 
1941
1772
  [`XmlElement`](#xmlelement)\<`Name`\>
1942
1773
 
1943
- ##### Inherited from
1944
-
1945
- `BaseEpub.createXmlElement`
1946
-
1947
1774
  #### createXmlTextNode()
1948
1775
 
1949
1776
  > `static` **createXmlTextNode**(`text`): [`XmlTextNode`](#xmltextnode)
1950
1777
 
1951
1778
  Defined in:
1952
- [epub/index.ts:319](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L319)
1779
+ [epub/index.ts:282](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L282)
1953
1780
 
1954
1781
  ##### Parameters
1955
1782
 
@@ -1961,17 +1788,13 @@ Defined in:
1961
1788
 
1962
1789
  [`XmlTextNode`](#xmltextnode)
1963
1790
 
1964
- ##### Inherited from
1965
-
1966
- `BaseEpub.createXmlTextNode`
1967
-
1968
1791
  #### findXmlChildByName()
1969
1792
 
1970
1793
  > `static` **findXmlChildByName**\<`Name`\>(`name`, `xml`, `filter?`):
1971
1794
  > `undefined` \| [`XmlElement`](#xmlelement)\<`Name`\>
1972
1795
 
1973
1796
  Defined in:
1974
- [epub/index.ts:380](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L380)
1797
+ [epub/index.ts:343](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L343)
1975
1798
 
1976
1799
  Given an XML structure, find the first child matching the provided name and
1977
1800
  optional filter.
@@ -1994,16 +1817,12 @@ optional filter.
1994
1817
 
1995
1818
  `undefined` \| [`XmlElement`](#xmlelement)\<`Name`\>
1996
1819
 
1997
- ##### Inherited from
1998
-
1999
- `BaseEpub.findXmlChildByName`
2000
-
2001
1820
  #### formatSmilDuration()
2002
1821
 
2003
1822
  > `static` **formatSmilDuration**(`duration`): `string`
2004
1823
 
2005
1824
  Defined in:
2006
- [epub/index.ts:254](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L254)
1825
+ [epub/index.ts:217](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L217)
2007
1826
 
2008
1827
  Format a duration, provided as a number of seconds, as a SMIL clock value, to be
2009
1828
  used for Media Overlays.
@@ -2022,39 +1841,31 @@ used for Media Overlays.
2022
1841
 
2023
1842
  https://www.w3.org/TR/epub-33/#sec-duration
2024
1843
 
2025
- ##### Inherited from
2026
-
2027
- `BaseEpub.formatSmilDuration`
2028
-
2029
1844
  #### from()
2030
1845
 
2031
- > `static` **from**(...`args`): `Promise`\<[`Epub`](#epub)\>
1846
+ > `static` **from**(`pathOrData`): `Promise`\<[`Epub`](#epub)\>
2032
1847
 
2033
1848
  Defined in:
2034
- [epub/node.ts:31](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/node.ts#L31)
1849
+ [epub/index.ts:480](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L480)
2035
1850
 
2036
1851
  Construct an Epub instance by reading an existing EPUB publication.
2037
1852
 
2038
1853
  ##### Parameters
2039
1854
 
2040
- | Parameter | Type |
2041
- | --------- | ------------------------------------------------- |
2042
- | ...`args` | \[`string` \| `Uint8Array`\<`ArrayBufferLike`\>\] |
1855
+ | Parameter | Type | Description |
1856
+ | ------------ | --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
1857
+ | `pathOrData` | `string` \| `Uint8Array`\<`ArrayBufferLike`\> | Must be either a string representing the path to an EPUB file on disk, or a Uint8Array representing the data of the EPUB publication. |
2043
1858
 
2044
1859
  ##### Returns
2045
1860
 
2046
1861
  `Promise`\<[`Epub`](#epub)\>
2047
1862
 
2048
- ##### Overrides
2049
-
2050
- `BaseEpub.from`
2051
-
2052
1863
  #### getXhtmlBody()
2053
1864
 
2054
1865
  > `static` **getXhtmlBody**(`xml`): [`ParsedXml`](#parsedxml)
2055
1866
 
2056
1867
  Defined in:
2057
- [epub/index.ts:296](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L296)
1868
+ [epub/index.ts:259](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L259)
2058
1869
 
2059
1870
  Given an XML structure representing a complete XHTML document, return the
2060
1871
  sub-structure representing the children of the document's body element.
@@ -2069,16 +1880,12 @@ sub-structure representing the children of the document's body element.
2069
1880
 
2070
1881
  [`ParsedXml`](#parsedxml)
2071
1882
 
2072
- ##### Inherited from
2073
-
2074
- `BaseEpub.getXhtmlBody`
2075
-
2076
1883
  #### getXhtmlTextContent()
2077
1884
 
2078
1885
  > `static` **getXhtmlTextContent**(`xml`): `string`
2079
1886
 
2080
1887
  Defined in:
2081
- [epub/index.ts:328](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L328)
1888
+ [epub/index.ts:291](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L291)
2082
1889
 
2083
1890
  Given an XML structure representing a complete XHTML document, return a string
2084
1891
  representing the concatenation of all text nodes in the document.
@@ -2093,16 +1900,12 @@ representing the concatenation of all text nodes in the document.
2093
1900
 
2094
1901
  `string`
2095
1902
 
2096
- ##### Inherited from
2097
-
2098
- `BaseEpub.getXhtmlTextContent`
2099
-
2100
1903
  #### getXmlChildren()
2101
1904
 
2102
1905
  > `static` **getXmlChildren**\<`Name`\>(`element`): [`ParsedXml`](#parsedxml)
2103
1906
 
2104
1907
  Defined in:
2105
- [epub/index.ts:360](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L360)
1908
+ [epub/index.ts:323](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L323)
2106
1909
 
2107
1910
  Given an XMLElement, return a list of its children
2108
1911
 
@@ -2122,16 +1925,12 @@ Given an XMLElement, return a list of its children
2122
1925
 
2123
1926
  [`ParsedXml`](#parsedxml)
2124
1927
 
2125
- ##### Inherited from
2126
-
2127
- `BaseEpub.getXmlChildren`
2128
-
2129
1928
  #### getXmlElementName()
2130
1929
 
2131
1930
  > `static` **getXmlElementName**\<`Name`\>(`element`): `Name`
2132
1931
 
2133
1932
  Defined in:
2134
- [epub/index.ts:345](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L345)
1933
+ [epub/index.ts:308](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L308)
2135
1934
 
2136
1935
  Given an XMLElement, return its tag name.
2137
1936
 
@@ -2151,16 +1950,12 @@ Given an XMLElement, return its tag name.
2151
1950
 
2152
1951
  `Name`
2153
1952
 
2154
- ##### Inherited from
2155
-
2156
- `BaseEpub.getXmlElementName`
2157
-
2158
1953
  #### isXmlTextNode()
2159
1954
 
2160
1955
  > `static` **isXmlTextNode**(`node`): `node is XmlTextNode`
2161
1956
 
2162
1957
  Defined in:
2163
- [epub/index.ts:393](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L393)
1958
+ [epub/index.ts:356](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L356)
2164
1959
 
2165
1960
  Given an XMLNode, determine whether it represents a text node or an XML element.
2166
1961
 
@@ -2174,16 +1969,12 @@ Given an XMLNode, determine whether it represents a text node or an XML element.
2174
1969
 
2175
1970
  `node is XmlTextNode`
2176
1971
 
2177
- ##### Inherited from
2178
-
2179
- `BaseEpub.isXmlTextNode`
2180
-
2181
1972
  #### replaceXmlChildren()
2182
1973
 
2183
1974
  > `static` **replaceXmlChildren**\<`Name`\>(`element`, `children`): `void`
2184
1975
 
2185
1976
  Defined in:
2186
- [epub/index.ts:368](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L368)
1977
+ [epub/index.ts:331](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L331)
2187
1978
 
2188
1979
  ##### Type Parameters
2189
1980
 
@@ -2202,16 +1993,12 @@ Defined in:
2202
1993
 
2203
1994
  `void`
2204
1995
 
2205
- ##### Inherited from
2206
-
2207
- `BaseEpub.replaceXmlChildren`
2208
-
2209
1996
  ---
2210
1997
 
2211
1998
  ## AlternateScript
2212
1999
 
2213
2000
  Defined in:
2214
- [epub/index.ts:142](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L142)
2001
+ [epub/index.ts:105](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L105)
2215
2002
 
2216
2003
  ### Properties
2217
2004
 
@@ -2220,21 +2007,21 @@ Defined in:
2220
2007
  > **locale**: `Locale`
2221
2008
 
2222
2009
  Defined in:
2223
- [epub/index.ts:144](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L144)
2010
+ [epub/index.ts:107](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L107)
2224
2011
 
2225
2012
  #### name
2226
2013
 
2227
2014
  > **name**: `string`
2228
2015
 
2229
2016
  Defined in:
2230
- [epub/index.ts:143](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L143)
2017
+ [epub/index.ts:106](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L106)
2231
2018
 
2232
2019
  ---
2233
2020
 
2234
2021
  ## Collection
2235
2022
 
2236
2023
  Defined in:
2237
- [epub/index.ts:166](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L166)
2024
+ [epub/index.ts:129](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L129)
2238
2025
 
2239
2026
  ### Properties
2240
2027
 
@@ -2243,28 +2030,28 @@ Defined in:
2243
2030
  > **name**: `string`
2244
2031
 
2245
2032
  Defined in:
2246
- [epub/index.ts:167](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L167)
2033
+ [epub/index.ts:130](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L130)
2247
2034
 
2248
2035
  #### position?
2249
2036
 
2250
2037
  > `optional` **position**: `string`
2251
2038
 
2252
2039
  Defined in:
2253
- [epub/index.ts:169](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L169)
2040
+ [epub/index.ts:132](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L132)
2254
2041
 
2255
2042
  #### type?
2256
2043
 
2257
2044
  > `optional` **type**: `string`
2258
2045
 
2259
2046
  Defined in:
2260
- [epub/index.ts:168](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L168)
2047
+ [epub/index.ts:131](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L131)
2261
2048
 
2262
2049
  ---
2263
2050
 
2264
2051
  ## DcCreator
2265
2052
 
2266
2053
  Defined in:
2267
- [epub/index.ts:147](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L147)
2054
+ [epub/index.ts:110](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L110)
2268
2055
 
2269
2056
  ### Properties
2270
2057
 
@@ -2273,42 +2060,42 @@ Defined in:
2273
2060
  > `optional` **alternateScripts**: [`AlternateScript`](#alternatescript)[]
2274
2061
 
2275
2062
  Defined in:
2276
- [epub/index.ts:152](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L152)
2063
+ [epub/index.ts:115](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L115)
2277
2064
 
2278
2065
  #### fileAs?
2279
2066
 
2280
2067
  > `optional` **fileAs**: `string`
2281
2068
 
2282
2069
  Defined in:
2283
- [epub/index.ts:151](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L151)
2070
+ [epub/index.ts:114](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L114)
2284
2071
 
2285
2072
  #### name
2286
2073
 
2287
2074
  > **name**: `string`
2288
2075
 
2289
2076
  Defined in:
2290
- [epub/index.ts:148](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L148)
2077
+ [epub/index.ts:111](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L111)
2291
2078
 
2292
2079
  #### role?
2293
2080
 
2294
2081
  > `optional` **role**: `string`
2295
2082
 
2296
2083
  Defined in:
2297
- [epub/index.ts:149](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L149)
2084
+ [epub/index.ts:112](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L112)
2298
2085
 
2299
2086
  #### roleScheme?
2300
2087
 
2301
2088
  > `optional` **roleScheme**: `string`
2302
2089
 
2303
2090
  Defined in:
2304
- [epub/index.ts:150](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L150)
2091
+ [epub/index.ts:113](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L113)
2305
2092
 
2306
2093
  ---
2307
2094
 
2308
2095
  ## DcSubject
2309
2096
 
2310
2097
  Defined in:
2311
- [epub/index.ts:136](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L136)
2098
+ [epub/index.ts:99](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L99)
2312
2099
 
2313
2100
  ### Properties
2314
2101
 
@@ -2317,28 +2104,28 @@ Defined in:
2317
2104
  > **authority**: `string`
2318
2105
 
2319
2106
  Defined in:
2320
- [epub/index.ts:138](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L138)
2107
+ [epub/index.ts:101](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L101)
2321
2108
 
2322
2109
  #### term
2323
2110
 
2324
2111
  > **term**: `string`
2325
2112
 
2326
2113
  Defined in:
2327
- [epub/index.ts:139](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L139)
2114
+ [epub/index.ts:102](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L102)
2328
2115
 
2329
2116
  #### value
2330
2117
 
2331
2118
  > **value**: `string`
2332
2119
 
2333
2120
  Defined in:
2334
- [epub/index.ts:137](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L137)
2121
+ [epub/index.ts:100](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L100)
2335
2122
 
2336
2123
  ---
2337
2124
 
2338
2125
  ## DublinCore
2339
2126
 
2340
2127
  Defined in:
2341
- [epub/index.ts:155](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L155)
2128
+ [epub/index.ts:118](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L118)
2342
2129
 
2343
2130
  ### Properties
2344
2131
 
@@ -2347,56 +2134,56 @@ Defined in:
2347
2134
  > `optional` **contributors**: [`DcCreator`](#dccreator)[]
2348
2135
 
2349
2136
  Defined in:
2350
- [epub/index.ts:162](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L162)
2137
+ [epub/index.ts:125](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L125)
2351
2138
 
2352
2139
  #### creators?
2353
2140
 
2354
2141
  > `optional` **creators**: [`DcCreator`](#dccreator)[]
2355
2142
 
2356
2143
  Defined in:
2357
- [epub/index.ts:161](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L161)
2144
+ [epub/index.ts:124](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L124)
2358
2145
 
2359
2146
  #### date?
2360
2147
 
2361
2148
  > `optional` **date**: `Date`
2362
2149
 
2363
2150
  Defined in:
2364
- [epub/index.ts:159](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L159)
2151
+ [epub/index.ts:122](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L122)
2365
2152
 
2366
2153
  #### identifier
2367
2154
 
2368
2155
  > **identifier**: `string`
2369
2156
 
2370
2157
  Defined in:
2371
- [epub/index.ts:158](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L158)
2158
+ [epub/index.ts:121](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L121)
2372
2159
 
2373
2160
  #### language
2374
2161
 
2375
2162
  > **language**: `Locale`
2376
2163
 
2377
2164
  Defined in:
2378
- [epub/index.ts:157](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L157)
2165
+ [epub/index.ts:120](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L120)
2379
2166
 
2380
2167
  #### subjects?
2381
2168
 
2382
2169
  > `optional` **subjects**: (`string` \| [`DcSubject`](#dcsubject))[]
2383
2170
 
2384
2171
  Defined in:
2385
- [epub/index.ts:160](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L160)
2172
+ [epub/index.ts:123](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L123)
2386
2173
 
2387
2174
  #### title
2388
2175
 
2389
2176
  > **title**: `string`
2390
2177
 
2391
2178
  Defined in:
2392
- [epub/index.ts:156](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L156)
2179
+ [epub/index.ts:119](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L119)
2393
2180
 
2394
2181
  #### type?
2395
2182
 
2396
2183
  > `optional` **type**: `string`
2397
2184
 
2398
2185
  Defined in:
2399
- [epub/index.ts:163](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L163)
2186
+ [epub/index.ts:126](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L126)
2400
2187
 
2401
2188
  ---
2402
2189
 
@@ -2406,7 +2193,7 @@ Defined in:
2406
2193
  > \`$\{Letter \| Uppercase\<Letter\> \| QuestionMark\}$\{string\}\`
2407
2194
 
2408
2195
  Defined in:
2409
- [epub/index.ts:63](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L63)
2196
+ [epub/index.ts:60](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L60)
2410
2197
 
2411
2198
  A valid name for an XML element (must start with a letter)
2412
2199
 
@@ -2417,7 +2204,7 @@ A valid name for an XML element (must start with a letter)
2417
2204
  > **EpubMetadata** = [`MetadataEntry`](#metadataentry)[]
2418
2205
 
2419
2206
  Defined in:
2420
- [epub/index.ts:134](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L134)
2207
+ [epub/index.ts:97](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L97)
2421
2208
 
2422
2209
  ---
2423
2210
 
@@ -2426,7 +2213,7 @@ Defined in:
2426
2213
  > **ManifestItem** = `object`
2427
2214
 
2428
2215
  Defined in:
2429
- [epub/index.ts:84](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L84)
2216
+ [epub/index.ts:81](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L81)
2430
2217
 
2431
2218
  ### Properties
2432
2219
 
@@ -2435,42 +2222,42 @@ Defined in:
2435
2222
  > `optional` **fallback**: `string`
2436
2223
 
2437
2224
  Defined in:
2438
- [epub/index.ts:88](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L88)
2225
+ [epub/index.ts:85](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L85)
2439
2226
 
2440
2227
  #### href
2441
2228
 
2442
2229
  > **href**: `string`
2443
2230
 
2444
2231
  Defined in:
2445
- [epub/index.ts:86](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L86)
2232
+ [epub/index.ts:83](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L83)
2446
2233
 
2447
2234
  #### id
2448
2235
 
2449
2236
  > **id**: `string`
2450
2237
 
2451
2238
  Defined in:
2452
- [epub/index.ts:85](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L85)
2239
+ [epub/index.ts:82](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L82)
2453
2240
 
2454
2241
  #### mediaOverlay?
2455
2242
 
2456
2243
  > `optional` **mediaOverlay**: `string`
2457
2244
 
2458
2245
  Defined in:
2459
- [epub/index.ts:89](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L89)
2246
+ [epub/index.ts:86](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L86)
2460
2247
 
2461
2248
  #### mediaType?
2462
2249
 
2463
2250
  > `optional` **mediaType**: `string`
2464
2251
 
2465
2252
  Defined in:
2466
- [epub/index.ts:87](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L87)
2253
+ [epub/index.ts:84](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L84)
2467
2254
 
2468
2255
  #### properties?
2469
2256
 
2470
2257
  > `optional` **properties**: `string`[]
2471
2258
 
2472
2259
  Defined in:
2473
- [epub/index.ts:90](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L90)
2260
+ [epub/index.ts:87](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L87)
2474
2261
 
2475
2262
  ---
2476
2263
 
@@ -2479,7 +2266,7 @@ Defined in:
2479
2266
  > **MetadataEntry** = `object`
2480
2267
 
2481
2268
  Defined in:
2482
- [epub/index.ts:127](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L127)
2269
+ [epub/index.ts:90](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L90)
2483
2270
 
2484
2271
  ### Properties
2485
2272
 
@@ -2488,28 +2275,38 @@ Defined in:
2488
2275
  > `optional` **id**: `string`
2489
2276
 
2490
2277
  Defined in:
2491
- [epub/index.ts:128](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L128)
2278
+ [epub/index.ts:91](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L91)
2492
2279
 
2493
2280
  #### properties
2494
2281
 
2495
2282
  > **properties**: `Record`\<`string`, `string`\>
2496
2283
 
2497
2284
  Defined in:
2498
- [epub/index.ts:130](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L130)
2285
+ [epub/index.ts:93](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L93)
2499
2286
 
2500
2287
  #### type
2501
2288
 
2502
2289
  > **type**: [`ElementName`](#elementname)
2503
2290
 
2504
2291
  Defined in:
2505
- [epub/index.ts:129](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L129)
2292
+ [epub/index.ts:92](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L92)
2506
2293
 
2507
2294
  #### value
2508
2295
 
2509
2296
  > **value**: `string` \| `undefined`
2510
2297
 
2511
2298
  Defined in:
2512
- [epub/index.ts:131](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L131)
2299
+ [epub/index.ts:94](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L94)
2300
+
2301
+ ---
2302
+
2303
+ ## PackageElement
2304
+
2305
+ > **PackageElement** = [`XmlElement`](#xmlelement)\<`"package"`\> \|
2306
+ > [`XmlElement`](#xmlelement)\<`"opf:package"`\>
2307
+
2308
+ Defined in:
2309
+ [epub/index.ts:135](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L135)
2513
2310
 
2514
2311
  ---
2515
2312
 
@@ -2518,7 +2315,7 @@ Defined in:
2518
2315
  > **ParsedXml** = [`XmlNode`](#xmlnode)[]
2519
2316
 
2520
2317
  Defined in:
2521
- [epub/index.ts:82](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L82)
2318
+ [epub/index.ts:79](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L79)
2522
2319
 
2523
2320
  An XML structure
2524
2321
 
@@ -2529,11 +2326,11 @@ An XML structure
2529
2326
  > **XmlElement**\<`Name`\> = `object` & `{ [key in Name]: ParsedXml }`
2530
2327
 
2531
2328
  Defined in:
2532
- [epub/index.ts:69](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L69)
2329
+ [epub/index.ts:66](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L66)
2533
2330
 
2534
2331
  An XML element
2535
2332
 
2536
- ### Type declaration
2333
+ ### Type Declaration
2537
2334
 
2538
2335
  #### :@?
2539
2336
 
@@ -2552,7 +2349,7 @@ An XML element
2552
2349
  > **XmlNode** = [`XmlElement`](#xmlelement) \| [`XmlTextNode`](#xmltextnode)
2553
2350
 
2554
2351
  Defined in:
2555
- [epub/index.ts:79](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L79)
2352
+ [epub/index.ts:76](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L76)
2556
2353
 
2557
2354
  A valid XML node. May be either an element or a text node.
2558
2355
 
@@ -2563,7 +2360,7 @@ A valid XML node. May be either an element or a text node.
2563
2360
  > **XmlTextNode** = `object`
2564
2361
 
2565
2362
  Defined in:
2566
- [epub/index.ts:76](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L76)
2363
+ [epub/index.ts:73](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L73)
2567
2364
 
2568
2365
  A text node in an XML document
2569
2366
 
@@ -2574,4 +2371,4 @@ A text node in an XML document
2574
2371
  > **#text**: `string`
2575
2372
 
2576
2373
  Defined in:
2577
- [epub/index.ts:76](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L76)
2374
+ [epub/index.ts:73](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L73)