@storyteller-platform/epub 0.3.1 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -220,91 +220,104 @@ 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:31](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/node.ts#L31)
223
+ [epub/index.ts:206](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L206)
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**(`zipFs`): [`Epub`](#epub)
262
+ > `protected` **new Epub**(`extractPath`, `inputPath`): [`Epub`](#epub)
234
263
 
235
264
  Defined in:
236
- [epub/index.ts:363](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L363)
265
+ [epub/index.ts:410](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L410)
237
266
 
238
267
  ##### Parameters
239
268
 
240
- | Parameter | Type |
241
- | --------- | ------- |
242
- | `zipFs` | `ZipFS` |
269
+ | Parameter | Type |
270
+ | ------------- | ----------------------- |
271
+ | `extractPath` | `string` |
272
+ | `inputPath` | `undefined` \| `string` |
243
273
 
244
274
  ##### Returns
245
275
 
246
276
  [`Epub`](#epub)
247
277
 
248
- ##### Inherited from
249
-
250
- `BaseEpub.constructor`
251
-
252
278
  ### Properties
253
279
 
254
- #### zipFs
280
+ #### extractPath
255
281
 
256
- > `protected` **zipFs**: `ZipFS`
282
+ > `protected` **extractPath**: `string`
257
283
 
258
284
  Defined in:
259
- [epub/index.ts:363](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L363)
285
+ [epub/index.ts:411](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L411)
286
+
287
+ #### inputPath
260
288
 
261
- ##### Inherited from
289
+ > `protected` **inputPath**: `undefined` \| `string`
262
290
 
263
- `BaseEpub.zipFs`
291
+ Defined in:
292
+ [epub/index.ts:412](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L412)
264
293
 
265
294
  #### xhtmlBuilder
266
295
 
267
296
  > `static` **xhtmlBuilder**: `XMLBuilder`
268
297
 
269
298
  Defined in:
270
- [epub/index.ts:199](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L199)
271
-
272
- ##### Inherited from
273
-
274
- `BaseEpub.xhtmlBuilder`
299
+ [epub/index.ts:246](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L246)
275
300
 
276
301
  #### xhtmlParser
277
302
 
278
303
  > `static` **xhtmlParser**: `XMLParser`
279
304
 
280
305
  Defined in:
281
- [epub/index.ts:167](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L167)
282
-
283
- ##### Inherited from
284
-
285
- `BaseEpub.xhtmlParser`
306
+ [epub/index.ts:214](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L214)
286
307
 
287
308
  #### xmlBuilder
288
309
 
289
310
  > `static` **xmlBuilder**: `XMLBuilder`
290
311
 
291
312
  Defined in:
292
- [epub/index.ts:192](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L192)
293
-
294
- ##### Inherited from
295
-
296
- `BaseEpub.xmlBuilder`
313
+ [epub/index.ts:239](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L239)
297
314
 
298
315
  #### xmlParser
299
316
 
300
317
  > `static` **xmlParser**: `XMLParser`
301
318
 
302
319
  Defined in:
303
- [epub/index.ts:160](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L160)
304
-
305
- ##### Inherited from
306
-
307
- `BaseEpub.xmlParser`
320
+ [epub/index.ts:207](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L207)
308
321
 
309
322
  ### Methods
310
323
 
@@ -313,22 +326,18 @@ Defined in:
313
326
  > **\[dispose\]**(): `void`
314
327
 
315
328
  Defined in:
316
- [epub/index.ts:2418](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2418)
329
+ [epub/index.ts:2531](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2531)
317
330
 
318
331
  ##### Returns
319
332
 
320
333
  `void`
321
334
 
322
- ##### Inherited from
323
-
324
- `BaseEpub.[dispose]`
325
-
326
335
  #### addCollection()
327
336
 
328
337
  > **addCollection**(`collection`, `index?`): `Promise`\<`void`\>
329
338
 
330
339
  Defined in:
331
- [epub/index.ts:1473](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1473)
340
+ [epub/index.ts:1558](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1558)
332
341
 
333
342
  Add a collection to the EPUB metadata.
334
343
 
@@ -346,16 +355,12 @@ collections. Otherwise, it will be added to the end of the list.
346
355
 
347
356
  `Promise`\<`void`\>
348
357
 
349
- ##### Inherited from
350
-
351
- `BaseEpub.addCollection`
352
-
353
358
  #### addContributor()
354
359
 
355
360
  > **addContributor**(`contributor`, `index?`): `Promise`\<`void`\>
356
361
 
357
362
  Defined in:
358
- [epub/index.ts:1815](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1815)
363
+ [epub/index.ts:1900](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1900)
359
364
 
360
365
  Add a contributor to the EPUB metadata.
361
366
 
@@ -380,16 +385,12 @@ This is a convenience method for
380
385
 
381
386
  https://www.w3.org/TR/epub-33/#sec-opf-dccreator
382
387
 
383
- ##### Inherited from
384
-
385
- `BaseEpub.addContributor`
386
-
387
388
  #### addCreator()
388
389
 
389
390
  > **addCreator**(`creator`, `index?`, `type?`): `Promise`\<`void`\>
390
391
 
391
392
  Defined in:
392
- [epub/index.ts:1660](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1660)
393
+ [epub/index.ts:1745](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1745)
393
394
 
394
395
  Add a creator to the EPUB metadata.
395
396
 
@@ -412,10 +413,6 @@ creators. Otherwise, it will be added to the end of the list.
412
413
 
413
414
  https://www.w3.org/TR/epub-33/#sec-opf-dccreator
414
415
 
415
- ##### Inherited from
416
-
417
- `BaseEpub.addCreator`
418
-
419
416
  #### addManifestItem()
420
417
 
421
418
  ##### Call Signature
@@ -423,7 +420,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccreator
423
420
  > **addManifestItem**(`item`, `contents`, `encoding`): `Promise`\<`void`\>
424
421
 
425
422
  Defined in:
426
- [epub/index.ts:2142](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2142)
423
+ [epub/index.ts:2227](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2227)
427
424
 
428
425
  Create a new manifest item and write its contents to a new entry.
429
426
 
@@ -447,16 +444,12 @@ https://www.w3.org/TR/epub-33/#sec-pkg-manifest
447
444
 
448
445
  https://www.w3.org/TR/epub-33/#sec-contentdocs
449
446
 
450
- ###### Inherited from
451
-
452
- `BaseEpub.addManifestItem`
453
-
454
447
  ##### Call Signature
455
448
 
456
449
  > **addManifestItem**(`item`, `contents`, `encoding`): `Promise`\<`void`\>
457
450
 
458
451
  Defined in:
459
- [epub/index.ts:2147](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2147)
452
+ [epub/index.ts:2232](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2232)
460
453
 
461
454
  Create a new manifest item and write its contents to a new entry.
462
455
 
@@ -480,16 +473,12 @@ https://www.w3.org/TR/epub-33/#sec-pkg-manifest
480
473
 
481
474
  https://www.w3.org/TR/epub-33/#sec-contentdocs
482
475
 
483
- ###### Inherited from
484
-
485
- `BaseEpub.addManifestItem`
486
-
487
476
  ##### Call Signature
488
477
 
489
478
  > **addManifestItem**(`item`, `contents`): `Promise`\<`void`\>
490
479
 
491
480
  Defined in:
492
- [epub/index.ts:2152](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2152)
481
+ [epub/index.ts:2237](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2237)
493
482
 
494
483
  Create a new manifest item and write its contents to a new entry.
495
484
 
@@ -512,16 +501,12 @@ https://www.w3.org/TR/epub-33/#sec-pkg-manifest
512
501
 
513
502
  https://www.w3.org/TR/epub-33/#sec-contentdocs
514
503
 
515
- ###### Inherited from
516
-
517
- `BaseEpub.addManifestItem`
518
-
519
504
  #### addMetadata()
520
505
 
521
506
  > **addMetadata**(`entry`): `Promise`\<`void`\>
522
507
 
523
508
  Defined in:
524
- [epub/index.ts:2264](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2264)
509
+ [epub/index.ts:2349](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2349)
525
510
 
526
511
  Add a new metadata entry to the Epub.
527
512
 
@@ -543,16 +528,12 @@ useful semantic representations of metadata, use specific methods such as
543
528
 
544
529
  https://www.w3.org/TR/epub-33/#sec-pkg-metadata
545
530
 
546
- ##### Inherited from
547
-
548
- `BaseEpub.addMetadata`
549
-
550
531
  #### addSpineItem()
551
532
 
552
533
  > **addSpineItem**(`manifestId`, `index?`): `Promise`\<`void`\>
553
534
 
554
535
  Defined in:
555
- [epub/index.ts:1869](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1869)
536
+ [epub/index.ts:1954](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1954)
556
537
 
557
538
  Add an item to the spine of the EPUB.
558
539
 
@@ -577,16 +558,12 @@ throw an error.
577
558
 
578
559
  https://www.w3.org/TR/epub-33/#sec-spine-elem
579
560
 
580
- ##### Inherited from
581
-
582
- `BaseEpub.addSpineItem`
583
-
584
561
  #### addSubject()
585
562
 
586
563
  > **addSubject**(`subject`): `Promise`\<`void`\>
587
564
 
588
565
  Defined in:
589
- [epub/index.ts:1006](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1006)
566
+ [epub/index.ts:1087](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1087)
590
567
 
591
568
  Add a subject to the EPUB metadata.
592
569
 
@@ -604,10 +581,6 @@ Add a subject to the EPUB metadata.
604
581
 
605
582
  https://www.w3.org/TR/epub-33/#sec-opf-dcsubject
606
583
 
607
- ##### Inherited from
608
-
609
- `BaseEpub.addSubject`
610
-
611
584
  #### createXhtmlDocument()
612
585
 
613
586
  > **createXhtmlDocument**(`body`, `head?`, `language?`):
@@ -615,7 +588,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcsubject
615
588
  > [`XmlElement`](#xmlelement)\<`"?xml"`\>)[]\>
616
589
 
617
590
  Defined in:
618
- [epub/index.ts:1970](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1970)
591
+ [epub/index.ts:2055](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2055)
619
592
 
620
593
  Create a new XHTML document with the given body and head.
621
594
 
@@ -632,31 +605,23 @@ Create a new XHTML document with the given body and head.
632
605
  `Promise`\<([`XmlElement`](#xmlelement)\<`"html"`\> \|
633
606
  [`XmlElement`](#xmlelement)\<`"?xml"`\>)[]\>
634
607
 
635
- ##### Inherited from
636
-
637
- `BaseEpub.createXhtmlDocument`
638
-
639
608
  #### discardAndClose()
640
609
 
641
610
  > **discardAndClose**(): `void`
642
611
 
643
612
  Defined in:
644
- [epub/index.ts:2373](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2373)
613
+ [epub/index.ts:2458](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2458)
645
614
 
646
615
  ##### Returns
647
616
 
648
617
  `void`
649
618
 
650
- ##### Inherited from
651
-
652
- `BaseEpub.discardAndClose`
653
-
654
619
  #### findAllMetadataItems()
655
620
 
656
621
  > **findAllMetadataItems**(`predicate`): `Promise`\<`object`[]\>
657
622
 
658
623
  Defined in:
659
- [epub/index.ts:729](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L729)
624
+ [epub/index.ts:810](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L810)
660
625
 
661
626
  Returns the item in the metadata element's children array that matches the
662
627
  provided predicate.
@@ -671,10 +636,6 @@ provided predicate.
671
636
 
672
637
  `Promise`\<`object`[]\>
673
638
 
674
- ##### Inherited from
675
-
676
- `BaseEpub.findAllMetadataItems`
677
-
678
639
  #### findMetadataItem()
679
640
 
680
641
  > **findMetadataItem**(`predicate`): `Promise`\<`null` \| \{ `id`: `undefined`
@@ -700,7 +661,7 @@ provided predicate.
700
661
  > \}\>
701
662
 
702
663
  Defined in:
703
- [epub/index.ts:720](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L720)
664
+ [epub/index.ts:801](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L801)
704
665
 
705
666
  Returns the item in the metadata element's children array that matches the
706
667
  provided predicate.
@@ -734,36 +695,12 @@ provided predicate.
734
695
  `` `Y${string}` `` \| `` `Z${string}` `` \| `` `?${string}` ``; `value`:
735
696
  `undefined` \| `string`; \}\>
736
697
 
737
- ##### Inherited from
738
-
739
- `BaseEpub.findMetadataItem`
740
-
741
- #### getArrayAndClose()
742
-
743
- > **getArrayAndClose**(): `Promise`\<`Buffer`\<`ArrayBufferLike`\>\>
744
-
745
- Defined in:
746
- [epub/index.ts:2388](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2388)
747
-
748
- Write the current contents of the Epub to a new Uint8Array.
749
-
750
- When this method is called, the "dcterms:modified" meta tag is automatically
751
- updated to the current UTC timestamp.
752
-
753
- ##### Returns
754
-
755
- `Promise`\<`Buffer`\<`ArrayBufferLike`\>\>
756
-
757
- ##### Inherited from
758
-
759
- `BaseEpub.getArrayAndClose`
760
-
761
698
  #### getCollections()
762
699
 
763
700
  > **getCollections**(): `Promise`\<[`Collection`](#collection)[]\>
764
701
 
765
702
  Defined in:
766
- [epub/index.ts:1433](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1433)
703
+ [epub/index.ts:1518](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1518)
767
704
 
768
705
  Retrieve the list of collections.
769
706
 
@@ -771,16 +708,12 @@ Retrieve the list of collections.
771
708
 
772
709
  `Promise`\<[`Collection`](#collection)[]\>
773
710
 
774
- ##### Inherited from
775
-
776
- `BaseEpub.getCollections`
777
-
778
711
  #### getContributors()
779
712
 
780
713
  > **getContributors**(): `Promise`\<[`DcCreator`](#dccreator)[]\>
781
714
 
782
715
  Defined in:
783
- [epub/index.ts:1647](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1647)
716
+ [epub/index.ts:1732](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1732)
784
717
 
785
718
  Retrieve the list of contributors.
786
719
 
@@ -794,16 +727,12 @@ This is a convenience method for `epub.getCreators('contributor')`.
794
727
 
795
728
  https://www.w3.org/TR/epub-33/#sec-opf-dccontributor
796
729
 
797
- ##### Inherited from
798
-
799
- `BaseEpub.getContributors`
800
-
801
730
  #### getCoverImage()
802
731
 
803
732
  > **getCoverImage**(): `Promise`\<`null` \| `Uint8Array`\<`ArrayBufferLike`\>\>
804
733
 
805
734
  Defined in:
806
- [epub/index.ts:909](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L909)
735
+ [epub/index.ts:990](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L990)
807
736
 
808
737
  Retrieve the cover image data as a byte array.
809
738
 
@@ -818,17 +747,13 @@ retrieve the image manifest item, use epub.getCoverImageItem().
818
747
 
819
748
  https://www.w3.org/TR/epub-33/#sec-cover-image
820
749
 
821
- ##### Inherited from
822
-
823
- `BaseEpub.getCoverImage`
824
-
825
750
  #### getCoverImageItem()
826
751
 
827
752
  > **getCoverImageItem**(): `Promise`\<`null` \|
828
753
  > [`ManifestItem`](#manifestitem)\>
829
754
 
830
755
  Defined in:
831
- [epub/index.ts:890](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L890)
756
+ [epub/index.ts:971](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L971)
832
757
 
833
758
  Retrieve the cover image manifest item.
834
759
 
@@ -843,16 +768,12 @@ this item's id to epub.readItemContents, or use epub.getCoverImage() instead.
843
768
 
844
769
  https://www.w3.org/TR/epub-33/#sec-cover-image
845
770
 
846
- ##### Inherited from
847
-
848
- `BaseEpub.getCoverImageItem`
849
-
850
771
  #### getCreators()
851
772
 
852
773
  > **getCreators**(`type`): `Promise`\<[`DcCreator`](#dccreator)[]\>
853
774
 
854
775
  Defined in:
855
- [epub/index.ts:1586](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1586)
776
+ [epub/index.ts:1671](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1671)
856
777
 
857
778
  Retrieve the list of creators.
858
779
 
@@ -870,16 +791,12 @@ Retrieve the list of creators.
870
791
 
871
792
  https://www.w3.org/TR/epub-33/#sec-opf-dccreator
872
793
 
873
- ##### Inherited from
874
-
875
- `BaseEpub.getCreators`
876
-
877
794
  #### getDescription()
878
795
 
879
796
  > **getDescription**(): `Promise`\<`null` \| `string`\>
880
797
 
881
798
  Defined in:
882
- [epub/index.ts:1284](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1284)
799
+ [epub/index.ts:1369](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1369)
883
800
 
884
801
  Retrieve the Epub's description as specified in its package document metadata.
885
802
 
@@ -890,16 +807,12 @@ as a string. Descriptions may include HTML markup.
890
807
 
891
808
  `Promise`\<`null` \| `string`\>
892
809
 
893
- ##### Inherited from
894
-
895
- `BaseEpub.getDescription`
896
-
897
810
  #### getIdentifier()
898
811
 
899
812
  > **getIdentifier**(): `Promise`\<`null` \| `string`\>
900
813
 
901
814
  Defined in:
902
- [epub/index.ts:824](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L824)
815
+ [epub/index.ts:905](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L905)
903
816
 
904
817
  Retrieve the identifier from the dc:identifier element in the EPUB metadata.
905
818
 
@@ -913,16 +826,12 @@ If there is no dc:identifier element, returns null.
913
826
 
914
827
  https://www.w3.org/TR/epub-33/#sec-opf-dcidentifier
915
828
 
916
- ##### Inherited from
917
-
918
- `BaseEpub.getIdentifier`
919
-
920
829
  #### getLanguage()
921
830
 
922
831
  > **getLanguage**(): `Promise`\<`null` \| `Locale`\>
923
832
 
924
833
  Defined in:
925
- [epub/index.ts:1125](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1125)
834
+ [epub/index.ts:1206](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1206)
926
835
 
927
836
  Retrieve the Epub's language as specified in its package document metadata.
928
837
 
@@ -937,17 +846,13 @@ Intl.Locale instance.
937
846
 
938
847
  https://www.w3.org/TR/epub-33/#sec-opf-dclanguage
939
848
 
940
- ##### Inherited from
941
-
942
- `BaseEpub.getLanguage`
943
-
944
849
  #### getManifest()
945
850
 
946
851
  > **getManifest**(): `Promise`\<`Record`\<`string`,
947
852
  > [`ManifestItem`](#manifestitem)\>\>
948
853
 
949
854
  Defined in:
950
- [epub/index.ts:645](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L645)
855
+ [epub/index.ts:726](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L726)
951
856
 
952
857
  Retrieve the manifest for the Epub.
953
858
 
@@ -962,16 +867,12 @@ properties.
962
867
 
963
868
  https://www.w3.org/TR/epub-33/#sec-pkg-manifest
964
869
 
965
- ##### Inherited from
966
-
967
- `BaseEpub.getManifest`
968
-
969
870
  #### getMetadata()
970
871
 
971
872
  > **getMetadata**(): `Promise`\<[`EpubMetadata`](#epubmetadata)\>
972
873
 
973
874
  Defined in:
974
- [epub/index.ts:796](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L796)
875
+ [epub/index.ts:877](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L877)
975
876
 
976
877
  Retrieve the metadata entries for the Epub.
977
878
 
@@ -989,17 +890,13 @@ as `getTitle()` and `getAuthors()`.
989
890
 
990
891
  https://www.w3.org/TR/epub-33/#sec-pkg-metadata
991
892
 
992
- ##### Inherited from
993
-
994
- `BaseEpub.getMetadata`
995
-
996
893
  #### getPackageVocabularyPrefixes()
997
894
 
998
895
  > **getPackageVocabularyPrefixes**(): `Promise`\<`Record`\<`string`,
999
896
  > `string`\>\>
1000
897
 
1001
898
  Defined in:
1002
- [epub/index.ts:1301](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1301)
899
+ [epub/index.ts:1386](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1386)
1003
900
 
1004
901
  Return the set of custom vocabulary prefixes set on this publication's root
1005
902
  package element.
@@ -1014,16 +911,12 @@ Returns a map from prefix to URI
1014
911
 
1015
912
  https://www.w3.org/TR/epub-33/#sec-prefix-attr
1016
913
 
1017
- ##### Inherited from
1018
-
1019
- `BaseEpub.getPackageVocabularyPrefixes`
1020
-
1021
914
  #### getPublicationDate()
1022
915
 
1023
916
  > **getPublicationDate**(): `Promise`\<`null` \| `Date`\>
1024
917
 
1025
918
  Defined in:
1026
- [epub/index.ts:946](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L946)
919
+ [epub/index.ts:1027](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1027)
1027
920
 
1028
921
  Retrieve the publication date from the dc:date element in the EPUB metadata as a
1029
922
  Date object.
@@ -1038,16 +931,12 @@ If there is no dc:date element, returns null.
1038
931
 
1039
932
  https://www.w3.org/TR/epub-33/#sec-opf-dcdate
1040
933
 
1041
- ##### Inherited from
1042
-
1043
- `BaseEpub.getPublicationDate`
1044
-
1045
934
  #### getSpineItems()
1046
935
 
1047
936
  > **getSpineItems**(): `Promise`\<[`ManifestItem`](#manifestitem)[]\>
1048
937
 
1049
938
  Defined in:
1050
- [epub/index.ts:1850](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1850)
939
+ [epub/index.ts:1935](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1935)
1051
940
 
1052
941
  Retrieve the manifest items that make up the Epub's spine.
1053
942
 
@@ -1062,16 +951,12 @@ to users by default.
1062
951
 
1063
952
  https://www.w3.org/TR/epub-33/#sec-spine-elem
1064
953
 
1065
- ##### Inherited from
1066
-
1067
- `BaseEpub.getSpineItems`
1068
-
1069
954
  #### getSubjects()
1070
955
 
1071
956
  > **getSubjects**(): `Promise`\<(`string` \| [`DcSubject`](#dcsubject))[]\>
1072
957
 
1073
958
  Defined in:
1074
- [epub/index.ts:1080](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1080)
959
+ [epub/index.ts:1161](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1161)
1075
960
 
1076
961
  Retrieve the list of subjects for this EPUB.
1077
962
 
@@ -1087,16 +972,12 @@ authority, and term.
1087
972
 
1088
973
  https://www.w3.org/TR/epub-33/#sec-opf-dcsubject
1089
974
 
1090
- ##### Inherited from
1091
-
1092
- `BaseEpub.getSubjects`
1093
-
1094
975
  #### getSubtitle()
1095
976
 
1096
977
  > **getSubtitle**(): `Promise`\<`null` \| `string`\>
1097
978
 
1098
979
  Defined in:
1099
- [epub/index.ts:1191](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1191)
980
+ [epub/index.ts:1276](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1276)
1100
981
 
1101
982
  Retrieve the subtitle of the Epub, if it exists.
1102
983
 
@@ -1108,16 +989,12 @@ Retrieve the subtitle of the Epub, if it exists.
1108
989
 
1109
990
  https://www.w3.org/TR/epub-33/#sec-opf-dctitle
1110
991
 
1111
- ##### Inherited from
1112
-
1113
- `BaseEpub.getSubtitle`
1114
-
1115
992
  #### getTitle()
1116
993
 
1117
994
  > **getTitle**(`expanded`): `Promise`\<`null` \| `string`\>
1118
995
 
1119
996
  Defined in:
1120
- [epub/index.ts:1167](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1167)
997
+ [epub/index.ts:1252](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1252)
1121
998
 
1122
999
  Retrieve the title of the Epub.
1123
1000
 
@@ -1135,16 +1012,12 @@ Retrieve the title of the Epub.
1135
1012
 
1136
1013
  https://www.w3.org/TR/epub-33/#sec-opf-dctitle
1137
1014
 
1138
- ##### Inherited from
1139
-
1140
- `BaseEpub.getTitle`
1141
-
1142
1015
  #### getTitles()
1143
1016
 
1144
1017
  > **getTitles**(): `Promise`\<`object`[]\>
1145
1018
 
1146
1019
  Defined in:
1147
- [epub/index.ts:1203](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1203)
1020
+ [epub/index.ts:1288](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1288)
1148
1021
 
1149
1022
  Retrieve all title entries of the Epub.
1150
1023
 
@@ -1156,16 +1029,12 @@ Retrieve all title entries of the Epub.
1156
1029
 
1157
1030
  https://www.w3.org/TR/epub-33/#sec-opf-dctitle
1158
1031
 
1159
- ##### Inherited from
1160
-
1161
- `BaseEpub.getTitles`
1162
-
1163
1032
  #### getType()
1164
1033
 
1165
1034
  > **getType**(): `Promise`\<`null` \| [`MetadataEntry`](#metadataentry)\>
1166
1035
 
1167
1036
  Defined in:
1168
- [epub/index.ts:993](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L993)
1037
+ [epub/index.ts:1074](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1074)
1169
1038
 
1170
1039
  Retrieve the publication type from the dc:type element in the EPUB metadata.
1171
1040
 
@@ -1179,10 +1048,6 @@ If there is no dc:type element, returns null.
1179
1048
 
1180
1049
  https://www.w3.org/TR/epub-33/#sec-opf-dctype
1181
1050
 
1182
- ##### Inherited from
1183
-
1184
- `BaseEpub.getType`
1185
-
1186
1051
  #### readItemContents()
1187
1052
 
1188
1053
  ##### Call Signature
@@ -1190,7 +1055,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dctype
1190
1055
  > **readItemContents**(`id`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\>
1191
1056
 
1192
1057
  Defined in:
1193
- [epub/index.ts:1942](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1942)
1058
+ [epub/index.ts:2027](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2027)
1194
1059
 
1195
1060
  Retrieve the contents of a manifest item, given its id.
1196
1061
 
@@ -1208,16 +1073,12 @@ Retrieve the contents of a manifest item, given its id.
1208
1073
 
1209
1074
  https://www.w3.org/TR/epub-33/#sec-contentdocs
1210
1075
 
1211
- ###### Inherited from
1212
-
1213
- `BaseEpub.readItemContents`
1214
-
1215
1076
  ##### Call Signature
1216
1077
 
1217
1078
  > **readItemContents**(`id`, `encoding`): `Promise`\<`string`\>
1218
1079
 
1219
1080
  Defined in:
1220
- [epub/index.ts:1943](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1943)
1081
+ [epub/index.ts:2028](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2028)
1221
1082
 
1222
1083
  Retrieve the contents of a manifest item, given its id.
1223
1084
 
@@ -1236,10 +1097,6 @@ Retrieve the contents of a manifest item, given its id.
1236
1097
 
1237
1098
  https://www.w3.org/TR/epub-33/#sec-contentdocs
1238
1099
 
1239
- ###### Inherited from
1240
-
1241
- `BaseEpub.readItemContents`
1242
-
1243
1100
  #### readXhtmlItemContents()
1244
1101
 
1245
1102
  ##### Call Signature
@@ -1247,7 +1104,7 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
1247
1104
  > **readXhtmlItemContents**(`id`, `as?`): `Promise`\<[`ParsedXml`](#parsedxml)\>
1248
1105
 
1249
1106
  Defined in:
1250
- [epub/index.ts:2003](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2003)
1107
+ [epub/index.ts:2088](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2088)
1251
1108
 
1252
1109
  Retrieves the contents of an XHTML item, given its manifest id.
1253
1110
 
@@ -1266,16 +1123,12 @@ Retrieves the contents of an XHTML item, given its manifest id.
1266
1123
 
1267
1124
  https://www.w3.org/TR/epub-33/#sec-xhtml
1268
1125
 
1269
- ###### Inherited from
1270
-
1271
- `BaseEpub.readXhtmlItemContents`
1272
-
1273
1126
  ##### Call Signature
1274
1127
 
1275
1128
  > **readXhtmlItemContents**(`id`, `as`): `Promise`\<`string`\>
1276
1129
 
1277
1130
  Defined in:
1278
- [epub/index.ts:2004](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2004)
1131
+ [epub/index.ts:2089](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2089)
1279
1132
 
1280
1133
  Retrieves the contents of an XHTML item, given its manifest id.
1281
1134
 
@@ -1294,16 +1147,12 @@ Retrieves the contents of an XHTML item, given its manifest id.
1294
1147
 
1295
1148
  https://www.w3.org/TR/epub-33/#sec-xhtml
1296
1149
 
1297
- ###### Inherited from
1298
-
1299
- `BaseEpub.readXhtmlItemContents`
1300
-
1301
1150
  #### removeCollection()
1302
1151
 
1303
1152
  > **removeCollection**(`index`): `Promise`\<`void`\>
1304
1153
 
1305
1154
  Defined in:
1306
- [epub/index.ts:1542](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1542)
1155
+ [epub/index.ts:1627](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1627)
1307
1156
 
1308
1157
  Remove a collection from the EPUB metadata.
1309
1158
 
@@ -1320,16 +1169,12 @@ returned by `epub.getCollections()`.
1320
1169
 
1321
1170
  `Promise`\<`void`\>
1322
1171
 
1323
- ##### Inherited from
1324
-
1325
- `BaseEpub.removeCollection`
1326
-
1327
1172
  #### removeContributor()
1328
1173
 
1329
1174
  > **removeContributor**(`index`): `Promise`\<`void`\>
1330
1175
 
1331
1176
  Defined in:
1332
- [epub/index.ts:1799](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1799)
1177
+ [epub/index.ts:1884](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1884)
1333
1178
 
1334
1179
  Remove a contributor from the EPUB metadata.
1335
1180
 
@@ -1352,16 +1197,12 @@ This is a convenience method for `epub.removeCreator(index, 'contributor')`.
1352
1197
 
1353
1198
  https://www.w3.org/TR/epub-33/#sec-opf-dccreator
1354
1199
 
1355
- ##### Inherited from
1356
-
1357
- `BaseEpub.removeContributor`
1358
-
1359
1200
  #### removeCreator()
1360
1201
 
1361
1202
  > **removeCreator**(`index`, `type`): `Promise`\<`void`\>
1362
1203
 
1363
1204
  Defined in:
1364
- [epub/index.ts:1747](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1747)
1205
+ [epub/index.ts:1832](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1832)
1365
1206
 
1366
1207
  Remove a creator from the EPUB metadata.
1367
1208
 
@@ -1383,16 +1224,12 @@ returned by `epub.getCreators()`.
1383
1224
 
1384
1225
  https://www.w3.org/TR/epub-33/#sec-opf-dccreator
1385
1226
 
1386
- ##### Inherited from
1387
-
1388
- `BaseEpub.removeCreator`
1389
-
1390
1227
  #### removeManifestItem()
1391
1228
 
1392
1229
  > **removeManifestItem**(`id`): `Promise`\<`void`\>
1393
1230
 
1394
1231
  Defined in:
1395
- [epub/index.ts:2099](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2099)
1232
+ [epub/index.ts:2184](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2184)
1396
1233
 
1397
1234
  ##### Parameters
1398
1235
 
@@ -1404,16 +1241,12 @@ Defined in:
1404
1241
 
1405
1242
  `Promise`\<`void`\>
1406
1243
 
1407
- ##### Inherited from
1408
-
1409
- `BaseEpub.removeManifestItem`
1410
-
1411
1244
  #### removeMetadata()
1412
1245
 
1413
1246
  > **removeMetadata**(`predicate`): `Promise`\<`void`\>
1414
1247
 
1415
1248
  Defined in:
1416
- [epub/index.ts:2348](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2348)
1249
+ [epub/index.ts:2433](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2433)
1417
1250
 
1418
1251
  Remove one or more metadata entries.
1419
1252
 
@@ -1434,16 +1267,12 @@ all metadata entries that match the predicate will be removed.
1434
1267
 
1435
1268
  https://www.w3.org/TR/epub-33/#sec-pkg-metadata
1436
1269
 
1437
- ##### Inherited from
1438
-
1439
- `BaseEpub.removeMetadata`
1440
-
1441
1270
  #### removeSpineItem()
1442
1271
 
1443
1272
  > **removeSpineItem**(`index`): `Promise`\<`void`\>
1444
1273
 
1445
1274
  Defined in:
1446
- [epub/index.ts:1905](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1905)
1275
+ [epub/index.ts:1990](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1990)
1447
1276
 
1448
1277
  Remove the spine item at the specified index.
1449
1278
 
@@ -1461,16 +1290,12 @@ Remove the spine item at the specified index.
1461
1290
 
1462
1291
  https://www.w3.org/TR/epub-33/#sec-spine-elem
1463
1292
 
1464
- ##### Inherited from
1465
-
1466
- `BaseEpub.removeSpineItem`
1467
-
1468
1293
  #### removeSubject()
1469
1294
 
1470
1295
  > **removeSubject**(`index`): `Promise`\<`void`\>
1471
1296
 
1472
1297
  Defined in:
1473
- [epub/index.ts:1043](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1043)
1298
+ [epub/index.ts:1124](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1124)
1474
1299
 
1475
1300
  Remove a subject from the EPUB metadata.
1476
1301
 
@@ -1491,16 +1316,12 @@ returned by `epub.getSubjects()`.
1491
1316
 
1492
1317
  https://www.w3.org/TR/epub-33/#sec-opf-dccreator
1493
1318
 
1494
- ##### Inherited from
1495
-
1496
- `BaseEpub.removeSubject`
1497
-
1498
1319
  #### replaceMetadata()
1499
1320
 
1500
1321
  > **replaceMetadata**(`predicate`, `entry`): `Promise`\<`void`\>
1501
1322
 
1502
1323
  Defined in:
1503
- [epub/index.ts:2303](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2303)
1324
+ [epub/index.ts:2388](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2388)
1504
1325
 
1505
1326
  Replace a metadata entry with a new one.
1506
1327
 
@@ -1522,28 +1343,18 @@ first metadata entry that matches the predicate will be replaced.
1522
1343
 
1523
1344
  https://www.w3.org/TR/epub-33/#sec-pkg-metadata
1524
1345
 
1525
- ##### Inherited from
1526
-
1527
- `BaseEpub.replaceMetadata`
1528
-
1529
1346
  #### saveAndClose()
1530
1347
 
1531
- > **saveAndClose**(`path`): `Promise`\<`void`\>
1348
+ > **saveAndClose**(): `Promise`\<`void`\>
1532
1349
 
1533
1350
  Defined in:
1534
- [epub/node.ts:65](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/node.ts#L65)
1351
+ [epub/index.ts:2474](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2474)
1535
1352
 
1536
1353
  Write the current contents of the Epub to a new EPUB archive on disk.
1537
1354
 
1538
1355
  When this method is called, the "dcterms:modified" meta tag is automatically
1539
1356
  updated to the current UTC timestamp.
1540
1357
 
1541
- ##### Parameters
1542
-
1543
- | Parameter | Type | Description |
1544
- | --------- | -------- | ------------------------------------------------------------------------------------------------------------------------------- |
1545
- | `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. |
1546
-
1547
1358
  ##### Returns
1548
1359
 
1549
1360
  `Promise`\<`void`\>
@@ -1553,7 +1364,7 @@ updated to the current UTC timestamp.
1553
1364
  > **setCoverImage**(`href`, `data`): `Promise`\<`void`\>
1554
1365
 
1555
1366
  Defined in:
1556
- [epub/index.ts:923](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L923)
1367
+ [epub/index.ts:1004](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1004)
1557
1368
 
1558
1369
  Set the cover image for the EPUB.
1559
1370
 
@@ -1571,16 +1382,12 @@ then writes the provided image data to the provided href within the publication.
1571
1382
 
1572
1383
  `Promise`\<`void`\>
1573
1384
 
1574
- ##### Inherited from
1575
-
1576
- `BaseEpub.setCoverImage`
1577
-
1578
1385
  #### setDescription()
1579
1386
 
1580
1387
  > **setDescription**(`description`): `Promise`\<`void`\>
1581
1388
 
1582
1389
  Defined in:
1583
- [epub/index.ts:1268](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1268)
1390
+ [epub/index.ts:1353](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1353)
1584
1391
 
1585
1392
  Update the Epub's description metadata entry.
1586
1393
 
@@ -1598,16 +1405,12 @@ encoded as HTML entities.
1598
1405
 
1599
1406
  `Promise`\<`void`\>
1600
1407
 
1601
- ##### Inherited from
1602
-
1603
- `BaseEpub.setDescription`
1604
-
1605
1408
  #### setIdentifier()
1606
1409
 
1607
1410
  > **setIdentifier**(`identifier`): `Promise`\<`void`\>
1608
1411
 
1609
1412
  Defined in:
1610
- [epub/index.ts:838](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L838)
1413
+ [epub/index.ts:919](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L919)
1611
1414
 
1612
1415
  Set the dc:identifier metadata element with the provided string.
1613
1416
 
@@ -1628,16 +1431,12 @@ new element
1628
1431
 
1629
1432
  https://www.w3.org/TR/epub-33/#sec-opf-dcidentifier
1630
1433
 
1631
- ##### Inherited from
1632
-
1633
- `BaseEpub.setIdentifier`
1634
-
1635
1434
  #### setLanguage()
1636
1435
 
1637
1436
  > **setLanguage**(`locale`): `Promise`\<`void`\>
1638
1437
 
1639
1438
  Defined in:
1640
- [epub/index.ts:1150](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1150)
1439
+ [epub/index.ts:1235](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1235)
1641
1440
 
1642
1441
  Update the Epub's language metadata entry.
1643
1442
 
@@ -1658,16 +1457,12 @@ element
1658
1457
 
1659
1458
  https://www.w3.org/TR/epub-33/#sec-opf-dclanguage
1660
1459
 
1661
- ##### Inherited from
1662
-
1663
- `BaseEpub.setLanguage`
1664
-
1665
1460
  #### setPackageVocabularyPrefix()
1666
1461
 
1667
1462
  > **setPackageVocabularyPrefix**(`prefix`, `uri`): `Promise`\<`void`\>
1668
1463
 
1669
1464
  Defined in:
1670
- [epub/index.ts:1319](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1319)
1465
+ [epub/index.ts:1404](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1404)
1671
1466
 
1672
1467
  Set a custom vocabulary prefix on the root package element.
1673
1468
 
@@ -1686,16 +1481,12 @@ Set a custom vocabulary prefix on the root package element.
1686
1481
 
1687
1482
  https://www.w3.org/TR/epub-33/#sec-prefix-attr
1688
1483
 
1689
- ##### Inherited from
1690
-
1691
- `BaseEpub.setPackageVocabularyPrefix`
1692
-
1693
1484
  #### setPublicationDate()
1694
1485
 
1695
1486
  > **setPublicationDate**(`date`): `Promise`\<`void`\>
1696
1487
 
1697
1488
  Defined in:
1698
- [epub/index.ts:961](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L961)
1489
+ [epub/index.ts:1042](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1042)
1699
1490
 
1700
1491
  Set the dc:date metadata element with the provided date.
1701
1492
 
@@ -1716,16 +1507,12 @@ element
1716
1507
 
1717
1508
  https://www.w3.org/TR/epub-33/#sec-opf-dcdate
1718
1509
 
1719
- ##### Inherited from
1720
-
1721
- `BaseEpub.setPublicationDate`
1722
-
1723
1510
  #### setTitle()
1724
1511
 
1725
1512
  > **setTitle**(`title`): `Promise`\<`void`\>
1726
1513
 
1727
1514
  Defined in:
1728
- [epub/index.ts:1343](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1343)
1515
+ [epub/index.ts:1428](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1428)
1729
1516
 
1730
1517
  Set the title of the Epub.
1731
1518
 
@@ -1748,16 +1535,12 @@ To set specific titles and their types, use epub.setTitles().
1748
1535
 
1749
1536
  https://www.w3.org/TR/epub-33/#sec-opf-dctitle
1750
1537
 
1751
- ##### Inherited from
1752
-
1753
- `BaseEpub.setTitle`
1754
-
1755
1538
  #### setTitles()
1756
1539
 
1757
1540
  > **setTitles**(`entries`): `Promise`\<`void`\>
1758
1541
 
1759
1542
  Defined in:
1760
- [epub/index.ts:1371](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1371)
1543
+ [epub/index.ts:1456](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1456)
1761
1544
 
1762
1545
  ##### Parameters
1763
1546
 
@@ -1769,16 +1552,12 @@ Defined in:
1769
1552
 
1770
1553
  `Promise`\<`void`\>
1771
1554
 
1772
- ##### Inherited from
1773
-
1774
- `BaseEpub.setTitles`
1775
-
1776
1555
  #### setType()
1777
1556
 
1778
1557
  > **setType**(`type`): `Promise`\<`void`\>
1779
1558
 
1780
1559
  Defined in:
1781
- [epub/index.ts:977](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L977)
1560
+ [epub/index.ts:1058](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1058)
1782
1561
 
1783
1562
  Set the dc:type metadata element.
1784
1563
 
@@ -1799,16 +1578,12 @@ element.
1799
1578
 
1800
1579
  https://www.w3.org/TR/epub-33/#sec-opf-dctype
1801
1580
 
1802
- ##### Inherited from
1803
-
1804
- `BaseEpub.setType`
1805
-
1806
1581
  #### updateManifestItem()
1807
1582
 
1808
1583
  > **updateManifestItem**(`id`, `newItem`): `Promise`\<`void`\>
1809
1584
 
1810
1585
  Defined in:
1811
- [epub/index.ts:2215](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2215)
1586
+ [epub/index.ts:2300](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2300)
1812
1587
 
1813
1588
  Update the manifest entry for an existing item.
1814
1589
 
@@ -1830,10 +1605,6 @@ To update the contents of an entry, use `epub.writeItemContents()` or
1830
1605
 
1831
1606
  https://www.w3.org/TR/epub-33/#sec-pkg-manifest
1832
1607
 
1833
- ##### Inherited from
1834
-
1835
- `BaseEpub.updateManifestItem`
1836
-
1837
1608
  #### writeItemContents()
1838
1609
 
1839
1610
  ##### Call Signature
@@ -1841,7 +1612,7 @@ https://www.w3.org/TR/epub-33/#sec-pkg-manifest
1841
1612
  > **writeItemContents**(`id`, `contents`): `Promise`\<`void`\>
1842
1613
 
1843
1614
  Defined in:
1844
- [epub/index.ts:2051](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2051)
1615
+ [epub/index.ts:2136](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2136)
1845
1616
 
1846
1617
  Write new contents for an existing manifest item, specified by its id.
1847
1618
 
@@ -1863,16 +1634,12 @@ The id must reference an existing manifest item. If creating a new item, use
1863
1634
 
1864
1635
  https://www.w3.org/TR/epub-33/#sec-contentdocs
1865
1636
 
1866
- ###### Inherited from
1867
-
1868
- `BaseEpub.writeItemContents`
1869
-
1870
1637
  ##### Call Signature
1871
1638
 
1872
1639
  > **writeItemContents**(`id`, `contents`, `encoding`): `Promise`\<`void`\>
1873
1640
 
1874
1641
  Defined in:
1875
- [epub/index.ts:2052](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2052)
1642
+ [epub/index.ts:2137](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2137)
1876
1643
 
1877
1644
  Write new contents for an existing manifest item, specified by its id.
1878
1645
 
@@ -1895,16 +1662,12 @@ The id must reference an existing manifest item. If creating a new item, use
1895
1662
 
1896
1663
  https://www.w3.org/TR/epub-33/#sec-contentdocs
1897
1664
 
1898
- ###### Inherited from
1899
-
1900
- `BaseEpub.writeItemContents`
1901
-
1902
1665
  #### writeXhtmlItemContents()
1903
1666
 
1904
1667
  > **writeXhtmlItemContents**(`id`, `contents`): `Promise`\<`void`\>
1905
1668
 
1906
1669
  Defined in:
1907
- [epub/index.ts:2091](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2091)
1670
+ [epub/index.ts:2176](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2176)
1908
1671
 
1909
1672
  Write new contents for an existing XHTML item, specified by its id.
1910
1673
 
@@ -1926,16 +1689,12 @@ The id must reference an existing manifest item. If creating a new item, use
1926
1689
 
1927
1690
  https://www.w3.org/TR/epub-33/#sec-xhtml
1928
1691
 
1929
- ##### Inherited from
1930
-
1931
- `BaseEpub.writeXhtmlItemContents`
1932
-
1933
1692
  #### addLinkToXhtmlHead()
1934
1693
 
1935
1694
  > `static` **addLinkToXhtmlHead**(`xml`, `link`): `void`
1936
1695
 
1937
1696
  Defined in:
1938
- [epub/index.ts:229](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L229)
1697
+ [epub/index.ts:276](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L276)
1939
1698
 
1940
1699
  Given an XML structure representing a complete XHTML document, add a `link`
1941
1700
  element to the `head` of the document.
@@ -1956,16 +1715,13 @@ This method modifies the provided XML structure.
1956
1715
 
1957
1716
  `void`
1958
1717
 
1959
- ##### Inherited from
1960
-
1961
- `BaseEpub.addLinkToXhtmlHead`
1962
-
1963
1718
  #### create()
1964
1719
 
1965
- > `static` **create**(`dc`, `additionalMetadata`): `Promise`\<[`Epub`](#epub)\>
1720
+ > `static` **create**(`path`, `__namedParameters`, `additionalMetadata`):
1721
+ > `Promise`\<[`Epub`](#epub)\>
1966
1722
 
1967
1723
  Defined in:
1968
- [epub/node.ts:32](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/node.ts#L32)
1724
+ [epub/index.ts:430](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L430)
1969
1725
 
1970
1726
  Construct an Epub instance, optionally beginning with the provided metadata.
1971
1727
 
@@ -1973,24 +1729,21 @@ Construct an Epub instance, optionally beginning with the provided metadata.
1973
1729
 
1974
1730
  | Parameter | Type | Default value | Description |
1975
1731
  | -------------------- | ------------------------------- | ------------- | --------------------------------------- |
1976
- | `dc` | [`DublinCore`](#dublincore) | `undefined` | - |
1732
+ | `path` | `string` | `undefined` | - |
1733
+ | `__namedParameters` | [`DublinCore`](#dublincore) | `undefined` | - |
1977
1734
  | `additionalMetadata` | [`EpubMetadata`](#epubmetadata) | `[]` | An array of additional metadata entries |
1978
1735
 
1979
1736
  ##### Returns
1980
1737
 
1981
1738
  `Promise`\<[`Epub`](#epub)\>
1982
1739
 
1983
- ##### Overrides
1984
-
1985
- `BaseEpub.create`
1986
-
1987
1740
  #### createXmlElement()
1988
1741
 
1989
1742
  > `static` **createXmlElement**\<`Name`\>(`name`, `properties`, `children`):
1990
1743
  > [`XmlElement`](#xmlelement)\<`Name`\>
1991
1744
 
1992
1745
  Defined in:
1993
- [epub/index.ts:264](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L264)
1746
+ [epub/index.ts:311](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L311)
1994
1747
 
1995
1748
  ##### Type Parameters
1996
1749
 
@@ -2010,16 +1763,12 @@ Defined in:
2010
1763
 
2011
1764
  [`XmlElement`](#xmlelement)\<`Name`\>
2012
1765
 
2013
- ##### Inherited from
2014
-
2015
- `BaseEpub.createXmlElement`
2016
-
2017
1766
  #### createXmlTextNode()
2018
1767
 
2019
1768
  > `static` **createXmlTextNode**(`text`): [`XmlTextNode`](#xmltextnode)
2020
1769
 
2021
1770
  Defined in:
2022
- [epub/index.ts:277](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L277)
1771
+ [epub/index.ts:324](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L324)
2023
1772
 
2024
1773
  ##### Parameters
2025
1774
 
@@ -2031,17 +1780,13 @@ Defined in:
2031
1780
 
2032
1781
  [`XmlTextNode`](#xmltextnode)
2033
1782
 
2034
- ##### Inherited from
2035
-
2036
- `BaseEpub.createXmlTextNode`
2037
-
2038
1783
  #### findXmlChildByName()
2039
1784
 
2040
1785
  > `static` **findXmlChildByName**\<`Name`\>(`name`, `xml`, `filter?`):
2041
1786
  > `undefined` \| [`XmlElement`](#xmlelement)\<`Name`\>
2042
1787
 
2043
1788
  Defined in:
2044
- [epub/index.ts:338](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L338)
1789
+ [epub/index.ts:385](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L385)
2045
1790
 
2046
1791
  Given an XML structure, find the first child matching the provided name and
2047
1792
  optional filter.
@@ -2064,16 +1809,12 @@ optional filter.
2064
1809
 
2065
1810
  `undefined` \| [`XmlElement`](#xmlelement)\<`Name`\>
2066
1811
 
2067
- ##### Inherited from
2068
-
2069
- `BaseEpub.findXmlChildByName`
2070
-
2071
1812
  #### formatSmilDuration()
2072
1813
 
2073
1814
  > `static` **formatSmilDuration**(`duration`): `string`
2074
1815
 
2075
1816
  Defined in:
2076
- [epub/index.ts:212](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L212)
1817
+ [epub/index.ts:259](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L259)
2077
1818
 
2078
1819
  Format a duration, provided as a number of seconds, as a SMIL clock value, to be
2079
1820
  used for Media Overlays.
@@ -2092,39 +1833,31 @@ used for Media Overlays.
2092
1833
 
2093
1834
  https://www.w3.org/TR/epub-33/#sec-duration
2094
1835
 
2095
- ##### Inherited from
2096
-
2097
- `BaseEpub.formatSmilDuration`
2098
-
2099
1836
  #### from()
2100
1837
 
2101
- > `static` **from**(...`args`): `Promise`\<[`Epub`](#epub)\>
1838
+ > `static` **from**(`pathOrData`): `Promise`\<[`Epub`](#epub)\>
2102
1839
 
2103
1840
  Defined in:
2104
- [epub/node.ts:39](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/node.ts#L39)
1841
+ [epub/index.ts:514](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L514)
2105
1842
 
2106
1843
  Construct an Epub instance by reading an existing EPUB publication.
2107
1844
 
2108
1845
  ##### Parameters
2109
1846
 
2110
- | Parameter | Type |
2111
- | --------- | ------------------------------------------------- |
2112
- | ...`args` | \[`string` \| `Uint8Array`\<`ArrayBufferLike`\>\] |
1847
+ | Parameter | Type | Description |
1848
+ | ------------ | --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
1849
+ | `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. |
2113
1850
 
2114
1851
  ##### Returns
2115
1852
 
2116
1853
  `Promise`\<[`Epub`](#epub)\>
2117
1854
 
2118
- ##### Overrides
2119
-
2120
- `BaseEpub.from`
2121
-
2122
1855
  #### getXhtmlBody()
2123
1856
 
2124
1857
  > `static` **getXhtmlBody**(`xml`): [`ParsedXml`](#parsedxml)
2125
1858
 
2126
1859
  Defined in:
2127
- [epub/index.ts:254](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L254)
1860
+ [epub/index.ts:301](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L301)
2128
1861
 
2129
1862
  Given an XML structure representing a complete XHTML document, return the
2130
1863
  sub-structure representing the children of the document's body element.
@@ -2139,16 +1872,12 @@ sub-structure representing the children of the document's body element.
2139
1872
 
2140
1873
  [`ParsedXml`](#parsedxml)
2141
1874
 
2142
- ##### Inherited from
2143
-
2144
- `BaseEpub.getXhtmlBody`
2145
-
2146
1875
  #### getXhtmlTextContent()
2147
1876
 
2148
1877
  > `static` **getXhtmlTextContent**(`xml`): `string`
2149
1878
 
2150
1879
  Defined in:
2151
- [epub/index.ts:286](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L286)
1880
+ [epub/index.ts:333](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L333)
2152
1881
 
2153
1882
  Given an XML structure representing a complete XHTML document, return a string
2154
1883
  representing the concatenation of all text nodes in the document.
@@ -2163,16 +1892,12 @@ representing the concatenation of all text nodes in the document.
2163
1892
 
2164
1893
  `string`
2165
1894
 
2166
- ##### Inherited from
2167
-
2168
- `BaseEpub.getXhtmlTextContent`
2169
-
2170
1895
  #### getXmlChildren()
2171
1896
 
2172
1897
  > `static` **getXmlChildren**\<`Name`\>(`element`): [`ParsedXml`](#parsedxml)
2173
1898
 
2174
1899
  Defined in:
2175
- [epub/index.ts:318](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L318)
1900
+ [epub/index.ts:365](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L365)
2176
1901
 
2177
1902
  Given an XMLElement, return a list of its children
2178
1903
 
@@ -2192,16 +1917,12 @@ Given an XMLElement, return a list of its children
2192
1917
 
2193
1918
  [`ParsedXml`](#parsedxml)
2194
1919
 
2195
- ##### Inherited from
2196
-
2197
- `BaseEpub.getXmlChildren`
2198
-
2199
1920
  #### getXmlElementName()
2200
1921
 
2201
1922
  > `static` **getXmlElementName**\<`Name`\>(`element`): `Name`
2202
1923
 
2203
1924
  Defined in:
2204
- [epub/index.ts:303](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L303)
1925
+ [epub/index.ts:350](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L350)
2205
1926
 
2206
1927
  Given an XMLElement, return its tag name.
2207
1928
 
@@ -2221,16 +1942,12 @@ Given an XMLElement, return its tag name.
2221
1942
 
2222
1943
  `Name`
2223
1944
 
2224
- ##### Inherited from
2225
-
2226
- `BaseEpub.getXmlElementName`
2227
-
2228
1945
  #### isXmlTextNode()
2229
1946
 
2230
1947
  > `static` **isXmlTextNode**(`node`): `node is XmlTextNode`
2231
1948
 
2232
1949
  Defined in:
2233
- [epub/index.ts:351](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L351)
1950
+ [epub/index.ts:398](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L398)
2234
1951
 
2235
1952
  Given an XMLNode, determine whether it represents a text node or an XML element.
2236
1953
 
@@ -2244,16 +1961,12 @@ Given an XMLNode, determine whether it represents a text node or an XML element.
2244
1961
 
2245
1962
  `node is XmlTextNode`
2246
1963
 
2247
- ##### Inherited from
2248
-
2249
- `BaseEpub.isXmlTextNode`
2250
-
2251
1964
  #### replaceXmlChildren()
2252
1965
 
2253
1966
  > `static` **replaceXmlChildren**\<`Name`\>(`element`, `children`): `void`
2254
1967
 
2255
1968
  Defined in:
2256
- [epub/index.ts:326](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L326)
1969
+ [epub/index.ts:373](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L373)
2257
1970
 
2258
1971
  ##### Type Parameters
2259
1972
 
@@ -2272,16 +1985,12 @@ Defined in:
2272
1985
 
2273
1986
  `void`
2274
1987
 
2275
- ##### Inherited from
2276
-
2277
- `BaseEpub.replaceXmlChildren`
2278
-
2279
1988
  ---
2280
1989
 
2281
1990
  ## AlternateScript
2282
1991
 
2283
1992
  Defined in:
2284
- [epub/index.ts:100](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L100)
1993
+ [epub/index.ts:147](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L147)
2285
1994
 
2286
1995
  ### Properties
2287
1996
 
@@ -2290,21 +1999,21 @@ Defined in:
2290
1999
  > **locale**: `Locale`
2291
2000
 
2292
2001
  Defined in:
2293
- [epub/index.ts:102](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L102)
2002
+ [epub/index.ts:149](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L149)
2294
2003
 
2295
2004
  #### name
2296
2005
 
2297
2006
  > **name**: `string`
2298
2007
 
2299
2008
  Defined in:
2300
- [epub/index.ts:101](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L101)
2009
+ [epub/index.ts:148](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L148)
2301
2010
 
2302
2011
  ---
2303
2012
 
2304
2013
  ## Collection
2305
2014
 
2306
2015
  Defined in:
2307
- [epub/index.ts:124](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L124)
2016
+ [epub/index.ts:171](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L171)
2308
2017
 
2309
2018
  ### Properties
2310
2019
 
@@ -2313,28 +2022,28 @@ Defined in:
2313
2022
  > **name**: `string`
2314
2023
 
2315
2024
  Defined in:
2316
- [epub/index.ts:125](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L125)
2025
+ [epub/index.ts:172](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L172)
2317
2026
 
2318
2027
  #### position?
2319
2028
 
2320
2029
  > `optional` **position**: `string`
2321
2030
 
2322
2031
  Defined in:
2323
- [epub/index.ts:127](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L127)
2032
+ [epub/index.ts:174](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L174)
2324
2033
 
2325
2034
  #### type?
2326
2035
 
2327
2036
  > `optional` **type**: `string`
2328
2037
 
2329
2038
  Defined in:
2330
- [epub/index.ts:126](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L126)
2039
+ [epub/index.ts:173](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L173)
2331
2040
 
2332
2041
  ---
2333
2042
 
2334
2043
  ## DcCreator
2335
2044
 
2336
2045
  Defined in:
2337
- [epub/index.ts:105](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L105)
2046
+ [epub/index.ts:152](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L152)
2338
2047
 
2339
2048
  ### Properties
2340
2049
 
@@ -2343,42 +2052,42 @@ Defined in:
2343
2052
  > `optional` **alternateScripts**: [`AlternateScript`](#alternatescript)[]
2344
2053
 
2345
2054
  Defined in:
2346
- [epub/index.ts:110](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L110)
2055
+ [epub/index.ts:157](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L157)
2347
2056
 
2348
2057
  #### fileAs?
2349
2058
 
2350
2059
  > `optional` **fileAs**: `string`
2351
2060
 
2352
2061
  Defined in:
2353
- [epub/index.ts:109](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L109)
2062
+ [epub/index.ts:156](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L156)
2354
2063
 
2355
2064
  #### name
2356
2065
 
2357
2066
  > **name**: `string`
2358
2067
 
2359
2068
  Defined in:
2360
- [epub/index.ts:106](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L106)
2069
+ [epub/index.ts:153](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L153)
2361
2070
 
2362
2071
  #### role?
2363
2072
 
2364
2073
  > `optional` **role**: `string`
2365
2074
 
2366
2075
  Defined in:
2367
- [epub/index.ts:107](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L107)
2076
+ [epub/index.ts:154](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L154)
2368
2077
 
2369
2078
  #### roleScheme?
2370
2079
 
2371
2080
  > `optional` **roleScheme**: `string`
2372
2081
 
2373
2082
  Defined in:
2374
- [epub/index.ts:108](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L108)
2083
+ [epub/index.ts:155](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L155)
2375
2084
 
2376
2085
  ---
2377
2086
 
2378
2087
  ## DcSubject
2379
2088
 
2380
2089
  Defined in:
2381
- [epub/index.ts:94](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L94)
2090
+ [epub/index.ts:141](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L141)
2382
2091
 
2383
2092
  ### Properties
2384
2093
 
@@ -2387,28 +2096,28 @@ Defined in:
2387
2096
  > **authority**: `string`
2388
2097
 
2389
2098
  Defined in:
2390
- [epub/index.ts:96](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L96)
2099
+ [epub/index.ts:143](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L143)
2391
2100
 
2392
2101
  #### term
2393
2102
 
2394
2103
  > **term**: `string`
2395
2104
 
2396
2105
  Defined in:
2397
- [epub/index.ts:97](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L97)
2106
+ [epub/index.ts:144](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L144)
2398
2107
 
2399
2108
  #### value
2400
2109
 
2401
2110
  > **value**: `string`
2402
2111
 
2403
2112
  Defined in:
2404
- [epub/index.ts:95](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L95)
2113
+ [epub/index.ts:142](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L142)
2405
2114
 
2406
2115
  ---
2407
2116
 
2408
2117
  ## DublinCore
2409
2118
 
2410
2119
  Defined in:
2411
- [epub/index.ts:113](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L113)
2120
+ [epub/index.ts:160](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L160)
2412
2121
 
2413
2122
  ### Properties
2414
2123
 
@@ -2417,56 +2126,56 @@ Defined in:
2417
2126
  > `optional` **contributors**: [`DcCreator`](#dccreator)[]
2418
2127
 
2419
2128
  Defined in:
2420
- [epub/index.ts:120](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L120)
2129
+ [epub/index.ts:167](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L167)
2421
2130
 
2422
2131
  #### creators?
2423
2132
 
2424
2133
  > `optional` **creators**: [`DcCreator`](#dccreator)[]
2425
2134
 
2426
2135
  Defined in:
2427
- [epub/index.ts:119](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L119)
2136
+ [epub/index.ts:166](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L166)
2428
2137
 
2429
2138
  #### date?
2430
2139
 
2431
2140
  > `optional` **date**: `Date`
2432
2141
 
2433
2142
  Defined in:
2434
- [epub/index.ts:117](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L117)
2143
+ [epub/index.ts:164](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L164)
2435
2144
 
2436
2145
  #### identifier
2437
2146
 
2438
2147
  > **identifier**: `string`
2439
2148
 
2440
2149
  Defined in:
2441
- [epub/index.ts:116](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L116)
2150
+ [epub/index.ts:163](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L163)
2442
2151
 
2443
2152
  #### language
2444
2153
 
2445
2154
  > **language**: `Locale`
2446
2155
 
2447
2156
  Defined in:
2448
- [epub/index.ts:115](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L115)
2157
+ [epub/index.ts:162](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L162)
2449
2158
 
2450
2159
  #### subjects?
2451
2160
 
2452
2161
  > `optional` **subjects**: (`string` \| [`DcSubject`](#dcsubject))[]
2453
2162
 
2454
2163
  Defined in:
2455
- [epub/index.ts:118](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L118)
2164
+ [epub/index.ts:165](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L165)
2456
2165
 
2457
2166
  #### title
2458
2167
 
2459
2168
  > **title**: `string`
2460
2169
 
2461
2170
  Defined in:
2462
- [epub/index.ts:114](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L114)
2171
+ [epub/index.ts:161](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L161)
2463
2172
 
2464
2173
  #### type?
2465
2174
 
2466
2175
  > `optional` **type**: `string`
2467
2176
 
2468
2177
  Defined in:
2469
- [epub/index.ts:121](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L121)
2178
+ [epub/index.ts:168](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L168)
2470
2179
 
2471
2180
  ---
2472
2181
 
@@ -2476,7 +2185,7 @@ Defined in:
2476
2185
  > \`$\{Letter \| Uppercase\<Letter\> \| QuestionMark\}$\{string\}\`
2477
2186
 
2478
2187
  Defined in:
2479
- [epub/index.ts:55](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L55)
2188
+ [epub/index.ts:102](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L102)
2480
2189
 
2481
2190
  A valid name for an XML element (must start with a letter)
2482
2191
 
@@ -2487,7 +2196,7 @@ A valid name for an XML element (must start with a letter)
2487
2196
  > **EpubMetadata** = [`MetadataEntry`](#metadataentry)[]
2488
2197
 
2489
2198
  Defined in:
2490
- [epub/index.ts:92](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L92)
2199
+ [epub/index.ts:139](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L139)
2491
2200
 
2492
2201
  ---
2493
2202
 
@@ -2496,7 +2205,7 @@ Defined in:
2496
2205
  > **ManifestItem** = `object`
2497
2206
 
2498
2207
  Defined in:
2499
- [epub/index.ts:76](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L76)
2208
+ [epub/index.ts:123](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L123)
2500
2209
 
2501
2210
  ### Properties
2502
2211
 
@@ -2505,42 +2214,42 @@ Defined in:
2505
2214
  > `optional` **fallback**: `string`
2506
2215
 
2507
2216
  Defined in:
2508
- [epub/index.ts:80](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L80)
2217
+ [epub/index.ts:127](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L127)
2509
2218
 
2510
2219
  #### href
2511
2220
 
2512
2221
  > **href**: `string`
2513
2222
 
2514
2223
  Defined in:
2515
- [epub/index.ts:78](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L78)
2224
+ [epub/index.ts:125](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L125)
2516
2225
 
2517
2226
  #### id
2518
2227
 
2519
2228
  > **id**: `string`
2520
2229
 
2521
2230
  Defined in:
2522
- [epub/index.ts:77](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L77)
2231
+ [epub/index.ts:124](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L124)
2523
2232
 
2524
2233
  #### mediaOverlay?
2525
2234
 
2526
2235
  > `optional` **mediaOverlay**: `string`
2527
2236
 
2528
2237
  Defined in:
2529
- [epub/index.ts:81](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L81)
2238
+ [epub/index.ts:128](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L128)
2530
2239
 
2531
2240
  #### mediaType?
2532
2241
 
2533
2242
  > `optional` **mediaType**: `string`
2534
2243
 
2535
2244
  Defined in:
2536
- [epub/index.ts:79](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L79)
2245
+ [epub/index.ts:126](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L126)
2537
2246
 
2538
2247
  #### properties?
2539
2248
 
2540
2249
  > `optional` **properties**: `string`[]
2541
2250
 
2542
2251
  Defined in:
2543
- [epub/index.ts:82](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L82)
2252
+ [epub/index.ts:129](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L129)
2544
2253
 
2545
2254
  ---
2546
2255
 
@@ -2549,7 +2258,7 @@ Defined in:
2549
2258
  > **MetadataEntry** = `object`
2550
2259
 
2551
2260
  Defined in:
2552
- [epub/index.ts:85](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L85)
2261
+ [epub/index.ts:132](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L132)
2553
2262
 
2554
2263
  ### Properties
2555
2264
 
@@ -2558,28 +2267,38 @@ Defined in:
2558
2267
  > `optional` **id**: `string`
2559
2268
 
2560
2269
  Defined in:
2561
- [epub/index.ts:86](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L86)
2270
+ [epub/index.ts:133](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L133)
2562
2271
 
2563
2272
  #### properties
2564
2273
 
2565
2274
  > **properties**: `Record`\<`string`, `string`\>
2566
2275
 
2567
2276
  Defined in:
2568
- [epub/index.ts:88](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L88)
2277
+ [epub/index.ts:135](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L135)
2569
2278
 
2570
2279
  #### type
2571
2280
 
2572
2281
  > **type**: [`ElementName`](#elementname)
2573
2282
 
2574
2283
  Defined in:
2575
- [epub/index.ts:87](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L87)
2284
+ [epub/index.ts:134](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L134)
2576
2285
 
2577
2286
  #### value
2578
2287
 
2579
2288
  > **value**: `string` \| `undefined`
2580
2289
 
2581
2290
  Defined in:
2582
- [epub/index.ts:89](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L89)
2291
+ [epub/index.ts:136](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L136)
2292
+
2293
+ ---
2294
+
2295
+ ## PackageElement
2296
+
2297
+ > **PackageElement** = [`XmlElement`](#xmlelement)\<`"package"`\> \|
2298
+ > [`XmlElement`](#xmlelement)\<`"opf:package"`\>
2299
+
2300
+ Defined in:
2301
+ [epub/index.ts:177](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L177)
2583
2302
 
2584
2303
  ---
2585
2304
 
@@ -2588,7 +2307,7 @@ Defined in:
2588
2307
  > **ParsedXml** = [`XmlNode`](#xmlnode)[]
2589
2308
 
2590
2309
  Defined in:
2591
- [epub/index.ts:74](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L74)
2310
+ [epub/index.ts:121](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L121)
2592
2311
 
2593
2312
  An XML structure
2594
2313
 
@@ -2599,7 +2318,7 @@ An XML structure
2599
2318
  > **XmlElement**\<`Name`\> = `object` & `{ [key in Name]: ParsedXml }`
2600
2319
 
2601
2320
  Defined in:
2602
- [epub/index.ts:61](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L61)
2321
+ [epub/index.ts:108](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L108)
2603
2322
 
2604
2323
  An XML element
2605
2324
 
@@ -2622,7 +2341,7 @@ An XML element
2622
2341
  > **XmlNode** = [`XmlElement`](#xmlelement) \| [`XmlTextNode`](#xmltextnode)
2623
2342
 
2624
2343
  Defined in:
2625
- [epub/index.ts:71](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L71)
2344
+ [epub/index.ts:118](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L118)
2626
2345
 
2627
2346
  A valid XML node. May be either an element or a text node.
2628
2347
 
@@ -2633,7 +2352,7 @@ A valid XML node. May be either an element or a text node.
2633
2352
  > **XmlTextNode** = `object`
2634
2353
 
2635
2354
  Defined in:
2636
- [epub/index.ts:68](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L68)
2355
+ [epub/index.ts:115](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L115)
2637
2356
 
2638
2357
  A text node in an XML document
2639
2358
 
@@ -2644,4 +2363,4 @@ A text node in an XML document
2644
2363
  > **#text**: `string`
2645
2364
 
2646
2365
  Defined in:
2647
- [epub/index.ts:68](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L68)
2366
+ [epub/index.ts:115](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L115)