@storyteller-platform/epub 0.8.0 → 0.8.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 +125 -944
- package/dist/index.d.ts +2 -0
- package/dist/index.js +6 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -219,7 +219,7 @@ To get started with developing in the Storyteller monorepo, check out the
|
|
|
219
219
|
|
|
220
220
|
## Epub
|
|
221
221
|
|
|
222
|
-
Defined in: [libraries/epub/index.ts:
|
|
222
|
+
Defined in: [libraries/epub/index.ts:349](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L349)
|
|
223
223
|
|
|
224
224
|
A single EPUB instance.
|
|
225
225
|
|
|
@@ -260,7 +260,7 @@ https://www.w3.org/TR/epub-33/
|
|
|
260
260
|
|
|
261
261
|
> **new Epub**(`adapterClass`, `adapter`, `inputPath`, `readonlyOverride`): [`Epub`](#epub)
|
|
262
262
|
|
|
263
|
-
Defined in: [libraries/epub/index.ts:
|
|
263
|
+
Defined in: [libraries/epub/index.ts:624](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L624)
|
|
264
264
|
|
|
265
265
|
Prefer the static factories ([Epub.using](#using), [Epub.from](#from),
|
|
266
266
|
[Epub.create](#create), [Epub.upgrade](#upgrade)) over calling this constructor
|
|
@@ -286,31 +286,31 @@ else should need to.
|
|
|
286
286
|
|
|
287
287
|
> `protected` **adapter**: [`EpubStorageAdapter`](#epubstorageadapter)
|
|
288
288
|
|
|
289
|
-
Defined in: [libraries/epub/index.ts:
|
|
289
|
+
Defined in: [libraries/epub/index.ts:626](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L626)
|
|
290
290
|
|
|
291
291
|
#### adapterClass
|
|
292
292
|
|
|
293
293
|
> `protected` **adapterClass**: [`EpubStorageAdapterClass`](#epubstorageadapterclass)
|
|
294
294
|
|
|
295
|
-
Defined in: [libraries/epub/index.ts:
|
|
295
|
+
Defined in: [libraries/epub/index.ts:625](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L625)
|
|
296
296
|
|
|
297
297
|
#### inputPath
|
|
298
298
|
|
|
299
299
|
> `protected` **inputPath**: `string` \| `undefined`
|
|
300
300
|
|
|
301
|
-
Defined in: [libraries/epub/index.ts:
|
|
301
|
+
Defined in: [libraries/epub/index.ts:627](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L627)
|
|
302
302
|
|
|
303
303
|
#### readonlyOverride
|
|
304
304
|
|
|
305
305
|
> `protected` **readonlyOverride**: `boolean` = `false`
|
|
306
306
|
|
|
307
|
-
Defined in: [libraries/epub/index.ts:
|
|
307
|
+
Defined in: [libraries/epub/index.ts:628](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L628)
|
|
308
308
|
|
|
309
309
|
#### storage
|
|
310
310
|
|
|
311
311
|
> `readonly` **storage**: [`EpubStorageKind`](#epubstoragekind)
|
|
312
312
|
|
|
313
|
-
Defined in: [libraries/epub/index.ts:
|
|
313
|
+
Defined in: [libraries/epub/index.ts:616](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L616)
|
|
314
314
|
|
|
315
315
|
Storage backend kind in use for this instance
|
|
316
316
|
|
|
@@ -322,25 +322,25 @@ and the adapter's capability bag)
|
|
|
322
322
|
|
|
323
323
|
> `static` **xhtmlBuilder**: `XMLBuilder`
|
|
324
324
|
|
|
325
|
-
Defined in: [libraries/epub/index.ts:
|
|
325
|
+
Defined in: [libraries/epub/index.ts:405](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L405)
|
|
326
326
|
|
|
327
327
|
#### xhtmlParser
|
|
328
328
|
|
|
329
329
|
> `static` **xhtmlParser**: `XMLParser`
|
|
330
330
|
|
|
331
|
-
Defined in: [libraries/epub/index.ts:
|
|
331
|
+
Defined in: [libraries/epub/index.ts:357](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L357)
|
|
332
332
|
|
|
333
333
|
#### xmlBuilder
|
|
334
334
|
|
|
335
335
|
> `static` **xmlBuilder**: `XMLBuilder`
|
|
336
336
|
|
|
337
|
-
Defined in: [libraries/epub/index.ts:
|
|
337
|
+
Defined in: [libraries/epub/index.ts:398](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L398)
|
|
338
338
|
|
|
339
339
|
#### xmlParser
|
|
340
340
|
|
|
341
341
|
> `static` **xmlParser**: `XMLParser`
|
|
342
342
|
|
|
343
|
-
Defined in: [libraries/epub/index.ts:
|
|
343
|
+
Defined in: [libraries/epub/index.ts:350](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L350)
|
|
344
344
|
|
|
345
345
|
### Methods
|
|
346
346
|
|
|
@@ -348,7 +348,7 @@ Defined in: [libraries/epub/index.ts:348](https://gitlab.com/storyteller-platfor
|
|
|
348
348
|
|
|
349
349
|
> **\[dispose\]**(): `void`
|
|
350
350
|
|
|
351
|
-
Defined in: [libraries/epub/index.ts:
|
|
351
|
+
Defined in: [libraries/epub/index.ts:3595](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3595)
|
|
352
352
|
|
|
353
353
|
##### Returns
|
|
354
354
|
|
|
@@ -358,7 +358,7 @@ Defined in: [libraries/epub/index.ts:3583](https://gitlab.com/storyteller-platfo
|
|
|
358
358
|
|
|
359
359
|
> **addCollection**(`collection`, `index?`): `Promise`\<`void`\>
|
|
360
360
|
|
|
361
|
-
Defined in: [libraries/epub/index.ts:
|
|
361
|
+
Defined in: [libraries/epub/index.ts:2235](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2235)
|
|
362
362
|
|
|
363
363
|
Add a collection to the EPUB metadata.
|
|
364
364
|
|
|
@@ -381,7 +381,7 @@ will be added to the end of the list.
|
|
|
381
381
|
|
|
382
382
|
> **addContributor**(`contributor`, `index?`): `Promise`\<`void`\>
|
|
383
383
|
|
|
384
|
-
Defined in: [libraries/epub/index.ts:
|
|
384
|
+
Defined in: [libraries/epub/index.ts:2580](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2580)
|
|
385
385
|
|
|
386
386
|
Add a contributor to the EPUB metadata.
|
|
387
387
|
|
|
@@ -411,7 +411,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccreator
|
|
|
411
411
|
|
|
412
412
|
> **addCreator**(`creator`, `index?`, `type?`): `Promise`\<`void`\>
|
|
413
413
|
|
|
414
|
-
Defined in: [libraries/epub/index.ts:
|
|
414
|
+
Defined in: [libraries/epub/index.ts:2425](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2425)
|
|
415
415
|
|
|
416
416
|
Add a creator to the EPUB metadata.
|
|
417
417
|
|
|
@@ -441,7 +441,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccreator
|
|
|
441
441
|
|
|
442
442
|
> **addManifestItem**(`item`, `contents`, `encoding`): `Promise`\<`void`\>
|
|
443
443
|
|
|
444
|
-
Defined in: [libraries/epub/index.ts:
|
|
444
|
+
Defined in: [libraries/epub/index.ts:3182](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3182)
|
|
445
445
|
|
|
446
446
|
Create a new manifest item and write its contents to a
|
|
447
447
|
new entry.
|
|
@@ -470,7 +470,7 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
|
|
|
470
470
|
|
|
471
471
|
> **addManifestItem**(`item`, `contents`, `encoding`): `Promise`\<`void`\>
|
|
472
472
|
|
|
473
|
-
Defined in: [libraries/epub/index.ts:
|
|
473
|
+
Defined in: [libraries/epub/index.ts:3187](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3187)
|
|
474
474
|
|
|
475
475
|
Create a new manifest item and write its contents to a
|
|
476
476
|
new entry.
|
|
@@ -499,7 +499,7 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
|
|
|
499
499
|
|
|
500
500
|
> **addManifestItem**(`item`, `contents`): `Promise`\<`void`\>
|
|
501
501
|
|
|
502
|
-
Defined in: [libraries/epub/index.ts:
|
|
502
|
+
Defined in: [libraries/epub/index.ts:3192](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3192)
|
|
503
503
|
|
|
504
504
|
Create a new manifest item and write its contents to a
|
|
505
505
|
new entry.
|
|
@@ -527,7 +527,7 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
|
|
|
527
527
|
|
|
528
528
|
> **addMetadata**(`entry`): `Promise`\<`void`\>
|
|
529
529
|
|
|
530
|
-
Defined in: [libraries/epub/index.ts:
|
|
530
|
+
Defined in: [libraries/epub/index.ts:3303](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3303)
|
|
531
531
|
|
|
532
532
|
Add a new metadata entry to the Epub.
|
|
533
533
|
|
|
@@ -554,7 +554,7 @@ https://www.w3.org/TR/epub-33/#sec-pkg-metadata
|
|
|
554
554
|
|
|
555
555
|
> **addSpineItem**(`manifestId`, `index?`): `Promise`\<`void`\>
|
|
556
556
|
|
|
557
|
-
Defined in: [libraries/epub/index.ts:
|
|
557
|
+
Defined in: [libraries/epub/index.ts:2634](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2634)
|
|
558
558
|
|
|
559
559
|
Add an item to the spine of the EPUB.
|
|
560
560
|
|
|
@@ -584,7 +584,7 @@ https://www.w3.org/TR/epub-33/#sec-spine-elem
|
|
|
584
584
|
|
|
585
585
|
> **addSubject**(`subject`): `Promise`\<`void`\>
|
|
586
586
|
|
|
587
|
-
Defined in: [libraries/epub/index.ts:
|
|
587
|
+
Defined in: [libraries/epub/index.ts:1764](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1764)
|
|
588
588
|
|
|
589
589
|
Add a subject to the EPUB metadata.
|
|
590
590
|
|
|
@@ -606,7 +606,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcsubject
|
|
|
606
606
|
|
|
607
607
|
> **copy**(`path?`): `Promise`\<[`Epub`](#epub)\>
|
|
608
608
|
|
|
609
|
-
Defined in: [libraries/epub/index.ts:
|
|
609
|
+
Defined in: [libraries/epub/index.ts:721](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L721)
|
|
610
610
|
|
|
611
611
|
##### Parameters
|
|
612
612
|
|
|
@@ -622,7 +622,7 @@ Defined in: [libraries/epub/index.ts:719](https://gitlab.com/storyteller-platfor
|
|
|
622
622
|
|
|
623
623
|
> **createXhtmlDocument**(`body`, `head?`, `language?`): `Promise`\<([`XmlElement`](#xmlelement)\<`"?xml"`\> \| [`XmlElement`](#xmlelement)\<`"html"`\>)[]\>
|
|
624
624
|
|
|
625
|
-
Defined in: [libraries/epub/index.ts:
|
|
625
|
+
Defined in: [libraries/epub/index.ts:3003](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3003)
|
|
626
626
|
|
|
627
627
|
Create a new XHTML document with the given body
|
|
628
628
|
and head.
|
|
@@ -643,7 +643,7 @@ and head.
|
|
|
643
643
|
|
|
644
644
|
> **discardAndClose**(): `void`
|
|
645
645
|
|
|
646
|
-
Defined in: [libraries/epub/index.ts:
|
|
646
|
+
Defined in: [libraries/epub/index.ts:3545](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3545)
|
|
647
647
|
|
|
648
648
|
##### Returns
|
|
649
649
|
|
|
@@ -653,7 +653,7 @@ Defined in: [libraries/epub/index.ts:3533](https://gitlab.com/storyteller-platfo
|
|
|
653
653
|
|
|
654
654
|
> **findAllMetadataItems**(`predicate`): `Promise`\<`object`[]\>
|
|
655
655
|
|
|
656
|
-
Defined in: [libraries/epub/index.ts:
|
|
656
|
+
Defined in: [libraries/epub/index.ts:971](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L971)
|
|
657
657
|
|
|
658
658
|
Returns the item in the metadata element's children array
|
|
659
659
|
that matches the provided predicate.
|
|
@@ -672,7 +672,7 @@ that matches the provided predicate.
|
|
|
672
672
|
|
|
673
673
|
> **findMetadataItem**(`predicate`): `Promise`\<\{ `id`: `string` \| `undefined`; `properties`: \{[`k`: `string`]: `string`; \}; `type`: `` `r${string}` `` \| `` `a${string}` `` \| `` `b${string}` `` \| `` `c${string}` `` \| `` `d${string}` `` \| `` `e${string}` `` \| `` `f${string}` `` \| `` `g${string}` `` \| `` `h${string}` `` \| `` `i${string}` `` \| `` `j${string}` `` \| `` `k${string}` `` \| `` `l${string}` `` \| `` `m${string}` `` \| `` `n${string}` `` \| `` `o${string}` `` \| `` `p${string}` `` \| `` `q${string}` `` \| `` `s${string}` `` \| `` `t${string}` `` \| `` `u${string}` `` \| `` `v${string}` `` \| `` `w${string}` `` \| `` `x${string}` `` \| `` `y${string}` `` \| `` `z${string}` `` \| `` `R${string}` `` \| `` `A${string}` `` \| `` `B${string}` `` \| `` `C${string}` `` \| `` `D${string}` `` \| `` `E${string}` `` \| `` `F${string}` `` \| `` `G${string}` `` \| `` `H${string}` `` \| `` `I${string}` `` \| `` `J${string}` `` \| `` `K${string}` `` \| `` `L${string}` `` \| `` `M${string}` `` \| `` `N${string}` `` \| `` `O${string}` `` \| `` `P${string}` `` \| `` `Q${string}` `` \| `` `S${string}` `` \| `` `T${string}` `` \| `` `U${string}` `` \| `` `V${string}` `` \| `` `W${string}` `` \| `` `X${string}` `` \| `` `Y${string}` `` \| `` `Z${string}` `` \| `` `?${string}` ``; `value`: `string` \| `undefined`; \} \| `null`\>
|
|
674
674
|
|
|
675
|
-
Defined in: [libraries/epub/index.ts:
|
|
675
|
+
Defined in: [libraries/epub/index.ts:962](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L962)
|
|
676
676
|
|
|
677
677
|
Returns the item in the metadata element's children array
|
|
678
678
|
that matches the provided predicate.
|
|
@@ -691,7 +691,7 @@ that matches the provided predicate.
|
|
|
691
691
|
|
|
692
692
|
> **getBaseDirection**(): `Promise`\<`"auto"` \| `"rtl"` \| `"ltr"`\>
|
|
693
693
|
|
|
694
|
-
Defined in: [libraries/epub/index.ts:
|
|
694
|
+
Defined in: [libraries/epub/index.ts:1718](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1718)
|
|
695
695
|
|
|
696
696
|
Retrieve the base direction from the package element.
|
|
697
697
|
|
|
@@ -710,7 +710,7 @@ https://www.w3.org/TR/epub-33/#attrdef-dir
|
|
|
710
710
|
|
|
711
711
|
> **getCollections**(): `Promise`\<[`Collection`](#collection)[]\>
|
|
712
712
|
|
|
713
|
-
Defined in: [libraries/epub/index.ts:
|
|
713
|
+
Defined in: [libraries/epub/index.ts:2195](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2195)
|
|
714
714
|
|
|
715
715
|
Retrieve the list of collections.
|
|
716
716
|
|
|
@@ -722,7 +722,7 @@ Retrieve the list of collections.
|
|
|
722
722
|
|
|
723
723
|
> **getContributors**(): `Promise`\<[`DcCreator`](#dccreator)[]\>
|
|
724
724
|
|
|
725
|
-
Defined in: [libraries/epub/index.ts:
|
|
725
|
+
Defined in: [libraries/epub/index.ts:2412](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2412)
|
|
726
726
|
|
|
727
727
|
Retrieve the list of contributors.
|
|
728
728
|
|
|
@@ -741,7 +741,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccontributor
|
|
|
741
741
|
|
|
742
742
|
> **getCoverImage**(): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\> \| `null`\>
|
|
743
743
|
|
|
744
|
-
Defined in: [libraries/epub/index.ts:
|
|
744
|
+
Defined in: [libraries/epub/index.ts:1614](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1614)
|
|
745
745
|
|
|
746
746
|
Retrieve the cover image data as a byte array.
|
|
747
747
|
|
|
@@ -761,7 +761,7 @@ https://www.w3.org/TR/epub-33/#sec-cover-image
|
|
|
761
761
|
|
|
762
762
|
> **getCoverImageItem**(): `Promise`\<[`ManifestItem`](#manifestitem) \| `null`\>
|
|
763
763
|
|
|
764
|
-
Defined in: [libraries/epub/index.ts:
|
|
764
|
+
Defined in: [libraries/epub/index.ts:1595](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1595)
|
|
765
765
|
|
|
766
766
|
Retrieve the cover image manifest item.
|
|
767
767
|
|
|
@@ -782,7 +782,7 @@ https://www.w3.org/TR/epub-33/#sec-cover-image
|
|
|
782
782
|
|
|
783
783
|
> **getCreators**(`type`): `Promise`\<[`DcCreator`](#dccreator)[]\>
|
|
784
784
|
|
|
785
|
-
Defined in: [libraries/epub/index.ts:
|
|
785
|
+
Defined in: [libraries/epub/index.ts:2348](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2348)
|
|
786
786
|
|
|
787
787
|
Retrieve the list of creators.
|
|
788
788
|
|
|
@@ -804,7 +804,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccreator
|
|
|
804
804
|
|
|
805
805
|
> **getDescription**(): `Promise`\<`string` \| `null`\>
|
|
806
806
|
|
|
807
|
-
Defined in: [libraries/epub/index.ts:
|
|
807
|
+
Defined in: [libraries/epub/index.ts:2046](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2046)
|
|
808
808
|
|
|
809
809
|
Retrieve the Epub's description as specified in its
|
|
810
810
|
package document metadata.
|
|
@@ -821,7 +821,7 @@ include HTML markup.
|
|
|
821
821
|
|
|
822
822
|
> **getGuideEntries**(): `Promise`\<`GuideItem`[]\>
|
|
823
823
|
|
|
824
|
-
Defined in: [libraries/epub/index.ts:
|
|
824
|
+
Defined in: [libraries/epub/index.ts:3522](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3522)
|
|
825
825
|
|
|
826
826
|
Retrieve the guide entries from the package document.
|
|
827
827
|
|
|
@@ -836,7 +836,7 @@ the landmarks nav, but many publications still include it.
|
|
|
836
836
|
|
|
837
837
|
> **getIdentifier**(): `Promise`\<`string` \| `null`\>
|
|
838
838
|
|
|
839
|
-
Defined in: [libraries/epub/index.ts:
|
|
839
|
+
Defined in: [libraries/epub/index.ts:1069](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1069)
|
|
840
840
|
|
|
841
841
|
Retrieve the first identifier from the dc:identifier element
|
|
842
842
|
in the EPUB metadata.
|
|
@@ -860,7 +860,7 @@ or [getIdentifiers](#getidentifiers) to get all identifiers.
|
|
|
860
860
|
|
|
861
861
|
> **getIdentifiers**(): `Promise`\<[`EpubIdentifier`](#epubidentifier)[]\>
|
|
862
862
|
|
|
863
|
-
Defined in: [libraries/epub/index.ts:
|
|
863
|
+
Defined in: [libraries/epub/index.ts:1244](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1244)
|
|
864
864
|
|
|
865
865
|
Retrieve every `dc:identifier` entry, returned as found.
|
|
866
866
|
|
|
@@ -881,7 +881,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcidentifier
|
|
|
881
881
|
|
|
882
882
|
> **getItemArchiveLength**(`id`): `Promise`\<`number`\>
|
|
883
883
|
|
|
884
|
-
Defined in: [libraries/epub/index.ts:
|
|
884
|
+
Defined in: [libraries/epub/index.ts:747](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L747)
|
|
885
885
|
|
|
886
886
|
Length of the underlying archive entry for a manifest item, in bytes
|
|
887
887
|
Necessary to compute the readium page count which is for COMPRESSED content
|
|
@@ -904,7 +904,7 @@ Necessary to compute the readium page count which is for COMPRESSED content
|
|
|
904
904
|
|
|
905
905
|
> **getLandmarks**(`__namedParameters`): `Promise`\<[`Navigation`](#navigation) \| `null`\>
|
|
906
906
|
|
|
907
|
-
Defined in: [libraries/epub/index.ts:
|
|
907
|
+
Defined in: [libraries/epub/index.ts:2823](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2823)
|
|
908
908
|
|
|
909
909
|
Returns the structured landmarks navigation document
|
|
910
910
|
as a Navigation object
|
|
@@ -928,7 +928,7 @@ https://www.w3.org/TR/epub-33/#sec-nav-landmarks
|
|
|
928
928
|
|
|
929
929
|
> **getLanguage**(): `Promise`\<`Locale` \| `null`\>
|
|
930
930
|
|
|
931
|
-
Defined in: [libraries/epub/index.ts:
|
|
931
|
+
Defined in: [libraries/epub/index.ts:1883](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1883)
|
|
932
932
|
|
|
933
933
|
Retrieve the Epub's language as specified in its
|
|
934
934
|
package document metadata.
|
|
@@ -948,7 +948,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dclanguage
|
|
|
948
948
|
|
|
949
949
|
> **getLayout**(): `Promise`\<`"pre-paginated"` \| `"reflowable"`\>
|
|
950
950
|
|
|
951
|
-
Defined in: [libraries/epub/index.ts:
|
|
951
|
+
Defined in: [libraries/epub/index.ts:1699](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1699)
|
|
952
952
|
|
|
953
953
|
Retrieve the layout from the rendition:layout meta element
|
|
954
954
|
in the EPUB metadata.
|
|
@@ -967,7 +967,7 @@ https://www.w3.org/TR/epub-33/#layout
|
|
|
967
967
|
|
|
968
968
|
> **getManifest**(): `Promise`\<`Record`\<`string`, [`ManifestItem`](#manifestitem)\>\>
|
|
969
969
|
|
|
970
|
-
Defined in: [libraries/epub/index.ts:
|
|
970
|
+
Defined in: [libraries/epub/index.ts:887](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L887)
|
|
971
971
|
|
|
972
972
|
Retrieve the manifest for the Epub.
|
|
973
973
|
|
|
@@ -986,7 +986,7 @@ https://www.w3.org/TR/epub-33/#sec-pkg-manifest
|
|
|
986
986
|
|
|
987
987
|
> **getMetadata**(): `Promise`\<[`EpubMetadata`](#epubmetadata)\>
|
|
988
988
|
|
|
989
|
-
Defined in: [libraries/epub/index.ts:
|
|
989
|
+
Defined in: [libraries/epub/index.ts:1038](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1038)
|
|
990
990
|
|
|
991
991
|
Retrieve the metadata entries for the Epub.
|
|
992
992
|
|
|
@@ -1008,7 +1008,7 @@ https://www.w3.org/TR/epub-33/#sec-pkg-metadata
|
|
|
1008
1008
|
|
|
1009
1009
|
> **getModifiedDate**(): `Promise`\<`Date` \| `null`\>
|
|
1010
1010
|
|
|
1011
|
-
Defined in: [libraries/epub/index.ts:
|
|
1011
|
+
Defined in: [libraries/epub/index.ts:1682](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1682)
|
|
1012
1012
|
|
|
1013
1013
|
Retrieve the modified date from the dcterms:modified metadata
|
|
1014
1014
|
in the EPUB metadata as a Date object.
|
|
@@ -1027,7 +1027,7 @@ https://www.w3.org/TR/epub-33/#sec-metadata-last-modified
|
|
|
1027
1027
|
|
|
1028
1028
|
> **getNcxTableOfContents**(): `Promise`\<[`NavigationList`](#navigationlist)\>
|
|
1029
1029
|
|
|
1030
|
-
Defined in: [libraries/epub/index.ts:
|
|
1030
|
+
Defined in: [libraries/epub/index.ts:3428](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3428)
|
|
1031
1031
|
|
|
1032
1032
|
Parse the NCX table of contents, if one exists, and return
|
|
1033
1033
|
a tree of TocEntry nodes.
|
|
@@ -1044,7 +1044,7 @@ NCX for backwards compatibility.
|
|
|
1044
1044
|
|
|
1045
1045
|
> **getPackageElement**(): `Promise`\<[`XmlElement`](#xmlelement)\<`"package"`\>\>
|
|
1046
1046
|
|
|
1047
|
-
Defined in: [libraries/epub/index.ts:
|
|
1047
|
+
Defined in: [libraries/epub/index.ts:822](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L822)
|
|
1048
1048
|
|
|
1049
1049
|
##### Returns
|
|
1050
1050
|
|
|
@@ -1054,7 +1054,7 @@ Defined in: [libraries/epub/index.ts:820](https://gitlab.com/storyteller-platfor
|
|
|
1054
1054
|
|
|
1055
1055
|
> **getPackageVocabularyPrefixes**(): `Promise`\<`Record`\<`string`, `string`\>\>
|
|
1056
1056
|
|
|
1057
|
-
Defined in: [libraries/epub/index.ts:
|
|
1057
|
+
Defined in: [libraries/epub/index.ts:2063](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2063)
|
|
1058
1058
|
|
|
1059
1059
|
Return the set of custom vocabulary prefixes set on this publication's
|
|
1060
1060
|
root package element.
|
|
@@ -1073,7 +1073,7 @@ https://www.w3.org/TR/epub-33/#sec-prefix-attr
|
|
|
1073
1073
|
|
|
1074
1074
|
> **getPageBreakSource**(): `Promise`\<[`EpubSource`](#epubsource) \| `null`\>
|
|
1075
1075
|
|
|
1076
|
-
Defined in: [libraries/epub/index.ts:
|
|
1076
|
+
Defined in: [libraries/epub/index.ts:1281](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1281)
|
|
1077
1077
|
|
|
1078
1078
|
Retrieve the `pageBreakSource` property (EPUB 3.4, spec D.2.9), the
|
|
1079
1079
|
publication-level source for the source of its page break markers.
|
|
@@ -1094,7 +1094,7 @@ https://www.w3.org/TR/epub/#pageBreakSource
|
|
|
1094
1094
|
|
|
1095
1095
|
> **getPageList**(`__namedParameters`): `Promise`\<[`Navigation`](#navigation) \| `null`\>
|
|
1096
1096
|
|
|
1097
|
-
Defined in: [libraries/epub/index.ts:
|
|
1097
|
+
Defined in: [libraries/epub/index.ts:2835](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2835)
|
|
1098
1098
|
|
|
1099
1099
|
Returns the structured page list navigation document
|
|
1100
1100
|
as a Navigation object
|
|
@@ -1118,7 +1118,7 @@ https://www.w3.org/TR/epub-33/#sec-nav-landmarks
|
|
|
1118
1118
|
|
|
1119
1119
|
> **getPublicationDate**(): `Promise`\<`Date` \| `null`\>
|
|
1120
1120
|
|
|
1121
|
-
Defined in: [libraries/epub/index.ts:
|
|
1121
|
+
Defined in: [libraries/epub/index.ts:1651](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1651)
|
|
1122
1122
|
|
|
1123
1123
|
Retrieve the publication date from the dc:date element
|
|
1124
1124
|
in the EPUB metadata as a Date object.
|
|
@@ -1137,7 +1137,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcdate
|
|
|
1137
1137
|
|
|
1138
1138
|
> **getRootfile**(): `Promise`\<`string`\>
|
|
1139
1139
|
|
|
1140
|
-
Defined in: [libraries/epub/index.ts:
|
|
1140
|
+
Defined in: [libraries/epub/index.ts:758](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L758)
|
|
1141
1141
|
|
|
1142
1142
|
##### Returns
|
|
1143
1143
|
|
|
@@ -1147,7 +1147,7 @@ Defined in: [libraries/epub/index.ts:756](https://gitlab.com/storyteller-platfor
|
|
|
1147
1147
|
|
|
1148
1148
|
> **getSources**(): `Promise`\<[`EpubSource`](#epubsource)[]\>
|
|
1149
1149
|
|
|
1150
|
-
Defined in: [libraries/epub/index.ts:
|
|
1150
|
+
Defined in: [libraries/epub/index.ts:1258](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1258)
|
|
1151
1151
|
|
|
1152
1152
|
Retrieve every `dc:source` entry, returned as found.
|
|
1153
1153
|
|
|
@@ -1167,7 +1167,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcsource
|
|
|
1167
1167
|
|
|
1168
1168
|
> **getSpineItems**(): `Promise`\<[`ManifestItem`](#manifestitem)[]\>
|
|
1169
1169
|
|
|
1170
|
-
Defined in: [libraries/epub/index.ts:
|
|
1170
|
+
Defined in: [libraries/epub/index.ts:2615](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2615)
|
|
1171
1171
|
|
|
1172
1172
|
Retrieve the manifest items that make up the Epub's spine.
|
|
1173
1173
|
|
|
@@ -1186,7 +1186,7 @@ https://www.w3.org/TR/epub-33/#sec-spine-elem
|
|
|
1186
1186
|
|
|
1187
1187
|
> **getSubjects**(): `Promise`\<(`string` \| [`DcSubject`](#dcsubject))[]\>
|
|
1188
1188
|
|
|
1189
|
-
Defined in: [libraries/epub/index.ts:
|
|
1189
|
+
Defined in: [libraries/epub/index.ts:1838](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1838)
|
|
1190
1190
|
|
|
1191
1191
|
Retrieve the list of subjects for this EPUB.
|
|
1192
1192
|
|
|
@@ -1207,7 +1207,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcsubject
|
|
|
1207
1207
|
|
|
1208
1208
|
> **getSubtitle**(): `Promise`\<`string` \| `null`\>
|
|
1209
1209
|
|
|
1210
|
-
Defined in: [libraries/epub/index.ts:
|
|
1210
|
+
Defined in: [libraries/epub/index.ts:1953](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1953)
|
|
1211
1211
|
|
|
1212
1212
|
Retrieve the subtitle of the Epub, if it exists.
|
|
1213
1213
|
|
|
@@ -1223,7 +1223,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dctitle
|
|
|
1223
1223
|
|
|
1224
1224
|
> **getTableOfContents**(`__namedParameters`): `Promise`\<[`Navigation`](#navigation) \| `null`\>
|
|
1225
1225
|
|
|
1226
|
-
Defined in: [libraries/epub/index.ts:
|
|
1226
|
+
Defined in: [libraries/epub/index.ts:2805](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2805)
|
|
1227
1227
|
|
|
1228
1228
|
Returns the structured table of contents navigation document
|
|
1229
1229
|
as a Navigation object.
|
|
@@ -1247,7 +1247,7 @@ https://www.w3.org/TR/epub-33/#sec-nav-toc
|
|
|
1247
1247
|
|
|
1248
1248
|
> **getTitle**(`expanded`): `Promise`\<`string` \| `null`\>
|
|
1249
1249
|
|
|
1250
|
-
Defined in: [libraries/epub/index.ts:
|
|
1250
|
+
Defined in: [libraries/epub/index.ts:1929](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1929)
|
|
1251
1251
|
|
|
1252
1252
|
Retrieve the title of the Epub.
|
|
1253
1253
|
|
|
@@ -1269,7 +1269,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dctitle
|
|
|
1269
1269
|
|
|
1270
1270
|
> **getTitles**(): `Promise`\<`object`[]\>
|
|
1271
1271
|
|
|
1272
|
-
Defined in: [libraries/epub/index.ts:
|
|
1272
|
+
Defined in: [libraries/epub/index.ts:1965](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1965)
|
|
1273
1273
|
|
|
1274
1274
|
Retrieve all title entries of the Epub.
|
|
1275
1275
|
|
|
@@ -1285,7 +1285,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dctitle
|
|
|
1285
1285
|
|
|
1286
1286
|
> **getType**(): `Promise`\<[`MetadataEntry`](#metadataentry) \| `null`\>
|
|
1287
1287
|
|
|
1288
|
-
Defined in: [libraries/epub/index.ts:
|
|
1288
|
+
Defined in: [libraries/epub/index.ts:1751](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1751)
|
|
1289
1289
|
|
|
1290
1290
|
Retrieve the publication type from the dc:type element
|
|
1291
1291
|
in the EPUB metadata.
|
|
@@ -1304,7 +1304,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dctype
|
|
|
1304
1304
|
|
|
1305
1305
|
> **getUniqueIdentifier**(): `Promise`\<`string` \| `null`\>
|
|
1306
1306
|
|
|
1307
|
-
Defined in: [libraries/epub/index.ts:
|
|
1307
|
+
Defined in: [libraries/epub/index.ts:1101](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1101)
|
|
1308
1308
|
|
|
1309
1309
|
Retrieve the identifier with the unique identifier id
|
|
1310
1310
|
in the EPUB metadata.
|
|
@@ -1323,7 +1323,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcidentifier
|
|
|
1323
1323
|
|
|
1324
1324
|
> **getUniqueIdentifierId**(): `Promise`\<`string` \| `null`\>
|
|
1325
1325
|
|
|
1326
|
-
Defined in: [libraries/epub/index.ts:
|
|
1326
|
+
Defined in: [libraries/epub/index.ts:1182](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1182)
|
|
1327
1327
|
|
|
1328
1328
|
Retrieve the id of the publication's unique identifier, as declared by the
|
|
1329
1329
|
package element's `unique-identifier` attribute.
|
|
@@ -1340,7 +1340,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcidentifier
|
|
|
1340
1340
|
|
|
1341
1341
|
> **getVersion**(): `Promise`\<`string`\>
|
|
1342
1342
|
|
|
1343
|
-
Defined in: [libraries/epub/index.ts:
|
|
1343
|
+
Defined in: [libraries/epub/index.ts:3415](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3415)
|
|
1344
1344
|
|
|
1345
1345
|
Returns the EPUB version declared on the package element.
|
|
1346
1346
|
|
|
@@ -1354,7 +1354,7 @@ Returns the EPUB version declared on the package element.
|
|
|
1354
1354
|
|
|
1355
1355
|
> **readFileContents**(`href`, `relativeTo?`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\>
|
|
1356
1356
|
|
|
1357
|
-
Defined in: [libraries/epub/index.ts:
|
|
1357
|
+
Defined in: [libraries/epub/index.ts:2942](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2942)
|
|
1358
1358
|
|
|
1359
1359
|
Retrieve the contents of a file, given its href.
|
|
1360
1360
|
|
|
@@ -1376,7 +1376,7 @@ and an encoding parameter.
|
|
|
1376
1376
|
|
|
1377
1377
|
> **readFileContents**(`href`, `relativeTo`, `encoding`): `Promise`\<`string`\>
|
|
1378
1378
|
|
|
1379
|
-
Defined in: [libraries/epub/index.ts:
|
|
1379
|
+
Defined in: [libraries/epub/index.ts:2943](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2943)
|
|
1380
1380
|
|
|
1381
1381
|
Retrieve the contents of a file, given its href.
|
|
1382
1382
|
|
|
@@ -1401,7 +1401,7 @@ and an encoding parameter.
|
|
|
1401
1401
|
|
|
1402
1402
|
> **readItemContents**(`id`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\>
|
|
1403
1403
|
|
|
1404
|
-
Defined in: [libraries/epub/index.ts:
|
|
1404
|
+
Defined in: [libraries/epub/index.ts:2975](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2975)
|
|
1405
1405
|
|
|
1406
1406
|
Retrieve the contents of a manifest item, given its id.
|
|
1407
1407
|
|
|
@@ -1423,7 +1423,7 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
|
|
|
1423
1423
|
|
|
1424
1424
|
> **readItemContents**(`id`, `encoding`): `Promise`\<`string`\>
|
|
1425
1425
|
|
|
1426
|
-
Defined in: [libraries/epub/index.ts:
|
|
1426
|
+
Defined in: [libraries/epub/index.ts:2976](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2976)
|
|
1427
1427
|
|
|
1428
1428
|
Retrieve the contents of a manifest item, given its id.
|
|
1429
1429
|
|
|
@@ -1448,7 +1448,7 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
|
|
|
1448
1448
|
|
|
1449
1449
|
> **readXhtmlItemContents**(`id`, `as?`): `Promise`\<[`ParsedXml`](#parsedxml)\>
|
|
1450
1450
|
|
|
1451
|
-
Defined in: [libraries/epub/index.ts:
|
|
1451
|
+
Defined in: [libraries/epub/index.ts:3038](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3038)
|
|
1452
1452
|
|
|
1453
1453
|
Retrieves the contents of an XHTML item, given its manifest id.
|
|
1454
1454
|
|
|
@@ -1471,7 +1471,7 @@ https://www.w3.org/TR/epub-33/#sec-xhtml
|
|
|
1471
1471
|
|
|
1472
1472
|
> **readXhtmlItemContents**(`id`, `as`): `Promise`\<`string`\>
|
|
1473
1473
|
|
|
1474
|
-
Defined in: [libraries/epub/index.ts:
|
|
1474
|
+
Defined in: [libraries/epub/index.ts:3039](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3039)
|
|
1475
1475
|
|
|
1476
1476
|
Retrieves the contents of an XHTML item, given its manifest id.
|
|
1477
1477
|
|
|
@@ -1494,7 +1494,7 @@ https://www.w3.org/TR/epub-33/#sec-xhtml
|
|
|
1494
1494
|
|
|
1495
1495
|
> **removeCollection**(`index`): `Promise`\<`void`\>
|
|
1496
1496
|
|
|
1497
|
-
Defined in: [libraries/epub/index.ts:
|
|
1497
|
+
Defined in: [libraries/epub/index.ts:2304](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2304)
|
|
1498
1498
|
|
|
1499
1499
|
Remove a collection from the EPUB metadata.
|
|
1500
1500
|
|
|
@@ -1515,7 +1515,7 @@ refers to the array returned by `epub.getCollections()`.
|
|
|
1515
1515
|
|
|
1516
1516
|
> **removeContributor**(`index`): `Promise`\<`void`\>
|
|
1517
1517
|
|
|
1518
|
-
Defined in: [libraries/epub/index.ts:
|
|
1518
|
+
Defined in: [libraries/epub/index.ts:2564](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2564)
|
|
1519
1519
|
|
|
1520
1520
|
Remove a contributor from the EPUB metadata.
|
|
1521
1521
|
|
|
@@ -1543,7 +1543,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccreator
|
|
|
1543
1543
|
|
|
1544
1544
|
> **removeCreator**(`index`, `type`): `Promise`\<`void`\>
|
|
1545
1545
|
|
|
1546
|
-
Defined in: [libraries/epub/index.ts:
|
|
1546
|
+
Defined in: [libraries/epub/index.ts:2512](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2512)
|
|
1547
1547
|
|
|
1548
1548
|
Remove a creator from the EPUB metadata.
|
|
1549
1549
|
|
|
@@ -1569,7 +1569,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccreator
|
|
|
1569
1569
|
|
|
1570
1570
|
> **removeManifestItem**(`id`): `Promise`\<`void`\>
|
|
1571
1571
|
|
|
1572
|
-
Defined in: [libraries/epub/index.ts:
|
|
1572
|
+
Defined in: [libraries/epub/index.ts:3139](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3139)
|
|
1573
1573
|
|
|
1574
1574
|
##### Parameters
|
|
1575
1575
|
|
|
@@ -1585,7 +1585,7 @@ Defined in: [libraries/epub/index.ts:3127](https://gitlab.com/storyteller-platfo
|
|
|
1585
1585
|
|
|
1586
1586
|
> **removeMetadata**(`predicate`): `Promise`\<`void`\>
|
|
1587
1587
|
|
|
1588
|
-
Defined in: [libraries/epub/index.ts:
|
|
1588
|
+
Defined in: [libraries/epub/index.ts:3387](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3387)
|
|
1589
1589
|
|
|
1590
1590
|
Remove one or more metadata entries.
|
|
1591
1591
|
|
|
@@ -1611,7 +1611,7 @@ https://www.w3.org/TR/epub-33/#sec-pkg-metadata
|
|
|
1611
1611
|
|
|
1612
1612
|
> **removeSpineItem**(`index`): `Promise`\<`void`\>
|
|
1613
1613
|
|
|
1614
|
-
Defined in: [libraries/epub/index.ts:
|
|
1614
|
+
Defined in: [libraries/epub/index.ts:2670](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2670)
|
|
1615
1615
|
|
|
1616
1616
|
Remove the spine item at the specified index.
|
|
1617
1617
|
|
|
@@ -1633,7 +1633,7 @@ https://www.w3.org/TR/epub-33/#sec-spine-elem
|
|
|
1633
1633
|
|
|
1634
1634
|
> **removeSubject**(`index`): `Promise`\<`void`\>
|
|
1635
1635
|
|
|
1636
|
-
Defined in: [libraries/epub/index.ts:
|
|
1636
|
+
Defined in: [libraries/epub/index.ts:1801](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1801)
|
|
1637
1637
|
|
|
1638
1638
|
Remove a subject from the EPUB metadata.
|
|
1639
1639
|
|
|
@@ -1658,7 +1658,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccreator
|
|
|
1658
1658
|
|
|
1659
1659
|
> **replaceMetadata**(`predicate`, `entry`): `Promise`\<`void`\>
|
|
1660
1660
|
|
|
1661
|
-
Defined in: [libraries/epub/index.ts:
|
|
1661
|
+
Defined in: [libraries/epub/index.ts:3342](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3342)
|
|
1662
1662
|
|
|
1663
1663
|
Replace a metadata entry with a new one.
|
|
1664
1664
|
|
|
@@ -1685,7 +1685,7 @@ https://www.w3.org/TR/epub-33/#sec-pkg-metadata
|
|
|
1685
1685
|
|
|
1686
1686
|
> **resolveHref**(`href`, `relativeTo?`, `__namedParameters?`): `Promise`\<`string`\>
|
|
1687
1687
|
|
|
1688
|
-
Defined in: [libraries/epub/index.ts:
|
|
1688
|
+
Defined in: [libraries/epub/index.ts:2898](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2898)
|
|
1689
1689
|
|
|
1690
1690
|
Returns a path-relative-scheme-less URL, relative to the
|
|
1691
1691
|
container root.
|
|
@@ -1710,7 +1710,7 @@ a navigation document, is handed back unchanged.
|
|
|
1710
1710
|
|
|
1711
1711
|
> **saveAndClose**(): `Promise`\<`void`\>
|
|
1712
1712
|
|
|
1713
|
-
Defined in: [libraries/epub/index.ts:
|
|
1713
|
+
Defined in: [libraries/epub/index.ts:3560](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3560)
|
|
1714
1714
|
|
|
1715
1715
|
Write the current contents of the Epub to a new
|
|
1716
1716
|
EPUB archive on disk.
|
|
@@ -1727,7 +1727,7 @@ timestamp.
|
|
|
1727
1727
|
|
|
1728
1728
|
> **setCoverImage**(`href`, `data`): `Promise`\<`void`\>
|
|
1729
1729
|
|
|
1730
|
-
Defined in: [libraries/epub/index.ts:
|
|
1730
|
+
Defined in: [libraries/epub/index.ts:1628](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1628)
|
|
1731
1731
|
|
|
1732
1732
|
Set the cover image for the EPUB.
|
|
1733
1733
|
|
|
@@ -1750,7 +1750,7 @@ the provided href within the publication.
|
|
|
1750
1750
|
|
|
1751
1751
|
> **setDescription**(`description`): `Promise`\<`void`\>
|
|
1752
1752
|
|
|
1753
|
-
Defined in: [libraries/epub/index.ts:
|
|
1753
|
+
Defined in: [libraries/epub/index.ts:2030](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2030)
|
|
1754
1754
|
|
|
1755
1755
|
Update the Epub's description metadata entry.
|
|
1756
1756
|
|
|
@@ -1772,7 +1772,7 @@ Otherwise creates a new element. Any non-ASCII symbols,
|
|
|
1772
1772
|
|
|
1773
1773
|
> **setIdentifier**(`identifier`): `Promise`\<`void`\>
|
|
1774
1774
|
|
|
1775
|
-
Defined in: [libraries/epub/index.ts:
|
|
1775
|
+
Defined in: [libraries/epub/index.ts:1085](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1085)
|
|
1776
1776
|
|
|
1777
1777
|
Set the dc:identifier metadata element with the provided string.
|
|
1778
1778
|
|
|
@@ -1801,7 +1801,7 @@ Use [setUniqueIdentifier](#setuniqueidentifier) instead.
|
|
|
1801
1801
|
|
|
1802
1802
|
> **setIdentifiers**(`identifiers`): `Promise`\<`void`\>
|
|
1803
1803
|
|
|
1804
|
-
Defined in: [libraries/epub/index.ts:
|
|
1804
|
+
Defined in: [libraries/epub/index.ts:1350](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1350)
|
|
1805
1805
|
|
|
1806
1806
|
Replace the publication's `dc:identifier` entries.
|
|
1807
1807
|
|
|
@@ -1838,7 +1838,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcidentifier
|
|
|
1838
1838
|
|
|
1839
1839
|
> **setLanguage**(`locale`): `Promise`\<`void`\>
|
|
1840
1840
|
|
|
1841
|
-
Defined in: [libraries/epub/index.ts:
|
|
1841
|
+
Defined in: [libraries/epub/index.ts:1912](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1912)
|
|
1842
1842
|
|
|
1843
1843
|
Update the Epub's language metadata entry.
|
|
1844
1844
|
|
|
@@ -1863,7 +1863,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dclanguage
|
|
|
1863
1863
|
|
|
1864
1864
|
> **setPackageVocabularyPrefix**(`prefix`, `uri`): `Promise`\<`void`\>
|
|
1865
1865
|
|
|
1866
|
-
Defined in: [libraries/epub/index.ts:
|
|
1866
|
+
Defined in: [libraries/epub/index.ts:2081](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2081)
|
|
1867
1867
|
|
|
1868
1868
|
Set a custom vocabulary prefix on the root package element.
|
|
1869
1869
|
|
|
@@ -1886,7 +1886,7 @@ https://www.w3.org/TR/epub-33/#sec-prefix-attr
|
|
|
1886
1886
|
|
|
1887
1887
|
> **setPageBreakSource**(`value`): `Promise`\<`void`\>
|
|
1888
1888
|
|
|
1889
|
-
Defined in: [libraries/epub/index.ts:
|
|
1889
|
+
Defined in: [libraries/epub/index.ts:1317](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1317)
|
|
1890
1890
|
|
|
1891
1891
|
Set the `pageBreakSource` property (EPUB 3.4, spec D.2.9), or remove it when
|
|
1892
1892
|
passed null. Replaces an existing `pageBreakSource` meta if present.
|
|
@@ -1911,7 +1911,7 @@ https://www.w3.org/TR/epub/#pageBreakSource
|
|
|
1911
1911
|
|
|
1912
1912
|
> **setPublicationDate**(`date`): `Promise`\<`void`\>
|
|
1913
1913
|
|
|
1914
|
-
Defined in: [libraries/epub/index.ts:
|
|
1914
|
+
Defined in: [libraries/epub/index.ts:1666](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1666)
|
|
1915
1915
|
|
|
1916
1916
|
Set the dc:date metadata element with the provided date.
|
|
1917
1917
|
|
|
@@ -1936,7 +1936,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcdate
|
|
|
1936
1936
|
|
|
1937
1937
|
> **setSources**(`sources`): `Promise`\<`void`\>
|
|
1938
1938
|
|
|
1939
|
-
Defined in: [libraries/epub/index.ts:
|
|
1939
|
+
Defined in: [libraries/epub/index.ts:1468](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1468)
|
|
1940
1940
|
|
|
1941
1941
|
Replace the publication's `dc:source` entries.
|
|
1942
1942
|
|
|
@@ -1967,7 +1967,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcsource
|
|
|
1967
1967
|
|
|
1968
1968
|
> **setTitle**(`title`): `Promise`\<`void`\>
|
|
1969
1969
|
|
|
1970
|
-
Defined in: [libraries/epub/index.ts:
|
|
1970
|
+
Defined in: [libraries/epub/index.ts:2105](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2105)
|
|
1971
1971
|
|
|
1972
1972
|
Set the title of the Epub.
|
|
1973
1973
|
|
|
@@ -1994,7 +1994,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dctitle
|
|
|
1994
1994
|
|
|
1995
1995
|
> **setTitles**(`entries`): `Promise`\<`void`\>
|
|
1996
1996
|
|
|
1997
|
-
Defined in: [libraries/epub/index.ts:
|
|
1997
|
+
Defined in: [libraries/epub/index.ts:2133](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2133)
|
|
1998
1998
|
|
|
1999
1999
|
##### Parameters
|
|
2000
2000
|
|
|
@@ -2010,7 +2010,7 @@ Defined in: [libraries/epub/index.ts:2131](https://gitlab.com/storyteller-platfo
|
|
|
2010
2010
|
|
|
2011
2011
|
> **setType**(`type`): `Promise`\<`void`\>
|
|
2012
2012
|
|
|
2013
|
-
Defined in: [libraries/epub/index.ts:
|
|
2013
|
+
Defined in: [libraries/epub/index.ts:1735](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1735)
|
|
2014
2014
|
|
|
2015
2015
|
Set the dc:type metadata element.
|
|
2016
2016
|
|
|
@@ -2035,7 +2035,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dctype
|
|
|
2035
2035
|
|
|
2036
2036
|
> **setUniqueIdentifier**(`identifier`): `Promise`\<`void`\>
|
|
2037
2037
|
|
|
2038
|
-
Defined in: [libraries/epub/index.ts:
|
|
2038
|
+
Defined in: [libraries/epub/index.ts:1126](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1126)
|
|
2039
2039
|
|
|
2040
2040
|
Set the unique identifier id for the EPUB.
|
|
2041
2041
|
|
|
@@ -2062,7 +2062,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcidentifier
|
|
|
2062
2062
|
|
|
2063
2063
|
> **updateManifestItem**(`id`, `newItem`): `Promise`\<`void`\>
|
|
2064
2064
|
|
|
2065
|
-
Defined in: [libraries/epub/index.ts:
|
|
2065
|
+
Defined in: [libraries/epub/index.ts:3254](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3254)
|
|
2066
2066
|
|
|
2067
2067
|
Update the manifest entry for an existing item.
|
|
2068
2068
|
|
|
@@ -2088,7 +2088,7 @@ https://www.w3.org/TR/epub-33/#sec-pkg-manifest
|
|
|
2088
2088
|
|
|
2089
2089
|
> **withPackage**(`producer`): `Promise`\<`void`\>
|
|
2090
2090
|
|
|
2091
|
-
Defined in: [libraries/epub/index.ts:
|
|
2091
|
+
Defined in: [libraries/epub/index.ts:848](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L848)
|
|
2092
2092
|
|
|
2093
2093
|
Safely modify the package document, without race conditions.
|
|
2094
2094
|
|
|
@@ -2113,7 +2113,7 @@ method uses a mutex to ensure that each update runs exclusively.
|
|
|
2113
2113
|
|
|
2114
2114
|
> **writeItemContents**(`id`, `contents`): `Promise`\<`void`\>
|
|
2115
2115
|
|
|
2116
|
-
Defined in: [libraries/epub/index.ts:
|
|
2116
|
+
Defined in: [libraries/epub/index.ts:3095](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3095)
|
|
2117
2117
|
|
|
2118
2118
|
Write new contents for an existing manifest item,
|
|
2119
2119
|
specified by its id.
|
|
@@ -2140,7 +2140,7 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
|
|
|
2140
2140
|
|
|
2141
2141
|
> **writeItemContents**(`id`, `contents`, `encoding`): `Promise`\<`void`\>
|
|
2142
2142
|
|
|
2143
|
-
Defined in: [libraries/epub/index.ts:
|
|
2143
|
+
Defined in: [libraries/epub/index.ts:3096](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3096)
|
|
2144
2144
|
|
|
2145
2145
|
Write new contents for an existing manifest item,
|
|
2146
2146
|
specified by its id.
|
|
@@ -2168,7 +2168,7 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
|
|
|
2168
2168
|
|
|
2169
2169
|
> **writeXhtmlItemContents**(`id`, `contents`): `Promise`\<`void`\>
|
|
2170
2170
|
|
|
2171
|
-
Defined in: [libraries/epub/index.ts:
|
|
2171
|
+
Defined in: [libraries/epub/index.ts:3135](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3135)
|
|
2172
2172
|
|
|
2173
2173
|
Write new contents for an existing XHTML item,
|
|
2174
2174
|
specified by its id.
|
|
@@ -2195,7 +2195,7 @@ https://www.w3.org/TR/epub-33/#sec-xhtml
|
|
|
2195
2195
|
|
|
2196
2196
|
> `static` **addLinkToXhtmlHead**(`xml`, `link`): `void`
|
|
2197
2197
|
|
|
2198
|
-
Defined in: [libraries/epub/index.ts:
|
|
2198
|
+
Defined in: [libraries/epub/index.ts:436](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L436)
|
|
2199
2199
|
|
|
2200
2200
|
Given an XML structure representing a complete XHTML document,
|
|
2201
2201
|
add a `link` element to the `head` of the document.
|
|
@@ -2220,7 +2220,7 @@ This method modifies the provided XML structure.
|
|
|
2220
2220
|
|
|
2221
2221
|
> `static` **assertEpub3**(`epub`): `Promise`\<`void`\>
|
|
2222
2222
|
|
|
2223
|
-
Defined in: [libraries/epub/index.ts:
|
|
2223
|
+
Defined in: [libraries/epub/index.ts:711](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L711)
|
|
2224
2224
|
|
|
2225
2225
|
##### Parameters
|
|
2226
2226
|
|
|
@@ -2236,7 +2236,7 @@ Defined in: [libraries/epub/index.ts:709](https://gitlab.com/storyteller-platfor
|
|
|
2236
2236
|
|
|
2237
2237
|
> `static` **create**(`path`, `dublinCore`, `additionalMetadata`): `Promise`\<[`Epub`](#epub)\>
|
|
2238
2238
|
|
|
2239
|
-
Defined in: [libraries/epub/index.ts:
|
|
2239
|
+
Defined in: [libraries/epub/index.ts:659](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L659)
|
|
2240
2240
|
|
|
2241
2241
|
Construct a new EPUB on a writable backend, optionally seeded
|
|
2242
2242
|
with the provided metadata. Equivalent to
|
|
@@ -2258,7 +2258,7 @@ with the provided metadata. Equivalent to
|
|
|
2258
2258
|
|
|
2259
2259
|
> `static` **createXmlElement**\<`Name`\>(`name`, `properties`, `children`): [`XmlElement`](#xmlelement)\<`Name`\>
|
|
2260
2260
|
|
|
2261
|
-
Defined in: [libraries/epub/index.ts:
|
|
2261
|
+
Defined in: [libraries/epub/index.ts:471](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L471)
|
|
2262
2262
|
|
|
2263
2263
|
##### Type Parameters
|
|
2264
2264
|
|
|
@@ -2282,7 +2282,7 @@ Defined in: [libraries/epub/index.ts:469](https://gitlab.com/storyteller-platfor
|
|
|
2282
2282
|
|
|
2283
2283
|
> `static` **createXmlTextNode**(`text`): [`XmlTextNode`](#xmltextnode)
|
|
2284
2284
|
|
|
2285
|
-
Defined in: [libraries/epub/index.ts:
|
|
2285
|
+
Defined in: [libraries/epub/index.ts:484](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L484)
|
|
2286
2286
|
|
|
2287
2287
|
##### Parameters
|
|
2288
2288
|
|
|
@@ -2298,7 +2298,7 @@ Defined in: [libraries/epub/index.ts:482](https://gitlab.com/storyteller-platfor
|
|
|
2298
2298
|
|
|
2299
2299
|
> `static` **findXmlChildByName**\<`Name`\>(`name`, `xml`, `filter?`): [`XmlElement`](#xmlelement)\<`Name`\> \| `undefined`
|
|
2300
2300
|
|
|
2301
|
-
Defined in: [libraries/epub/index.ts:
|
|
2301
|
+
Defined in: [libraries/epub/index.ts:557](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L557)
|
|
2302
2302
|
|
|
2303
2303
|
Given an XML structure, find the first child matching
|
|
2304
2304
|
the provided name and optional filter.
|
|
@@ -2325,7 +2325,7 @@ the provided name and optional filter.
|
|
|
2325
2325
|
|
|
2326
2326
|
> `static` **findXmlDescendantByName**\<`Name`\>(`name`, `xml`, `filter?`): [`XmlElement`](#xmlelement)\<`Name`\> \| `undefined`
|
|
2327
2327
|
|
|
2328
|
-
Defined in: [libraries/epub/index.ts:
|
|
2328
|
+
Defined in: [libraries/epub/index.ts:575](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L575)
|
|
2329
2329
|
|
|
2330
2330
|
Given an XML structure, find the first descendant matching
|
|
2331
2331
|
the provided name and optional filter.
|
|
@@ -2355,7 +2355,7 @@ the highest element in the tree matching the name and filter.
|
|
|
2355
2355
|
|
|
2356
2356
|
> `static` **formatSmilDuration**(`duration`): `string`
|
|
2357
2357
|
|
|
2358
|
-
Defined in: [libraries/epub/index.ts:
|
|
2358
|
+
Defined in: [libraries/epub/index.ts:419](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L419)
|
|
2359
2359
|
|
|
2360
2360
|
Format a duration, provided as a number of seconds, as
|
|
2361
2361
|
a SMIL clock value, to be used for Media Overlays.
|
|
@@ -2380,7 +2380,7 @@ https://www.w3.org/TR/epub-33/#sec-duration
|
|
|
2380
2380
|
|
|
2381
2381
|
> `static` **from**(`pathOrData`): `Promise`\<[`Epub`](#epub)\>
|
|
2382
2382
|
|
|
2383
|
-
Defined in: [libraries/epub/index.ts:
|
|
2383
|
+
Defined in: [libraries/epub/index.ts:695](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L695)
|
|
2384
2384
|
|
|
2385
2385
|
Open an existing EPUB publication, extracting it to a temp directory
|
|
2386
2386
|
so writes can mutate the unpacked tree and rezip with `saveAndClose`.
|
|
@@ -2408,7 +2408,7 @@ when the archive is not a valid EPUB 3
|
|
|
2408
2408
|
|
|
2409
2409
|
> `static` **from**(`pathOrData`, `options`): `Promise`\<[`EpubReader`](#epubreader)\>
|
|
2410
2410
|
|
|
2411
|
-
Defined in: [libraries/epub/index.ts:
|
|
2411
|
+
Defined in: [libraries/epub/index.ts:696](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L696)
|
|
2412
2412
|
|
|
2413
2413
|
Open an existing EPUB publication, extracting it to a temp directory
|
|
2414
2414
|
so writes can mutate the unpacked tree and rezip with `saveAndClose`.
|
|
@@ -2437,7 +2437,7 @@ when the archive is not a valid EPUB 3
|
|
|
2437
2437
|
|
|
2438
2438
|
> `static` **from**(`pathOrData`, `options?`): `Promise`\<[`Epub`](#epub) \| [`EpubReader`](#epubreader)\>
|
|
2439
2439
|
|
|
2440
|
-
Defined in: [libraries/epub/index.ts:
|
|
2440
|
+
Defined in: [libraries/epub/index.ts:700](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L700)
|
|
2441
2441
|
|
|
2442
2442
|
Open an existing EPUB publication, extracting it to a temp directory
|
|
2443
2443
|
so writes can mutate the unpacked tree and rezip with `saveAndClose`.
|
|
@@ -2466,7 +2466,7 @@ when the archive is not a valid EPUB 3
|
|
|
2466
2466
|
|
|
2467
2467
|
> `static` **getXhtmlBody**(`xml`): [`ParsedXml`](#parsedxml)
|
|
2468
2468
|
|
|
2469
|
-
Defined in: [libraries/epub/index.ts:
|
|
2469
|
+
Defined in: [libraries/epub/index.ts:461](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L461)
|
|
2470
2470
|
|
|
2471
2471
|
Given an XML structure representing a complete XHTML document,
|
|
2472
2472
|
return the sub-structure representing the children of the
|
|
@@ -2486,7 +2486,7 @@ document's body element.
|
|
|
2486
2486
|
|
|
2487
2487
|
> `static` **getXhtmlTextContent**(`xml`): `string`
|
|
2488
2488
|
|
|
2489
|
-
Defined in: [libraries/epub/index.ts:
|
|
2489
|
+
Defined in: [libraries/epub/index.ts:493](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L493)
|
|
2490
2490
|
|
|
2491
2491
|
Given an XML structure representing a complete XHTML document,
|
|
2492
2492
|
return a string representing the concatenation of all text nodes
|
|
@@ -2506,7 +2506,7 @@ in the document.
|
|
|
2506
2506
|
|
|
2507
2507
|
> `static` **getXmlAttributes**(`element`): `Record`\<`string`, `string`\>
|
|
2508
2508
|
|
|
2509
|
-
Defined in: [libraries/epub/index.ts:
|
|
2509
|
+
Defined in: [libraries/epub/index.ts:510](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L510)
|
|
2510
2510
|
|
|
2511
2511
|
Given an XMLElement, return its attributes.
|
|
2512
2512
|
|
|
@@ -2524,7 +2524,7 @@ Given an XMLElement, return its attributes.
|
|
|
2524
2524
|
|
|
2525
2525
|
> `static` **getXmlChildren**\<`Name`\>(`element`): [`ParsedXml`](#parsedxml)
|
|
2526
2526
|
|
|
2527
|
-
Defined in: [libraries/epub/index.ts:
|
|
2527
|
+
Defined in: [libraries/epub/index.ts:537](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L537)
|
|
2528
2528
|
|
|
2529
2529
|
Given an XMLElement, return a list of its children
|
|
2530
2530
|
|
|
@@ -2548,7 +2548,7 @@ Given an XMLElement, return a list of its children
|
|
|
2548
2548
|
|
|
2549
2549
|
> `static` **getXmlElementName**\<`Name`\>(`element`): `Name`
|
|
2550
2550
|
|
|
2551
|
-
Defined in: [libraries/epub/index.ts:
|
|
2551
|
+
Defined in: [libraries/epub/index.ts:522](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L522)
|
|
2552
2552
|
|
|
2553
2553
|
Given an XMLElement, return its tag name.
|
|
2554
2554
|
|
|
@@ -2572,7 +2572,7 @@ Given an XMLElement, return its tag name.
|
|
|
2572
2572
|
|
|
2573
2573
|
> `static` **isXmlTextNode**(`node`): `node is XmlTextNode`
|
|
2574
2574
|
|
|
2575
|
-
Defined in: [libraries/epub/index.ts:
|
|
2575
|
+
Defined in: [libraries/epub/index.ts:597](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L597)
|
|
2576
2576
|
|
|
2577
2577
|
Given an XMLNode, determine whether it represents
|
|
2578
2578
|
a text node or an XML element.
|
|
@@ -2591,7 +2591,7 @@ a text node or an XML element.
|
|
|
2591
2591
|
|
|
2592
2592
|
> `static` **replaceXmlChildren**\<`Name`\>(`element`, `children`): `void`
|
|
2593
2593
|
|
|
2594
|
-
Defined in: [libraries/epub/index.ts:
|
|
2594
|
+
Defined in: [libraries/epub/index.ts:545](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L545)
|
|
2595
2595
|
|
|
2596
2596
|
##### Type Parameters
|
|
2597
2597
|
|
|
@@ -2614,7 +2614,7 @@ Defined in: [libraries/epub/index.ts:543](https://gitlab.com/storyteller-platfor
|
|
|
2614
2614
|
|
|
2615
2615
|
> `static` **upgrade**(`path`, `options`): `Promise`\<[`Epub`](#epub)\>
|
|
2616
2616
|
|
|
2617
|
-
Defined in: [libraries/epub/index.ts:
|
|
2617
|
+
Defined in: [libraries/epub/index.ts:3588](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3588)
|
|
2618
2618
|
|
|
2619
2619
|
Upgrade an EPUB 2 publication to EPUB 3 in place, returning a new,
|
|
2620
2620
|
valid Epub 3 instance. Equivalent to
|
|
@@ -2635,7 +2635,7 @@ valid Epub 3 instance. Equivalent to
|
|
|
2635
2635
|
|
|
2636
2636
|
> `static` **using**\<`A`\>(`adapterClass`): [`EpubFactory`](#epubfactory)\<`A`\>
|
|
2637
2637
|
|
|
2638
|
-
Defined in: [libraries/epub/index.ts:
|
|
2638
|
+
Defined in: [libraries/epub/index.ts:679](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L679)
|
|
2639
2639
|
|
|
2640
2640
|
Specify the storage backend to use for the EPUB
|
|
2641
2641
|
|
|
@@ -2669,7 +2669,7 @@ using reader = await Epub.using(MemoryAdapter).from(buffer, { cache: false });
|
|
|
2669
2669
|
|
|
2670
2670
|
## EpubFactory\<A\>
|
|
2671
2671
|
|
|
2672
|
-
Defined in: [libraries/epub/index.ts:
|
|
2672
|
+
Defined in: [libraries/epub/index.ts:3617](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3617)
|
|
2673
2673
|
|
|
2674
2674
|
Adapter-bound factory returned by [Epub.using](#using).
|
|
2675
2675
|
|
|
@@ -2690,7 +2690,7 @@ gracefully when the adapter doesn't support the operation: `create` and
|
|
|
2690
2690
|
|
|
2691
2691
|
> **new EpubFactory**\<`A`\>(`adapterClass`): [`EpubFactory`](#epubfactory)\<`A`\>
|
|
2692
2692
|
|
|
2693
|
-
Defined in: [libraries/epub/index.ts:
|
|
2693
|
+
Defined in: [libraries/epub/index.ts:3618](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3618)
|
|
2694
2694
|
|
|
2695
2695
|
##### Parameters
|
|
2696
2696
|
|
|
@@ -2708,7 +2708,7 @@ Defined in: [libraries/epub/index.ts:3606](https://gitlab.com/storyteller-platfo
|
|
|
2708
2708
|
|
|
2709
2709
|
> `readonly` **adapterClass**: `A`
|
|
2710
2710
|
|
|
2711
|
-
Defined in: [libraries/epub/index.ts:
|
|
2711
|
+
Defined in: [libraries/epub/index.ts:3618](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3618)
|
|
2712
2712
|
|
|
2713
2713
|
### Methods
|
|
2714
2714
|
|
|
@@ -2716,7 +2716,7 @@ Defined in: [libraries/epub/index.ts:3606](https://gitlab.com/storyteller-platfo
|
|
|
2716
2716
|
|
|
2717
2717
|
> **create**(`path`, `__namedParameters`, `additionalMetadata`): `Promise`\<[`EpubInstanceFor`](#epubinstancefor)\<`A`\>\>
|
|
2718
2718
|
|
|
2719
|
-
Defined in: [libraries/epub/index.ts:
|
|
2719
|
+
Defined in: [libraries/epub/index.ts:3679](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3679)
|
|
2720
2720
|
|
|
2721
2721
|
Construct a new EPUB on this factory's adapter, optionally seeded
|
|
2722
2722
|
with the provided metadata. Requires a writable adapter that
|
|
@@ -2744,7 +2744,7 @@ when the adapter is read-only or does not implement initEmpty
|
|
|
2744
2744
|
|
|
2745
2745
|
> **from**(`source`, `options`): `Promise`\<`Pick`\<[`Epub`](#epub), `"storage"` \| `"getItemArchiveLength"` \| `"getRootfile"` \| `"getPackageElement"` \| `"getManifest"` \| `"findMetadataItem"` \| `"findAllMetadataItems"` \| `"getMetadata"` \| `"getIdentifier"` \| `"getUniqueIdentifier"` \| `"getUniqueIdentifierId"` \| `"getIdentifiers"` \| `"getSources"` \| `"getPageBreakSource"` \| `"getCoverImageItem"` \| `"getCoverImage"` \| `"getPublicationDate"` \| `"getModifiedDate"` \| `"getLayout"` \| `"getBaseDirection"` \| `"getType"` \| `"getSubjects"` \| `"getLanguage"` \| `"getTitle"` \| `"getSubtitle"` \| `"getTitles"` \| `"getDescription"` \| `"getPackageVocabularyPrefixes"` \| `"getCollections"` \| `"getCreators"` \| `"getContributors"` \| `"getSpineItems"` \| `"getTableOfContents"` \| `"getLandmarks"` \| `"getPageList"` \| `"resolveHref"` \| `"readFileContents"` \| `"readItemContents"` \| `"readXhtmlItemContents"` \| `"getVersion"` \| `"getNcxTableOfContents"` \| `"getGuideEntries"` \| `"discardAndClose"`\> & `Disposable` & `object`\>
|
|
2746
2746
|
|
|
2747
|
-
Defined in: [libraries/epub/index.ts:
|
|
2747
|
+
Defined in: [libraries/epub/index.ts:3625](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3625)
|
|
2748
2748
|
|
|
2749
2749
|
Open an existing EPUB through this factory's adapter
|
|
2750
2750
|
|
|
@@ -2767,7 +2767,7 @@ when the archive is not a valid EPUB 3
|
|
|
2767
2767
|
|
|
2768
2768
|
> **from**(`source`, `options?`): `Promise`\<[`EpubInstanceFor`](#epubinstancefor)\<`A`\> & `object`\>
|
|
2769
2769
|
|
|
2770
|
-
Defined in: [libraries/epub/index.ts:
|
|
2770
|
+
Defined in: [libraries/epub/index.ts:3629](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3629)
|
|
2771
2771
|
|
|
2772
2772
|
Open an existing EPUB through this factory's adapter
|
|
2773
2773
|
|
|
@@ -2790,7 +2790,7 @@ when the archive is not a valid EPUB 3
|
|
|
2790
2790
|
|
|
2791
2791
|
> **upgrade**(`path`, `options`): `Promise`\<[`EpubInstanceFor`](#epubinstancefor)\<`A`\>\>
|
|
2792
2792
|
|
|
2793
|
-
Defined in: [libraries/epub/index.ts:
|
|
2793
|
+
Defined in: [libraries/epub/index.ts:3786](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3786)
|
|
2794
2794
|
|
|
2795
2795
|
Upgrade an EPUB 2 publication to EPUB 3 in place using this
|
|
2796
2796
|
factory's adapter, returning a new, valid Epub 3 instance.
|
|
@@ -2828,7 +2828,7 @@ when the adapter is read-only
|
|
|
2828
2828
|
|
|
2829
2829
|
## EpubReadOnlyError
|
|
2830
2830
|
|
|
2831
|
-
Defined in: [libraries/epub/index.ts:
|
|
2831
|
+
Defined in: [libraries/epub/index.ts:236](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L236)
|
|
2832
2832
|
|
|
2833
2833
|
### Extends
|
|
2834
2834
|
|
|
@@ -3057,7 +3057,7 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces
|
|
|
3057
3057
|
|
|
3058
3058
|
## EpubVersionError
|
|
3059
3059
|
|
|
3060
|
-
Defined in: [libraries/epub/index.ts:
|
|
3060
|
+
Defined in: [libraries/epub/index.ts:235](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L235)
|
|
3061
3061
|
|
|
3062
3062
|
### Extends
|
|
3063
3063
|
|
|
@@ -3868,823 +3868,4 @@ Defined in: [libraries/epub/index.ts:167](https://gitlab.com/storyteller-platfor
|
|
|
3868
3868
|
|
|
3869
3869
|
> **identifier**: `string`
|
|
3870
3870
|
|
|
3871
|
-
Defined in: [libraries/epub/index.ts:166](https://gitlab.com/storyteller-
|
|
3872
|
-
|
|
3873
|
-
#### language
|
|
3874
|
-
|
|
3875
|
-
> **language**: `Locale`
|
|
3876
|
-
|
|
3877
|
-
Defined in: [libraries/epub/index.ts:165](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L165)
|
|
3878
|
-
|
|
3879
|
-
#### subjects?
|
|
3880
|
-
|
|
3881
|
-
> `optional` **subjects**: (`string` \| [`DcSubject`](#dcsubject))[]
|
|
3882
|
-
|
|
3883
|
-
Defined in: [libraries/epub/index.ts:168](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L168)
|
|
3884
|
-
|
|
3885
|
-
#### title
|
|
3886
|
-
|
|
3887
|
-
> **title**: `string`
|
|
3888
|
-
|
|
3889
|
-
Defined in: [libraries/epub/index.ts:164](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L164)
|
|
3890
|
-
|
|
3891
|
-
#### type?
|
|
3892
|
-
|
|
3893
|
-
> `optional` **type**: `string`
|
|
3894
|
-
|
|
3895
|
-
Defined in: [libraries/epub/index.ts:171](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L171)
|
|
3896
|
-
|
|
3897
|
-
---
|
|
3898
|
-
|
|
3899
|
-
## Epub2UpgradeOptions
|
|
3900
|
-
|
|
3901
|
-
Defined in: [libraries/epub/upgrade.ts:69](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/upgrade.ts#L69)
|
|
3902
|
-
|
|
3903
|
-
### Properties
|
|
3904
|
-
|
|
3905
|
-
#### outputPath?
|
|
3906
|
-
|
|
3907
|
-
> `optional` **outputPath**: `string`
|
|
3908
|
-
|
|
3909
|
-
Defined in: [libraries/epub/upgrade.ts:73](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/upgrade.ts#L73)
|
|
3910
|
-
|
|
3911
|
-
The path to the output file. If provided, the input file will be copied to the output path.
|
|
3912
|
-
|
|
3913
|
-
#### removeNcx?
|
|
3914
|
-
|
|
3915
|
-
> `optional` **removeNcx**: `boolean`
|
|
3916
|
-
|
|
3917
|
-
Defined in: [libraries/epub/upgrade.ts:77](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/upgrade.ts#L77)
|
|
3918
|
-
|
|
3919
|
-
Whether to remove the NCX file, as it's technically optional in EPUB 3.
|
|
3920
|
-
|
|
3921
|
-
---
|
|
3922
|
-
|
|
3923
|
-
## EpubIdentifier
|
|
3924
|
-
|
|
3925
|
-
Defined in: [libraries/epub/index.ts:123](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L123)
|
|
3926
|
-
|
|
3927
|
-
### Properties
|
|
3928
|
-
|
|
3929
|
-
#### id?
|
|
3930
|
-
|
|
3931
|
-
> `optional` **id**: `string`
|
|
3932
|
-
|
|
3933
|
-
Defined in: [libraries/epub/index.ts:125](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L125)
|
|
3934
|
-
|
|
3935
|
-
#### identifierType?
|
|
3936
|
-
|
|
3937
|
-
> `optional` **identifierType**: `string`
|
|
3938
|
-
|
|
3939
|
-
Defined in: [libraries/epub/index.ts:127](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L127)
|
|
3940
|
-
|
|
3941
|
-
the value of a refining `identifier-type` meta, if present
|
|
3942
|
-
|
|
3943
|
-
#### scheme?
|
|
3944
|
-
|
|
3945
|
-
> `optional` **scheme**: `string`
|
|
3946
|
-
|
|
3947
|
-
Defined in: [libraries/epub/index.ts:129](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L129)
|
|
3948
|
-
|
|
3949
|
-
the `scheme` of a refining `identifier-type` meta, or a legacy `opf:scheme` attribute
|
|
3950
|
-
|
|
3951
|
-
#### value
|
|
3952
|
-
|
|
3953
|
-
> **value**: `string`
|
|
3954
|
-
|
|
3955
|
-
Defined in: [libraries/epub/index.ts:124](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L124)
|
|
3956
|
-
|
|
3957
|
-
---
|
|
3958
|
-
|
|
3959
|
-
## EpubListEntry
|
|
3960
|
-
|
|
3961
|
-
Defined in: [libraries/epub/adapters/interface.ts:17](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L17)
|
|
3962
|
-
|
|
3963
|
-
### Properties
|
|
3964
|
-
|
|
3965
|
-
#### absolutePath
|
|
3966
|
-
|
|
3967
|
-
> **absolutePath**: `string`
|
|
3968
|
-
|
|
3969
|
-
Defined in: [libraries/epub/adapters/interface.ts:19](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L19)
|
|
3970
|
-
|
|
3971
|
-
location the adapter can read the entry back from, in whatever form it stores
|
|
3972
|
-
|
|
3973
|
-
#### relativePath
|
|
3974
|
-
|
|
3975
|
-
> **relativePath**: `string`
|
|
3976
|
-
|
|
3977
|
-
Defined in: [libraries/epub/adapters/interface.ts:21](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L21)
|
|
3978
|
-
|
|
3979
|
-
the entry name, as it appears in the archive
|
|
3980
|
-
|
|
3981
|
-
---
|
|
3982
|
-
|
|
3983
|
-
## EpubSource
|
|
3984
|
-
|
|
3985
|
-
Defined in: [libraries/epub/index.ts:132](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L132)
|
|
3986
|
-
|
|
3987
|
-
### Properties
|
|
3988
|
-
|
|
3989
|
-
#### id?
|
|
3990
|
-
|
|
3991
|
-
> `optional` **id**: `string`
|
|
3992
|
-
|
|
3993
|
-
Defined in: [libraries/epub/index.ts:134](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L134)
|
|
3994
|
-
|
|
3995
|
-
#### identifierType?
|
|
3996
|
-
|
|
3997
|
-
> `optional` **identifierType**: `string`
|
|
3998
|
-
|
|
3999
|
-
Defined in: [libraries/epub/index.ts:136](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L136)
|
|
4000
|
-
|
|
4001
|
-
the value of a refining `identifier-type` meta, if present
|
|
4002
|
-
|
|
4003
|
-
#### isPageBreakSource?
|
|
4004
|
-
|
|
4005
|
-
> `optional` **isPageBreakSource**: `boolean`
|
|
4006
|
-
|
|
4007
|
-
Defined in: [libraries/epub/index.ts:147](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L147)
|
|
4008
|
-
|
|
4009
|
-
whether this source has a `source-of="pagination"` refinement
|
|
4010
|
-
or of a `<meta property="pageBreakSource">` element
|
|
4011
|
-
|
|
4012
|
-
as of EPUB 3.4 `source-of` is advised-deprecated in favour of the
|
|
4013
|
-
publication-level `pageBreakSource` property. if you want to
|
|
4014
|
-
be sure to get the source of pagination, use [Epub.getPageBreakSource](#getpagebreaksource)
|
|
4015
|
-
|
|
4016
|
-
#### scheme?
|
|
4017
|
-
|
|
4018
|
-
> `optional` **scheme**: `string`
|
|
4019
|
-
|
|
4020
|
-
Defined in: [libraries/epub/index.ts:138](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L138)
|
|
4021
|
-
|
|
4022
|
-
the `scheme` of a refining `identifier-type` meta, or a legacy `opf:scheme` attribute
|
|
4023
|
-
|
|
4024
|
-
#### value
|
|
4025
|
-
|
|
4026
|
-
> **value**: `string`
|
|
4027
|
-
|
|
4028
|
-
Defined in: [libraries/epub/index.ts:133](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L133)
|
|
4029
|
-
|
|
4030
|
-
---
|
|
4031
|
-
|
|
4032
|
-
## EpubStorageAdapter
|
|
4033
|
-
|
|
4034
|
-
Defined in: [libraries/epub/adapters/interface.ts:34](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L34)
|
|
4035
|
-
|
|
4036
|
-
Adapters only receive entry names, which is:
|
|
4037
|
-
|
|
4038
|
-
- the name a file has in the archive itself
|
|
4039
|
-
- relative to the container root, slash-separated,
|
|
4040
|
-
- already percent-decoded (eg `OEBPS/a b.xhtml`, not `OEBPS/a%20b.xhtml`)
|
|
4041
|
-
|
|
4042
|
-
Adapter decides where to store files under what name
|
|
4043
|
-
In previous versions of the EPUB lib, this was a little bit more muddled, leading to
|
|
4044
|
-
eg the TmpFsAdapter trying to read `OEBPS/a%20b.xhtml`, whereas it was stored as `OEBPS/a b.xhtml`
|
|
4045
|
-
|
|
4046
|
-
### Methods
|
|
4047
|
-
|
|
4048
|
-
#### archiveLength()
|
|
4049
|
-
|
|
4050
|
-
> **archiveLength**(`entry`): `Promise`\<`number`\>
|
|
4051
|
-
|
|
4052
|
-
Defined in: [libraries/epub/adapters/interface.ts:49](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L49)
|
|
4053
|
-
|
|
4054
|
-
Length of an entry in bytes, for the readium page-count heuristic
|
|
4055
|
-
which expects compressed size when available
|
|
4056
|
-
|
|
4057
|
-
##### Parameters
|
|
4058
|
-
|
|
4059
|
-
| Parameter | Type |
|
|
4060
|
-
| --------- | -------- |
|
|
4061
|
-
| `entry` | `string` |
|
|
4062
|
-
|
|
4063
|
-
##### Returns
|
|
4064
|
-
|
|
4065
|
-
`Promise`\<`number`\>
|
|
4066
|
-
|
|
4067
|
-
#### dispose()
|
|
4068
|
-
|
|
4069
|
-
> **dispose**(): `void` \| `Promise`\<`void`\>
|
|
4070
|
-
|
|
4071
|
-
Defined in: [libraries/epub/adapters/interface.ts:68](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L68)
|
|
4072
|
-
|
|
4073
|
-
Always called on close or error
|
|
4074
|
-
|
|
4075
|
-
##### Returns
|
|
4076
|
-
|
|
4077
|
-
`void` \| `Promise`\<`void`\>
|
|
4078
|
-
|
|
4079
|
-
#### duplicate()?
|
|
4080
|
-
|
|
4081
|
-
> `optional` **duplicate**(): `Promise`\<[`EpubStorageAdapter`](#epubstorageadapter)\>
|
|
4082
|
-
|
|
4083
|
-
Defined in: [libraries/epub/adapters/interface.ts:62](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L62)
|
|
4084
|
-
|
|
4085
|
-
Required for Epub.copy
|
|
4086
|
-
|
|
4087
|
-
##### Returns
|
|
4088
|
-
|
|
4089
|
-
`Promise`\<[`EpubStorageAdapter`](#epubstorageadapter)\>
|
|
4090
|
-
|
|
4091
|
-
#### exists()
|
|
4092
|
-
|
|
4093
|
-
> **exists**(`entry`): `Promise`\<`boolean`\>
|
|
4094
|
-
|
|
4095
|
-
Defined in: [libraries/epub/adapters/interface.ts:43](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L43)
|
|
4096
|
-
|
|
4097
|
-
Whether the archive holds an entry under exactly this name.
|
|
4098
|
-
Used to choose between different canditates for an href
|
|
4099
|
-
so should be exact
|
|
4100
|
-
|
|
4101
|
-
##### Parameters
|
|
4102
|
-
|
|
4103
|
-
| Parameter | Type |
|
|
4104
|
-
| --------- | -------- |
|
|
4105
|
-
| `entry` | `string` |
|
|
4106
|
-
|
|
4107
|
-
##### Returns
|
|
4108
|
-
|
|
4109
|
-
`Promise`\<`boolean`\>
|
|
4110
|
-
|
|
4111
|
-
#### list()?
|
|
4112
|
-
|
|
4113
|
-
> `optional` **list**(): `AsyncIterable`\<[`EpubListEntry`](#epublistentry)\>
|
|
4114
|
-
|
|
4115
|
-
Defined in: [libraries/epub/adapters/interface.ts:59](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L59)
|
|
4116
|
-
|
|
4117
|
-
Required for Epub.saveAndClose to walk the contents
|
|
4118
|
-
|
|
4119
|
-
##### Returns
|
|
4120
|
-
|
|
4121
|
-
`AsyncIterable`\<[`EpubListEntry`](#epublistentry)\>
|
|
4122
|
-
|
|
4123
|
-
#### read()
|
|
4124
|
-
|
|
4125
|
-
##### Call Signature
|
|
4126
|
-
|
|
4127
|
-
> **read**(`entry`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\>
|
|
4128
|
-
|
|
4129
|
-
Defined in: [libraries/epub/adapters/interface.ts:35](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L35)
|
|
4130
|
-
|
|
4131
|
-
###### Parameters
|
|
4132
|
-
|
|
4133
|
-
| Parameter | Type |
|
|
4134
|
-
| --------- | -------- |
|
|
4135
|
-
| `entry` | `string` |
|
|
4136
|
-
|
|
4137
|
-
###### Returns
|
|
4138
|
-
|
|
4139
|
-
`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\>
|
|
4140
|
-
|
|
4141
|
-
##### Call Signature
|
|
4142
|
-
|
|
4143
|
-
> **read**(`entry`, `encoding`): `Promise`\<`string`\>
|
|
4144
|
-
|
|
4145
|
-
Defined in: [libraries/epub/adapters/interface.ts:36](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L36)
|
|
4146
|
-
|
|
4147
|
-
###### Parameters
|
|
4148
|
-
|
|
4149
|
-
| Parameter | Type |
|
|
4150
|
-
| ---------- | --------- |
|
|
4151
|
-
| `entry` | `string` |
|
|
4152
|
-
| `encoding` | `"utf-8"` |
|
|
4153
|
-
|
|
4154
|
-
###### Returns
|
|
4155
|
-
|
|
4156
|
-
`Promise`\<`string`\>
|
|
4157
|
-
|
|
4158
|
-
#### remove()?
|
|
4159
|
-
|
|
4160
|
-
> `optional` **remove**(`entry`): `Promise`\<`void`\>
|
|
4161
|
-
|
|
4162
|
-
Defined in: [libraries/epub/adapters/interface.ts:56](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L56)
|
|
4163
|
-
|
|
4164
|
-
Required for removeManifestItem / setCoverImage replacement
|
|
4165
|
-
|
|
4166
|
-
##### Parameters
|
|
4167
|
-
|
|
4168
|
-
| Parameter | Type |
|
|
4169
|
-
| --------- | -------- |
|
|
4170
|
-
| `entry` | `string` |
|
|
4171
|
-
|
|
4172
|
-
##### Returns
|
|
4173
|
-
|
|
4174
|
-
`Promise`\<`void`\>
|
|
4175
|
-
|
|
4176
|
-
#### serialize()?
|
|
4177
|
-
|
|
4178
|
-
> `optional` **serialize**(`targetPath`): `Promise`\<`void`\>
|
|
4179
|
-
|
|
4180
|
-
Defined in: [libraries/epub/adapters/interface.ts:65](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L65)
|
|
4181
|
-
|
|
4182
|
-
Required for Epub.saveAndClose
|
|
4183
|
-
|
|
4184
|
-
##### Parameters
|
|
4185
|
-
|
|
4186
|
-
| Parameter | Type |
|
|
4187
|
-
| ------------ | -------- |
|
|
4188
|
-
| `targetPath` | `string` |
|
|
4189
|
-
|
|
4190
|
-
##### Returns
|
|
4191
|
-
|
|
4192
|
-
`Promise`\<`void`\>
|
|
4193
|
-
|
|
4194
|
-
#### write()?
|
|
4195
|
-
|
|
4196
|
-
##### Call Signature
|
|
4197
|
-
|
|
4198
|
-
> `optional` **write**(`entry`, `data`): `Promise`\<`void`\>
|
|
4199
|
-
|
|
4200
|
-
Defined in: [libraries/epub/adapters/interface.ts:52](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L52)
|
|
4201
|
-
|
|
4202
|
-
Required for any mutation method on Epub
|
|
4203
|
-
|
|
4204
|
-
###### Parameters
|
|
4205
|
-
|
|
4206
|
-
| Parameter | Type |
|
|
4207
|
-
| --------- | ------------ |
|
|
4208
|
-
| `entry` | `string` |
|
|
4209
|
-
| `data` | `Uint8Array` |
|
|
4210
|
-
|
|
4211
|
-
###### Returns
|
|
4212
|
-
|
|
4213
|
-
`Promise`\<`void`\>
|
|
4214
|
-
|
|
4215
|
-
##### Call Signature
|
|
4216
|
-
|
|
4217
|
-
> `optional` **write**(`entry`, `data`, `encoding`): `Promise`\<`void`\>
|
|
4218
|
-
|
|
4219
|
-
Defined in: [libraries/epub/adapters/interface.ts:53](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L53)
|
|
4220
|
-
|
|
4221
|
-
###### Parameters
|
|
4222
|
-
|
|
4223
|
-
| Parameter | Type |
|
|
4224
|
-
| ---------- | --------- |
|
|
4225
|
-
| `entry` | `string` |
|
|
4226
|
-
| `data` | `string` |
|
|
4227
|
-
| `encoding` | `"utf-8"` |
|
|
4228
|
-
|
|
4229
|
-
###### Returns
|
|
4230
|
-
|
|
4231
|
-
`Promise`\<`void`\>
|
|
4232
|
-
|
|
4233
|
-
---
|
|
4234
|
-
|
|
4235
|
-
## EpubStorageAdapterClass\<Opts\>
|
|
4236
|
-
|
|
4237
|
-
Defined in: [libraries/epub/adapters/interface.ts:71](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L71)
|
|
4238
|
-
|
|
4239
|
-
### Type Parameters
|
|
4240
|
-
|
|
4241
|
-
| Type Parameter | Default type |
|
|
4242
|
-
| ------------------------- | ------------ |
|
|
4243
|
-
| `Opts` _extends_ `object` | `object` |
|
|
4244
|
-
|
|
4245
|
-
### Properties
|
|
4246
|
-
|
|
4247
|
-
#### capabilities
|
|
4248
|
-
|
|
4249
|
-
> `readonly` **capabilities**: [`EpubStorageCapabilities`](#epubstoragecapabilities)
|
|
4250
|
-
|
|
4251
|
-
Defined in: [libraries/epub/adapters/interface.ts:73](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L73)
|
|
4252
|
-
|
|
4253
|
-
#### kind
|
|
4254
|
-
|
|
4255
|
-
> `readonly` **kind**: [`EpubStorageKind`](#epubstoragekind)
|
|
4256
|
-
|
|
4257
|
-
Defined in: [libraries/epub/adapters/interface.ts:72](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L72)
|
|
4258
|
-
|
|
4259
|
-
### Methods
|
|
4260
|
-
|
|
4261
|
-
#### init()
|
|
4262
|
-
|
|
4263
|
-
> **init**(`source`, `opts?`): `Promise`\<[`EpubStorageAdapter`](#epubstorageadapter)\>
|
|
4264
|
-
|
|
4265
|
-
Defined in: [libraries/epub/adapters/interface.ts:79](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L79)
|
|
4266
|
-
|
|
4267
|
-
Open an archive from a path or buffer.
|
|
4268
|
-
Will throw if the archive is not a valid EPUB 3
|
|
4269
|
-
|
|
4270
|
-
##### Parameters
|
|
4271
|
-
|
|
4272
|
-
| Parameter | Type |
|
|
4273
|
-
| --------- | --------------------------------------------- |
|
|
4274
|
-
| `source` | `string` \| `Uint8Array`\<`ArrayBufferLike`\> |
|
|
4275
|
-
| `opts?` | `Opts` |
|
|
4276
|
-
|
|
4277
|
-
##### Returns
|
|
4278
|
-
|
|
4279
|
-
`Promise`\<[`EpubStorageAdapter`](#epubstorageadapter)\>
|
|
4280
|
-
|
|
4281
|
-
#### initEmpty()?
|
|
4282
|
-
|
|
4283
|
-
> `optional` **initEmpty**(`opts?`): `Promise`\<[`EpubStorageAdapter`](#epubstorageadapter)\>
|
|
4284
|
-
|
|
4285
|
-
Defined in: [libraries/epub/adapters/interface.ts:85](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L85)
|
|
4286
|
-
|
|
4287
|
-
Initialize an empty extract root for [Epub.create](#create).
|
|
4288
|
-
Only necessary for adapters that can write
|
|
4289
|
-
|
|
4290
|
-
##### Parameters
|
|
4291
|
-
|
|
4292
|
-
| Parameter | Type |
|
|
4293
|
-
| --------- | ------ |
|
|
4294
|
-
| `opts?` | `Opts` |
|
|
4295
|
-
|
|
4296
|
-
##### Returns
|
|
4297
|
-
|
|
4298
|
-
`Promise`\<[`EpubStorageAdapter`](#epubstorageadapter)\>
|
|
4299
|
-
|
|
4300
|
-
---
|
|
4301
|
-
|
|
4302
|
-
## EpubStorageCapabilities
|
|
4303
|
-
|
|
4304
|
-
Defined in: [libraries/epub/adapters/interface.ts:12](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L12)
|
|
4305
|
-
|
|
4306
|
-
### Properties
|
|
4307
|
-
|
|
4308
|
-
#### writable
|
|
4309
|
-
|
|
4310
|
-
> `readonly` **writable**: `boolean`
|
|
4311
|
-
|
|
4312
|
-
Defined in: [libraries/epub/adapters/interface.ts:14](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L14)
|
|
4313
|
-
|
|
4314
|
-
when false, the Epub class refuses every mutation method at runtime
|
|
4315
|
-
|
|
4316
|
-
---
|
|
4317
|
-
|
|
4318
|
-
## FromOptions
|
|
4319
|
-
|
|
4320
|
-
Defined in: [libraries/epub/index.ts:201](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L201)
|
|
4321
|
-
|
|
4322
|
-
### Properties
|
|
4323
|
-
|
|
4324
|
-
#### readonly?
|
|
4325
|
-
|
|
4326
|
-
> `optional` **readonly**: `boolean`
|
|
4327
|
-
|
|
4328
|
-
Defined in: [libraries/epub/index.ts:206](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L206)
|
|
4329
|
-
|
|
4330
|
-
when true, mutation methods throw [EpubReadOnlyError](#epubreadonlyerror) at runtime
|
|
4331
|
-
|
|
4332
|
-
##### Default
|
|
4333
|
-
|
|
4334
|
-
```ts
|
|
4335
|
-
false;
|
|
4336
|
-
```
|
|
4337
|
-
|
|
4338
|
-
---
|
|
4339
|
-
|
|
4340
|
-
## Landmark
|
|
4341
|
-
|
|
4342
|
-
Defined in: [libraries/epub/upgrade.ts:63](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/upgrade.ts#L63)
|
|
4343
|
-
|
|
4344
|
-
### Properties
|
|
4345
|
-
|
|
4346
|
-
#### href
|
|
4347
|
-
|
|
4348
|
-
> **href**: `string`
|
|
4349
|
-
|
|
4350
|
-
Defined in: [libraries/epub/upgrade.ts:64](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/upgrade.ts#L64)
|
|
4351
|
-
|
|
4352
|
-
#### title
|
|
4353
|
-
|
|
4354
|
-
> **title**: `string`
|
|
4355
|
-
|
|
4356
|
-
Defined in: [libraries/epub/upgrade.ts:65](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/upgrade.ts#L65)
|
|
4357
|
-
|
|
4358
|
-
#### type
|
|
4359
|
-
|
|
4360
|
-
> **type**: `string`
|
|
4361
|
-
|
|
4362
|
-
Defined in: [libraries/epub/upgrade.ts:66](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/upgrade.ts#L66)
|
|
4363
|
-
|
|
4364
|
-
---
|
|
4365
|
-
|
|
4366
|
-
## MemoryAdapterOptions
|
|
4367
|
-
|
|
4368
|
-
Defined in: [libraries/epub/adapters/memory.ts:10](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/memory.ts#L10)
|
|
4369
|
-
|
|
4370
|
-
### Properties
|
|
4371
|
-
|
|
4372
|
-
#### cache?
|
|
4373
|
-
|
|
4374
|
-
> `optional` **cache**: `boolean`
|
|
4375
|
-
|
|
4376
|
-
Defined in: [libraries/epub/adapters/memory.ts:17](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/memory.ts#L17)
|
|
4377
|
-
|
|
4378
|
-
per-entry decompressed buffer cache
|
|
4379
|
-
turn it off when opening many EPUBs and reading each entry at most once
|
|
4380
|
-
keeps resident size bounded by the entry index, not the decompressed payload sum
|
|
4381
|
-
|
|
4382
|
-
##### Default
|
|
4383
|
-
|
|
4384
|
-
```ts
|
|
4385
|
-
true;
|
|
4386
|
-
```
|
|
4387
|
-
|
|
4388
|
-
#### signal?
|
|
4389
|
-
|
|
4390
|
-
> `optional` **signal**: `AbortSignal`
|
|
4391
|
-
|
|
4392
|
-
Defined in: [libraries/epub/adapters/memory.ts:18](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/memory.ts#L18)
|
|
4393
|
-
|
|
4394
|
-
---
|
|
4395
|
-
|
|
4396
|
-
## Navigation
|
|
4397
|
-
|
|
4398
|
-
Defined in: [libraries/epub/index.ts:188](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L188)
|
|
4399
|
-
|
|
4400
|
-
### Properties
|
|
4401
|
-
|
|
4402
|
-
#### children
|
|
4403
|
-
|
|
4404
|
-
> **children**: [`NavigationList`](#navigationlist)
|
|
4405
|
-
|
|
4406
|
-
Defined in: [libraries/epub/index.ts:190](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L190)
|
|
4407
|
-
|
|
4408
|
-
#### title?
|
|
4409
|
-
|
|
4410
|
-
> `optional` **title**: `string`
|
|
4411
|
-
|
|
4412
|
-
Defined in: [libraries/epub/index.ts:189](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L189)
|
|
4413
|
-
|
|
4414
|
-
---
|
|
4415
|
-
|
|
4416
|
-
## NavigationItem
|
|
4417
|
-
|
|
4418
|
-
Defined in: [libraries/epub/index.ts:180](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L180)
|
|
4419
|
-
|
|
4420
|
-
### Properties
|
|
4421
|
-
|
|
4422
|
-
#### children?
|
|
4423
|
-
|
|
4424
|
-
> `optional` **children**: [`NavigationList`](#navigationlist)
|
|
4425
|
-
|
|
4426
|
-
Defined in: [libraries/epub/index.ts:183](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L183)
|
|
4427
|
-
|
|
4428
|
-
#### href?
|
|
4429
|
-
|
|
4430
|
-
> `optional` **href**: `string`
|
|
4431
|
-
|
|
4432
|
-
Defined in: [libraries/epub/index.ts:182](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L182)
|
|
4433
|
-
|
|
4434
|
-
#### title
|
|
4435
|
-
|
|
4436
|
-
> **title**: `string`
|
|
4437
|
-
|
|
4438
|
-
Defined in: [libraries/epub/index.ts:181](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L181)
|
|
4439
|
-
|
|
4440
|
-
---
|
|
4441
|
-
|
|
4442
|
-
## AdapterOptions\<A\>
|
|
4443
|
-
|
|
4444
|
-
> **AdapterOptions**\<`A`\> = `A` _extends_ [`EpubStorageAdapterClass`](#epubstorageadapterclass)\<infer Opts\> ? `Opts` : `object`
|
|
4445
|
-
|
|
4446
|
-
Defined in: [libraries/epub/adapters/interface.ts:88](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L88)
|
|
4447
|
-
|
|
4448
|
-
### Type Parameters
|
|
4449
|
-
|
|
4450
|
-
| Type Parameter |
|
|
4451
|
-
| -------------- |
|
|
4452
|
-
| `A` |
|
|
4453
|
-
|
|
4454
|
-
---
|
|
4455
|
-
|
|
4456
|
-
## ElementName
|
|
4457
|
-
|
|
4458
|
-
> **ElementName** = \`$\{Letter \| Uppercase\<Letter\> \| QuestionMark\}$\{string\}\`
|
|
4459
|
-
|
|
4460
|
-
Defined in: [libraries/epub/index.ts:78](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L78)
|
|
4461
|
-
|
|
4462
|
-
A valid name for an XML element (must start with a letter)
|
|
4463
|
-
|
|
4464
|
-
---
|
|
4465
|
-
|
|
4466
|
-
## EpubInstanceFor\<A\>
|
|
4467
|
-
|
|
4468
|
-
> **EpubInstanceFor**\<`A`\> = `A`\[`"capabilities"`\]\[`"writable"`\] _extends_ `true` ? [`Epub`](#epub) : [`EpubReader`](#epubreader)
|
|
4469
|
-
|
|
4470
|
-
Defined in: [libraries/epub/index.ts:3594](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3594)
|
|
4471
|
-
|
|
4472
|
-
Resolves to [Epub](#epub) for writable adapters, [EpubReader](#epubreader) for read-only ones.
|
|
4473
|
-
|
|
4474
|
-
The conditional pivots on `capabilities.writable`, which must be a literal
|
|
4475
|
-
`true`/`false` on the adapter class (use `as const`) for inference to work.
|
|
4476
|
-
|
|
4477
|
-
### Type Parameters
|
|
4478
|
-
|
|
4479
|
-
| Type Parameter |
|
|
4480
|
-
| ------------------------------------------------------------------- |
|
|
4481
|
-
| `A` _extends_ [`EpubStorageAdapterClass`](#epubstorageadapterclass) |
|
|
4482
|
-
|
|
4483
|
-
---
|
|
4484
|
-
|
|
4485
|
-
## EpubMetadata
|
|
4486
|
-
|
|
4487
|
-
> **EpubMetadata** = [`MetadataEntry`](#metadataentry)[]
|
|
4488
|
-
|
|
4489
|
-
Defined in: [libraries/epub/index.ts:115](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L115)
|
|
4490
|
-
|
|
4491
|
-
---
|
|
4492
|
-
|
|
4493
|
-
## EpubReader
|
|
4494
|
-
|
|
4495
|
-
> **EpubReader** = `Pick`\<[`Epub`](#epub), `"storage"` \| `"findMetadataItem"` \| `"findAllMetadataItems"` \| `"resolveHref"` \| `"readFileContents"` \| `"readItemContents"` \| `"readXhtmlItemContents"` \| `"discardAndClose"` \| `Extract`\<keyof [`Epub`](#epub), `` `get${string}` ``\>\> & `Disposable`
|
|
4496
|
-
|
|
4497
|
-
Defined in: [libraries/epub/index.ts:213](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L213)
|
|
4498
|
-
|
|
4499
|
-
Read-only view of an EPUB
|
|
4500
|
-
Returned by Epub.using(MemoryAdapter).from(...) and by Epub.from(path, { readonly: true })
|
|
4501
|
-
|
|
4502
|
-
---
|
|
4503
|
-
|
|
4504
|
-
## EpubStorageKind
|
|
4505
|
-
|
|
4506
|
-
> **EpubStorageKind** = `"tmp-dir"` \| `"in-memory"` \| `string` & `object`
|
|
4507
|
-
|
|
4508
|
-
Defined in: [libraries/epub/adapters/interface.ts:10](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L10)
|
|
4509
|
-
|
|
4510
|
-
Pluggable storage backend for an Epub instance
|
|
4511
|
-
|
|
4512
|
-
Built-in adapters:
|
|
4513
|
-
|
|
4514
|
-
- [TmpFsAdapter](#tmpfsadapter) extracts the archive to a tmp directory and
|
|
4515
|
-
supports the full read/write/save/upgrade
|
|
4516
|
-
- [MemoryAdapter](#memoryadapter) keeps an in-memory zip handle and supports
|
|
4517
|
-
reads only
|
|
4518
|
-
|
|
4519
|
-
---
|
|
4520
|
-
|
|
4521
|
-
## InMemoryEpubReader
|
|
4522
|
-
|
|
4523
|
-
> **InMemoryEpubReader** = [`EpubReader`](#epubreader) & `object`
|
|
4524
|
-
|
|
4525
|
-
Defined in: [libraries/epub/index.ts:231](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L231)
|
|
4526
|
-
|
|
4527
|
-
Readonly Epub-instance backed by an in-memory zip handle
|
|
4528
|
-
Returned by `Epub.using(MemoryAdapter).from(...)`
|
|
4529
|
-
|
|
4530
|
-
### Type Declaration
|
|
4531
|
-
|
|
4532
|
-
#### storage
|
|
4533
|
-
|
|
4534
|
-
> `readonly` **storage**: `"in-memory"`
|
|
4535
|
-
|
|
4536
|
-
---
|
|
4537
|
-
|
|
4538
|
-
## ManifestItem
|
|
4539
|
-
|
|
4540
|
-
> **ManifestItem** = `object`
|
|
4541
|
-
|
|
4542
|
-
Defined in: [libraries/epub/index.ts:99](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L99)
|
|
4543
|
-
|
|
4544
|
-
### Properties
|
|
4545
|
-
|
|
4546
|
-
#### fallback?
|
|
4547
|
-
|
|
4548
|
-
> `optional` **fallback**: `string`
|
|
4549
|
-
|
|
4550
|
-
Defined in: [libraries/epub/index.ts:103](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L103)
|
|
4551
|
-
|
|
4552
|
-
#### href
|
|
4553
|
-
|
|
4554
|
-
> **href**: `string`
|
|
4555
|
-
|
|
4556
|
-
Defined in: [libraries/epub/index.ts:101](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L101)
|
|
4557
|
-
|
|
4558
|
-
#### id
|
|
4559
|
-
|
|
4560
|
-
> **id**: `string`
|
|
4561
|
-
|
|
4562
|
-
Defined in: [libraries/epub/index.ts:100](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L100)
|
|
4563
|
-
|
|
4564
|
-
#### mediaOverlay?
|
|
4565
|
-
|
|
4566
|
-
> `optional` **mediaOverlay**: `string`
|
|
4567
|
-
|
|
4568
|
-
Defined in: [libraries/epub/index.ts:104](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L104)
|
|
4569
|
-
|
|
4570
|
-
#### mediaType?
|
|
4571
|
-
|
|
4572
|
-
> `optional` **mediaType**: `string`
|
|
4573
|
-
|
|
4574
|
-
Defined in: [libraries/epub/index.ts:102](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L102)
|
|
4575
|
-
|
|
4576
|
-
#### properties?
|
|
4577
|
-
|
|
4578
|
-
> `optional` **properties**: `string`[]
|
|
4579
|
-
|
|
4580
|
-
Defined in: [libraries/epub/index.ts:105](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L105)
|
|
4581
|
-
|
|
4582
|
-
---
|
|
4583
|
-
|
|
4584
|
-
## MetadataEntry
|
|
4585
|
-
|
|
4586
|
-
> **MetadataEntry** = `object`
|
|
4587
|
-
|
|
4588
|
-
Defined in: [libraries/epub/index.ts:108](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L108)
|
|
4589
|
-
|
|
4590
|
-
### Properties
|
|
4591
|
-
|
|
4592
|
-
#### id?
|
|
4593
|
-
|
|
4594
|
-
> `optional` **id**: `string`
|
|
4595
|
-
|
|
4596
|
-
Defined in: [libraries/epub/index.ts:109](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L109)
|
|
4597
|
-
|
|
4598
|
-
#### properties
|
|
4599
|
-
|
|
4600
|
-
> **properties**: `Record`\<`string`, `string`\>
|
|
4601
|
-
|
|
4602
|
-
Defined in: [libraries/epub/index.ts:111](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L111)
|
|
4603
|
-
|
|
4604
|
-
#### type
|
|
4605
|
-
|
|
4606
|
-
> **type**: [`ElementName`](#elementname)
|
|
4607
|
-
|
|
4608
|
-
Defined in: [libraries/epub/index.ts:110](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L110)
|
|
4609
|
-
|
|
4610
|
-
#### value
|
|
4611
|
-
|
|
4612
|
-
> **value**: `string` \| `undefined`
|
|
4613
|
-
|
|
4614
|
-
Defined in: [libraries/epub/index.ts:112](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L112)
|
|
4615
|
-
|
|
4616
|
-
---
|
|
4617
|
-
|
|
4618
|
-
## NavigationList
|
|
4619
|
-
|
|
4620
|
-
> **NavigationList** = [`NavigationItem`](#navigationitem)[]
|
|
4621
|
-
|
|
4622
|
-
Defined in: [libraries/epub/index.ts:186](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L186)
|
|
4623
|
-
|
|
4624
|
-
---
|
|
4625
|
-
|
|
4626
|
-
## PackageElement
|
|
4627
|
-
|
|
4628
|
-
> **PackageElement** = [`XmlElement`](#xmlelement)\<`"package"`\>
|
|
4629
|
-
|
|
4630
|
-
Defined in: [libraries/epub/index.ts:199](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L199)
|
|
4631
|
-
|
|
4632
|
-
---
|
|
4633
|
-
|
|
4634
|
-
## ParsedXml
|
|
4635
|
-
|
|
4636
|
-
> **ParsedXml** = [`XmlNode`](#xmlnode)[]
|
|
4637
|
-
|
|
4638
|
-
Defined in: [libraries/epub/index.ts:97](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L97)
|
|
4639
|
-
|
|
4640
|
-
An XML structure
|
|
4641
|
-
|
|
4642
|
-
---
|
|
4643
|
-
|
|
4644
|
-
## XmlElement\<Name\>
|
|
4645
|
-
|
|
4646
|
-
> **XmlElement**\<`Name`\> = `object` & `{ [key in Name]: ParsedXml }`
|
|
4647
|
-
|
|
4648
|
-
Defined in: [libraries/epub/index.ts:84](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L84)
|
|
4649
|
-
|
|
4650
|
-
An XML element
|
|
4651
|
-
|
|
4652
|
-
### Type Declaration
|
|
4653
|
-
|
|
4654
|
-
#### :@?
|
|
4655
|
-
|
|
4656
|
-
> `optional` **:@**: `Record`\<`` `${PropertyPrefix}${string}` ``, `string`\>
|
|
4657
|
-
|
|
4658
|
-
### Type Parameters
|
|
4659
|
-
|
|
4660
|
-
| Type Parameter | Default type |
|
|
4661
|
-
| ---------------------------------------------- | ----------------------------- |
|
|
4662
|
-
| `Name` _extends_ [`ElementName`](#elementname) | [`ElementName`](#elementname) |
|
|
4663
|
-
|
|
4664
|
-
---
|
|
4665
|
-
|
|
4666
|
-
## XmlNode
|
|
4667
|
-
|
|
4668
|
-
> **XmlNode** = [`XmlElement`](#xmlelement) \| [`XmlTextNode`](#xmltextnode)
|
|
4669
|
-
|
|
4670
|
-
Defined in: [libraries/epub/index.ts:94](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L94)
|
|
4671
|
-
|
|
4672
|
-
A valid XML node. May be either an element or a text node.
|
|
4673
|
-
|
|
4674
|
-
---
|
|
4675
|
-
|
|
4676
|
-
## XmlTextNode
|
|
4677
|
-
|
|
4678
|
-
> **XmlTextNode** = `object`
|
|
4679
|
-
|
|
4680
|
-
Defined in: [libraries/epub/index.ts:91](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L91)
|
|
4681
|
-
|
|
4682
|
-
A text node in an XML document
|
|
4683
|
-
|
|
4684
|
-
### Properties
|
|
4685
|
-
|
|
4686
|
-
#### #text
|
|
4687
|
-
|
|
4688
|
-
> **#text**: `string`
|
|
4689
|
-
|
|
4690
|
-
Defined in: [libraries/epub/index.ts:91](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L91)
|
|
3871
|
+
Defined in: [libraries/epub/index.ts:166](https://gitlab.com/storyteller-platf
|