@storyteller-platform/epub 0.8.1 → 0.8.2
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 +1044 -154
- package/dist/index.d.ts +7 -2
- package/dist/index.js +37 -10
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -210,16 +210,16 @@ For more details about using the API, see the [API documentation](#epub).
|
|
|
210
210
|
This package lives in the
|
|
211
211
|
[Storyteller monorepo](https://gitlab.com/storyteller-platform/storyteller), and
|
|
212
212
|
is developed alongside the
|
|
213
|
-
[Storyteller platform](https://storyteller-platform.
|
|
213
|
+
[Storyteller platform](https://storyteller-platform.dev).
|
|
214
214
|
|
|
215
215
|
To get started with developing in the Storyteller monorepo, check out the
|
|
216
|
-
[development guides in the docs](https://storyteller-platform.
|
|
216
|
+
[development guides in the docs](https://storyteller-platform.dev/docs/category/development).
|
|
217
217
|
|
|
218
218
|
## API Docs
|
|
219
219
|
|
|
220
220
|
## Epub
|
|
221
221
|
|
|
222
|
-
Defined in: [libraries/epub/index.ts:
|
|
222
|
+
Defined in: [libraries/epub/index.ts:350](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L350)
|
|
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:625](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L625)
|
|
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:627](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L627)
|
|
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:626](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L626)
|
|
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:628](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L628)
|
|
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:629](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L629)
|
|
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:617](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L617)
|
|
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:406](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L406)
|
|
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:358](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L358)
|
|
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:399](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L399)
|
|
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:351](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L351)
|
|
344
344
|
|
|
345
345
|
### Methods
|
|
346
346
|
|
|
@@ -348,7 +348,7 @@ Defined in: [libraries/epub/index.ts:350](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:3611](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3611)
|
|
352
352
|
|
|
353
353
|
##### Returns
|
|
354
354
|
|
|
@@ -358,7 +358,7 @@ Defined in: [libraries/epub/index.ts:3595](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:2240](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2240)
|
|
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:2585](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2585)
|
|
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:2430](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2430)
|
|
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:3198](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3198)
|
|
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:3203](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3203)
|
|
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:3208](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3208)
|
|
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:3319](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3319)
|
|
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:2658](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2658)
|
|
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:1769](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1769)
|
|
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:722](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L722)
|
|
610
610
|
|
|
611
611
|
##### Parameters
|
|
612
612
|
|
|
@@ -622,7 +622,7 @@ Defined in: [libraries/epub/index.ts:721](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:3019](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3019)
|
|
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:3561](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3561)
|
|
647
647
|
|
|
648
648
|
##### Returns
|
|
649
649
|
|
|
@@ -653,7 +653,7 @@ Defined in: [libraries/epub/index.ts:3545](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:976](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L976)
|
|
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:967](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L967)
|
|
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:1723](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1723)
|
|
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:2200](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2200)
|
|
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:2417](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2417)
|
|
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:1619](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1619)
|
|
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:1600](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1600)
|
|
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:2353](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2353)
|
|
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:2051](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2051)
|
|
808
808
|
|
|
809
809
|
Retrieve the Epub's description as specified in its
|
|
810
810
|
package document metadata.
|
|
@@ -819,9 +819,9 @@ include HTML markup.
|
|
|
819
819
|
|
|
820
820
|
#### getGuideEntries()
|
|
821
821
|
|
|
822
|
-
> **getGuideEntries**(): `Promise
|
|
822
|
+
> **getGuideEntries**(): `Promise`\<[`GuideItem`](#guideitem)[]\>
|
|
823
823
|
|
|
824
|
-
Defined in: [libraries/epub/index.ts:
|
|
824
|
+
Defined in: [libraries/epub/index.ts:3538](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3538)
|
|
825
825
|
|
|
826
826
|
Retrieve the guide entries from the package document.
|
|
827
827
|
|
|
@@ -830,13 +830,13 @@ the landmarks nav, but many publications still include it.
|
|
|
830
830
|
|
|
831
831
|
##### Returns
|
|
832
832
|
|
|
833
|
-
`Promise
|
|
833
|
+
`Promise`\<[`GuideItem`](#guideitem)[]\>
|
|
834
834
|
|
|
835
835
|
#### ~~getIdentifier()~~
|
|
836
836
|
|
|
837
837
|
> **getIdentifier**(): `Promise`\<`string` \| `null`\>
|
|
838
838
|
|
|
839
|
-
Defined in: [libraries/epub/index.ts:
|
|
839
|
+
Defined in: [libraries/epub/index.ts:1074](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1074)
|
|
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:1249](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1249)
|
|
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:748](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L748)
|
|
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:2839](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2839)
|
|
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:1888](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1888)
|
|
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:1704](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1704)
|
|
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:892](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L892)
|
|
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:1043](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1043)
|
|
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:1687](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1687)
|
|
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:3444](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3444)
|
|
1031
1031
|
|
|
1032
1032
|
Parse the NCX table of contents, if one exists, and return
|
|
1033
1033
|
a tree of TocEntry nodes.
|
|
@@ -1040,11 +1040,21 @@ NCX for backwards compatibility.
|
|
|
1040
1040
|
|
|
1041
1041
|
`Promise`\<[`NavigationList`](#navigationlist)\>
|
|
1042
1042
|
|
|
1043
|
+
#### getPackageDocumentSource()
|
|
1044
|
+
|
|
1045
|
+
> **getPackageDocumentSource**(): `Promise`\<`string`\>
|
|
1046
|
+
|
|
1047
|
+
Defined in: [libraries/epub/index.ts:807](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L807)
|
|
1048
|
+
|
|
1049
|
+
##### Returns
|
|
1050
|
+
|
|
1051
|
+
`Promise`\<`string`\>
|
|
1052
|
+
|
|
1043
1053
|
#### getPackageElement()
|
|
1044
1054
|
|
|
1045
1055
|
> **getPackageElement**(): `Promise`\<[`XmlElement`](#xmlelement)\<`"package"`\>\>
|
|
1046
1056
|
|
|
1047
|
-
Defined in: [libraries/epub/index.ts:
|
|
1057
|
+
Defined in: [libraries/epub/index.ts:827](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L827)
|
|
1048
1058
|
|
|
1049
1059
|
##### Returns
|
|
1050
1060
|
|
|
@@ -1054,7 +1064,7 @@ Defined in: [libraries/epub/index.ts:822](https://gitlab.com/storyteller-platfor
|
|
|
1054
1064
|
|
|
1055
1065
|
> **getPackageVocabularyPrefixes**(): `Promise`\<`Record`\<`string`, `string`\>\>
|
|
1056
1066
|
|
|
1057
|
-
Defined in: [libraries/epub/index.ts:
|
|
1067
|
+
Defined in: [libraries/epub/index.ts:2068](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2068)
|
|
1058
1068
|
|
|
1059
1069
|
Return the set of custom vocabulary prefixes set on this publication's
|
|
1060
1070
|
root package element.
|
|
@@ -1073,7 +1083,7 @@ https://www.w3.org/TR/epub-33/#sec-prefix-attr
|
|
|
1073
1083
|
|
|
1074
1084
|
> **getPageBreakSource**(): `Promise`\<[`EpubSource`](#epubsource) \| `null`\>
|
|
1075
1085
|
|
|
1076
|
-
Defined in: [libraries/epub/index.ts:
|
|
1086
|
+
Defined in: [libraries/epub/index.ts:1286](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1286)
|
|
1077
1087
|
|
|
1078
1088
|
Retrieve the `pageBreakSource` property (EPUB 3.4, spec D.2.9), the
|
|
1079
1089
|
publication-level source for the source of its page break markers.
|
|
@@ -1094,7 +1104,7 @@ https://www.w3.org/TR/epub/#pageBreakSource
|
|
|
1094
1104
|
|
|
1095
1105
|
> **getPageList**(`__namedParameters`): `Promise`\<[`Navigation`](#navigation) \| `null`\>
|
|
1096
1106
|
|
|
1097
|
-
Defined in: [libraries/epub/index.ts:
|
|
1107
|
+
Defined in: [libraries/epub/index.ts:2851](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2851)
|
|
1098
1108
|
|
|
1099
1109
|
Returns the structured page list navigation document
|
|
1100
1110
|
as a Navigation object
|
|
@@ -1118,7 +1128,7 @@ https://www.w3.org/TR/epub-33/#sec-nav-landmarks
|
|
|
1118
1128
|
|
|
1119
1129
|
> **getPublicationDate**(): `Promise`\<`Date` \| `null`\>
|
|
1120
1130
|
|
|
1121
|
-
Defined in: [libraries/epub/index.ts:
|
|
1131
|
+
Defined in: [libraries/epub/index.ts:1656](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1656)
|
|
1122
1132
|
|
|
1123
1133
|
Retrieve the publication date from the dc:date element
|
|
1124
1134
|
in the EPUB metadata as a Date object.
|
|
@@ -1137,7 +1147,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcdate
|
|
|
1137
1147
|
|
|
1138
1148
|
> **getRootfile**(): `Promise`\<`string`\>
|
|
1139
1149
|
|
|
1140
|
-
Defined in: [libraries/epub/index.ts:
|
|
1150
|
+
Defined in: [libraries/epub/index.ts:759](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L759)
|
|
1141
1151
|
|
|
1142
1152
|
##### Returns
|
|
1143
1153
|
|
|
@@ -1147,7 +1157,7 @@ Defined in: [libraries/epub/index.ts:758](https://gitlab.com/storyteller-platfor
|
|
|
1147
1157
|
|
|
1148
1158
|
> **getSources**(): `Promise`\<[`EpubSource`](#epubsource)[]\>
|
|
1149
1159
|
|
|
1150
|
-
Defined in: [libraries/epub/index.ts:
|
|
1160
|
+
Defined in: [libraries/epub/index.ts:1263](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1263)
|
|
1151
1161
|
|
|
1152
1162
|
Retrieve every `dc:source` entry, returned as found.
|
|
1153
1163
|
|
|
@@ -1165,9 +1175,9 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcsource
|
|
|
1165
1175
|
|
|
1166
1176
|
#### getSpineItems()
|
|
1167
1177
|
|
|
1168
|
-
> **getSpineItems**(): `Promise`\<[`ManifestItem`](#manifestitem)[]\>
|
|
1178
|
+
> **getSpineItems**(): `Promise`\<[`ManifestItem`](#manifestitem) & `object`[]\>
|
|
1169
1179
|
|
|
1170
|
-
Defined in: [libraries/epub/index.ts:
|
|
1180
|
+
Defined in: [libraries/epub/index.ts:2631](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2631)
|
|
1171
1181
|
|
|
1172
1182
|
Retrieve the manifest items that make up the Epub's spine.
|
|
1173
1183
|
|
|
@@ -1176,7 +1186,7 @@ should be displayed to users by default.
|
|
|
1176
1186
|
|
|
1177
1187
|
##### Returns
|
|
1178
1188
|
|
|
1179
|
-
`Promise`\<[`ManifestItem`](#manifestitem)[]\>
|
|
1189
|
+
`Promise`\<[`ManifestItem`](#manifestitem) & `object`[]\>
|
|
1180
1190
|
|
|
1181
1191
|
##### Link
|
|
1182
1192
|
|
|
@@ -1186,7 +1196,7 @@ https://www.w3.org/TR/epub-33/#sec-spine-elem
|
|
|
1186
1196
|
|
|
1187
1197
|
> **getSubjects**(): `Promise`\<(`string` \| [`DcSubject`](#dcsubject))[]\>
|
|
1188
1198
|
|
|
1189
|
-
Defined in: [libraries/epub/index.ts:
|
|
1199
|
+
Defined in: [libraries/epub/index.ts:1843](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1843)
|
|
1190
1200
|
|
|
1191
1201
|
Retrieve the list of subjects for this EPUB.
|
|
1192
1202
|
|
|
@@ -1207,7 +1217,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcsubject
|
|
|
1207
1217
|
|
|
1208
1218
|
> **getSubtitle**(): `Promise`\<`string` \| `null`\>
|
|
1209
1219
|
|
|
1210
|
-
Defined in: [libraries/epub/index.ts:
|
|
1220
|
+
Defined in: [libraries/epub/index.ts:1958](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1958)
|
|
1211
1221
|
|
|
1212
1222
|
Retrieve the subtitle of the Epub, if it exists.
|
|
1213
1223
|
|
|
@@ -1223,7 +1233,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dctitle
|
|
|
1223
1233
|
|
|
1224
1234
|
> **getTableOfContents**(`__namedParameters`): `Promise`\<[`Navigation`](#navigation) \| `null`\>
|
|
1225
1235
|
|
|
1226
|
-
Defined in: [libraries/epub/index.ts:
|
|
1236
|
+
Defined in: [libraries/epub/index.ts:2821](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2821)
|
|
1227
1237
|
|
|
1228
1238
|
Returns the structured table of contents navigation document
|
|
1229
1239
|
as a Navigation object.
|
|
@@ -1247,7 +1257,7 @@ https://www.w3.org/TR/epub-33/#sec-nav-toc
|
|
|
1247
1257
|
|
|
1248
1258
|
> **getTitle**(`expanded`): `Promise`\<`string` \| `null`\>
|
|
1249
1259
|
|
|
1250
|
-
Defined in: [libraries/epub/index.ts:
|
|
1260
|
+
Defined in: [libraries/epub/index.ts:1934](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1934)
|
|
1251
1261
|
|
|
1252
1262
|
Retrieve the title of the Epub.
|
|
1253
1263
|
|
|
@@ -1269,7 +1279,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dctitle
|
|
|
1269
1279
|
|
|
1270
1280
|
> **getTitles**(): `Promise`\<`object`[]\>
|
|
1271
1281
|
|
|
1272
|
-
Defined in: [libraries/epub/index.ts:
|
|
1282
|
+
Defined in: [libraries/epub/index.ts:1970](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1970)
|
|
1273
1283
|
|
|
1274
1284
|
Retrieve all title entries of the Epub.
|
|
1275
1285
|
|
|
@@ -1285,7 +1295,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dctitle
|
|
|
1285
1295
|
|
|
1286
1296
|
> **getType**(): `Promise`\<[`MetadataEntry`](#metadataentry) \| `null`\>
|
|
1287
1297
|
|
|
1288
|
-
Defined in: [libraries/epub/index.ts:
|
|
1298
|
+
Defined in: [libraries/epub/index.ts:1756](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1756)
|
|
1289
1299
|
|
|
1290
1300
|
Retrieve the publication type from the dc:type element
|
|
1291
1301
|
in the EPUB metadata.
|
|
@@ -1304,7 +1314,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dctype
|
|
|
1304
1314
|
|
|
1305
1315
|
> **getUniqueIdentifier**(): `Promise`\<`string` \| `null`\>
|
|
1306
1316
|
|
|
1307
|
-
Defined in: [libraries/epub/index.ts:
|
|
1317
|
+
Defined in: [libraries/epub/index.ts:1106](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1106)
|
|
1308
1318
|
|
|
1309
1319
|
Retrieve the identifier with the unique identifier id
|
|
1310
1320
|
in the EPUB metadata.
|
|
@@ -1323,7 +1333,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcidentifier
|
|
|
1323
1333
|
|
|
1324
1334
|
> **getUniqueIdentifierId**(): `Promise`\<`string` \| `null`\>
|
|
1325
1335
|
|
|
1326
|
-
Defined in: [libraries/epub/index.ts:
|
|
1336
|
+
Defined in: [libraries/epub/index.ts:1187](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1187)
|
|
1327
1337
|
|
|
1328
1338
|
Retrieve the id of the publication's unique identifier, as declared by the
|
|
1329
1339
|
package element's `unique-identifier` attribute.
|
|
@@ -1340,7 +1350,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcidentifier
|
|
|
1340
1350
|
|
|
1341
1351
|
> **getVersion**(): `Promise`\<`string`\>
|
|
1342
1352
|
|
|
1343
|
-
Defined in: [libraries/epub/index.ts:
|
|
1353
|
+
Defined in: [libraries/epub/index.ts:3431](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3431)
|
|
1344
1354
|
|
|
1345
1355
|
Returns the EPUB version declared on the package element.
|
|
1346
1356
|
|
|
@@ -1354,7 +1364,7 @@ Returns the EPUB version declared on the package element.
|
|
|
1354
1364
|
|
|
1355
1365
|
> **readFileContents**(`href`, `relativeTo?`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\>
|
|
1356
1366
|
|
|
1357
|
-
Defined in: [libraries/epub/index.ts:
|
|
1367
|
+
Defined in: [libraries/epub/index.ts:2958](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2958)
|
|
1358
1368
|
|
|
1359
1369
|
Retrieve the contents of a file, given its href.
|
|
1360
1370
|
|
|
@@ -1376,7 +1386,7 @@ and an encoding parameter.
|
|
|
1376
1386
|
|
|
1377
1387
|
> **readFileContents**(`href`, `relativeTo`, `encoding`): `Promise`\<`string`\>
|
|
1378
1388
|
|
|
1379
|
-
Defined in: [libraries/epub/index.ts:
|
|
1389
|
+
Defined in: [libraries/epub/index.ts:2959](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2959)
|
|
1380
1390
|
|
|
1381
1391
|
Retrieve the contents of a file, given its href.
|
|
1382
1392
|
|
|
@@ -1401,7 +1411,7 @@ and an encoding parameter.
|
|
|
1401
1411
|
|
|
1402
1412
|
> **readItemContents**(`id`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\>
|
|
1403
1413
|
|
|
1404
|
-
Defined in: [libraries/epub/index.ts:
|
|
1414
|
+
Defined in: [libraries/epub/index.ts:2991](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2991)
|
|
1405
1415
|
|
|
1406
1416
|
Retrieve the contents of a manifest item, given its id.
|
|
1407
1417
|
|
|
@@ -1423,7 +1433,7 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
|
|
|
1423
1433
|
|
|
1424
1434
|
> **readItemContents**(`id`, `encoding`): `Promise`\<`string`\>
|
|
1425
1435
|
|
|
1426
|
-
Defined in: [libraries/epub/index.ts:
|
|
1436
|
+
Defined in: [libraries/epub/index.ts:2992](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2992)
|
|
1427
1437
|
|
|
1428
1438
|
Retrieve the contents of a manifest item, given its id.
|
|
1429
1439
|
|
|
@@ -1448,7 +1458,7 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
|
|
|
1448
1458
|
|
|
1449
1459
|
> **readXhtmlItemContents**(`id`, `as?`): `Promise`\<[`ParsedXml`](#parsedxml)\>
|
|
1450
1460
|
|
|
1451
|
-
Defined in: [libraries/epub/index.ts:
|
|
1461
|
+
Defined in: [libraries/epub/index.ts:3054](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3054)
|
|
1452
1462
|
|
|
1453
1463
|
Retrieves the contents of an XHTML item, given its manifest id.
|
|
1454
1464
|
|
|
@@ -1471,7 +1481,7 @@ https://www.w3.org/TR/epub-33/#sec-xhtml
|
|
|
1471
1481
|
|
|
1472
1482
|
> **readXhtmlItemContents**(`id`, `as`): `Promise`\<`string`\>
|
|
1473
1483
|
|
|
1474
|
-
Defined in: [libraries/epub/index.ts:
|
|
1484
|
+
Defined in: [libraries/epub/index.ts:3055](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3055)
|
|
1475
1485
|
|
|
1476
1486
|
Retrieves the contents of an XHTML item, given its manifest id.
|
|
1477
1487
|
|
|
@@ -1494,7 +1504,7 @@ https://www.w3.org/TR/epub-33/#sec-xhtml
|
|
|
1494
1504
|
|
|
1495
1505
|
> **removeCollection**(`index`): `Promise`\<`void`\>
|
|
1496
1506
|
|
|
1497
|
-
Defined in: [libraries/epub/index.ts:
|
|
1507
|
+
Defined in: [libraries/epub/index.ts:2309](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2309)
|
|
1498
1508
|
|
|
1499
1509
|
Remove a collection from the EPUB metadata.
|
|
1500
1510
|
|
|
@@ -1515,7 +1525,7 @@ refers to the array returned by `epub.getCollections()`.
|
|
|
1515
1525
|
|
|
1516
1526
|
> **removeContributor**(`index`): `Promise`\<`void`\>
|
|
1517
1527
|
|
|
1518
|
-
Defined in: [libraries/epub/index.ts:
|
|
1528
|
+
Defined in: [libraries/epub/index.ts:2569](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2569)
|
|
1519
1529
|
|
|
1520
1530
|
Remove a contributor from the EPUB metadata.
|
|
1521
1531
|
|
|
@@ -1543,7 +1553,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccreator
|
|
|
1543
1553
|
|
|
1544
1554
|
> **removeCreator**(`index`, `type`): `Promise`\<`void`\>
|
|
1545
1555
|
|
|
1546
|
-
Defined in: [libraries/epub/index.ts:
|
|
1556
|
+
Defined in: [libraries/epub/index.ts:2517](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2517)
|
|
1547
1557
|
|
|
1548
1558
|
Remove a creator from the EPUB metadata.
|
|
1549
1559
|
|
|
@@ -1569,7 +1579,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccreator
|
|
|
1569
1579
|
|
|
1570
1580
|
> **removeManifestItem**(`id`): `Promise`\<`void`\>
|
|
1571
1581
|
|
|
1572
|
-
Defined in: [libraries/epub/index.ts:
|
|
1582
|
+
Defined in: [libraries/epub/index.ts:3155](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3155)
|
|
1573
1583
|
|
|
1574
1584
|
##### Parameters
|
|
1575
1585
|
|
|
@@ -1585,7 +1595,7 @@ Defined in: [libraries/epub/index.ts:3139](https://gitlab.com/storyteller-platfo
|
|
|
1585
1595
|
|
|
1586
1596
|
> **removeMetadata**(`predicate`): `Promise`\<`void`\>
|
|
1587
1597
|
|
|
1588
|
-
Defined in: [libraries/epub/index.ts:
|
|
1598
|
+
Defined in: [libraries/epub/index.ts:3403](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3403)
|
|
1589
1599
|
|
|
1590
1600
|
Remove one or more metadata entries.
|
|
1591
1601
|
|
|
@@ -1611,7 +1621,7 @@ https://www.w3.org/TR/epub-33/#sec-pkg-metadata
|
|
|
1611
1621
|
|
|
1612
1622
|
> **removeSpineItem**(`index`): `Promise`\<`void`\>
|
|
1613
1623
|
|
|
1614
|
-
Defined in: [libraries/epub/index.ts:
|
|
1624
|
+
Defined in: [libraries/epub/index.ts:2694](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2694)
|
|
1615
1625
|
|
|
1616
1626
|
Remove the spine item at the specified index.
|
|
1617
1627
|
|
|
@@ -1633,7 +1643,7 @@ https://www.w3.org/TR/epub-33/#sec-spine-elem
|
|
|
1633
1643
|
|
|
1634
1644
|
> **removeSubject**(`index`): `Promise`\<`void`\>
|
|
1635
1645
|
|
|
1636
|
-
Defined in: [libraries/epub/index.ts:
|
|
1646
|
+
Defined in: [libraries/epub/index.ts:1806](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1806)
|
|
1637
1647
|
|
|
1638
1648
|
Remove a subject from the EPUB metadata.
|
|
1639
1649
|
|
|
@@ -1658,7 +1668,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccreator
|
|
|
1658
1668
|
|
|
1659
1669
|
> **replaceMetadata**(`predicate`, `entry`): `Promise`\<`void`\>
|
|
1660
1670
|
|
|
1661
|
-
Defined in: [libraries/epub/index.ts:
|
|
1671
|
+
Defined in: [libraries/epub/index.ts:3358](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3358)
|
|
1662
1672
|
|
|
1663
1673
|
Replace a metadata entry with a new one.
|
|
1664
1674
|
|
|
@@ -1685,7 +1695,7 @@ https://www.w3.org/TR/epub-33/#sec-pkg-metadata
|
|
|
1685
1695
|
|
|
1686
1696
|
> **resolveHref**(`href`, `relativeTo?`, `__namedParameters?`): `Promise`\<`string`\>
|
|
1687
1697
|
|
|
1688
|
-
Defined in: [libraries/epub/index.ts:
|
|
1698
|
+
Defined in: [libraries/epub/index.ts:2914](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2914)
|
|
1689
1699
|
|
|
1690
1700
|
Returns a path-relative-scheme-less URL, relative to the
|
|
1691
1701
|
container root.
|
|
@@ -1710,7 +1720,7 @@ a navigation document, is handed back unchanged.
|
|
|
1710
1720
|
|
|
1711
1721
|
> **saveAndClose**(): `Promise`\<`void`\>
|
|
1712
1722
|
|
|
1713
|
-
Defined in: [libraries/epub/index.ts:
|
|
1723
|
+
Defined in: [libraries/epub/index.ts:3576](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3576)
|
|
1714
1724
|
|
|
1715
1725
|
Write the current contents of the Epub to a new
|
|
1716
1726
|
EPUB archive on disk.
|
|
@@ -1727,7 +1737,7 @@ timestamp.
|
|
|
1727
1737
|
|
|
1728
1738
|
> **setCoverImage**(`href`, `data`): `Promise`\<`void`\>
|
|
1729
1739
|
|
|
1730
|
-
Defined in: [libraries/epub/index.ts:
|
|
1740
|
+
Defined in: [libraries/epub/index.ts:1633](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1633)
|
|
1731
1741
|
|
|
1732
1742
|
Set the cover image for the EPUB.
|
|
1733
1743
|
|
|
@@ -1750,7 +1760,7 @@ the provided href within the publication.
|
|
|
1750
1760
|
|
|
1751
1761
|
> **setDescription**(`description`): `Promise`\<`void`\>
|
|
1752
1762
|
|
|
1753
|
-
Defined in: [libraries/epub/index.ts:
|
|
1763
|
+
Defined in: [libraries/epub/index.ts:2035](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2035)
|
|
1754
1764
|
|
|
1755
1765
|
Update the Epub's description metadata entry.
|
|
1756
1766
|
|
|
@@ -1772,7 +1782,7 @@ Otherwise creates a new element. Any non-ASCII symbols,
|
|
|
1772
1782
|
|
|
1773
1783
|
> **setIdentifier**(`identifier`): `Promise`\<`void`\>
|
|
1774
1784
|
|
|
1775
|
-
Defined in: [libraries/epub/index.ts:
|
|
1785
|
+
Defined in: [libraries/epub/index.ts:1090](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1090)
|
|
1776
1786
|
|
|
1777
1787
|
Set the dc:identifier metadata element with the provided string.
|
|
1778
1788
|
|
|
@@ -1801,7 +1811,7 @@ Use [setUniqueIdentifier](#setuniqueidentifier) instead.
|
|
|
1801
1811
|
|
|
1802
1812
|
> **setIdentifiers**(`identifiers`): `Promise`\<`void`\>
|
|
1803
1813
|
|
|
1804
|
-
Defined in: [libraries/epub/index.ts:
|
|
1814
|
+
Defined in: [libraries/epub/index.ts:1355](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1355)
|
|
1805
1815
|
|
|
1806
1816
|
Replace the publication's `dc:identifier` entries.
|
|
1807
1817
|
|
|
@@ -1838,7 +1848,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcidentifier
|
|
|
1838
1848
|
|
|
1839
1849
|
> **setLanguage**(`locale`): `Promise`\<`void`\>
|
|
1840
1850
|
|
|
1841
|
-
Defined in: [libraries/epub/index.ts:
|
|
1851
|
+
Defined in: [libraries/epub/index.ts:1917](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1917)
|
|
1842
1852
|
|
|
1843
1853
|
Update the Epub's language metadata entry.
|
|
1844
1854
|
|
|
@@ -1863,7 +1873,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dclanguage
|
|
|
1863
1873
|
|
|
1864
1874
|
> **setPackageVocabularyPrefix**(`prefix`, `uri`): `Promise`\<`void`\>
|
|
1865
1875
|
|
|
1866
|
-
Defined in: [libraries/epub/index.ts:
|
|
1876
|
+
Defined in: [libraries/epub/index.ts:2086](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2086)
|
|
1867
1877
|
|
|
1868
1878
|
Set a custom vocabulary prefix on the root package element.
|
|
1869
1879
|
|
|
@@ -1886,7 +1896,7 @@ https://www.w3.org/TR/epub-33/#sec-prefix-attr
|
|
|
1886
1896
|
|
|
1887
1897
|
> **setPageBreakSource**(`value`): `Promise`\<`void`\>
|
|
1888
1898
|
|
|
1889
|
-
Defined in: [libraries/epub/index.ts:
|
|
1899
|
+
Defined in: [libraries/epub/index.ts:1322](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1322)
|
|
1890
1900
|
|
|
1891
1901
|
Set the `pageBreakSource` property (EPUB 3.4, spec D.2.9), or remove it when
|
|
1892
1902
|
passed null. Replaces an existing `pageBreakSource` meta if present.
|
|
@@ -1911,7 +1921,7 @@ https://www.w3.org/TR/epub/#pageBreakSource
|
|
|
1911
1921
|
|
|
1912
1922
|
> **setPublicationDate**(`date`): `Promise`\<`void`\>
|
|
1913
1923
|
|
|
1914
|
-
Defined in: [libraries/epub/index.ts:
|
|
1924
|
+
Defined in: [libraries/epub/index.ts:1671](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1671)
|
|
1915
1925
|
|
|
1916
1926
|
Set the dc:date metadata element with the provided date.
|
|
1917
1927
|
|
|
@@ -1936,7 +1946,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcdate
|
|
|
1936
1946
|
|
|
1937
1947
|
> **setSources**(`sources`): `Promise`\<`void`\>
|
|
1938
1948
|
|
|
1939
|
-
Defined in: [libraries/epub/index.ts:
|
|
1949
|
+
Defined in: [libraries/epub/index.ts:1473](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1473)
|
|
1940
1950
|
|
|
1941
1951
|
Replace the publication's `dc:source` entries.
|
|
1942
1952
|
|
|
@@ -1967,7 +1977,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcsource
|
|
|
1967
1977
|
|
|
1968
1978
|
> **setTitle**(`title`): `Promise`\<`void`\>
|
|
1969
1979
|
|
|
1970
|
-
Defined in: [libraries/epub/index.ts:
|
|
1980
|
+
Defined in: [libraries/epub/index.ts:2110](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2110)
|
|
1971
1981
|
|
|
1972
1982
|
Set the title of the Epub.
|
|
1973
1983
|
|
|
@@ -1994,7 +2004,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dctitle
|
|
|
1994
2004
|
|
|
1995
2005
|
> **setTitles**(`entries`): `Promise`\<`void`\>
|
|
1996
2006
|
|
|
1997
|
-
Defined in: [libraries/epub/index.ts:
|
|
2007
|
+
Defined in: [libraries/epub/index.ts:2138](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L2138)
|
|
1998
2008
|
|
|
1999
2009
|
##### Parameters
|
|
2000
2010
|
|
|
@@ -2010,7 +2020,7 @@ Defined in: [libraries/epub/index.ts:2133](https://gitlab.com/storyteller-platfo
|
|
|
2010
2020
|
|
|
2011
2021
|
> **setType**(`type`): `Promise`\<`void`\>
|
|
2012
2022
|
|
|
2013
|
-
Defined in: [libraries/epub/index.ts:
|
|
2023
|
+
Defined in: [libraries/epub/index.ts:1740](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1740)
|
|
2014
2024
|
|
|
2015
2025
|
Set the dc:type metadata element.
|
|
2016
2026
|
|
|
@@ -2035,7 +2045,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dctype
|
|
|
2035
2045
|
|
|
2036
2046
|
> **setUniqueIdentifier**(`identifier`): `Promise`\<`void`\>
|
|
2037
2047
|
|
|
2038
|
-
Defined in: [libraries/epub/index.ts:
|
|
2048
|
+
Defined in: [libraries/epub/index.ts:1131](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L1131)
|
|
2039
2049
|
|
|
2040
2050
|
Set the unique identifier id for the EPUB.
|
|
2041
2051
|
|
|
@@ -2062,7 +2072,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcidentifier
|
|
|
2062
2072
|
|
|
2063
2073
|
> **updateManifestItem**(`id`, `newItem`): `Promise`\<`void`\>
|
|
2064
2074
|
|
|
2065
|
-
Defined in: [libraries/epub/index.ts:
|
|
2075
|
+
Defined in: [libraries/epub/index.ts:3270](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3270)
|
|
2066
2076
|
|
|
2067
2077
|
Update the manifest entry for an existing item.
|
|
2068
2078
|
|
|
@@ -2088,7 +2098,7 @@ https://www.w3.org/TR/epub-33/#sec-pkg-manifest
|
|
|
2088
2098
|
|
|
2089
2099
|
> **withPackage**(`producer`): `Promise`\<`void`\>
|
|
2090
2100
|
|
|
2091
|
-
Defined in: [libraries/epub/index.ts:
|
|
2101
|
+
Defined in: [libraries/epub/index.ts:853](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L853)
|
|
2092
2102
|
|
|
2093
2103
|
Safely modify the package document, without race conditions.
|
|
2094
2104
|
|
|
@@ -2113,7 +2123,7 @@ method uses a mutex to ensure that each update runs exclusively.
|
|
|
2113
2123
|
|
|
2114
2124
|
> **writeItemContents**(`id`, `contents`): `Promise`\<`void`\>
|
|
2115
2125
|
|
|
2116
|
-
Defined in: [libraries/epub/index.ts:
|
|
2126
|
+
Defined in: [libraries/epub/index.ts:3111](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3111)
|
|
2117
2127
|
|
|
2118
2128
|
Write new contents for an existing manifest item,
|
|
2119
2129
|
specified by its id.
|
|
@@ -2140,7 +2150,7 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
|
|
|
2140
2150
|
|
|
2141
2151
|
> **writeItemContents**(`id`, `contents`, `encoding`): `Promise`\<`void`\>
|
|
2142
2152
|
|
|
2143
|
-
Defined in: [libraries/epub/index.ts:
|
|
2153
|
+
Defined in: [libraries/epub/index.ts:3112](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3112)
|
|
2144
2154
|
|
|
2145
2155
|
Write new contents for an existing manifest item,
|
|
2146
2156
|
specified by its id.
|
|
@@ -2168,7 +2178,7 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
|
|
|
2168
2178
|
|
|
2169
2179
|
> **writeXhtmlItemContents**(`id`, `contents`): `Promise`\<`void`\>
|
|
2170
2180
|
|
|
2171
|
-
Defined in: [libraries/epub/index.ts:
|
|
2181
|
+
Defined in: [libraries/epub/index.ts:3151](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3151)
|
|
2172
2182
|
|
|
2173
2183
|
Write new contents for an existing XHTML item,
|
|
2174
2184
|
specified by its id.
|
|
@@ -2195,7 +2205,7 @@ https://www.w3.org/TR/epub-33/#sec-xhtml
|
|
|
2195
2205
|
|
|
2196
2206
|
> `static` **addLinkToXhtmlHead**(`xml`, `link`): `void`
|
|
2197
2207
|
|
|
2198
|
-
Defined in: [libraries/epub/index.ts:
|
|
2208
|
+
Defined in: [libraries/epub/index.ts:437](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L437)
|
|
2199
2209
|
|
|
2200
2210
|
Given an XML structure representing a complete XHTML document,
|
|
2201
2211
|
add a `link` element to the `head` of the document.
|
|
@@ -2220,7 +2230,7 @@ This method modifies the provided XML structure.
|
|
|
2220
2230
|
|
|
2221
2231
|
> `static` **assertEpub3**(`epub`): `Promise`\<`void`\>
|
|
2222
2232
|
|
|
2223
|
-
Defined in: [libraries/epub/index.ts:
|
|
2233
|
+
Defined in: [libraries/epub/index.ts:712](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L712)
|
|
2224
2234
|
|
|
2225
2235
|
##### Parameters
|
|
2226
2236
|
|
|
@@ -2236,7 +2246,7 @@ Defined in: [libraries/epub/index.ts:711](https://gitlab.com/storyteller-platfor
|
|
|
2236
2246
|
|
|
2237
2247
|
> `static` **create**(`path`, `dublinCore`, `additionalMetadata`): `Promise`\<[`Epub`](#epub)\>
|
|
2238
2248
|
|
|
2239
|
-
Defined in: [libraries/epub/index.ts:
|
|
2249
|
+
Defined in: [libraries/epub/index.ts:660](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L660)
|
|
2240
2250
|
|
|
2241
2251
|
Construct a new EPUB on a writable backend, optionally seeded
|
|
2242
2252
|
with the provided metadata. Equivalent to
|
|
@@ -2258,7 +2268,7 @@ with the provided metadata. Equivalent to
|
|
|
2258
2268
|
|
|
2259
2269
|
> `static` **createXmlElement**\<`Name`\>(`name`, `properties`, `children`): [`XmlElement`](#xmlelement)\<`Name`\>
|
|
2260
2270
|
|
|
2261
|
-
Defined in: [libraries/epub/index.ts:
|
|
2271
|
+
Defined in: [libraries/epub/index.ts:472](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L472)
|
|
2262
2272
|
|
|
2263
2273
|
##### Type Parameters
|
|
2264
2274
|
|
|
@@ -2282,7 +2292,7 @@ Defined in: [libraries/epub/index.ts:471](https://gitlab.com/storyteller-platfor
|
|
|
2282
2292
|
|
|
2283
2293
|
> `static` **createXmlTextNode**(`text`): [`XmlTextNode`](#xmltextnode)
|
|
2284
2294
|
|
|
2285
|
-
Defined in: [libraries/epub/index.ts:
|
|
2295
|
+
Defined in: [libraries/epub/index.ts:485](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L485)
|
|
2286
2296
|
|
|
2287
2297
|
##### Parameters
|
|
2288
2298
|
|
|
@@ -2298,7 +2308,7 @@ Defined in: [libraries/epub/index.ts:484](https://gitlab.com/storyteller-platfor
|
|
|
2298
2308
|
|
|
2299
2309
|
> `static` **findXmlChildByName**\<`Name`\>(`name`, `xml`, `filter?`): [`XmlElement`](#xmlelement)\<`Name`\> \| `undefined`
|
|
2300
2310
|
|
|
2301
|
-
Defined in: [libraries/epub/index.ts:
|
|
2311
|
+
Defined in: [libraries/epub/index.ts:558](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L558)
|
|
2302
2312
|
|
|
2303
2313
|
Given an XML structure, find the first child matching
|
|
2304
2314
|
the provided name and optional filter.
|
|
@@ -2325,7 +2335,7 @@ the provided name and optional filter.
|
|
|
2325
2335
|
|
|
2326
2336
|
> `static` **findXmlDescendantByName**\<`Name`\>(`name`, `xml`, `filter?`): [`XmlElement`](#xmlelement)\<`Name`\> \| `undefined`
|
|
2327
2337
|
|
|
2328
|
-
Defined in: [libraries/epub/index.ts:
|
|
2338
|
+
Defined in: [libraries/epub/index.ts:576](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L576)
|
|
2329
2339
|
|
|
2330
2340
|
Given an XML structure, find the first descendant matching
|
|
2331
2341
|
the provided name and optional filter.
|
|
@@ -2355,7 +2365,7 @@ the highest element in the tree matching the name and filter.
|
|
|
2355
2365
|
|
|
2356
2366
|
> `static` **formatSmilDuration**(`duration`): `string`
|
|
2357
2367
|
|
|
2358
|
-
Defined in: [libraries/epub/index.ts:
|
|
2368
|
+
Defined in: [libraries/epub/index.ts:420](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L420)
|
|
2359
2369
|
|
|
2360
2370
|
Format a duration, provided as a number of seconds, as
|
|
2361
2371
|
a SMIL clock value, to be used for Media Overlays.
|
|
@@ -2380,7 +2390,7 @@ https://www.w3.org/TR/epub-33/#sec-duration
|
|
|
2380
2390
|
|
|
2381
2391
|
> `static` **from**(`pathOrData`): `Promise`\<[`Epub`](#epub)\>
|
|
2382
2392
|
|
|
2383
|
-
Defined in: [libraries/epub/index.ts:
|
|
2393
|
+
Defined in: [libraries/epub/index.ts:696](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L696)
|
|
2384
2394
|
|
|
2385
2395
|
Open an existing EPUB publication, extracting it to a temp directory
|
|
2386
2396
|
so writes can mutate the unpacked tree and rezip with `saveAndClose`.
|
|
@@ -2408,7 +2418,7 @@ when the archive is not a valid EPUB 3
|
|
|
2408
2418
|
|
|
2409
2419
|
> `static` **from**(`pathOrData`, `options`): `Promise`\<[`EpubReader`](#epubreader)\>
|
|
2410
2420
|
|
|
2411
|
-
Defined in: [libraries/epub/index.ts:
|
|
2421
|
+
Defined in: [libraries/epub/index.ts:697](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L697)
|
|
2412
2422
|
|
|
2413
2423
|
Open an existing EPUB publication, extracting it to a temp directory
|
|
2414
2424
|
so writes can mutate the unpacked tree and rezip with `saveAndClose`.
|
|
@@ -2437,7 +2447,7 @@ when the archive is not a valid EPUB 3
|
|
|
2437
2447
|
|
|
2438
2448
|
> `static` **from**(`pathOrData`, `options?`): `Promise`\<[`Epub`](#epub) \| [`EpubReader`](#epubreader)\>
|
|
2439
2449
|
|
|
2440
|
-
Defined in: [libraries/epub/index.ts:
|
|
2450
|
+
Defined in: [libraries/epub/index.ts:701](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L701)
|
|
2441
2451
|
|
|
2442
2452
|
Open an existing EPUB publication, extracting it to a temp directory
|
|
2443
2453
|
so writes can mutate the unpacked tree and rezip with `saveAndClose`.
|
|
@@ -2466,7 +2476,7 @@ when the archive is not a valid EPUB 3
|
|
|
2466
2476
|
|
|
2467
2477
|
> `static` **getXhtmlBody**(`xml`): [`ParsedXml`](#parsedxml)
|
|
2468
2478
|
|
|
2469
|
-
Defined in: [libraries/epub/index.ts:
|
|
2479
|
+
Defined in: [libraries/epub/index.ts:462](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L462)
|
|
2470
2480
|
|
|
2471
2481
|
Given an XML structure representing a complete XHTML document,
|
|
2472
2482
|
return the sub-structure representing the children of the
|
|
@@ -2486,7 +2496,7 @@ document's body element.
|
|
|
2486
2496
|
|
|
2487
2497
|
> `static` **getXhtmlTextContent**(`xml`): `string`
|
|
2488
2498
|
|
|
2489
|
-
Defined in: [libraries/epub/index.ts:
|
|
2499
|
+
Defined in: [libraries/epub/index.ts:494](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L494)
|
|
2490
2500
|
|
|
2491
2501
|
Given an XML structure representing a complete XHTML document,
|
|
2492
2502
|
return a string representing the concatenation of all text nodes
|
|
@@ -2506,7 +2516,7 @@ in the document.
|
|
|
2506
2516
|
|
|
2507
2517
|
> `static` **getXmlAttributes**(`element`): `Record`\<`string`, `string`\>
|
|
2508
2518
|
|
|
2509
|
-
Defined in: [libraries/epub/index.ts:
|
|
2519
|
+
Defined in: [libraries/epub/index.ts:511](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L511)
|
|
2510
2520
|
|
|
2511
2521
|
Given an XMLElement, return its attributes.
|
|
2512
2522
|
|
|
@@ -2524,7 +2534,7 @@ Given an XMLElement, return its attributes.
|
|
|
2524
2534
|
|
|
2525
2535
|
> `static` **getXmlChildren**\<`Name`\>(`element`): [`ParsedXml`](#parsedxml)
|
|
2526
2536
|
|
|
2527
|
-
Defined in: [libraries/epub/index.ts:
|
|
2537
|
+
Defined in: [libraries/epub/index.ts:538](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L538)
|
|
2528
2538
|
|
|
2529
2539
|
Given an XMLElement, return a list of its children
|
|
2530
2540
|
|
|
@@ -2548,7 +2558,7 @@ Given an XMLElement, return a list of its children
|
|
|
2548
2558
|
|
|
2549
2559
|
> `static` **getXmlElementName**\<`Name`\>(`element`): `Name`
|
|
2550
2560
|
|
|
2551
|
-
Defined in: [libraries/epub/index.ts:
|
|
2561
|
+
Defined in: [libraries/epub/index.ts:523](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L523)
|
|
2552
2562
|
|
|
2553
2563
|
Given an XMLElement, return its tag name.
|
|
2554
2564
|
|
|
@@ -2572,7 +2582,7 @@ Given an XMLElement, return its tag name.
|
|
|
2572
2582
|
|
|
2573
2583
|
> `static` **isXmlTextNode**(`node`): `node is XmlTextNode`
|
|
2574
2584
|
|
|
2575
|
-
Defined in: [libraries/epub/index.ts:
|
|
2585
|
+
Defined in: [libraries/epub/index.ts:598](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L598)
|
|
2576
2586
|
|
|
2577
2587
|
Given an XMLNode, determine whether it represents
|
|
2578
2588
|
a text node or an XML element.
|
|
@@ -2591,7 +2601,7 @@ a text node or an XML element.
|
|
|
2591
2601
|
|
|
2592
2602
|
> `static` **replaceXmlChildren**\<`Name`\>(`element`, `children`): `void`
|
|
2593
2603
|
|
|
2594
|
-
Defined in: [libraries/epub/index.ts:
|
|
2604
|
+
Defined in: [libraries/epub/index.ts:546](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L546)
|
|
2595
2605
|
|
|
2596
2606
|
##### Type Parameters
|
|
2597
2607
|
|
|
@@ -2614,7 +2624,7 @@ Defined in: [libraries/epub/index.ts:545](https://gitlab.com/storyteller-platfor
|
|
|
2614
2624
|
|
|
2615
2625
|
> `static` **upgrade**(`path`, `options`): `Promise`\<[`Epub`](#epub)\>
|
|
2616
2626
|
|
|
2617
|
-
Defined in: [libraries/epub/index.ts:
|
|
2627
|
+
Defined in: [libraries/epub/index.ts:3604](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3604)
|
|
2618
2628
|
|
|
2619
2629
|
Upgrade an EPUB 2 publication to EPUB 3 in place, returning a new,
|
|
2620
2630
|
valid Epub 3 instance. Equivalent to
|
|
@@ -2635,7 +2645,7 @@ valid Epub 3 instance. Equivalent to
|
|
|
2635
2645
|
|
|
2636
2646
|
> `static` **using**\<`A`\>(`adapterClass`): [`EpubFactory`](#epubfactory)\<`A`\>
|
|
2637
2647
|
|
|
2638
|
-
Defined in: [libraries/epub/index.ts:
|
|
2648
|
+
Defined in: [libraries/epub/index.ts:680](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L680)
|
|
2639
2649
|
|
|
2640
2650
|
Specify the storage backend to use for the EPUB
|
|
2641
2651
|
|
|
@@ -2669,7 +2679,7 @@ using reader = await Epub.using(MemoryAdapter).from(buffer, { cache: false });
|
|
|
2669
2679
|
|
|
2670
2680
|
## EpubFactory\<A\>
|
|
2671
2681
|
|
|
2672
|
-
Defined in: [libraries/epub/index.ts:
|
|
2682
|
+
Defined in: [libraries/epub/index.ts:3633](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3633)
|
|
2673
2683
|
|
|
2674
2684
|
Adapter-bound factory returned by [Epub.using](#using).
|
|
2675
2685
|
|
|
@@ -2690,7 +2700,7 @@ gracefully when the adapter doesn't support the operation: `create` and
|
|
|
2690
2700
|
|
|
2691
2701
|
> **new EpubFactory**\<`A`\>(`adapterClass`): [`EpubFactory`](#epubfactory)\<`A`\>
|
|
2692
2702
|
|
|
2693
|
-
Defined in: [libraries/epub/index.ts:
|
|
2703
|
+
Defined in: [libraries/epub/index.ts:3634](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3634)
|
|
2694
2704
|
|
|
2695
2705
|
##### Parameters
|
|
2696
2706
|
|
|
@@ -2708,7 +2718,7 @@ Defined in: [libraries/epub/index.ts:3618](https://gitlab.com/storyteller-platfo
|
|
|
2708
2718
|
|
|
2709
2719
|
> `readonly` **adapterClass**: `A`
|
|
2710
2720
|
|
|
2711
|
-
Defined in: [libraries/epub/index.ts:
|
|
2721
|
+
Defined in: [libraries/epub/index.ts:3634](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3634)
|
|
2712
2722
|
|
|
2713
2723
|
### Methods
|
|
2714
2724
|
|
|
@@ -2716,7 +2726,7 @@ Defined in: [libraries/epub/index.ts:3618](https://gitlab.com/storyteller-platfo
|
|
|
2716
2726
|
|
|
2717
2727
|
> **create**(`path`, `__namedParameters`, `additionalMetadata`): `Promise`\<[`EpubInstanceFor`](#epubinstancefor)\<`A`\>\>
|
|
2718
2728
|
|
|
2719
|
-
Defined in: [libraries/epub/index.ts:
|
|
2729
|
+
Defined in: [libraries/epub/index.ts:3714](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3714)
|
|
2720
2730
|
|
|
2721
2731
|
Construct a new EPUB on this factory's adapter, optionally seeded
|
|
2722
2732
|
with the provided metadata. Requires a writable adapter that
|
|
@@ -2742,9 +2752,9 @@ when the adapter is read-only or does not implement initEmpty
|
|
|
2742
2752
|
|
|
2743
2753
|
##### Call Signature
|
|
2744
2754
|
|
|
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`\>
|
|
2755
|
+
> **from**(`source`, `options`): `Promise`\<`Pick`\<[`Epub`](#epub), `"storage"` \| `"getItemArchiveLength"` \| `"getRootfile"` \| `"getPackageDocumentSource"` \| `"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
2756
|
|
|
2747
|
-
Defined in: [libraries/epub/index.ts:
|
|
2757
|
+
Defined in: [libraries/epub/index.ts:3641](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3641)
|
|
2748
2758
|
|
|
2749
2759
|
Open an existing EPUB through this factory's adapter
|
|
2750
2760
|
|
|
@@ -2757,7 +2767,7 @@ Open an existing EPUB through this factory's adapter
|
|
|
2757
2767
|
|
|
2758
2768
|
###### Returns
|
|
2759
2769
|
|
|
2760
|
-
`Promise`\<`Pick`\<[`Epub`](#epub), `"storage"` \| `"getItemArchiveLength"` \| `"getRootfile"` \| `"getPackageElement"` \| `"getManifest"` \| `"findMetadataItem"` \| `"findAllMetadataItems"` \| `"getMetadata"` \| `"getIdentifier"` \| `"getUniqueIdentifier"` \| `"getUniqueIdentifierId"` \| `"getIdentifiers"` \| `"getSources"` \| `"getPageBreakSource"` \| `"getCoverImageItem"` \| `"getCoverImage"` \| `"getPublicationDate"` \| `"getModifiedDate"` \| `"getLayout"` \| `"getBaseDirection"` \| `"getType"` \| `"getSubjects"` \| `"getLanguage"` \| `"getTitle"` \| `"getSubtitle"` \| `"getTitles"` \| `"getDescription"` \| `"getPackageVocabularyPrefixes"` \| `"getCollections"` \| `"getCreators"` \| `"getContributors"` \| `"getSpineItems"` \| `"getTableOfContents"` \| `"getLandmarks"` \| `"getPageList"` \| `"resolveHref"` \| `"readFileContents"` \| `"readItemContents"` \| `"readXhtmlItemContents"` \| `"getVersion"` \| `"getNcxTableOfContents"` \| `"getGuideEntries"` \| `"discardAndClose"`\> & `Disposable` & `object`\>
|
|
2770
|
+
`Promise`\<`Pick`\<[`Epub`](#epub), `"storage"` \| `"getItemArchiveLength"` \| `"getRootfile"` \| `"getPackageDocumentSource"` \| `"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`\>
|
|
2761
2771
|
|
|
2762
2772
|
###### Throws
|
|
2763
2773
|
|
|
@@ -2767,7 +2777,7 @@ when the archive is not a valid EPUB 3
|
|
|
2767
2777
|
|
|
2768
2778
|
> **from**(`source`, `options?`): `Promise`\<[`EpubInstanceFor`](#epubinstancefor)\<`A`\> & `object`\>
|
|
2769
2779
|
|
|
2770
|
-
Defined in: [libraries/epub/index.ts:
|
|
2780
|
+
Defined in: [libraries/epub/index.ts:3645](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3645)
|
|
2771
2781
|
|
|
2772
2782
|
Open an existing EPUB through this factory's adapter
|
|
2773
2783
|
|
|
@@ -2786,11 +2796,28 @@ Open an existing EPUB through this factory's adapter
|
|
|
2786
2796
|
|
|
2787
2797
|
when the archive is not a valid EPUB 3
|
|
2788
2798
|
|
|
2799
|
+
#### readPackageDocumentSource()
|
|
2800
|
+
|
|
2801
|
+
> **readPackageDocumentSource**(`source`, `options`): `Promise`\<`string`\>
|
|
2802
|
+
|
|
2803
|
+
Defined in: [libraries/epub/index.ts:3688](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3688)
|
|
2804
|
+
|
|
2805
|
+
##### Parameters
|
|
2806
|
+
|
|
2807
|
+
| Parameter | Type |
|
|
2808
|
+
| --------- | --------------------------------------------- |
|
|
2809
|
+
| `source` | `string` \| `Uint8Array`\<`ArrayBufferLike`\> |
|
|
2810
|
+
| `options` | [`AdapterOptions`](#adapteroptions)\<`A`\> |
|
|
2811
|
+
|
|
2812
|
+
##### Returns
|
|
2813
|
+
|
|
2814
|
+
`Promise`\<`string`\>
|
|
2815
|
+
|
|
2789
2816
|
#### upgrade()
|
|
2790
2817
|
|
|
2791
2818
|
> **upgrade**(`path`, `options`): `Promise`\<[`EpubInstanceFor`](#epubinstancefor)\<`A`\>\>
|
|
2792
2819
|
|
|
2793
|
-
Defined in: [libraries/epub/index.ts:
|
|
2820
|
+
Defined in: [libraries/epub/index.ts:3821](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3821)
|
|
2794
2821
|
|
|
2795
2822
|
Upgrade an EPUB 2 publication to EPUB 3 in place using this
|
|
2796
2823
|
factory's adapter, returning a new, valid Epub 3 instance.
|
|
@@ -2828,7 +2855,7 @@ when the adapter is read-only
|
|
|
2828
2855
|
|
|
2829
2856
|
## EpubReadOnlyError
|
|
2830
2857
|
|
|
2831
|
-
Defined in: [libraries/epub/index.ts:
|
|
2858
|
+
Defined in: [libraries/epub/index.ts:237](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L237)
|
|
2832
2859
|
|
|
2833
2860
|
### Extends
|
|
2834
2861
|
|
|
@@ -3057,7 +3084,7 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces
|
|
|
3057
3084
|
|
|
3058
3085
|
## EpubVersionError
|
|
3059
3086
|
|
|
3060
|
-
Defined in: [libraries/epub/index.ts:
|
|
3087
|
+
Defined in: [libraries/epub/index.ts:236](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L236)
|
|
3061
3088
|
|
|
3062
3089
|
### Extends
|
|
3063
3090
|
|
|
@@ -3732,7 +3759,7 @@ Defined in: [libraries/epub/adapters/tmpfs.ts:88](https://gitlab.com/storyteller
|
|
|
3732
3759
|
|
|
3733
3760
|
## AlternateScript
|
|
3734
3761
|
|
|
3735
|
-
Defined in: [libraries/epub/index.ts:
|
|
3762
|
+
Defined in: [libraries/epub/index.ts:151](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L151)
|
|
3736
3763
|
|
|
3737
3764
|
### Properties
|
|
3738
3765
|
|
|
@@ -3740,19 +3767,19 @@ Defined in: [libraries/epub/index.ts:150](https://gitlab.com/storyteller-platfor
|
|
|
3740
3767
|
|
|
3741
3768
|
> **locale**: `Locale`
|
|
3742
3769
|
|
|
3743
|
-
Defined in: [libraries/epub/index.ts:
|
|
3770
|
+
Defined in: [libraries/epub/index.ts:153](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L153)
|
|
3744
3771
|
|
|
3745
3772
|
#### name
|
|
3746
3773
|
|
|
3747
3774
|
> **name**: `string`
|
|
3748
3775
|
|
|
3749
|
-
Defined in: [libraries/epub/index.ts:
|
|
3776
|
+
Defined in: [libraries/epub/index.ts:152](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L152)
|
|
3750
3777
|
|
|
3751
3778
|
---
|
|
3752
3779
|
|
|
3753
3780
|
## Collection
|
|
3754
3781
|
|
|
3755
|
-
Defined in: [libraries/epub/index.ts:
|
|
3782
|
+
Defined in: [libraries/epub/index.ts:175](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L175)
|
|
3756
3783
|
|
|
3757
3784
|
### Properties
|
|
3758
3785
|
|
|
@@ -3760,25 +3787,25 @@ Defined in: [libraries/epub/index.ts:174](https://gitlab.com/storyteller-platfor
|
|
|
3760
3787
|
|
|
3761
3788
|
> **name**: `string`
|
|
3762
3789
|
|
|
3763
|
-
Defined in: [libraries/epub/index.ts:
|
|
3790
|
+
Defined in: [libraries/epub/index.ts:176](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L176)
|
|
3764
3791
|
|
|
3765
3792
|
#### position?
|
|
3766
3793
|
|
|
3767
3794
|
> `optional` **position**: `string`
|
|
3768
3795
|
|
|
3769
|
-
Defined in: [libraries/epub/index.ts:
|
|
3796
|
+
Defined in: [libraries/epub/index.ts:178](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L178)
|
|
3770
3797
|
|
|
3771
3798
|
#### type?
|
|
3772
3799
|
|
|
3773
3800
|
> `optional` **type**: `string`
|
|
3774
3801
|
|
|
3775
|
-
Defined in: [libraries/epub/index.ts:
|
|
3802
|
+
Defined in: [libraries/epub/index.ts:177](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L177)
|
|
3776
3803
|
|
|
3777
3804
|
---
|
|
3778
3805
|
|
|
3779
3806
|
## DcCreator
|
|
3780
3807
|
|
|
3781
|
-
Defined in: [libraries/epub/index.ts:
|
|
3808
|
+
Defined in: [libraries/epub/index.ts:156](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L156)
|
|
3782
3809
|
|
|
3783
3810
|
### Properties
|
|
3784
3811
|
|
|
@@ -3786,37 +3813,37 @@ Defined in: [libraries/epub/index.ts:155](https://gitlab.com/storyteller-platfor
|
|
|
3786
3813
|
|
|
3787
3814
|
> `optional` **alternateScripts**: [`AlternateScript`](#alternatescript)[]
|
|
3788
3815
|
|
|
3789
|
-
Defined in: [libraries/epub/index.ts:
|
|
3816
|
+
Defined in: [libraries/epub/index.ts:161](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L161)
|
|
3790
3817
|
|
|
3791
3818
|
#### fileAs?
|
|
3792
3819
|
|
|
3793
3820
|
> `optional` **fileAs**: `string`
|
|
3794
3821
|
|
|
3795
|
-
Defined in: [libraries/epub/index.ts:
|
|
3822
|
+
Defined in: [libraries/epub/index.ts:160](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L160)
|
|
3796
3823
|
|
|
3797
3824
|
#### name
|
|
3798
3825
|
|
|
3799
3826
|
> **name**: `string`
|
|
3800
3827
|
|
|
3801
|
-
Defined in: [libraries/epub/index.ts:
|
|
3828
|
+
Defined in: [libraries/epub/index.ts:157](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L157)
|
|
3802
3829
|
|
|
3803
3830
|
#### role?
|
|
3804
3831
|
|
|
3805
3832
|
> `optional` **role**: `string`
|
|
3806
3833
|
|
|
3807
|
-
Defined in: [libraries/epub/index.ts:
|
|
3834
|
+
Defined in: [libraries/epub/index.ts:158](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L158)
|
|
3808
3835
|
|
|
3809
3836
|
#### roleScheme?
|
|
3810
3837
|
|
|
3811
3838
|
> `optional` **roleScheme**: `string`
|
|
3812
3839
|
|
|
3813
|
-
Defined in: [libraries/epub/index.ts:
|
|
3840
|
+
Defined in: [libraries/epub/index.ts:159](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L159)
|
|
3814
3841
|
|
|
3815
3842
|
---
|
|
3816
3843
|
|
|
3817
3844
|
## DcSubject
|
|
3818
3845
|
|
|
3819
|
-
Defined in: [libraries/epub/index.ts:
|
|
3846
|
+
Defined in: [libraries/epub/index.ts:118](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L118)
|
|
3820
3847
|
|
|
3821
3848
|
### Properties
|
|
3822
3849
|
|
|
@@ -3824,25 +3851,25 @@ Defined in: [libraries/epub/index.ts:117](https://gitlab.com/storyteller-platfor
|
|
|
3824
3851
|
|
|
3825
3852
|
> **authority**: `string`
|
|
3826
3853
|
|
|
3827
|
-
Defined in: [libraries/epub/index.ts:
|
|
3854
|
+
Defined in: [libraries/epub/index.ts:120](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L120)
|
|
3828
3855
|
|
|
3829
3856
|
#### term
|
|
3830
3857
|
|
|
3831
3858
|
> **term**: `string`
|
|
3832
3859
|
|
|
3833
|
-
Defined in: [libraries/epub/index.ts:
|
|
3860
|
+
Defined in: [libraries/epub/index.ts:121](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L121)
|
|
3834
3861
|
|
|
3835
3862
|
#### value
|
|
3836
3863
|
|
|
3837
3864
|
> **value**: `string`
|
|
3838
3865
|
|
|
3839
|
-
Defined in: [libraries/epub/index.ts:
|
|
3866
|
+
Defined in: [libraries/epub/index.ts:119](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L119)
|
|
3840
3867
|
|
|
3841
3868
|
---
|
|
3842
3869
|
|
|
3843
3870
|
## DublinCore
|
|
3844
3871
|
|
|
3845
|
-
Defined in: [libraries/epub/index.ts:
|
|
3872
|
+
Defined in: [libraries/epub/index.ts:164](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L164)
|
|
3846
3873
|
|
|
3847
3874
|
### Properties
|
|
3848
3875
|
|
|
@@ -3850,22 +3877,885 @@ Defined in: [libraries/epub/index.ts:163](https://gitlab.com/storyteller-platfor
|
|
|
3850
3877
|
|
|
3851
3878
|
> `optional` **contributors**: [`DcCreator`](#dccreator)[]
|
|
3852
3879
|
|
|
3853
|
-
Defined in: [libraries/epub/index.ts:
|
|
3880
|
+
Defined in: [libraries/epub/index.ts:171](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L171)
|
|
3854
3881
|
|
|
3855
3882
|
#### creators?
|
|
3856
3883
|
|
|
3857
3884
|
> `optional` **creators**: [`DcCreator`](#dccreator)[]
|
|
3858
3885
|
|
|
3859
|
-
Defined in: [libraries/epub/index.ts:
|
|
3886
|
+
Defined in: [libraries/epub/index.ts:170](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L170)
|
|
3860
3887
|
|
|
3861
3888
|
#### date?
|
|
3862
3889
|
|
|
3863
3890
|
> `optional` **date**: `Date`
|
|
3864
3891
|
|
|
3865
|
-
Defined in: [libraries/epub/index.ts:
|
|
3892
|
+
Defined in: [libraries/epub/index.ts:168](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L168)
|
|
3866
3893
|
|
|
3867
3894
|
#### identifier
|
|
3868
3895
|
|
|
3869
3896
|
> **identifier**: `string`
|
|
3870
3897
|
|
|
3871
|
-
Defined in: [libraries/epub/index.ts:
|
|
3898
|
+
Defined in: [libraries/epub/index.ts:167](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L167)
|
|
3899
|
+
|
|
3900
|
+
#### language
|
|
3901
|
+
|
|
3902
|
+
> **language**: `Locale`
|
|
3903
|
+
|
|
3904
|
+
Defined in: [libraries/epub/index.ts:166](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L166)
|
|
3905
|
+
|
|
3906
|
+
#### subjects?
|
|
3907
|
+
|
|
3908
|
+
> `optional` **subjects**: (`string` \| [`DcSubject`](#dcsubject))[]
|
|
3909
|
+
|
|
3910
|
+
Defined in: [libraries/epub/index.ts:169](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L169)
|
|
3911
|
+
|
|
3912
|
+
#### title
|
|
3913
|
+
|
|
3914
|
+
> **title**: `string`
|
|
3915
|
+
|
|
3916
|
+
Defined in: [libraries/epub/index.ts:165](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L165)
|
|
3917
|
+
|
|
3918
|
+
#### type?
|
|
3919
|
+
|
|
3920
|
+
> `optional` **type**: `string`
|
|
3921
|
+
|
|
3922
|
+
Defined in: [libraries/epub/index.ts:172](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L172)
|
|
3923
|
+
|
|
3924
|
+
---
|
|
3925
|
+
|
|
3926
|
+
## Epub2UpgradeOptions
|
|
3927
|
+
|
|
3928
|
+
Defined in: [libraries/epub/upgrade.ts:69](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/upgrade.ts#L69)
|
|
3929
|
+
|
|
3930
|
+
### Properties
|
|
3931
|
+
|
|
3932
|
+
#### outputPath?
|
|
3933
|
+
|
|
3934
|
+
> `optional` **outputPath**: `string`
|
|
3935
|
+
|
|
3936
|
+
Defined in: [libraries/epub/upgrade.ts:73](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/upgrade.ts#L73)
|
|
3937
|
+
|
|
3938
|
+
The path to the output file. If provided, the input file will be copied to the output path.
|
|
3939
|
+
|
|
3940
|
+
#### removeNcx?
|
|
3941
|
+
|
|
3942
|
+
> `optional` **removeNcx**: `boolean`
|
|
3943
|
+
|
|
3944
|
+
Defined in: [libraries/epub/upgrade.ts:77](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/upgrade.ts#L77)
|
|
3945
|
+
|
|
3946
|
+
Whether to remove the NCX file, as it's technically optional in EPUB 3.
|
|
3947
|
+
|
|
3948
|
+
---
|
|
3949
|
+
|
|
3950
|
+
## EpubIdentifier
|
|
3951
|
+
|
|
3952
|
+
Defined in: [libraries/epub/index.ts:124](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L124)
|
|
3953
|
+
|
|
3954
|
+
### Properties
|
|
3955
|
+
|
|
3956
|
+
#### id?
|
|
3957
|
+
|
|
3958
|
+
> `optional` **id**: `string`
|
|
3959
|
+
|
|
3960
|
+
Defined in: [libraries/epub/index.ts:126](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L126)
|
|
3961
|
+
|
|
3962
|
+
#### identifierType?
|
|
3963
|
+
|
|
3964
|
+
> `optional` **identifierType**: `string`
|
|
3965
|
+
|
|
3966
|
+
Defined in: [libraries/epub/index.ts:128](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L128)
|
|
3967
|
+
|
|
3968
|
+
the value of a refining `identifier-type` meta, if present
|
|
3969
|
+
|
|
3970
|
+
#### scheme?
|
|
3971
|
+
|
|
3972
|
+
> `optional` **scheme**: `string`
|
|
3973
|
+
|
|
3974
|
+
Defined in: [libraries/epub/index.ts:130](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L130)
|
|
3975
|
+
|
|
3976
|
+
the `scheme` of a refining `identifier-type` meta, or a legacy `opf:scheme` attribute
|
|
3977
|
+
|
|
3978
|
+
#### value
|
|
3979
|
+
|
|
3980
|
+
> **value**: `string`
|
|
3981
|
+
|
|
3982
|
+
Defined in: [libraries/epub/index.ts:125](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L125)
|
|
3983
|
+
|
|
3984
|
+
---
|
|
3985
|
+
|
|
3986
|
+
## EpubListEntry
|
|
3987
|
+
|
|
3988
|
+
Defined in: [libraries/epub/adapters/interface.ts:17](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L17)
|
|
3989
|
+
|
|
3990
|
+
### Properties
|
|
3991
|
+
|
|
3992
|
+
#### absolutePath
|
|
3993
|
+
|
|
3994
|
+
> **absolutePath**: `string`
|
|
3995
|
+
|
|
3996
|
+
Defined in: [libraries/epub/adapters/interface.ts:19](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L19)
|
|
3997
|
+
|
|
3998
|
+
location the adapter can read the entry back from, in whatever form it stores
|
|
3999
|
+
|
|
4000
|
+
#### relativePath
|
|
4001
|
+
|
|
4002
|
+
> **relativePath**: `string`
|
|
4003
|
+
|
|
4004
|
+
Defined in: [libraries/epub/adapters/interface.ts:21](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L21)
|
|
4005
|
+
|
|
4006
|
+
the entry name, as it appears in the archive
|
|
4007
|
+
|
|
4008
|
+
---
|
|
4009
|
+
|
|
4010
|
+
## EpubSource
|
|
4011
|
+
|
|
4012
|
+
Defined in: [libraries/epub/index.ts:133](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L133)
|
|
4013
|
+
|
|
4014
|
+
### Properties
|
|
4015
|
+
|
|
4016
|
+
#### id?
|
|
4017
|
+
|
|
4018
|
+
> `optional` **id**: `string`
|
|
4019
|
+
|
|
4020
|
+
Defined in: [libraries/epub/index.ts:135](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L135)
|
|
4021
|
+
|
|
4022
|
+
#### identifierType?
|
|
4023
|
+
|
|
4024
|
+
> `optional` **identifierType**: `string`
|
|
4025
|
+
|
|
4026
|
+
Defined in: [libraries/epub/index.ts:137](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L137)
|
|
4027
|
+
|
|
4028
|
+
the value of a refining `identifier-type` meta, if present
|
|
4029
|
+
|
|
4030
|
+
#### isPageBreakSource?
|
|
4031
|
+
|
|
4032
|
+
> `optional` **isPageBreakSource**: `boolean`
|
|
4033
|
+
|
|
4034
|
+
Defined in: [libraries/epub/index.ts:148](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L148)
|
|
4035
|
+
|
|
4036
|
+
whether this source has a `source-of="pagination"` refinement
|
|
4037
|
+
or of a `<meta property="pageBreakSource">` element
|
|
4038
|
+
|
|
4039
|
+
as of EPUB 3.4 `source-of` is advised-deprecated in favour of the
|
|
4040
|
+
publication-level `pageBreakSource` property. if you want to
|
|
4041
|
+
be sure to get the source of pagination, use [Epub.getPageBreakSource](#getpagebreaksource)
|
|
4042
|
+
|
|
4043
|
+
#### scheme?
|
|
4044
|
+
|
|
4045
|
+
> `optional` **scheme**: `string`
|
|
4046
|
+
|
|
4047
|
+
Defined in: [libraries/epub/index.ts:139](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L139)
|
|
4048
|
+
|
|
4049
|
+
the `scheme` of a refining `identifier-type` meta, or a legacy `opf:scheme` attribute
|
|
4050
|
+
|
|
4051
|
+
#### value
|
|
4052
|
+
|
|
4053
|
+
> **value**: `string`
|
|
4054
|
+
|
|
4055
|
+
Defined in: [libraries/epub/index.ts:134](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L134)
|
|
4056
|
+
|
|
4057
|
+
---
|
|
4058
|
+
|
|
4059
|
+
## EpubStorageAdapter
|
|
4060
|
+
|
|
4061
|
+
Defined in: [libraries/epub/adapters/interface.ts:34](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L34)
|
|
4062
|
+
|
|
4063
|
+
Adapters only receive entry names, which is:
|
|
4064
|
+
|
|
4065
|
+
- the name a file has in the archive itself
|
|
4066
|
+
- relative to the container root, slash-separated,
|
|
4067
|
+
- already percent-decoded (eg `OEBPS/a b.xhtml`, not `OEBPS/a%20b.xhtml`)
|
|
4068
|
+
|
|
4069
|
+
Adapter decides where to store files under what name
|
|
4070
|
+
In previous versions of the EPUB lib, this was a little bit more muddled, leading to
|
|
4071
|
+
eg the TmpFsAdapter trying to read `OEBPS/a%20b.xhtml`, whereas it was stored as `OEBPS/a b.xhtml`
|
|
4072
|
+
|
|
4073
|
+
### Methods
|
|
4074
|
+
|
|
4075
|
+
#### archiveLength()
|
|
4076
|
+
|
|
4077
|
+
> **archiveLength**(`entry`): `Promise`\<`number`\>
|
|
4078
|
+
|
|
4079
|
+
Defined in: [libraries/epub/adapters/interface.ts:49](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L49)
|
|
4080
|
+
|
|
4081
|
+
Length of an entry in bytes, for the readium page-count heuristic
|
|
4082
|
+
which expects compressed size when available
|
|
4083
|
+
|
|
4084
|
+
##### Parameters
|
|
4085
|
+
|
|
4086
|
+
| Parameter | Type |
|
|
4087
|
+
| --------- | -------- |
|
|
4088
|
+
| `entry` | `string` |
|
|
4089
|
+
|
|
4090
|
+
##### Returns
|
|
4091
|
+
|
|
4092
|
+
`Promise`\<`number`\>
|
|
4093
|
+
|
|
4094
|
+
#### dispose()
|
|
4095
|
+
|
|
4096
|
+
> **dispose**(): `void` \| `Promise`\<`void`\>
|
|
4097
|
+
|
|
4098
|
+
Defined in: [libraries/epub/adapters/interface.ts:68](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L68)
|
|
4099
|
+
|
|
4100
|
+
Always called on close or error
|
|
4101
|
+
|
|
4102
|
+
##### Returns
|
|
4103
|
+
|
|
4104
|
+
`void` \| `Promise`\<`void`\>
|
|
4105
|
+
|
|
4106
|
+
#### duplicate()?
|
|
4107
|
+
|
|
4108
|
+
> `optional` **duplicate**(): `Promise`\<[`EpubStorageAdapter`](#epubstorageadapter)\>
|
|
4109
|
+
|
|
4110
|
+
Defined in: [libraries/epub/adapters/interface.ts:62](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L62)
|
|
4111
|
+
|
|
4112
|
+
Required for Epub.copy
|
|
4113
|
+
|
|
4114
|
+
##### Returns
|
|
4115
|
+
|
|
4116
|
+
`Promise`\<[`EpubStorageAdapter`](#epubstorageadapter)\>
|
|
4117
|
+
|
|
4118
|
+
#### exists()
|
|
4119
|
+
|
|
4120
|
+
> **exists**(`entry`): `Promise`\<`boolean`\>
|
|
4121
|
+
|
|
4122
|
+
Defined in: [libraries/epub/adapters/interface.ts:43](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L43)
|
|
4123
|
+
|
|
4124
|
+
Whether the archive holds an entry under exactly this name.
|
|
4125
|
+
Used to choose between different canditates for an href
|
|
4126
|
+
so should be exact
|
|
4127
|
+
|
|
4128
|
+
##### Parameters
|
|
4129
|
+
|
|
4130
|
+
| Parameter | Type |
|
|
4131
|
+
| --------- | -------- |
|
|
4132
|
+
| `entry` | `string` |
|
|
4133
|
+
|
|
4134
|
+
##### Returns
|
|
4135
|
+
|
|
4136
|
+
`Promise`\<`boolean`\>
|
|
4137
|
+
|
|
4138
|
+
#### list()?
|
|
4139
|
+
|
|
4140
|
+
> `optional` **list**(): `AsyncIterable`\<[`EpubListEntry`](#epublistentry)\>
|
|
4141
|
+
|
|
4142
|
+
Defined in: [libraries/epub/adapters/interface.ts:59](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L59)
|
|
4143
|
+
|
|
4144
|
+
Required for Epub.saveAndClose to walk the contents
|
|
4145
|
+
|
|
4146
|
+
##### Returns
|
|
4147
|
+
|
|
4148
|
+
`AsyncIterable`\<[`EpubListEntry`](#epublistentry)\>
|
|
4149
|
+
|
|
4150
|
+
#### read()
|
|
4151
|
+
|
|
4152
|
+
##### Call Signature
|
|
4153
|
+
|
|
4154
|
+
> **read**(`entry`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\>
|
|
4155
|
+
|
|
4156
|
+
Defined in: [libraries/epub/adapters/interface.ts:35](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L35)
|
|
4157
|
+
|
|
4158
|
+
###### Parameters
|
|
4159
|
+
|
|
4160
|
+
| Parameter | Type |
|
|
4161
|
+
| --------- | -------- |
|
|
4162
|
+
| `entry` | `string` |
|
|
4163
|
+
|
|
4164
|
+
###### Returns
|
|
4165
|
+
|
|
4166
|
+
`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\>
|
|
4167
|
+
|
|
4168
|
+
##### Call Signature
|
|
4169
|
+
|
|
4170
|
+
> **read**(`entry`, `encoding`): `Promise`\<`string`\>
|
|
4171
|
+
|
|
4172
|
+
Defined in: [libraries/epub/adapters/interface.ts:36](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L36)
|
|
4173
|
+
|
|
4174
|
+
###### Parameters
|
|
4175
|
+
|
|
4176
|
+
| Parameter | Type |
|
|
4177
|
+
| ---------- | --------- |
|
|
4178
|
+
| `entry` | `string` |
|
|
4179
|
+
| `encoding` | `"utf-8"` |
|
|
4180
|
+
|
|
4181
|
+
###### Returns
|
|
4182
|
+
|
|
4183
|
+
`Promise`\<`string`\>
|
|
4184
|
+
|
|
4185
|
+
#### remove()?
|
|
4186
|
+
|
|
4187
|
+
> `optional` **remove**(`entry`): `Promise`\<`void`\>
|
|
4188
|
+
|
|
4189
|
+
Defined in: [libraries/epub/adapters/interface.ts:56](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L56)
|
|
4190
|
+
|
|
4191
|
+
Required for removeManifestItem / setCoverImage replacement
|
|
4192
|
+
|
|
4193
|
+
##### Parameters
|
|
4194
|
+
|
|
4195
|
+
| Parameter | Type |
|
|
4196
|
+
| --------- | -------- |
|
|
4197
|
+
| `entry` | `string` |
|
|
4198
|
+
|
|
4199
|
+
##### Returns
|
|
4200
|
+
|
|
4201
|
+
`Promise`\<`void`\>
|
|
4202
|
+
|
|
4203
|
+
#### serialize()?
|
|
4204
|
+
|
|
4205
|
+
> `optional` **serialize**(`targetPath`): `Promise`\<`void`\>
|
|
4206
|
+
|
|
4207
|
+
Defined in: [libraries/epub/adapters/interface.ts:65](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L65)
|
|
4208
|
+
|
|
4209
|
+
Required for Epub.saveAndClose
|
|
4210
|
+
|
|
4211
|
+
##### Parameters
|
|
4212
|
+
|
|
4213
|
+
| Parameter | Type |
|
|
4214
|
+
| ------------ | -------- |
|
|
4215
|
+
| `targetPath` | `string` |
|
|
4216
|
+
|
|
4217
|
+
##### Returns
|
|
4218
|
+
|
|
4219
|
+
`Promise`\<`void`\>
|
|
4220
|
+
|
|
4221
|
+
#### write()?
|
|
4222
|
+
|
|
4223
|
+
##### Call Signature
|
|
4224
|
+
|
|
4225
|
+
> `optional` **write**(`entry`, `data`): `Promise`\<`void`\>
|
|
4226
|
+
|
|
4227
|
+
Defined in: [libraries/epub/adapters/interface.ts:52](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L52)
|
|
4228
|
+
|
|
4229
|
+
Required for any mutation method on Epub
|
|
4230
|
+
|
|
4231
|
+
###### Parameters
|
|
4232
|
+
|
|
4233
|
+
| Parameter | Type |
|
|
4234
|
+
| --------- | ------------ |
|
|
4235
|
+
| `entry` | `string` |
|
|
4236
|
+
| `data` | `Uint8Array` |
|
|
4237
|
+
|
|
4238
|
+
###### Returns
|
|
4239
|
+
|
|
4240
|
+
`Promise`\<`void`\>
|
|
4241
|
+
|
|
4242
|
+
##### Call Signature
|
|
4243
|
+
|
|
4244
|
+
> `optional` **write**(`entry`, `data`, `encoding`): `Promise`\<`void`\>
|
|
4245
|
+
|
|
4246
|
+
Defined in: [libraries/epub/adapters/interface.ts:53](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L53)
|
|
4247
|
+
|
|
4248
|
+
###### Parameters
|
|
4249
|
+
|
|
4250
|
+
| Parameter | Type |
|
|
4251
|
+
| ---------- | --------- |
|
|
4252
|
+
| `entry` | `string` |
|
|
4253
|
+
| `data` | `string` |
|
|
4254
|
+
| `encoding` | `"utf-8"` |
|
|
4255
|
+
|
|
4256
|
+
###### Returns
|
|
4257
|
+
|
|
4258
|
+
`Promise`\<`void`\>
|
|
4259
|
+
|
|
4260
|
+
---
|
|
4261
|
+
|
|
4262
|
+
## EpubStorageAdapterClass\<Opts\>
|
|
4263
|
+
|
|
4264
|
+
Defined in: [libraries/epub/adapters/interface.ts:71](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L71)
|
|
4265
|
+
|
|
4266
|
+
### Type Parameters
|
|
4267
|
+
|
|
4268
|
+
| Type Parameter | Default type |
|
|
4269
|
+
| ------------------------- | ------------ |
|
|
4270
|
+
| `Opts` _extends_ `object` | `object` |
|
|
4271
|
+
|
|
4272
|
+
### Properties
|
|
4273
|
+
|
|
4274
|
+
#### capabilities
|
|
4275
|
+
|
|
4276
|
+
> `readonly` **capabilities**: [`EpubStorageCapabilities`](#epubstoragecapabilities)
|
|
4277
|
+
|
|
4278
|
+
Defined in: [libraries/epub/adapters/interface.ts:73](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L73)
|
|
4279
|
+
|
|
4280
|
+
#### kind
|
|
4281
|
+
|
|
4282
|
+
> `readonly` **kind**: [`EpubStorageKind`](#epubstoragekind)
|
|
4283
|
+
|
|
4284
|
+
Defined in: [libraries/epub/adapters/interface.ts:72](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L72)
|
|
4285
|
+
|
|
4286
|
+
### Methods
|
|
4287
|
+
|
|
4288
|
+
#### init()
|
|
4289
|
+
|
|
4290
|
+
> **init**(`source`, `opts?`): `Promise`\<[`EpubStorageAdapter`](#epubstorageadapter)\>
|
|
4291
|
+
|
|
4292
|
+
Defined in: [libraries/epub/adapters/interface.ts:79](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L79)
|
|
4293
|
+
|
|
4294
|
+
Open an archive from a path or buffer.
|
|
4295
|
+
Will throw if the archive is not a valid EPUB 3
|
|
4296
|
+
|
|
4297
|
+
##### Parameters
|
|
4298
|
+
|
|
4299
|
+
| Parameter | Type |
|
|
4300
|
+
| --------- | --------------------------------------------- |
|
|
4301
|
+
| `source` | `string` \| `Uint8Array`\<`ArrayBufferLike`\> |
|
|
4302
|
+
| `opts?` | `Opts` |
|
|
4303
|
+
|
|
4304
|
+
##### Returns
|
|
4305
|
+
|
|
4306
|
+
`Promise`\<[`EpubStorageAdapter`](#epubstorageadapter)\>
|
|
4307
|
+
|
|
4308
|
+
#### initEmpty()?
|
|
4309
|
+
|
|
4310
|
+
> `optional` **initEmpty**(`opts?`): `Promise`\<[`EpubStorageAdapter`](#epubstorageadapter)\>
|
|
4311
|
+
|
|
4312
|
+
Defined in: [libraries/epub/adapters/interface.ts:85](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L85)
|
|
4313
|
+
|
|
4314
|
+
Initialize an empty extract root for [Epub.create](#create).
|
|
4315
|
+
Only necessary for adapters that can write
|
|
4316
|
+
|
|
4317
|
+
##### Parameters
|
|
4318
|
+
|
|
4319
|
+
| Parameter | Type |
|
|
4320
|
+
| --------- | ------ |
|
|
4321
|
+
| `opts?` | `Opts` |
|
|
4322
|
+
|
|
4323
|
+
##### Returns
|
|
4324
|
+
|
|
4325
|
+
`Promise`\<[`EpubStorageAdapter`](#epubstorageadapter)\>
|
|
4326
|
+
|
|
4327
|
+
---
|
|
4328
|
+
|
|
4329
|
+
## EpubStorageCapabilities
|
|
4330
|
+
|
|
4331
|
+
Defined in: [libraries/epub/adapters/interface.ts:12](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L12)
|
|
4332
|
+
|
|
4333
|
+
### Properties
|
|
4334
|
+
|
|
4335
|
+
#### writable
|
|
4336
|
+
|
|
4337
|
+
> `readonly` **writable**: `boolean`
|
|
4338
|
+
|
|
4339
|
+
Defined in: [libraries/epub/adapters/interface.ts:14](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L14)
|
|
4340
|
+
|
|
4341
|
+
when false, the Epub class refuses every mutation method at runtime
|
|
4342
|
+
|
|
4343
|
+
---
|
|
4344
|
+
|
|
4345
|
+
## FromOptions
|
|
4346
|
+
|
|
4347
|
+
Defined in: [libraries/epub/index.ts:204](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L204)
|
|
4348
|
+
|
|
4349
|
+
### Properties
|
|
4350
|
+
|
|
4351
|
+
#### readonly?
|
|
4352
|
+
|
|
4353
|
+
> `optional` **readonly**: `boolean`
|
|
4354
|
+
|
|
4355
|
+
Defined in: [libraries/epub/index.ts:209](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L209)
|
|
4356
|
+
|
|
4357
|
+
when true, mutation methods throw [EpubReadOnlyError](#epubreadonlyerror) at runtime
|
|
4358
|
+
|
|
4359
|
+
##### Default
|
|
4360
|
+
|
|
4361
|
+
```ts
|
|
4362
|
+
false;
|
|
4363
|
+
```
|
|
4364
|
+
|
|
4365
|
+
---
|
|
4366
|
+
|
|
4367
|
+
## GuideItem
|
|
4368
|
+
|
|
4369
|
+
Defined in: [libraries/epub/index.ts:196](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L196)
|
|
4370
|
+
|
|
4371
|
+
### Properties
|
|
4372
|
+
|
|
4373
|
+
#### href
|
|
4374
|
+
|
|
4375
|
+
> **href**: `string`
|
|
4376
|
+
|
|
4377
|
+
Defined in: [libraries/epub/index.ts:197](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L197)
|
|
4378
|
+
|
|
4379
|
+
#### title
|
|
4380
|
+
|
|
4381
|
+
> **title**: `string`
|
|
4382
|
+
|
|
4383
|
+
Defined in: [libraries/epub/index.ts:198](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L198)
|
|
4384
|
+
|
|
4385
|
+
#### type
|
|
4386
|
+
|
|
4387
|
+
> **type**: `string`
|
|
4388
|
+
|
|
4389
|
+
Defined in: [libraries/epub/index.ts:199](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L199)
|
|
4390
|
+
|
|
4391
|
+
---
|
|
4392
|
+
|
|
4393
|
+
## Landmark
|
|
4394
|
+
|
|
4395
|
+
Defined in: [libraries/epub/upgrade.ts:63](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/upgrade.ts#L63)
|
|
4396
|
+
|
|
4397
|
+
### Properties
|
|
4398
|
+
|
|
4399
|
+
#### href
|
|
4400
|
+
|
|
4401
|
+
> **href**: `string`
|
|
4402
|
+
|
|
4403
|
+
Defined in: [libraries/epub/upgrade.ts:64](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/upgrade.ts#L64)
|
|
4404
|
+
|
|
4405
|
+
#### title
|
|
4406
|
+
|
|
4407
|
+
> **title**: `string`
|
|
4408
|
+
|
|
4409
|
+
Defined in: [libraries/epub/upgrade.ts:65](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/upgrade.ts#L65)
|
|
4410
|
+
|
|
4411
|
+
#### type
|
|
4412
|
+
|
|
4413
|
+
> **type**: `string`
|
|
4414
|
+
|
|
4415
|
+
Defined in: [libraries/epub/upgrade.ts:66](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/upgrade.ts#L66)
|
|
4416
|
+
|
|
4417
|
+
---
|
|
4418
|
+
|
|
4419
|
+
## MemoryAdapterOptions
|
|
4420
|
+
|
|
4421
|
+
Defined in: [libraries/epub/adapters/memory.ts:10](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/memory.ts#L10)
|
|
4422
|
+
|
|
4423
|
+
### Properties
|
|
4424
|
+
|
|
4425
|
+
#### cache?
|
|
4426
|
+
|
|
4427
|
+
> `optional` **cache**: `boolean`
|
|
4428
|
+
|
|
4429
|
+
Defined in: [libraries/epub/adapters/memory.ts:17](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/memory.ts#L17)
|
|
4430
|
+
|
|
4431
|
+
per-entry decompressed buffer cache
|
|
4432
|
+
turn it off when opening many EPUBs and reading each entry at most once
|
|
4433
|
+
keeps resident size bounded by the entry index, not the decompressed payload sum
|
|
4434
|
+
|
|
4435
|
+
##### Default
|
|
4436
|
+
|
|
4437
|
+
```ts
|
|
4438
|
+
true;
|
|
4439
|
+
```
|
|
4440
|
+
|
|
4441
|
+
#### signal?
|
|
4442
|
+
|
|
4443
|
+
> `optional` **signal**: `AbortSignal`
|
|
4444
|
+
|
|
4445
|
+
Defined in: [libraries/epub/adapters/memory.ts:18](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/memory.ts#L18)
|
|
4446
|
+
|
|
4447
|
+
---
|
|
4448
|
+
|
|
4449
|
+
## Navigation
|
|
4450
|
+
|
|
4451
|
+
Defined in: [libraries/epub/index.ts:190](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L190)
|
|
4452
|
+
|
|
4453
|
+
### Properties
|
|
4454
|
+
|
|
4455
|
+
#### children
|
|
4456
|
+
|
|
4457
|
+
> **children**: [`NavigationList`](#navigationlist)
|
|
4458
|
+
|
|
4459
|
+
Defined in: [libraries/epub/index.ts:193](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L193)
|
|
4460
|
+
|
|
4461
|
+
#### role
|
|
4462
|
+
|
|
4463
|
+
> **role**: `string`
|
|
4464
|
+
|
|
4465
|
+
Defined in: [libraries/epub/index.ts:192](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L192)
|
|
4466
|
+
|
|
4467
|
+
#### title?
|
|
4468
|
+
|
|
4469
|
+
> `optional` **title**: `string`
|
|
4470
|
+
|
|
4471
|
+
Defined in: [libraries/epub/index.ts:191](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L191)
|
|
4472
|
+
|
|
4473
|
+
---
|
|
4474
|
+
|
|
4475
|
+
## NavigationItem
|
|
4476
|
+
|
|
4477
|
+
Defined in: [libraries/epub/index.ts:181](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L181)
|
|
4478
|
+
|
|
4479
|
+
### Properties
|
|
4480
|
+
|
|
4481
|
+
#### children?
|
|
4482
|
+
|
|
4483
|
+
> `optional` **children**: [`NavigationList`](#navigationlist)
|
|
4484
|
+
|
|
4485
|
+
Defined in: [libraries/epub/index.ts:185](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L185)
|
|
4486
|
+
|
|
4487
|
+
#### href?
|
|
4488
|
+
|
|
4489
|
+
> `optional` **href**: `string`
|
|
4490
|
+
|
|
4491
|
+
Defined in: [libraries/epub/index.ts:183](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L183)
|
|
4492
|
+
|
|
4493
|
+
#### role?
|
|
4494
|
+
|
|
4495
|
+
> `optional` **role**: `string`
|
|
4496
|
+
|
|
4497
|
+
Defined in: [libraries/epub/index.ts:184](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L184)
|
|
4498
|
+
|
|
4499
|
+
#### title
|
|
4500
|
+
|
|
4501
|
+
> **title**: `string`
|
|
4502
|
+
|
|
4503
|
+
Defined in: [libraries/epub/index.ts:182](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L182)
|
|
4504
|
+
|
|
4505
|
+
---
|
|
4506
|
+
|
|
4507
|
+
## AdapterOptions\<A\>
|
|
4508
|
+
|
|
4509
|
+
> **AdapterOptions**\<`A`\> = `A` _extends_ [`EpubStorageAdapterClass`](#epubstorageadapterclass)\<infer Opts\> ? `Opts` : `object`
|
|
4510
|
+
|
|
4511
|
+
Defined in: [libraries/epub/adapters/interface.ts:88](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L88)
|
|
4512
|
+
|
|
4513
|
+
### Type Parameters
|
|
4514
|
+
|
|
4515
|
+
| Type Parameter |
|
|
4516
|
+
| -------------- |
|
|
4517
|
+
| `A` |
|
|
4518
|
+
|
|
4519
|
+
---
|
|
4520
|
+
|
|
4521
|
+
## ElementName
|
|
4522
|
+
|
|
4523
|
+
> **ElementName** = \`$\{Letter \| Uppercase\<Letter\> \| QuestionMark\}$\{string\}\`
|
|
4524
|
+
|
|
4525
|
+
Defined in: [libraries/epub/index.ts:78](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L78)
|
|
4526
|
+
|
|
4527
|
+
A valid name for an XML element (must start with a letter)
|
|
4528
|
+
|
|
4529
|
+
---
|
|
4530
|
+
|
|
4531
|
+
## EpubInstanceFor\<A\>
|
|
4532
|
+
|
|
4533
|
+
> **EpubInstanceFor**\<`A`\> = `A`\[`"capabilities"`\]\[`"writable"`\] _extends_ `true` ? [`Epub`](#epub) : [`EpubReader`](#epubreader)
|
|
4534
|
+
|
|
4535
|
+
Defined in: [libraries/epub/index.ts:3622](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L3622)
|
|
4536
|
+
|
|
4537
|
+
Resolves to [Epub](#epub) for writable adapters, [EpubReader](#epubreader) for read-only ones.
|
|
4538
|
+
|
|
4539
|
+
The conditional pivots on `capabilities.writable`, which must be a literal
|
|
4540
|
+
`true`/`false` on the adapter class (use `as const`) for inference to work.
|
|
4541
|
+
|
|
4542
|
+
### Type Parameters
|
|
4543
|
+
|
|
4544
|
+
| Type Parameter |
|
|
4545
|
+
| ------------------------------------------------------------------- |
|
|
4546
|
+
| `A` _extends_ [`EpubStorageAdapterClass`](#epubstorageadapterclass) |
|
|
4547
|
+
|
|
4548
|
+
---
|
|
4549
|
+
|
|
4550
|
+
## EpubMetadata
|
|
4551
|
+
|
|
4552
|
+
> **EpubMetadata** = [`MetadataEntry`](#metadataentry)[]
|
|
4553
|
+
|
|
4554
|
+
Defined in: [libraries/epub/index.ts:116](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L116)
|
|
4555
|
+
|
|
4556
|
+
---
|
|
4557
|
+
|
|
4558
|
+
## EpubReader
|
|
4559
|
+
|
|
4560
|
+
> **EpubReader** = `Pick`\<[`Epub`](#epub), `"storage"` \| `"findMetadataItem"` \| `"findAllMetadataItems"` \| `"resolveHref"` \| `"readFileContents"` \| `"readItemContents"` \| `"readXhtmlItemContents"` \| `"discardAndClose"` \| `Extract`\<keyof [`Epub`](#epub), `` `get${string}` ``\>\> & `Disposable`
|
|
4561
|
+
|
|
4562
|
+
Defined in: [libraries/epub/index.ts:216](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L216)
|
|
4563
|
+
|
|
4564
|
+
Read-only view of an EPUB
|
|
4565
|
+
Returned by Epub.using(MemoryAdapter).from(...) and by Epub.from(path, { readonly: true })
|
|
4566
|
+
|
|
4567
|
+
---
|
|
4568
|
+
|
|
4569
|
+
## EpubStorageKind
|
|
4570
|
+
|
|
4571
|
+
> **EpubStorageKind** = `"tmp-dir"` \| `"in-memory"` \| `string` & `object`
|
|
4572
|
+
|
|
4573
|
+
Defined in: [libraries/epub/adapters/interface.ts:10](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/adapters/interface.ts#L10)
|
|
4574
|
+
|
|
4575
|
+
Pluggable storage backend for an Epub instance
|
|
4576
|
+
|
|
4577
|
+
Built-in adapters:
|
|
4578
|
+
|
|
4579
|
+
- [TmpFsAdapter](#tmpfsadapter) extracts the archive to a tmp directory and
|
|
4580
|
+
supports the full read/write/save/upgrade
|
|
4581
|
+
- [MemoryAdapter](#memoryadapter) keeps an in-memory zip handle and supports
|
|
4582
|
+
reads only
|
|
4583
|
+
|
|
4584
|
+
---
|
|
4585
|
+
|
|
4586
|
+
## InMemoryEpubReader
|
|
4587
|
+
|
|
4588
|
+
> **InMemoryEpubReader** = [`EpubReader`](#epubreader) & `object`
|
|
4589
|
+
|
|
4590
|
+
Defined in: [libraries/epub/index.ts:234](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L234)
|
|
4591
|
+
|
|
4592
|
+
Readonly Epub-instance backed by an in-memory zip handle
|
|
4593
|
+
Returned by `Epub.using(MemoryAdapter).from(...)`
|
|
4594
|
+
|
|
4595
|
+
### Type Declaration
|
|
4596
|
+
|
|
4597
|
+
#### storage
|
|
4598
|
+
|
|
4599
|
+
> `readonly` **storage**: `"in-memory"`
|
|
4600
|
+
|
|
4601
|
+
---
|
|
4602
|
+
|
|
4603
|
+
## ManifestItem
|
|
4604
|
+
|
|
4605
|
+
> **ManifestItem** = `object`
|
|
4606
|
+
|
|
4607
|
+
Defined in: [libraries/epub/index.ts:99](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L99)
|
|
4608
|
+
|
|
4609
|
+
### Properties
|
|
4610
|
+
|
|
4611
|
+
#### fallback?
|
|
4612
|
+
|
|
4613
|
+
> `optional` **fallback**: `string`
|
|
4614
|
+
|
|
4615
|
+
Defined in: [libraries/epub/index.ts:104](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L104)
|
|
4616
|
+
|
|
4617
|
+
#### href
|
|
4618
|
+
|
|
4619
|
+
> **href**: `string`
|
|
4620
|
+
|
|
4621
|
+
Defined in: [libraries/epub/index.ts:101](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L101)
|
|
4622
|
+
|
|
4623
|
+
#### id
|
|
4624
|
+
|
|
4625
|
+
> **id**: `string`
|
|
4626
|
+
|
|
4627
|
+
Defined in: [libraries/epub/index.ts:100](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L100)
|
|
4628
|
+
|
|
4629
|
+
#### mediaOverlay?
|
|
4630
|
+
|
|
4631
|
+
> `optional` **mediaOverlay**: `string`
|
|
4632
|
+
|
|
4633
|
+
Defined in: [libraries/epub/index.ts:105](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L105)
|
|
4634
|
+
|
|
4635
|
+
#### mediaType?
|
|
4636
|
+
|
|
4637
|
+
> `optional` **mediaType**: `string`
|
|
4638
|
+
|
|
4639
|
+
Defined in: [libraries/epub/index.ts:103](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L103)
|
|
4640
|
+
|
|
4641
|
+
#### properties?
|
|
4642
|
+
|
|
4643
|
+
> `optional` **properties**: `string`[]
|
|
4644
|
+
|
|
4645
|
+
Defined in: [libraries/epub/index.ts:106](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L106)
|
|
4646
|
+
|
|
4647
|
+
#### title?
|
|
4648
|
+
|
|
4649
|
+
> `optional` **title**: `string`
|
|
4650
|
+
|
|
4651
|
+
Defined in: [libraries/epub/index.ts:102](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L102)
|
|
4652
|
+
|
|
4653
|
+
---
|
|
4654
|
+
|
|
4655
|
+
## MetadataEntry
|
|
4656
|
+
|
|
4657
|
+
> **MetadataEntry** = `object`
|
|
4658
|
+
|
|
4659
|
+
Defined in: [libraries/epub/index.ts:109](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L109)
|
|
4660
|
+
|
|
4661
|
+
### Properties
|
|
4662
|
+
|
|
4663
|
+
#### id?
|
|
4664
|
+
|
|
4665
|
+
> `optional` **id**: `string`
|
|
4666
|
+
|
|
4667
|
+
Defined in: [libraries/epub/index.ts:110](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L110)
|
|
4668
|
+
|
|
4669
|
+
#### properties
|
|
4670
|
+
|
|
4671
|
+
> **properties**: `Record`\<`string`, `string`\>
|
|
4672
|
+
|
|
4673
|
+
Defined in: [libraries/epub/index.ts:112](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L112)
|
|
4674
|
+
|
|
4675
|
+
#### type
|
|
4676
|
+
|
|
4677
|
+
> **type**: [`ElementName`](#elementname)
|
|
4678
|
+
|
|
4679
|
+
Defined in: [libraries/epub/index.ts:111](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L111)
|
|
4680
|
+
|
|
4681
|
+
#### value
|
|
4682
|
+
|
|
4683
|
+
> **value**: `string` \| `undefined`
|
|
4684
|
+
|
|
4685
|
+
Defined in: [libraries/epub/index.ts:113](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L113)
|
|
4686
|
+
|
|
4687
|
+
---
|
|
4688
|
+
|
|
4689
|
+
## NavigationList
|
|
4690
|
+
|
|
4691
|
+
> **NavigationList** = [`NavigationItem`](#navigationitem)[]
|
|
4692
|
+
|
|
4693
|
+
Defined in: [libraries/epub/index.ts:188](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L188)
|
|
4694
|
+
|
|
4695
|
+
---
|
|
4696
|
+
|
|
4697
|
+
## PackageElement
|
|
4698
|
+
|
|
4699
|
+
> **PackageElement** = [`XmlElement`](#xmlelement)\<`"package"`\>
|
|
4700
|
+
|
|
4701
|
+
Defined in: [libraries/epub/index.ts:202](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L202)
|
|
4702
|
+
|
|
4703
|
+
---
|
|
4704
|
+
|
|
4705
|
+
## ParsedXml
|
|
4706
|
+
|
|
4707
|
+
> **ParsedXml** = [`XmlNode`](#xmlnode)[]
|
|
4708
|
+
|
|
4709
|
+
Defined in: [libraries/epub/index.ts:97](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L97)
|
|
4710
|
+
|
|
4711
|
+
An XML structure
|
|
4712
|
+
|
|
4713
|
+
---
|
|
4714
|
+
|
|
4715
|
+
## XmlElement\<Name\>
|
|
4716
|
+
|
|
4717
|
+
> **XmlElement**\<`Name`\> = `object` & `{ [key in Name]: ParsedXml }`
|
|
4718
|
+
|
|
4719
|
+
Defined in: [libraries/epub/index.ts:84](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L84)
|
|
4720
|
+
|
|
4721
|
+
An XML element
|
|
4722
|
+
|
|
4723
|
+
### Type Declaration
|
|
4724
|
+
|
|
4725
|
+
#### :@?
|
|
4726
|
+
|
|
4727
|
+
> `optional` **:@**: `Record`\<`` `${PropertyPrefix}${string}` ``, `string`\>
|
|
4728
|
+
|
|
4729
|
+
### Type Parameters
|
|
4730
|
+
|
|
4731
|
+
| Type Parameter | Default type |
|
|
4732
|
+
| ---------------------------------------------- | ----------------------------- |
|
|
4733
|
+
| `Name` _extends_ [`ElementName`](#elementname) | [`ElementName`](#elementname) |
|
|
4734
|
+
|
|
4735
|
+
---
|
|
4736
|
+
|
|
4737
|
+
## XmlNode
|
|
4738
|
+
|
|
4739
|
+
> **XmlNode** = [`XmlElement`](#xmlelement) \| [`XmlTextNode`](#xmltextnode)
|
|
4740
|
+
|
|
4741
|
+
Defined in: [libraries/epub/index.ts:94](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L94)
|
|
4742
|
+
|
|
4743
|
+
A valid XML node. May be either an element or a text node.
|
|
4744
|
+
|
|
4745
|
+
---
|
|
4746
|
+
|
|
4747
|
+
## XmlTextNode
|
|
4748
|
+
|
|
4749
|
+
> **XmlTextNode** = `object`
|
|
4750
|
+
|
|
4751
|
+
Defined in: [libraries/epub/index.ts:91](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L91)
|
|
4752
|
+
|
|
4753
|
+
A text node in an XML document
|
|
4754
|
+
|
|
4755
|
+
### Properties
|
|
4756
|
+
|
|
4757
|
+
#### #text
|
|
4758
|
+
|
|
4759
|
+
> **#text**: `string`
|
|
4760
|
+
|
|
4761
|
+
Defined in: [libraries/epub/index.ts:91](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/index.ts#L91)
|