@storyteller-platform/epub 0.2.0 → 0.3.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 +263 -193
- package/dist/index.cjs +87 -132
- package/dist/index.d.cts +41 -31
- package/dist/index.d.ts +41 -31
- package/dist/index.js +87 -138
- package/dist/node.cjs +11 -12
- package/dist/node.d.cts +6 -10
- package/dist/node.d.ts +6 -10
- package/dist/node.js +14 -13
- package/package.json +29 -29
package/README.md
CHANGED
|
@@ -220,7 +220,7 @@ 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:
|
|
223
|
+
[epub/node.ts:31](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/node.ts#L31)
|
|
224
224
|
|
|
225
225
|
### Extends
|
|
226
226
|
|
|
@@ -230,17 +230,16 @@ Defined in:
|
|
|
230
230
|
|
|
231
231
|
#### Constructor
|
|
232
232
|
|
|
233
|
-
> `protected` **new Epub**(`
|
|
233
|
+
> `protected` **new Epub**(`zipFs`): [`Epub`](#epub)
|
|
234
234
|
|
|
235
235
|
Defined in:
|
|
236
|
-
[epub/index.ts:
|
|
236
|
+
[epub/index.ts:363](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L363)
|
|
237
237
|
|
|
238
238
|
##### Parameters
|
|
239
239
|
|
|
240
|
-
| Parameter
|
|
241
|
-
|
|
|
242
|
-
| `
|
|
243
|
-
| `onClose?` | () => `void` \| `Promise`\<`void`\> |
|
|
240
|
+
| Parameter | Type |
|
|
241
|
+
| --------- | ------- |
|
|
242
|
+
| `zipFs` | `ZipFS` |
|
|
244
243
|
|
|
245
244
|
##### Returns
|
|
246
245
|
|
|
@@ -252,12 +251,23 @@ Defined in:
|
|
|
252
251
|
|
|
253
252
|
### Properties
|
|
254
253
|
|
|
254
|
+
#### zipFs
|
|
255
|
+
|
|
256
|
+
> `protected` **zipFs**: `ZipFS`
|
|
257
|
+
|
|
258
|
+
Defined in:
|
|
259
|
+
[epub/index.ts:363](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L363)
|
|
260
|
+
|
|
261
|
+
##### Inherited from
|
|
262
|
+
|
|
263
|
+
`BaseEpub.zipFs`
|
|
264
|
+
|
|
255
265
|
#### xhtmlBuilder
|
|
256
266
|
|
|
257
267
|
> `static` **xhtmlBuilder**: `XMLBuilder`
|
|
258
268
|
|
|
259
269
|
Defined in:
|
|
260
|
-
[epub/index.ts:
|
|
270
|
+
[epub/index.ts:199](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L199)
|
|
261
271
|
|
|
262
272
|
##### Inherited from
|
|
263
273
|
|
|
@@ -268,7 +278,7 @@ Defined in:
|
|
|
268
278
|
> `static` **xhtmlParser**: `XMLParser`
|
|
269
279
|
|
|
270
280
|
Defined in:
|
|
271
|
-
[epub/index.ts:
|
|
281
|
+
[epub/index.ts:167](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L167)
|
|
272
282
|
|
|
273
283
|
##### Inherited from
|
|
274
284
|
|
|
@@ -279,7 +289,7 @@ Defined in:
|
|
|
279
289
|
> `static` **xmlBuilder**: `XMLBuilder`
|
|
280
290
|
|
|
281
291
|
Defined in:
|
|
282
|
-
[epub/index.ts:
|
|
292
|
+
[epub/index.ts:192](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L192)
|
|
283
293
|
|
|
284
294
|
##### Inherited from
|
|
285
295
|
|
|
@@ -290,7 +300,7 @@ Defined in:
|
|
|
290
300
|
> `static` **xmlParser**: `XMLParser`
|
|
291
301
|
|
|
292
302
|
Defined in:
|
|
293
|
-
[epub/index.ts:
|
|
303
|
+
[epub/index.ts:160](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L160)
|
|
294
304
|
|
|
295
305
|
##### Inherited from
|
|
296
306
|
|
|
@@ -298,12 +308,27 @@ Defined in:
|
|
|
298
308
|
|
|
299
309
|
### Methods
|
|
300
310
|
|
|
311
|
+
#### \[dispose\]()
|
|
312
|
+
|
|
313
|
+
> **\[dispose\]**(): `void`
|
|
314
|
+
|
|
315
|
+
Defined in:
|
|
316
|
+
[epub/index.ts:2418](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2418)
|
|
317
|
+
|
|
318
|
+
##### Returns
|
|
319
|
+
|
|
320
|
+
`void`
|
|
321
|
+
|
|
322
|
+
##### Inherited from
|
|
323
|
+
|
|
324
|
+
`BaseEpub.[dispose]`
|
|
325
|
+
|
|
301
326
|
#### addCollection()
|
|
302
327
|
|
|
303
328
|
> **addCollection**(`collection`, `index?`): `Promise`\<`void`\>
|
|
304
329
|
|
|
305
330
|
Defined in:
|
|
306
|
-
[epub/index.ts:
|
|
331
|
+
[epub/index.ts:1473](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1473)
|
|
307
332
|
|
|
308
333
|
Add a collection to the EPUB metadata.
|
|
309
334
|
|
|
@@ -330,7 +355,7 @@ collections. Otherwise, it will be added to the end of the list.
|
|
|
330
355
|
> **addContributor**(`contributor`, `index?`): `Promise`\<`void`\>
|
|
331
356
|
|
|
332
357
|
Defined in:
|
|
333
|
-
[epub/index.ts:
|
|
358
|
+
[epub/index.ts:1815](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1815)
|
|
334
359
|
|
|
335
360
|
Add a contributor to the EPUB metadata.
|
|
336
361
|
|
|
@@ -364,7 +389,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccreator
|
|
|
364
389
|
> **addCreator**(`creator`, `index?`, `type?`): `Promise`\<`void`\>
|
|
365
390
|
|
|
366
391
|
Defined in:
|
|
367
|
-
[epub/index.ts:
|
|
392
|
+
[epub/index.ts:1660](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1660)
|
|
368
393
|
|
|
369
394
|
Add a creator to the EPUB metadata.
|
|
370
395
|
|
|
@@ -398,7 +423,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccreator
|
|
|
398
423
|
> **addManifestItem**(`item`, `contents`, `encoding`): `Promise`\<`void`\>
|
|
399
424
|
|
|
400
425
|
Defined in:
|
|
401
|
-
[epub/index.ts:
|
|
426
|
+
[epub/index.ts:2142](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2142)
|
|
402
427
|
|
|
403
428
|
Create a new manifest item and write its contents to a new entry.
|
|
404
429
|
|
|
@@ -431,7 +456,7 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
|
|
|
431
456
|
> **addManifestItem**(`item`, `contents`, `encoding`): `Promise`\<`void`\>
|
|
432
457
|
|
|
433
458
|
Defined in:
|
|
434
|
-
[epub/index.ts:
|
|
459
|
+
[epub/index.ts:2147](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2147)
|
|
435
460
|
|
|
436
461
|
Create a new manifest item and write its contents to a new entry.
|
|
437
462
|
|
|
@@ -464,7 +489,7 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
|
|
|
464
489
|
> **addManifestItem**(`item`, `contents`): `Promise`\<`void`\>
|
|
465
490
|
|
|
466
491
|
Defined in:
|
|
467
|
-
[epub/index.ts:
|
|
492
|
+
[epub/index.ts:2152](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2152)
|
|
468
493
|
|
|
469
494
|
Create a new manifest item and write its contents to a new entry.
|
|
470
495
|
|
|
@@ -496,7 +521,7 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
|
|
|
496
521
|
> **addMetadata**(`entry`): `Promise`\<`void`\>
|
|
497
522
|
|
|
498
523
|
Defined in:
|
|
499
|
-
[epub/index.ts:
|
|
524
|
+
[epub/index.ts:2264](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2264)
|
|
500
525
|
|
|
501
526
|
Add a new metadata entry to the Epub.
|
|
502
527
|
|
|
@@ -527,7 +552,7 @@ https://www.w3.org/TR/epub-33/#sec-pkg-metadata
|
|
|
527
552
|
> **addSpineItem**(`manifestId`, `index?`): `Promise`\<`void`\>
|
|
528
553
|
|
|
529
554
|
Defined in:
|
|
530
|
-
[epub/index.ts:
|
|
555
|
+
[epub/index.ts:1869](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1869)
|
|
531
556
|
|
|
532
557
|
Add an item to the spine of the EPUB.
|
|
533
558
|
|
|
@@ -561,7 +586,7 @@ https://www.w3.org/TR/epub-33/#sec-spine-elem
|
|
|
561
586
|
> **addSubject**(`subject`): `Promise`\<`void`\>
|
|
562
587
|
|
|
563
588
|
Defined in:
|
|
564
|
-
[epub/index.ts:
|
|
589
|
+
[epub/index.ts:1006](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1006)
|
|
565
590
|
|
|
566
591
|
Add a subject to the EPUB metadata.
|
|
567
592
|
|
|
@@ -583,24 +608,6 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcsubject
|
|
|
583
608
|
|
|
584
609
|
`BaseEpub.addSubject`
|
|
585
610
|
|
|
586
|
-
#### close()
|
|
587
|
-
|
|
588
|
-
> **close**(): `Promise`\<`void`\>
|
|
589
|
-
|
|
590
|
-
Defined in:
|
|
591
|
-
[epub/index.ts:430](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L430)
|
|
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
611
|
#### createXhtmlDocument()
|
|
605
612
|
|
|
606
613
|
> **createXhtmlDocument**(`body`, `head?`, `language?`):
|
|
@@ -608,7 +615,7 @@ collected.
|
|
|
608
615
|
> [`XmlElement`](#xmlelement)\<`"?xml"`\>)[]\>
|
|
609
616
|
|
|
610
617
|
Defined in:
|
|
611
|
-
[epub/index.ts:
|
|
618
|
+
[epub/index.ts:1970](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1970)
|
|
612
619
|
|
|
613
620
|
Create a new XHTML document with the given body and head.
|
|
614
621
|
|
|
@@ -629,12 +636,27 @@ Create a new XHTML document with the given body and head.
|
|
|
629
636
|
|
|
630
637
|
`BaseEpub.createXhtmlDocument`
|
|
631
638
|
|
|
639
|
+
#### discardAndClose()
|
|
640
|
+
|
|
641
|
+
> **discardAndClose**(): `void`
|
|
642
|
+
|
|
643
|
+
Defined in:
|
|
644
|
+
[epub/index.ts:2373](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2373)
|
|
645
|
+
|
|
646
|
+
##### Returns
|
|
647
|
+
|
|
648
|
+
`void`
|
|
649
|
+
|
|
650
|
+
##### Inherited from
|
|
651
|
+
|
|
652
|
+
`BaseEpub.discardAndClose`
|
|
653
|
+
|
|
632
654
|
#### findAllMetadataItems()
|
|
633
655
|
|
|
634
656
|
> **findAllMetadataItems**(`predicate`): `Promise`\<`object`[]\>
|
|
635
657
|
|
|
636
658
|
Defined in:
|
|
637
|
-
[epub/index.ts:
|
|
659
|
+
[epub/index.ts:729](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L729)
|
|
638
660
|
|
|
639
661
|
Returns the item in the metadata element's children array that matches the
|
|
640
662
|
provided predicate.
|
|
@@ -678,7 +700,7 @@ provided predicate.
|
|
|
678
700
|
> \}\>
|
|
679
701
|
|
|
680
702
|
Defined in:
|
|
681
|
-
[epub/index.ts:
|
|
703
|
+
[epub/index.ts:720](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L720)
|
|
682
704
|
|
|
683
705
|
Returns the item in the metadata element's children array that matches the
|
|
684
706
|
provided predicate.
|
|
@@ -716,12 +738,32 @@ provided predicate.
|
|
|
716
738
|
|
|
717
739
|
`BaseEpub.findMetadataItem`
|
|
718
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
|
+
|
|
719
761
|
#### getCollections()
|
|
720
762
|
|
|
721
763
|
> **getCollections**(): `Promise`\<[`Collection`](#collection)[]\>
|
|
722
764
|
|
|
723
765
|
Defined in:
|
|
724
|
-
[epub/index.ts:
|
|
766
|
+
[epub/index.ts:1433](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1433)
|
|
725
767
|
|
|
726
768
|
Retrieve the list of collections.
|
|
727
769
|
|
|
@@ -738,7 +780,7 @@ Retrieve the list of collections.
|
|
|
738
780
|
> **getContributors**(): `Promise`\<[`DcCreator`](#dccreator)[]\>
|
|
739
781
|
|
|
740
782
|
Defined in:
|
|
741
|
-
[epub/index.ts:
|
|
783
|
+
[epub/index.ts:1647](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1647)
|
|
742
784
|
|
|
743
785
|
Retrieve the list of contributors.
|
|
744
786
|
|
|
@@ -761,7 +803,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccontributor
|
|
|
761
803
|
> **getCoverImage**(): `Promise`\<`null` \| `Uint8Array`\<`ArrayBufferLike`\>\>
|
|
762
804
|
|
|
763
805
|
Defined in:
|
|
764
|
-
[epub/index.ts:
|
|
806
|
+
[epub/index.ts:909](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L909)
|
|
765
807
|
|
|
766
808
|
Retrieve the cover image data as a byte array.
|
|
767
809
|
|
|
@@ -786,7 +828,7 @@ https://www.w3.org/TR/epub-33/#sec-cover-image
|
|
|
786
828
|
> [`ManifestItem`](#manifestitem)\>
|
|
787
829
|
|
|
788
830
|
Defined in:
|
|
789
|
-
[epub/index.ts:
|
|
831
|
+
[epub/index.ts:890](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L890)
|
|
790
832
|
|
|
791
833
|
Retrieve the cover image manifest item.
|
|
792
834
|
|
|
@@ -810,7 +852,7 @@ https://www.w3.org/TR/epub-33/#sec-cover-image
|
|
|
810
852
|
> **getCreators**(`type`): `Promise`\<[`DcCreator`](#dccreator)[]\>
|
|
811
853
|
|
|
812
854
|
Defined in:
|
|
813
|
-
[epub/index.ts:
|
|
855
|
+
[epub/index.ts:1586](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1586)
|
|
814
856
|
|
|
815
857
|
Retrieve the list of creators.
|
|
816
858
|
|
|
@@ -837,7 +879,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccreator
|
|
|
837
879
|
> **getDescription**(): `Promise`\<`null` \| `string`\>
|
|
838
880
|
|
|
839
881
|
Defined in:
|
|
840
|
-
[epub/index.ts:
|
|
882
|
+
[epub/index.ts:1284](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1284)
|
|
841
883
|
|
|
842
884
|
Retrieve the Epub's description as specified in its package document metadata.
|
|
843
885
|
|
|
@@ -852,12 +894,35 @@ as a string. Descriptions may include HTML markup.
|
|
|
852
894
|
|
|
853
895
|
`BaseEpub.getDescription`
|
|
854
896
|
|
|
897
|
+
#### getIdentifier()
|
|
898
|
+
|
|
899
|
+
> **getIdentifier**(): `Promise`\<`null` \| `string`\>
|
|
900
|
+
|
|
901
|
+
Defined in:
|
|
902
|
+
[epub/index.ts:824](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L824)
|
|
903
|
+
|
|
904
|
+
Retrieve the identifier from the dc:identifier element in the EPUB metadata.
|
|
905
|
+
|
|
906
|
+
If there is no dc:identifier element, returns null.
|
|
907
|
+
|
|
908
|
+
##### Returns
|
|
909
|
+
|
|
910
|
+
`Promise`\<`null` \| `string`\>
|
|
911
|
+
|
|
912
|
+
##### Link
|
|
913
|
+
|
|
914
|
+
https://www.w3.org/TR/epub-33/#sec-opf-dcidentifier
|
|
915
|
+
|
|
916
|
+
##### Inherited from
|
|
917
|
+
|
|
918
|
+
`BaseEpub.getIdentifier`
|
|
919
|
+
|
|
855
920
|
#### getLanguage()
|
|
856
921
|
|
|
857
922
|
> **getLanguage**(): `Promise`\<`null` \| `Locale`\>
|
|
858
923
|
|
|
859
924
|
Defined in:
|
|
860
|
-
[epub/index.ts:
|
|
925
|
+
[epub/index.ts:1125](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1125)
|
|
861
926
|
|
|
862
927
|
Retrieve the Epub's language as specified in its package document metadata.
|
|
863
928
|
|
|
@@ -882,7 +947,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dclanguage
|
|
|
882
947
|
> [`ManifestItem`](#manifestitem)\>\>
|
|
883
948
|
|
|
884
949
|
Defined in:
|
|
885
|
-
[epub/index.ts:
|
|
950
|
+
[epub/index.ts:645](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L645)
|
|
886
951
|
|
|
887
952
|
Retrieve the manifest for the Epub.
|
|
888
953
|
|
|
@@ -906,7 +971,7 @@ https://www.w3.org/TR/epub-33/#sec-pkg-manifest
|
|
|
906
971
|
> **getMetadata**(): `Promise`\<[`EpubMetadata`](#epubmetadata)\>
|
|
907
972
|
|
|
908
973
|
Defined in:
|
|
909
|
-
[epub/index.ts:
|
|
974
|
+
[epub/index.ts:796](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L796)
|
|
910
975
|
|
|
911
976
|
Retrieve the metadata entries for the Epub.
|
|
912
977
|
|
|
@@ -934,7 +999,7 @@ https://www.w3.org/TR/epub-33/#sec-pkg-metadata
|
|
|
934
999
|
> `string`\>\>
|
|
935
1000
|
|
|
936
1001
|
Defined in:
|
|
937
|
-
[epub/index.ts:
|
|
1002
|
+
[epub/index.ts:1301](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1301)
|
|
938
1003
|
|
|
939
1004
|
Return the set of custom vocabulary prefixes set on this publication's root
|
|
940
1005
|
package element.
|
|
@@ -958,7 +1023,7 @@ https://www.w3.org/TR/epub-33/#sec-prefix-attr
|
|
|
958
1023
|
> **getPublicationDate**(): `Promise`\<`null` \| `Date`\>
|
|
959
1024
|
|
|
960
1025
|
Defined in:
|
|
961
|
-
[epub/index.ts:
|
|
1026
|
+
[epub/index.ts:946](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L946)
|
|
962
1027
|
|
|
963
1028
|
Retrieve the publication date from the dc:date element in the EPUB metadata as a
|
|
964
1029
|
Date object.
|
|
@@ -982,7 +1047,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcdate
|
|
|
982
1047
|
> **getSpineItems**(): `Promise`\<[`ManifestItem`](#manifestitem)[]\>
|
|
983
1048
|
|
|
984
1049
|
Defined in:
|
|
985
|
-
[epub/index.ts:
|
|
1050
|
+
[epub/index.ts:1850](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1850)
|
|
986
1051
|
|
|
987
1052
|
Retrieve the manifest items that make up the Epub's spine.
|
|
988
1053
|
|
|
@@ -1006,7 +1071,7 @@ https://www.w3.org/TR/epub-33/#sec-spine-elem
|
|
|
1006
1071
|
> **getSubjects**(): `Promise`\<(`string` \| [`DcSubject`](#dcsubject))[]\>
|
|
1007
1072
|
|
|
1008
1073
|
Defined in:
|
|
1009
|
-
[epub/index.ts:
|
|
1074
|
+
[epub/index.ts:1080](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1080)
|
|
1010
1075
|
|
|
1011
1076
|
Retrieve the list of subjects for this EPUB.
|
|
1012
1077
|
|
|
@@ -1031,7 +1096,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcsubject
|
|
|
1031
1096
|
> **getSubtitle**(): `Promise`\<`null` \| `string`\>
|
|
1032
1097
|
|
|
1033
1098
|
Defined in:
|
|
1034
|
-
[epub/index.ts:
|
|
1099
|
+
[epub/index.ts:1191](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1191)
|
|
1035
1100
|
|
|
1036
1101
|
Retrieve the subtitle of the Epub, if it exists.
|
|
1037
1102
|
|
|
@@ -1052,7 +1117,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dctitle
|
|
|
1052
1117
|
> **getTitle**(`expanded`): `Promise`\<`null` \| `string`\>
|
|
1053
1118
|
|
|
1054
1119
|
Defined in:
|
|
1055
|
-
[epub/index.ts:
|
|
1120
|
+
[epub/index.ts:1167](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1167)
|
|
1056
1121
|
|
|
1057
1122
|
Retrieve the title of the Epub.
|
|
1058
1123
|
|
|
@@ -1079,7 +1144,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dctitle
|
|
|
1079
1144
|
> **getTitles**(): `Promise`\<`object`[]\>
|
|
1080
1145
|
|
|
1081
1146
|
Defined in:
|
|
1082
|
-
[epub/index.ts:
|
|
1147
|
+
[epub/index.ts:1203](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1203)
|
|
1083
1148
|
|
|
1084
1149
|
Retrieve all title entries of the Epub.
|
|
1085
1150
|
|
|
@@ -1100,7 +1165,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dctitle
|
|
|
1100
1165
|
> **getType**(): `Promise`\<`null` \| [`MetadataEntry`](#metadataentry)\>
|
|
1101
1166
|
|
|
1102
1167
|
Defined in:
|
|
1103
|
-
[epub/index.ts:
|
|
1168
|
+
[epub/index.ts:993](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L993)
|
|
1104
1169
|
|
|
1105
1170
|
Retrieve the publication type from the dc:type element in the EPUB metadata.
|
|
1106
1171
|
|
|
@@ -1125,7 +1190,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dctype
|
|
|
1125
1190
|
> **readItemContents**(`id`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\>
|
|
1126
1191
|
|
|
1127
1192
|
Defined in:
|
|
1128
|
-
[epub/index.ts:
|
|
1193
|
+
[epub/index.ts:1942](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1942)
|
|
1129
1194
|
|
|
1130
1195
|
Retrieve the contents of a manifest item, given its id.
|
|
1131
1196
|
|
|
@@ -1152,7 +1217,7 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
|
|
|
1152
1217
|
> **readItemContents**(`id`, `encoding`): `Promise`\<`string`\>
|
|
1153
1218
|
|
|
1154
1219
|
Defined in:
|
|
1155
|
-
[epub/index.ts:
|
|
1220
|
+
[epub/index.ts:1943](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1943)
|
|
1156
1221
|
|
|
1157
1222
|
Retrieve the contents of a manifest item, given its id.
|
|
1158
1223
|
|
|
@@ -1182,7 +1247,7 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
|
|
|
1182
1247
|
> **readXhtmlItemContents**(`id`, `as?`): `Promise`\<[`ParsedXml`](#parsedxml)\>
|
|
1183
1248
|
|
|
1184
1249
|
Defined in:
|
|
1185
|
-
[epub/index.ts:
|
|
1250
|
+
[epub/index.ts:2003](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2003)
|
|
1186
1251
|
|
|
1187
1252
|
Retrieves the contents of an XHTML item, given its manifest id.
|
|
1188
1253
|
|
|
@@ -1210,7 +1275,7 @@ https://www.w3.org/TR/epub-33/#sec-xhtml
|
|
|
1210
1275
|
> **readXhtmlItemContents**(`id`, `as`): `Promise`\<`string`\>
|
|
1211
1276
|
|
|
1212
1277
|
Defined in:
|
|
1213
|
-
[epub/index.ts:
|
|
1278
|
+
[epub/index.ts:2004](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2004)
|
|
1214
1279
|
|
|
1215
1280
|
Retrieves the contents of an XHTML item, given its manifest id.
|
|
1216
1281
|
|
|
@@ -1238,7 +1303,7 @@ https://www.w3.org/TR/epub-33/#sec-xhtml
|
|
|
1238
1303
|
> **removeCollection**(`index`): `Promise`\<`void`\>
|
|
1239
1304
|
|
|
1240
1305
|
Defined in:
|
|
1241
|
-
[epub/index.ts:
|
|
1306
|
+
[epub/index.ts:1542](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1542)
|
|
1242
1307
|
|
|
1243
1308
|
Remove a collection from the EPUB metadata.
|
|
1244
1309
|
|
|
@@ -1264,7 +1329,7 @@ returned by `epub.getCollections()`.
|
|
|
1264
1329
|
> **removeContributor**(`index`): `Promise`\<`void`\>
|
|
1265
1330
|
|
|
1266
1331
|
Defined in:
|
|
1267
|
-
[epub/index.ts:
|
|
1332
|
+
[epub/index.ts:1799](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1799)
|
|
1268
1333
|
|
|
1269
1334
|
Remove a contributor from the EPUB metadata.
|
|
1270
1335
|
|
|
@@ -1296,7 +1361,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccreator
|
|
|
1296
1361
|
> **removeCreator**(`index`, `type`): `Promise`\<`void`\>
|
|
1297
1362
|
|
|
1298
1363
|
Defined in:
|
|
1299
|
-
[epub/index.ts:
|
|
1364
|
+
[epub/index.ts:1747](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1747)
|
|
1300
1365
|
|
|
1301
1366
|
Remove a creator from the EPUB metadata.
|
|
1302
1367
|
|
|
@@ -1327,7 +1392,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccreator
|
|
|
1327
1392
|
> **removeManifestItem**(`id`): `Promise`\<`void`\>
|
|
1328
1393
|
|
|
1329
1394
|
Defined in:
|
|
1330
|
-
[epub/index.ts:
|
|
1395
|
+
[epub/index.ts:2099](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2099)
|
|
1331
1396
|
|
|
1332
1397
|
##### Parameters
|
|
1333
1398
|
|
|
@@ -1348,7 +1413,7 @@ Defined in:
|
|
|
1348
1413
|
> **removeMetadata**(`predicate`): `Promise`\<`void`\>
|
|
1349
1414
|
|
|
1350
1415
|
Defined in:
|
|
1351
|
-
[epub/index.ts:
|
|
1416
|
+
[epub/index.ts:2348](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2348)
|
|
1352
1417
|
|
|
1353
1418
|
Remove one or more metadata entries.
|
|
1354
1419
|
|
|
@@ -1378,7 +1443,7 @@ https://www.w3.org/TR/epub-33/#sec-pkg-metadata
|
|
|
1378
1443
|
> **removeSpineItem**(`index`): `Promise`\<`void`\>
|
|
1379
1444
|
|
|
1380
1445
|
Defined in:
|
|
1381
|
-
[epub/index.ts:
|
|
1446
|
+
[epub/index.ts:1905](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1905)
|
|
1382
1447
|
|
|
1383
1448
|
Remove the spine item at the specified index.
|
|
1384
1449
|
|
|
@@ -1405,7 +1470,7 @@ https://www.w3.org/TR/epub-33/#sec-spine-elem
|
|
|
1405
1470
|
> **removeSubject**(`index`): `Promise`\<`void`\>
|
|
1406
1471
|
|
|
1407
1472
|
Defined in:
|
|
1408
|
-
[epub/index.ts:
|
|
1473
|
+
[epub/index.ts:1043](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1043)
|
|
1409
1474
|
|
|
1410
1475
|
Remove a subject from the EPUB metadata.
|
|
1411
1476
|
|
|
@@ -1435,7 +1500,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccreator
|
|
|
1435
1500
|
> **replaceMetadata**(`predicate`, `entry`): `Promise`\<`void`\>
|
|
1436
1501
|
|
|
1437
1502
|
Defined in:
|
|
1438
|
-
[epub/index.ts:
|
|
1503
|
+
[epub/index.ts:2303](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2303)
|
|
1439
1504
|
|
|
1440
1505
|
Replace a metadata entry with a new one.
|
|
1441
1506
|
|
|
@@ -1461,12 +1526,34 @@ https://www.w3.org/TR/epub-33/#sec-pkg-metadata
|
|
|
1461
1526
|
|
|
1462
1527
|
`BaseEpub.replaceMetadata`
|
|
1463
1528
|
|
|
1529
|
+
#### saveAndClose()
|
|
1530
|
+
|
|
1531
|
+
> **saveAndClose**(`path`): `Promise`\<`void`\>
|
|
1532
|
+
|
|
1533
|
+
Defined in:
|
|
1534
|
+
[epub/node.ts:65](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/node.ts#L65)
|
|
1535
|
+
|
|
1536
|
+
Write the current contents of the Epub to a new EPUB archive on disk.
|
|
1537
|
+
|
|
1538
|
+
When this method is called, the "dcterms:modified" meta tag is automatically
|
|
1539
|
+
updated to the current UTC timestamp.
|
|
1540
|
+
|
|
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
|
+
##### Returns
|
|
1548
|
+
|
|
1549
|
+
`Promise`\<`void`\>
|
|
1550
|
+
|
|
1464
1551
|
#### setCoverImage()
|
|
1465
1552
|
|
|
1466
1553
|
> **setCoverImage**(`href`, `data`): `Promise`\<`void`\>
|
|
1467
1554
|
|
|
1468
1555
|
Defined in:
|
|
1469
|
-
[epub/index.ts:
|
|
1556
|
+
[epub/index.ts:923](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L923)
|
|
1470
1557
|
|
|
1471
1558
|
Set the cover image for the EPUB.
|
|
1472
1559
|
|
|
@@ -1493,7 +1580,7 @@ then writes the provided image data to the provided href within the publication.
|
|
|
1493
1580
|
> **setDescription**(`description`): `Promise`\<`void`\>
|
|
1494
1581
|
|
|
1495
1582
|
Defined in:
|
|
1496
|
-
[epub/index.ts:
|
|
1583
|
+
[epub/index.ts:1268](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1268)
|
|
1497
1584
|
|
|
1498
1585
|
Update the Epub's description metadata entry.
|
|
1499
1586
|
|
|
@@ -1515,12 +1602,42 @@ encoded as HTML entities.
|
|
|
1515
1602
|
|
|
1516
1603
|
`BaseEpub.setDescription`
|
|
1517
1604
|
|
|
1605
|
+
#### setIdentifier()
|
|
1606
|
+
|
|
1607
|
+
> **setIdentifier**(`identifier`): `Promise`\<`void`\>
|
|
1608
|
+
|
|
1609
|
+
Defined in:
|
|
1610
|
+
[epub/index.ts:838](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L838)
|
|
1611
|
+
|
|
1612
|
+
Set the dc:identifier metadata element with the provided string.
|
|
1613
|
+
|
|
1614
|
+
Updates the existing dc:identifier element if one exists. Otherwise creates a
|
|
1615
|
+
new element
|
|
1616
|
+
|
|
1617
|
+
##### Parameters
|
|
1618
|
+
|
|
1619
|
+
| Parameter | Type |
|
|
1620
|
+
| ------------ | -------- |
|
|
1621
|
+
| `identifier` | `string` |
|
|
1622
|
+
|
|
1623
|
+
##### Returns
|
|
1624
|
+
|
|
1625
|
+
`Promise`\<`void`\>
|
|
1626
|
+
|
|
1627
|
+
##### Link
|
|
1628
|
+
|
|
1629
|
+
https://www.w3.org/TR/epub-33/#sec-opf-dcidentifier
|
|
1630
|
+
|
|
1631
|
+
##### Inherited from
|
|
1632
|
+
|
|
1633
|
+
`BaseEpub.setIdentifier`
|
|
1634
|
+
|
|
1518
1635
|
#### setLanguage()
|
|
1519
1636
|
|
|
1520
1637
|
> **setLanguage**(`locale`): `Promise`\<`void`\>
|
|
1521
1638
|
|
|
1522
1639
|
Defined in:
|
|
1523
|
-
[epub/index.ts:
|
|
1640
|
+
[epub/index.ts:1150](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1150)
|
|
1524
1641
|
|
|
1525
1642
|
Update the Epub's language metadata entry.
|
|
1526
1643
|
|
|
@@ -1550,7 +1667,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dclanguage
|
|
|
1550
1667
|
> **setPackageVocabularyPrefix**(`prefix`, `uri`): `Promise`\<`void`\>
|
|
1551
1668
|
|
|
1552
1669
|
Defined in:
|
|
1553
|
-
[epub/index.ts:
|
|
1670
|
+
[epub/index.ts:1319](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1319)
|
|
1554
1671
|
|
|
1555
1672
|
Set a custom vocabulary prefix on the root package element.
|
|
1556
1673
|
|
|
@@ -1578,7 +1695,7 @@ https://www.w3.org/TR/epub-33/#sec-prefix-attr
|
|
|
1578
1695
|
> **setPublicationDate**(`date`): `Promise`\<`void`\>
|
|
1579
1696
|
|
|
1580
1697
|
Defined in:
|
|
1581
|
-
[epub/index.ts:
|
|
1698
|
+
[epub/index.ts:961](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L961)
|
|
1582
1699
|
|
|
1583
1700
|
Set the dc:date metadata element with the provided date.
|
|
1584
1701
|
|
|
@@ -1608,7 +1725,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcdate
|
|
|
1608
1725
|
> **setTitle**(`title`): `Promise`\<`void`\>
|
|
1609
1726
|
|
|
1610
1727
|
Defined in:
|
|
1611
|
-
[epub/index.ts:
|
|
1728
|
+
[epub/index.ts:1343](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1343)
|
|
1612
1729
|
|
|
1613
1730
|
Set the title of the Epub.
|
|
1614
1731
|
|
|
@@ -1640,7 +1757,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dctitle
|
|
|
1640
1757
|
> **setTitles**(`entries`): `Promise`\<`void`\>
|
|
1641
1758
|
|
|
1642
1759
|
Defined in:
|
|
1643
|
-
[epub/index.ts:
|
|
1760
|
+
[epub/index.ts:1371](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1371)
|
|
1644
1761
|
|
|
1645
1762
|
##### Parameters
|
|
1646
1763
|
|
|
@@ -1661,7 +1778,7 @@ Defined in:
|
|
|
1661
1778
|
> **setType**(`type`): `Promise`\<`void`\>
|
|
1662
1779
|
|
|
1663
1780
|
Defined in:
|
|
1664
|
-
[epub/index.ts:
|
|
1781
|
+
[epub/index.ts:977](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L977)
|
|
1665
1782
|
|
|
1666
1783
|
Set the dc:type metadata element.
|
|
1667
1784
|
|
|
@@ -1691,7 +1808,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dctype
|
|
|
1691
1808
|
> **updateManifestItem**(`id`, `newItem`): `Promise`\<`void`\>
|
|
1692
1809
|
|
|
1693
1810
|
Defined in:
|
|
1694
|
-
[epub/index.ts:
|
|
1811
|
+
[epub/index.ts:2215](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2215)
|
|
1695
1812
|
|
|
1696
1813
|
Update the manifest entry for an existing item.
|
|
1697
1814
|
|
|
@@ -1724,7 +1841,7 @@ https://www.w3.org/TR/epub-33/#sec-pkg-manifest
|
|
|
1724
1841
|
> **writeItemContents**(`id`, `contents`): `Promise`\<`void`\>
|
|
1725
1842
|
|
|
1726
1843
|
Defined in:
|
|
1727
|
-
[epub/index.ts:
|
|
1844
|
+
[epub/index.ts:2051](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2051)
|
|
1728
1845
|
|
|
1729
1846
|
Write new contents for an existing manifest item, specified by its id.
|
|
1730
1847
|
|
|
@@ -1755,7 +1872,7 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
|
|
|
1755
1872
|
> **writeItemContents**(`id`, `contents`, `encoding`): `Promise`\<`void`\>
|
|
1756
1873
|
|
|
1757
1874
|
Defined in:
|
|
1758
|
-
[epub/index.ts:
|
|
1875
|
+
[epub/index.ts:2052](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2052)
|
|
1759
1876
|
|
|
1760
1877
|
Write new contents for an existing manifest item, specified by its id.
|
|
1761
1878
|
|
|
@@ -1782,60 +1899,12 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
|
|
|
1782
1899
|
|
|
1783
1900
|
`BaseEpub.writeItemContents`
|
|
1784
1901
|
|
|
1785
|
-
#### writeToArray()
|
|
1786
|
-
|
|
1787
|
-
> **writeToArray**(): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\>
|
|
1788
|
-
|
|
1789
|
-
Defined in:
|
|
1790
|
-
[epub/index.ts:2438](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2438)
|
|
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
1902
|
#### writeXhtmlItemContents()
|
|
1834
1903
|
|
|
1835
1904
|
> **writeXhtmlItemContents**(`id`, `contents`): `Promise`\<`void`\>
|
|
1836
1905
|
|
|
1837
1906
|
Defined in:
|
|
1838
|
-
[epub/index.ts:
|
|
1907
|
+
[epub/index.ts:2091](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2091)
|
|
1839
1908
|
|
|
1840
1909
|
Write new contents for an existing XHTML item, specified by its id.
|
|
1841
1910
|
|
|
@@ -1866,7 +1935,7 @@ https://www.w3.org/TR/epub-33/#sec-xhtml
|
|
|
1866
1935
|
> `static` **addLinkToXhtmlHead**(`xml`, `link`): `void`
|
|
1867
1936
|
|
|
1868
1937
|
Defined in:
|
|
1869
|
-
[epub/index.ts:
|
|
1938
|
+
[epub/index.ts:229](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L229)
|
|
1870
1939
|
|
|
1871
1940
|
Given an XML structure representing a complete XHTML document, add a `link`
|
|
1872
1941
|
element to the `head` of the document.
|
|
@@ -1893,18 +1962,19 @@ This method modifies the provided XML structure.
|
|
|
1893
1962
|
|
|
1894
1963
|
#### create()
|
|
1895
1964
|
|
|
1896
|
-
> `static` **create**(
|
|
1965
|
+
> `static` **create**(`dc`, `additionalMetadata`): `Promise`\<[`Epub`](#epub)\>
|
|
1897
1966
|
|
|
1898
1967
|
Defined in:
|
|
1899
|
-
[epub/node.ts:
|
|
1968
|
+
[epub/node.ts:32](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/node.ts#L32)
|
|
1900
1969
|
|
|
1901
1970
|
Construct an Epub instance, optionally beginning with the provided metadata.
|
|
1902
1971
|
|
|
1903
1972
|
##### Parameters
|
|
1904
1973
|
|
|
1905
|
-
| Parameter
|
|
1906
|
-
|
|
|
1907
|
-
|
|
|
1974
|
+
| Parameter | Type | Default value | Description |
|
|
1975
|
+
| -------------------- | ------------------------------- | ------------- | --------------------------------------- |
|
|
1976
|
+
| `dc` | [`DublinCore`](#dublincore) | `undefined` | - |
|
|
1977
|
+
| `additionalMetadata` | [`EpubMetadata`](#epubmetadata) | `[]` | An array of additional metadata entries |
|
|
1908
1978
|
|
|
1909
1979
|
##### Returns
|
|
1910
1980
|
|
|
@@ -1920,7 +1990,7 @@ Construct an Epub instance, optionally beginning with the provided metadata.
|
|
|
1920
1990
|
> [`XmlElement`](#xmlelement)\<`Name`\>
|
|
1921
1991
|
|
|
1922
1992
|
Defined in:
|
|
1923
|
-
[epub/index.ts:
|
|
1993
|
+
[epub/index.ts:264](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L264)
|
|
1924
1994
|
|
|
1925
1995
|
##### Type Parameters
|
|
1926
1996
|
|
|
@@ -1949,7 +2019,7 @@ Defined in:
|
|
|
1949
2019
|
> `static` **createXmlTextNode**(`text`): [`XmlTextNode`](#xmltextnode)
|
|
1950
2020
|
|
|
1951
2021
|
Defined in:
|
|
1952
|
-
[epub/index.ts:
|
|
2022
|
+
[epub/index.ts:277](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L277)
|
|
1953
2023
|
|
|
1954
2024
|
##### Parameters
|
|
1955
2025
|
|
|
@@ -1971,7 +2041,7 @@ Defined in:
|
|
|
1971
2041
|
> `undefined` \| [`XmlElement`](#xmlelement)\<`Name`\>
|
|
1972
2042
|
|
|
1973
2043
|
Defined in:
|
|
1974
|
-
[epub/index.ts:
|
|
2044
|
+
[epub/index.ts:338](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L338)
|
|
1975
2045
|
|
|
1976
2046
|
Given an XML structure, find the first child matching the provided name and
|
|
1977
2047
|
optional filter.
|
|
@@ -2003,7 +2073,7 @@ optional filter.
|
|
|
2003
2073
|
> `static` **formatSmilDuration**(`duration`): `string`
|
|
2004
2074
|
|
|
2005
2075
|
Defined in:
|
|
2006
|
-
[epub/index.ts:
|
|
2076
|
+
[epub/index.ts:212](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L212)
|
|
2007
2077
|
|
|
2008
2078
|
Format a duration, provided as a number of seconds, as a SMIL clock value, to be
|
|
2009
2079
|
used for Media Overlays.
|
|
@@ -2031,7 +2101,7 @@ https://www.w3.org/TR/epub-33/#sec-duration
|
|
|
2031
2101
|
> `static` **from**(...`args`): `Promise`\<[`Epub`](#epub)\>
|
|
2032
2102
|
|
|
2033
2103
|
Defined in:
|
|
2034
|
-
[epub/node.ts:
|
|
2104
|
+
[epub/node.ts:39](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/node.ts#L39)
|
|
2035
2105
|
|
|
2036
2106
|
Construct an Epub instance by reading an existing EPUB publication.
|
|
2037
2107
|
|
|
@@ -2054,7 +2124,7 @@ Construct an Epub instance by reading an existing EPUB publication.
|
|
|
2054
2124
|
> `static` **getXhtmlBody**(`xml`): [`ParsedXml`](#parsedxml)
|
|
2055
2125
|
|
|
2056
2126
|
Defined in:
|
|
2057
|
-
[epub/index.ts:
|
|
2127
|
+
[epub/index.ts:254](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L254)
|
|
2058
2128
|
|
|
2059
2129
|
Given an XML structure representing a complete XHTML document, return the
|
|
2060
2130
|
sub-structure representing the children of the document's body element.
|
|
@@ -2078,7 +2148,7 @@ sub-structure representing the children of the document's body element.
|
|
|
2078
2148
|
> `static` **getXhtmlTextContent**(`xml`): `string`
|
|
2079
2149
|
|
|
2080
2150
|
Defined in:
|
|
2081
|
-
[epub/index.ts:
|
|
2151
|
+
[epub/index.ts:286](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L286)
|
|
2082
2152
|
|
|
2083
2153
|
Given an XML structure representing a complete XHTML document, return a string
|
|
2084
2154
|
representing the concatenation of all text nodes in the document.
|
|
@@ -2102,7 +2172,7 @@ representing the concatenation of all text nodes in the document.
|
|
|
2102
2172
|
> `static` **getXmlChildren**\<`Name`\>(`element`): [`ParsedXml`](#parsedxml)
|
|
2103
2173
|
|
|
2104
2174
|
Defined in:
|
|
2105
|
-
[epub/index.ts:
|
|
2175
|
+
[epub/index.ts:318](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L318)
|
|
2106
2176
|
|
|
2107
2177
|
Given an XMLElement, return a list of its children
|
|
2108
2178
|
|
|
@@ -2131,7 +2201,7 @@ Given an XMLElement, return a list of its children
|
|
|
2131
2201
|
> `static` **getXmlElementName**\<`Name`\>(`element`): `Name`
|
|
2132
2202
|
|
|
2133
2203
|
Defined in:
|
|
2134
|
-
[epub/index.ts:
|
|
2204
|
+
[epub/index.ts:303](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L303)
|
|
2135
2205
|
|
|
2136
2206
|
Given an XMLElement, return its tag name.
|
|
2137
2207
|
|
|
@@ -2160,7 +2230,7 @@ Given an XMLElement, return its tag name.
|
|
|
2160
2230
|
> `static` **isXmlTextNode**(`node`): `node is XmlTextNode`
|
|
2161
2231
|
|
|
2162
2232
|
Defined in:
|
|
2163
|
-
[epub/index.ts:
|
|
2233
|
+
[epub/index.ts:351](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L351)
|
|
2164
2234
|
|
|
2165
2235
|
Given an XMLNode, determine whether it represents a text node or an XML element.
|
|
2166
2236
|
|
|
@@ -2183,7 +2253,7 @@ Given an XMLNode, determine whether it represents a text node or an XML element.
|
|
|
2183
2253
|
> `static` **replaceXmlChildren**\<`Name`\>(`element`, `children`): `void`
|
|
2184
2254
|
|
|
2185
2255
|
Defined in:
|
|
2186
|
-
[epub/index.ts:
|
|
2256
|
+
[epub/index.ts:326](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L326)
|
|
2187
2257
|
|
|
2188
2258
|
##### Type Parameters
|
|
2189
2259
|
|
|
@@ -2211,7 +2281,7 @@ Defined in:
|
|
|
2211
2281
|
## AlternateScript
|
|
2212
2282
|
|
|
2213
2283
|
Defined in:
|
|
2214
|
-
[epub/index.ts:
|
|
2284
|
+
[epub/index.ts:100](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L100)
|
|
2215
2285
|
|
|
2216
2286
|
### Properties
|
|
2217
2287
|
|
|
@@ -2220,21 +2290,21 @@ Defined in:
|
|
|
2220
2290
|
> **locale**: `Locale`
|
|
2221
2291
|
|
|
2222
2292
|
Defined in:
|
|
2223
|
-
[epub/index.ts:
|
|
2293
|
+
[epub/index.ts:102](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L102)
|
|
2224
2294
|
|
|
2225
2295
|
#### name
|
|
2226
2296
|
|
|
2227
2297
|
> **name**: `string`
|
|
2228
2298
|
|
|
2229
2299
|
Defined in:
|
|
2230
|
-
[epub/index.ts:
|
|
2300
|
+
[epub/index.ts:101](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L101)
|
|
2231
2301
|
|
|
2232
2302
|
---
|
|
2233
2303
|
|
|
2234
2304
|
## Collection
|
|
2235
2305
|
|
|
2236
2306
|
Defined in:
|
|
2237
|
-
[epub/index.ts:
|
|
2307
|
+
[epub/index.ts:124](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L124)
|
|
2238
2308
|
|
|
2239
2309
|
### Properties
|
|
2240
2310
|
|
|
@@ -2243,28 +2313,28 @@ Defined in:
|
|
|
2243
2313
|
> **name**: `string`
|
|
2244
2314
|
|
|
2245
2315
|
Defined in:
|
|
2246
|
-
[epub/index.ts:
|
|
2316
|
+
[epub/index.ts:125](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L125)
|
|
2247
2317
|
|
|
2248
2318
|
#### position?
|
|
2249
2319
|
|
|
2250
2320
|
> `optional` **position**: `string`
|
|
2251
2321
|
|
|
2252
2322
|
Defined in:
|
|
2253
|
-
[epub/index.ts:
|
|
2323
|
+
[epub/index.ts:127](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L127)
|
|
2254
2324
|
|
|
2255
2325
|
#### type?
|
|
2256
2326
|
|
|
2257
2327
|
> `optional` **type**: `string`
|
|
2258
2328
|
|
|
2259
2329
|
Defined in:
|
|
2260
|
-
[epub/index.ts:
|
|
2330
|
+
[epub/index.ts:126](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L126)
|
|
2261
2331
|
|
|
2262
2332
|
---
|
|
2263
2333
|
|
|
2264
2334
|
## DcCreator
|
|
2265
2335
|
|
|
2266
2336
|
Defined in:
|
|
2267
|
-
[epub/index.ts:
|
|
2337
|
+
[epub/index.ts:105](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L105)
|
|
2268
2338
|
|
|
2269
2339
|
### Properties
|
|
2270
2340
|
|
|
@@ -2273,42 +2343,42 @@ Defined in:
|
|
|
2273
2343
|
> `optional` **alternateScripts**: [`AlternateScript`](#alternatescript)[]
|
|
2274
2344
|
|
|
2275
2345
|
Defined in:
|
|
2276
|
-
[epub/index.ts:
|
|
2346
|
+
[epub/index.ts:110](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L110)
|
|
2277
2347
|
|
|
2278
2348
|
#### fileAs?
|
|
2279
2349
|
|
|
2280
2350
|
> `optional` **fileAs**: `string`
|
|
2281
2351
|
|
|
2282
2352
|
Defined in:
|
|
2283
|
-
[epub/index.ts:
|
|
2353
|
+
[epub/index.ts:109](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L109)
|
|
2284
2354
|
|
|
2285
2355
|
#### name
|
|
2286
2356
|
|
|
2287
2357
|
> **name**: `string`
|
|
2288
2358
|
|
|
2289
2359
|
Defined in:
|
|
2290
|
-
[epub/index.ts:
|
|
2360
|
+
[epub/index.ts:106](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L106)
|
|
2291
2361
|
|
|
2292
2362
|
#### role?
|
|
2293
2363
|
|
|
2294
2364
|
> `optional` **role**: `string`
|
|
2295
2365
|
|
|
2296
2366
|
Defined in:
|
|
2297
|
-
[epub/index.ts:
|
|
2367
|
+
[epub/index.ts:107](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L107)
|
|
2298
2368
|
|
|
2299
2369
|
#### roleScheme?
|
|
2300
2370
|
|
|
2301
2371
|
> `optional` **roleScheme**: `string`
|
|
2302
2372
|
|
|
2303
2373
|
Defined in:
|
|
2304
|
-
[epub/index.ts:
|
|
2374
|
+
[epub/index.ts:108](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L108)
|
|
2305
2375
|
|
|
2306
2376
|
---
|
|
2307
2377
|
|
|
2308
2378
|
## DcSubject
|
|
2309
2379
|
|
|
2310
2380
|
Defined in:
|
|
2311
|
-
[epub/index.ts:
|
|
2381
|
+
[epub/index.ts:94](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L94)
|
|
2312
2382
|
|
|
2313
2383
|
### Properties
|
|
2314
2384
|
|
|
@@ -2317,28 +2387,28 @@ Defined in:
|
|
|
2317
2387
|
> **authority**: `string`
|
|
2318
2388
|
|
|
2319
2389
|
Defined in:
|
|
2320
|
-
[epub/index.ts:
|
|
2390
|
+
[epub/index.ts:96](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L96)
|
|
2321
2391
|
|
|
2322
2392
|
#### term
|
|
2323
2393
|
|
|
2324
2394
|
> **term**: `string`
|
|
2325
2395
|
|
|
2326
2396
|
Defined in:
|
|
2327
|
-
[epub/index.ts:
|
|
2397
|
+
[epub/index.ts:97](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L97)
|
|
2328
2398
|
|
|
2329
2399
|
#### value
|
|
2330
2400
|
|
|
2331
2401
|
> **value**: `string`
|
|
2332
2402
|
|
|
2333
2403
|
Defined in:
|
|
2334
|
-
[epub/index.ts:
|
|
2404
|
+
[epub/index.ts:95](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L95)
|
|
2335
2405
|
|
|
2336
2406
|
---
|
|
2337
2407
|
|
|
2338
2408
|
## DublinCore
|
|
2339
2409
|
|
|
2340
2410
|
Defined in:
|
|
2341
|
-
[epub/index.ts:
|
|
2411
|
+
[epub/index.ts:113](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L113)
|
|
2342
2412
|
|
|
2343
2413
|
### Properties
|
|
2344
2414
|
|
|
@@ -2347,56 +2417,56 @@ Defined in:
|
|
|
2347
2417
|
> `optional` **contributors**: [`DcCreator`](#dccreator)[]
|
|
2348
2418
|
|
|
2349
2419
|
Defined in:
|
|
2350
|
-
[epub/index.ts:
|
|
2420
|
+
[epub/index.ts:120](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L120)
|
|
2351
2421
|
|
|
2352
2422
|
#### creators?
|
|
2353
2423
|
|
|
2354
2424
|
> `optional` **creators**: [`DcCreator`](#dccreator)[]
|
|
2355
2425
|
|
|
2356
2426
|
Defined in:
|
|
2357
|
-
[epub/index.ts:
|
|
2427
|
+
[epub/index.ts:119](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L119)
|
|
2358
2428
|
|
|
2359
2429
|
#### date?
|
|
2360
2430
|
|
|
2361
2431
|
> `optional` **date**: `Date`
|
|
2362
2432
|
|
|
2363
2433
|
Defined in:
|
|
2364
|
-
[epub/index.ts:
|
|
2434
|
+
[epub/index.ts:117](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L117)
|
|
2365
2435
|
|
|
2366
2436
|
#### identifier
|
|
2367
2437
|
|
|
2368
2438
|
> **identifier**: `string`
|
|
2369
2439
|
|
|
2370
2440
|
Defined in:
|
|
2371
|
-
[epub/index.ts:
|
|
2441
|
+
[epub/index.ts:116](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L116)
|
|
2372
2442
|
|
|
2373
2443
|
#### language
|
|
2374
2444
|
|
|
2375
2445
|
> **language**: `Locale`
|
|
2376
2446
|
|
|
2377
2447
|
Defined in:
|
|
2378
|
-
[epub/index.ts:
|
|
2448
|
+
[epub/index.ts:115](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L115)
|
|
2379
2449
|
|
|
2380
2450
|
#### subjects?
|
|
2381
2451
|
|
|
2382
2452
|
> `optional` **subjects**: (`string` \| [`DcSubject`](#dcsubject))[]
|
|
2383
2453
|
|
|
2384
2454
|
Defined in:
|
|
2385
|
-
[epub/index.ts:
|
|
2455
|
+
[epub/index.ts:118](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L118)
|
|
2386
2456
|
|
|
2387
2457
|
#### title
|
|
2388
2458
|
|
|
2389
2459
|
> **title**: `string`
|
|
2390
2460
|
|
|
2391
2461
|
Defined in:
|
|
2392
|
-
[epub/index.ts:
|
|
2462
|
+
[epub/index.ts:114](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L114)
|
|
2393
2463
|
|
|
2394
2464
|
#### type?
|
|
2395
2465
|
|
|
2396
2466
|
> `optional` **type**: `string`
|
|
2397
2467
|
|
|
2398
2468
|
Defined in:
|
|
2399
|
-
[epub/index.ts:
|
|
2469
|
+
[epub/index.ts:121](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L121)
|
|
2400
2470
|
|
|
2401
2471
|
---
|
|
2402
2472
|
|
|
@@ -2406,7 +2476,7 @@ Defined in:
|
|
|
2406
2476
|
> \`$\{Letter \| Uppercase\<Letter\> \| QuestionMark\}$\{string\}\`
|
|
2407
2477
|
|
|
2408
2478
|
Defined in:
|
|
2409
|
-
[epub/index.ts:
|
|
2479
|
+
[epub/index.ts:55](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L55)
|
|
2410
2480
|
|
|
2411
2481
|
A valid name for an XML element (must start with a letter)
|
|
2412
2482
|
|
|
@@ -2417,7 +2487,7 @@ A valid name for an XML element (must start with a letter)
|
|
|
2417
2487
|
> **EpubMetadata** = [`MetadataEntry`](#metadataentry)[]
|
|
2418
2488
|
|
|
2419
2489
|
Defined in:
|
|
2420
|
-
[epub/index.ts:
|
|
2490
|
+
[epub/index.ts:92](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L92)
|
|
2421
2491
|
|
|
2422
2492
|
---
|
|
2423
2493
|
|
|
@@ -2426,7 +2496,7 @@ Defined in:
|
|
|
2426
2496
|
> **ManifestItem** = `object`
|
|
2427
2497
|
|
|
2428
2498
|
Defined in:
|
|
2429
|
-
[epub/index.ts:
|
|
2499
|
+
[epub/index.ts:76](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L76)
|
|
2430
2500
|
|
|
2431
2501
|
### Properties
|
|
2432
2502
|
|
|
@@ -2435,42 +2505,42 @@ Defined in:
|
|
|
2435
2505
|
> `optional` **fallback**: `string`
|
|
2436
2506
|
|
|
2437
2507
|
Defined in:
|
|
2438
|
-
[epub/index.ts:
|
|
2508
|
+
[epub/index.ts:80](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L80)
|
|
2439
2509
|
|
|
2440
2510
|
#### href
|
|
2441
2511
|
|
|
2442
2512
|
> **href**: `string`
|
|
2443
2513
|
|
|
2444
2514
|
Defined in:
|
|
2445
|
-
[epub/index.ts:
|
|
2515
|
+
[epub/index.ts:78](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L78)
|
|
2446
2516
|
|
|
2447
2517
|
#### id
|
|
2448
2518
|
|
|
2449
2519
|
> **id**: `string`
|
|
2450
2520
|
|
|
2451
2521
|
Defined in:
|
|
2452
|
-
[epub/index.ts:
|
|
2522
|
+
[epub/index.ts:77](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L77)
|
|
2453
2523
|
|
|
2454
2524
|
#### mediaOverlay?
|
|
2455
2525
|
|
|
2456
2526
|
> `optional` **mediaOverlay**: `string`
|
|
2457
2527
|
|
|
2458
2528
|
Defined in:
|
|
2459
|
-
[epub/index.ts:
|
|
2529
|
+
[epub/index.ts:81](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L81)
|
|
2460
2530
|
|
|
2461
2531
|
#### mediaType?
|
|
2462
2532
|
|
|
2463
2533
|
> `optional` **mediaType**: `string`
|
|
2464
2534
|
|
|
2465
2535
|
Defined in:
|
|
2466
|
-
[epub/index.ts:
|
|
2536
|
+
[epub/index.ts:79](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L79)
|
|
2467
2537
|
|
|
2468
2538
|
#### properties?
|
|
2469
2539
|
|
|
2470
2540
|
> `optional` **properties**: `string`[]
|
|
2471
2541
|
|
|
2472
2542
|
Defined in:
|
|
2473
|
-
[epub/index.ts:
|
|
2543
|
+
[epub/index.ts:82](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L82)
|
|
2474
2544
|
|
|
2475
2545
|
---
|
|
2476
2546
|
|
|
@@ -2479,7 +2549,7 @@ Defined in:
|
|
|
2479
2549
|
> **MetadataEntry** = `object`
|
|
2480
2550
|
|
|
2481
2551
|
Defined in:
|
|
2482
|
-
[epub/index.ts:
|
|
2552
|
+
[epub/index.ts:85](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L85)
|
|
2483
2553
|
|
|
2484
2554
|
### Properties
|
|
2485
2555
|
|
|
@@ -2488,28 +2558,28 @@ Defined in:
|
|
|
2488
2558
|
> `optional` **id**: `string`
|
|
2489
2559
|
|
|
2490
2560
|
Defined in:
|
|
2491
|
-
[epub/index.ts:
|
|
2561
|
+
[epub/index.ts:86](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L86)
|
|
2492
2562
|
|
|
2493
2563
|
#### properties
|
|
2494
2564
|
|
|
2495
2565
|
> **properties**: `Record`\<`string`, `string`\>
|
|
2496
2566
|
|
|
2497
2567
|
Defined in:
|
|
2498
|
-
[epub/index.ts:
|
|
2568
|
+
[epub/index.ts:88](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L88)
|
|
2499
2569
|
|
|
2500
2570
|
#### type
|
|
2501
2571
|
|
|
2502
2572
|
> **type**: [`ElementName`](#elementname)
|
|
2503
2573
|
|
|
2504
2574
|
Defined in:
|
|
2505
|
-
[epub/index.ts:
|
|
2575
|
+
[epub/index.ts:87](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L87)
|
|
2506
2576
|
|
|
2507
2577
|
#### value
|
|
2508
2578
|
|
|
2509
2579
|
> **value**: `string` \| `undefined`
|
|
2510
2580
|
|
|
2511
2581
|
Defined in:
|
|
2512
|
-
[epub/index.ts:
|
|
2582
|
+
[epub/index.ts:89](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L89)
|
|
2513
2583
|
|
|
2514
2584
|
---
|
|
2515
2585
|
|
|
@@ -2518,7 +2588,7 @@ Defined in:
|
|
|
2518
2588
|
> **ParsedXml** = [`XmlNode`](#xmlnode)[]
|
|
2519
2589
|
|
|
2520
2590
|
Defined in:
|
|
2521
|
-
[epub/index.ts:
|
|
2591
|
+
[epub/index.ts:74](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L74)
|
|
2522
2592
|
|
|
2523
2593
|
An XML structure
|
|
2524
2594
|
|
|
@@ -2529,11 +2599,11 @@ An XML structure
|
|
|
2529
2599
|
> **XmlElement**\<`Name`\> = `object` & `{ [key in Name]: ParsedXml }`
|
|
2530
2600
|
|
|
2531
2601
|
Defined in:
|
|
2532
|
-
[epub/index.ts:
|
|
2602
|
+
[epub/index.ts:61](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L61)
|
|
2533
2603
|
|
|
2534
2604
|
An XML element
|
|
2535
2605
|
|
|
2536
|
-
### Type
|
|
2606
|
+
### Type Declaration
|
|
2537
2607
|
|
|
2538
2608
|
#### :@?
|
|
2539
2609
|
|
|
@@ -2552,7 +2622,7 @@ An XML element
|
|
|
2552
2622
|
> **XmlNode** = [`XmlElement`](#xmlelement) \| [`XmlTextNode`](#xmltextnode)
|
|
2553
2623
|
|
|
2554
2624
|
Defined in:
|
|
2555
|
-
[epub/index.ts:
|
|
2625
|
+
[epub/index.ts:71](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L71)
|
|
2556
2626
|
|
|
2557
2627
|
A valid XML node. May be either an element or a text node.
|
|
2558
2628
|
|
|
@@ -2563,7 +2633,7 @@ A valid XML node. May be either an element or a text node.
|
|
|
2563
2633
|
> **XmlTextNode** = `object`
|
|
2564
2634
|
|
|
2565
2635
|
Defined in:
|
|
2566
|
-
[epub/index.ts:
|
|
2636
|
+
[epub/index.ts:68](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L68)
|
|
2567
2637
|
|
|
2568
2638
|
A text node in an XML document
|
|
2569
2639
|
|
|
@@ -2574,4 +2644,4 @@ A text node in an XML document
|
|
|
2574
2644
|
> **#text**: `string`
|
|
2575
2645
|
|
|
2576
2646
|
Defined in:
|
|
2577
|
-
[epub/index.ts:
|
|
2647
|
+
[epub/index.ts:68](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L68)
|