@storyteller-platform/epub 1.0.2 → 1.0.3
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 +181 -180
- package/dist/index.d.ts +18 -5
- package/dist/index.js +192 -69
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -297,7 +297,7 @@ To get started with developing in the Storyteller monorepo, check out the
|
|
|
297
297
|
|
|
298
298
|
## Epub
|
|
299
299
|
|
|
300
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
300
|
+
Defined in: [libraries/epub/src/index.tsx:374](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L374)
|
|
301
301
|
|
|
302
302
|
A single EPUB instance.
|
|
303
303
|
|
|
@@ -337,7 +337,7 @@ https://www.w3.org/TR/epub-33/
|
|
|
337
337
|
|
|
338
338
|
> **new Epub**(`adapterClass`, `adapter`, `inputPath`, `readonlyOverride`): [`Epub`](#epub)
|
|
339
339
|
|
|
340
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
340
|
+
Defined in: [libraries/epub/src/index.tsx:415](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L415)
|
|
341
341
|
|
|
342
342
|
Prefer the static factories ([Epub.using](#using), [Epub.from](#from),
|
|
343
343
|
[Epub.create](#create), [Epub.upgrade](#upgrade)) over calling this constructor
|
|
@@ -363,31 +363,31 @@ else should need to.
|
|
|
363
363
|
|
|
364
364
|
> `protected` **adapter**: [`EpubStorageAdapter`](#epubstorageadapter)
|
|
365
365
|
|
|
366
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
366
|
+
Defined in: [libraries/epub/src/index.tsx:417](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L417)
|
|
367
367
|
|
|
368
368
|
#### adapterClass
|
|
369
369
|
|
|
370
370
|
> `protected` **adapterClass**: [`EpubStorageAdapterClass`](#epubstorageadapterclass)
|
|
371
371
|
|
|
372
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
372
|
+
Defined in: [libraries/epub/src/index.tsx:416](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L416)
|
|
373
373
|
|
|
374
374
|
#### inputPath
|
|
375
375
|
|
|
376
376
|
> `protected` **inputPath**: `string` \| `undefined`
|
|
377
377
|
|
|
378
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
378
|
+
Defined in: [libraries/epub/src/index.tsx:418](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L418)
|
|
379
379
|
|
|
380
380
|
#### readonlyOverride
|
|
381
381
|
|
|
382
382
|
> `protected` **readonlyOverride**: `boolean` = `false`
|
|
383
383
|
|
|
384
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
384
|
+
Defined in: [libraries/epub/src/index.tsx:419](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L419)
|
|
385
385
|
|
|
386
386
|
#### storage
|
|
387
387
|
|
|
388
388
|
> `readonly` **storage**: [`EpubStorageKind`](#epubstoragekind)
|
|
389
389
|
|
|
390
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
390
|
+
Defined in: [libraries/epub/src/index.tsx:407](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L407)
|
|
391
391
|
|
|
392
392
|
Storage backend kind in use for this instance
|
|
393
393
|
|
|
@@ -401,7 +401,7 @@ and the adapter's capability bag)
|
|
|
401
401
|
|
|
402
402
|
> **\[dispose\]**(): `void`
|
|
403
403
|
|
|
404
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
404
|
+
Defined in: [libraries/epub/src/index.tsx:3373](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3373)
|
|
405
405
|
|
|
406
406
|
##### Returns
|
|
407
407
|
|
|
@@ -411,7 +411,7 @@ Defined in: [libraries/epub/src/index.tsx:3314](https://gitlab.com/storyteller-p
|
|
|
411
411
|
|
|
412
412
|
> **addCollection**(`collection`, `index?`): `Promise`\<`void`\>
|
|
413
413
|
|
|
414
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
414
|
+
Defined in: [libraries/epub/src/index.tsx:1993](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1993)
|
|
415
415
|
|
|
416
416
|
Add a collection to the EPUB metadata.
|
|
417
417
|
|
|
@@ -434,7 +434,7 @@ will be added to the end of the list.
|
|
|
434
434
|
|
|
435
435
|
> **addContributor**(`contributor`, `index?`): `Promise`\<`void`\>
|
|
436
436
|
|
|
437
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
437
|
+
Defined in: [libraries/epub/src/index.tsx:2302](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2302)
|
|
438
438
|
|
|
439
439
|
Add a contributor to the EPUB metadata.
|
|
440
440
|
|
|
@@ -464,7 +464,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccreator
|
|
|
464
464
|
|
|
465
465
|
> **addCreator**(`creator`, `index?`, `type?`): `Promise`\<`void`\>
|
|
466
466
|
|
|
467
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
467
|
+
Defined in: [libraries/epub/src/index.tsx:2167](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2167)
|
|
468
468
|
|
|
469
469
|
Add a creator to the EPUB metadata.
|
|
470
470
|
|
|
@@ -494,7 +494,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccreator
|
|
|
494
494
|
|
|
495
495
|
> **addManifestItem**(`item`, `contents`, `encoding`): `Promise`\<`void`\>
|
|
496
496
|
|
|
497
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
497
|
+
Defined in: [libraries/epub/src/index.tsx:2967](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2967)
|
|
498
498
|
|
|
499
499
|
Create a new manifest item and write its contents to a
|
|
500
500
|
new entry.
|
|
@@ -523,7 +523,7 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
|
|
|
523
523
|
|
|
524
524
|
> **addManifestItem**(`item`, `contents`, `encoding`): `Promise`\<`void`\>
|
|
525
525
|
|
|
526
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
526
|
+
Defined in: [libraries/epub/src/index.tsx:2972](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2972)
|
|
527
527
|
|
|
528
528
|
Create a new manifest item and write its contents to a
|
|
529
529
|
new entry.
|
|
@@ -552,7 +552,7 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
|
|
|
552
552
|
|
|
553
553
|
> **addManifestItem**(`item`, `contents`): `Promise`\<`void`\>
|
|
554
554
|
|
|
555
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
555
|
+
Defined in: [libraries/epub/src/index.tsx:2977](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2977)
|
|
556
556
|
|
|
557
557
|
Create a new manifest item and write its contents to a
|
|
558
558
|
new entry.
|
|
@@ -580,7 +580,7 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
|
|
|
580
580
|
|
|
581
581
|
> **addMetadata**(`entry`): `Promise`\<`void`\>
|
|
582
582
|
|
|
583
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
583
|
+
Defined in: [libraries/epub/src/index.tsx:3106](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3106)
|
|
584
584
|
|
|
585
585
|
Add a new metadata entry to the Epub.
|
|
586
586
|
|
|
@@ -607,7 +607,7 @@ https://www.w3.org/TR/epub-33/#sec-pkg-metadata
|
|
|
607
607
|
|
|
608
608
|
> **addSpineItem**(`manifestId`, `index?`): `Promise`\<`void`\>
|
|
609
609
|
|
|
610
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
610
|
+
Defined in: [libraries/epub/src/index.tsx:2370](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2370)
|
|
611
611
|
|
|
612
612
|
Add an item to the spine of the EPUB.
|
|
613
613
|
|
|
@@ -637,7 +637,7 @@ https://www.w3.org/TR/epub-33/#sec-spine-elem
|
|
|
637
637
|
|
|
638
638
|
> **addSubject**(`subject`): `Promise`\<`void`\>
|
|
639
639
|
|
|
640
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
640
|
+
Defined in: [libraries/epub/src/index.tsx:1538](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1538)
|
|
641
641
|
|
|
642
642
|
Add a subject to the EPUB metadata.
|
|
643
643
|
|
|
@@ -659,7 +659,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcsubject
|
|
|
659
659
|
|
|
660
660
|
> **copy**(`path?`): `Promise`\<[`Epub`](#epub)\>
|
|
661
661
|
|
|
662
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
662
|
+
Defined in: [libraries/epub/src/index.tsx:512](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L512)
|
|
663
663
|
|
|
664
664
|
##### Parameters
|
|
665
665
|
|
|
@@ -675,7 +675,7 @@ Defined in: [libraries/epub/src/index.tsx:489](https://gitlab.com/storyteller-pl
|
|
|
675
675
|
|
|
676
676
|
> **createXhtmlDocument**(`body`, `head?`, `language?`): `Promise`\<[`Document`](#document-1)\>
|
|
677
677
|
|
|
678
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
678
|
+
Defined in: [libraries/epub/src/index.tsx:2768](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2768)
|
|
679
679
|
|
|
680
680
|
Create a new XHTML document with the given body
|
|
681
681
|
and head.
|
|
@@ -696,7 +696,7 @@ and head.
|
|
|
696
696
|
|
|
697
697
|
> **createXmlDocument**(`root`): [`Document`](#document-1)
|
|
698
698
|
|
|
699
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
699
|
+
Defined in: [libraries/epub/src/index.tsx:2732](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2732)
|
|
700
700
|
|
|
701
701
|
Create a new XML document with the given root node.
|
|
702
702
|
|
|
@@ -714,7 +714,7 @@ Create a new XML document with the given root node.
|
|
|
714
714
|
|
|
715
715
|
> **discardAndClose**(): `void`
|
|
716
716
|
|
|
717
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
717
|
+
Defined in: [libraries/epub/src/index.tsx:3323](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3323)
|
|
718
718
|
|
|
719
719
|
##### Returns
|
|
720
720
|
|
|
@@ -724,7 +724,7 @@ Defined in: [libraries/epub/src/index.tsx:3264](https://gitlab.com/storyteller-p
|
|
|
724
724
|
|
|
725
725
|
> **findAllMetadataItems**(`predicate`): `Promise`\<[`MetadataEntry`](#metadataentry)[]\>
|
|
726
726
|
|
|
727
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
727
|
+
Defined in: [libraries/epub/src/index.tsx:785](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L785)
|
|
728
728
|
|
|
729
729
|
Returns the item in the metadata element's children array
|
|
730
730
|
that matches the provided predicate.
|
|
@@ -743,7 +743,7 @@ that matches the provided predicate.
|
|
|
743
743
|
|
|
744
744
|
> **findMetadataItem**(`predicate`): `Promise`\<[`MetadataEntry`](#metadataentry) \| `null`\>
|
|
745
745
|
|
|
746
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
746
|
+
Defined in: [libraries/epub/src/index.tsx:776](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L776)
|
|
747
747
|
|
|
748
748
|
Returns the item in the metadata element's children array
|
|
749
749
|
that matches the provided predicate.
|
|
@@ -762,7 +762,7 @@ that matches the provided predicate.
|
|
|
762
762
|
|
|
763
763
|
> **getBaseDirection**(): `Promise`\<`"auto"` \| `"rtl"` \| `"ltr"`\>
|
|
764
764
|
|
|
765
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
765
|
+
Defined in: [libraries/epub/src/index.tsx:1492](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1492)
|
|
766
766
|
|
|
767
767
|
Retrieve the base direction from the package element.
|
|
768
768
|
|
|
@@ -781,7 +781,7 @@ https://www.w3.org/TR/epub-33/#attrdef-dir
|
|
|
781
781
|
|
|
782
782
|
> **getCollections**(): `Promise`\<[`Collection`](#collection)[]\>
|
|
783
783
|
|
|
784
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
784
|
+
Defined in: [libraries/epub/src/index.tsx:1953](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1953)
|
|
785
785
|
|
|
786
786
|
Retrieve the list of collections.
|
|
787
787
|
|
|
@@ -793,7 +793,7 @@ Retrieve the list of collections.
|
|
|
793
793
|
|
|
794
794
|
> **getContributors**(): `Promise`\<[`DcCreator`](#dccreator)[]\>
|
|
795
795
|
|
|
796
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
796
|
+
Defined in: [libraries/epub/src/index.tsx:2154](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2154)
|
|
797
797
|
|
|
798
798
|
Retrieve the list of contributors.
|
|
799
799
|
|
|
@@ -812,7 +812,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccontributor
|
|
|
812
812
|
|
|
813
813
|
> **getCoverImage**(): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\> \| `null`\>
|
|
814
814
|
|
|
815
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
815
|
+
Defined in: [libraries/epub/src/index.tsx:1388](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1388)
|
|
816
816
|
|
|
817
817
|
Retrieve the cover image data as a byte array.
|
|
818
818
|
|
|
@@ -832,7 +832,7 @@ https://www.w3.org/TR/epub-33/#sec-cover-image
|
|
|
832
832
|
|
|
833
833
|
> **getCoverImageItem**(): `Promise`\<[`ManifestItem`](#manifestitem) \| `null`\>
|
|
834
834
|
|
|
835
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
835
|
+
Defined in: [libraries/epub/src/index.tsx:1369](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1369)
|
|
836
836
|
|
|
837
837
|
Retrieve the cover image manifest item.
|
|
838
838
|
|
|
@@ -853,7 +853,7 @@ https://www.w3.org/TR/epub-33/#sec-cover-image
|
|
|
853
853
|
|
|
854
854
|
> **getCreators**(`type`): `Promise`\<[`DcCreator`](#dccreator)[]\>
|
|
855
855
|
|
|
856
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
856
|
+
Defined in: [libraries/epub/src/index.tsx:2090](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2090)
|
|
857
857
|
|
|
858
858
|
Retrieve the list of creators.
|
|
859
859
|
|
|
@@ -875,7 +875,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccreator
|
|
|
875
875
|
|
|
876
876
|
> **getDescription**(): `Promise`\<`string` \| `null`\>
|
|
877
877
|
|
|
878
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
878
|
+
Defined in: [libraries/epub/src/index.tsx:1811](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1811)
|
|
879
879
|
|
|
880
880
|
Retrieve the Epub's description as specified in its
|
|
881
881
|
package document metadata.
|
|
@@ -892,7 +892,7 @@ include HTML markup.
|
|
|
892
892
|
|
|
893
893
|
> **getGuideEntries**(): `Promise`\<[`GuideItem`](#guideitem)[]\>
|
|
894
894
|
|
|
895
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
895
|
+
Defined in: [libraries/epub/src/index.tsx:3306](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3306)
|
|
896
896
|
|
|
897
897
|
Retrieve the guide entries from the package document.
|
|
898
898
|
|
|
@@ -907,7 +907,7 @@ the landmarks nav, but many publications still include it.
|
|
|
907
907
|
|
|
908
908
|
> **getIdentifier**(): `Promise`\<`string` \| `null`\>
|
|
909
909
|
|
|
910
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
910
|
+
Defined in: [libraries/epub/src/index.tsx:877](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L877)
|
|
911
911
|
|
|
912
912
|
Retrieve the first identifier from the dc:identifier element
|
|
913
913
|
in the EPUB metadata.
|
|
@@ -931,7 +931,7 @@ or [getIdentifiers](#getidentifiers) to get all identifiers.
|
|
|
931
931
|
|
|
932
932
|
> **getIdentifiers**(): `Promise`\<[`EpubIdentifier`](#epubidentifier)[]\>
|
|
933
933
|
|
|
934
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
934
|
+
Defined in: [libraries/epub/src/index.tsx:1043](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1043)
|
|
935
935
|
|
|
936
936
|
Retrieve every `dc:identifier` entry, returned as found.
|
|
937
937
|
|
|
@@ -952,7 +952,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcidentifier
|
|
|
952
952
|
|
|
953
953
|
> **getItemArchiveLength**(`id`): `Promise`\<`number`\>
|
|
954
954
|
|
|
955
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
955
|
+
Defined in: [libraries/epub/src/index.tsx:538](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L538)
|
|
956
956
|
|
|
957
957
|
Length of the underlying archive entry for a manifest item, in bytes
|
|
958
958
|
Necessary to compute the readium page count which is for COMPRESSED content
|
|
@@ -975,7 +975,7 @@ Necessary to compute the readium page count which is for COMPRESSED content
|
|
|
975
975
|
|
|
976
976
|
> **getLandmarks**(`__namedParameters`): `Promise`\<[`Navigation`](#navigation) \| `null`\>
|
|
977
977
|
|
|
978
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
978
|
+
Defined in: [libraries/epub/src/index.tsx:2555](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2555)
|
|
979
979
|
|
|
980
980
|
Returns the structured landmarks navigation document
|
|
981
981
|
as a Navigation object
|
|
@@ -999,7 +999,7 @@ https://www.w3.org/TR/epub-33/#sec-nav-landmarks
|
|
|
999
999
|
|
|
1000
1000
|
> **getLanguage**(): `Promise`\<`Locale` \| `null`\>
|
|
1001
1001
|
|
|
1002
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1002
|
+
Defined in: [libraries/epub/src/index.tsx:1648](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1648)
|
|
1003
1003
|
|
|
1004
1004
|
Retrieve the Epub's language as specified in its
|
|
1005
1005
|
package document metadata.
|
|
@@ -1019,7 +1019,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dclanguage
|
|
|
1019
1019
|
|
|
1020
1020
|
> **getLayout**(): `Promise`\<`"pre-paginated"` \| `"reflowable"`\>
|
|
1021
1021
|
|
|
1022
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1022
|
+
Defined in: [libraries/epub/src/index.tsx:1473](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1473)
|
|
1023
1023
|
|
|
1024
1024
|
Retrieve the layout from the rendition:layout meta element
|
|
1025
1025
|
in the EPUB metadata.
|
|
@@ -1038,12 +1038,14 @@ https://www.w3.org/TR/epub-33/#layout
|
|
|
1038
1038
|
|
|
1039
1039
|
> **getManifest**(): `Promise`\<`Record`\<`string`, [`ManifestItem`](#manifestitem)\>\>
|
|
1040
1040
|
|
|
1041
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1041
|
+
Defined in: [libraries/epub/src/index.tsx:698](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L698)
|
|
1042
1042
|
|
|
1043
1043
|
Retrieve the manifest for the Epub.
|
|
1044
1044
|
|
|
1045
1045
|
This is represented as a map from each manifest items'
|
|
1046
|
-
id to the rest of its properties.
|
|
1046
|
+
id to the rest of its properties. Manifest hrefs are
|
|
1047
|
+
always URI-encoded (e.g. `chapter one.xhtml` -> `chapter%20one.xhtml`),
|
|
1048
|
+
even if the raw XML is (incorrectly) not URI-encoded.
|
|
1047
1049
|
|
|
1048
1050
|
##### Returns
|
|
1049
1051
|
|
|
@@ -1057,7 +1059,7 @@ https://www.w3.org/TR/epub-33/#sec-pkg-manifest
|
|
|
1057
1059
|
|
|
1058
1060
|
> **getMetadata**(): `Promise`\<[`EpubMetadata`](#epubmetadata)\>
|
|
1059
1061
|
|
|
1060
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1062
|
+
Defined in: [libraries/epub/src/index.tsx:845](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L845)
|
|
1061
1063
|
|
|
1062
1064
|
Retrieve the metadata entries for the Epub.
|
|
1063
1065
|
|
|
@@ -1079,7 +1081,7 @@ https://www.w3.org/TR/epub-33/#sec-pkg-metadata
|
|
|
1079
1081
|
|
|
1080
1082
|
> **getModifiedDate**(): `Promise`\<`Date` \| `null`\>
|
|
1081
1083
|
|
|
1082
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1084
|
+
Defined in: [libraries/epub/src/index.tsx:1456](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1456)
|
|
1083
1085
|
|
|
1084
1086
|
Retrieve the modified date from the dcterms:modified metadata
|
|
1085
1087
|
in the EPUB metadata as a Date object.
|
|
@@ -1098,7 +1100,7 @@ https://www.w3.org/TR/epub-33/#sec-metadata-last-modified
|
|
|
1098
1100
|
|
|
1099
1101
|
> **getNcxTableOfContents**(): `Promise`\<[`NavigationList`](#navigationlist)\>
|
|
1100
1102
|
|
|
1101
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1103
|
+
Defined in: [libraries/epub/src/index.tsx:3230](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3230)
|
|
1102
1104
|
|
|
1103
1105
|
Parse the NCX table of contents, if one exists, and return
|
|
1104
1106
|
a tree of TocEntry nodes.
|
|
@@ -1115,7 +1117,7 @@ NCX for backwards compatibility.
|
|
|
1115
1117
|
|
|
1116
1118
|
> **getPackageDocumentSource**(): `Promise`\<`string`\>
|
|
1117
1119
|
|
|
1118
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1120
|
+
Defined in: [libraries/epub/src/index.tsx:592](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L592)
|
|
1119
1121
|
|
|
1120
1122
|
##### Returns
|
|
1121
1123
|
|
|
@@ -1123,9 +1125,15 @@ Defined in: [libraries/epub/src/index.tsx:569](https://gitlab.com/storyteller-pl
|
|
|
1123
1125
|
|
|
1124
1126
|
#### getPackageElement()
|
|
1125
1127
|
|
|
1126
|
-
> **getPackageElement**(): `Promise`\<[`Element`](#element-1)\>
|
|
1128
|
+
> **getPackageElement**(`lock`): `Promise`\<[`Element`](#element-1)\>
|
|
1127
1129
|
|
|
1128
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1130
|
+
Defined in: [libraries/epub/src/index.tsx:615](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L615)
|
|
1131
|
+
|
|
1132
|
+
##### Parameters
|
|
1133
|
+
|
|
1134
|
+
| Parameter | Type | Default value |
|
|
1135
|
+
| --------- | --------- | ------------- |
|
|
1136
|
+
| `lock` | `boolean` | `true` |
|
|
1129
1137
|
|
|
1130
1138
|
##### Returns
|
|
1131
1139
|
|
|
@@ -1135,7 +1143,7 @@ Defined in: [libraries/epub/src/index.tsx:592](https://gitlab.com/storyteller-pl
|
|
|
1135
1143
|
|
|
1136
1144
|
> **getPackageVocabularyPrefixes**(): `Promise`\<`Record`\<`string`, `string`\>\>
|
|
1137
1145
|
|
|
1138
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1146
|
+
Defined in: [libraries/epub/src/index.tsx:1828](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1828)
|
|
1139
1147
|
|
|
1140
1148
|
Return the set of custom vocabulary prefixes set on this publication's
|
|
1141
1149
|
root package element.
|
|
@@ -1154,7 +1162,7 @@ https://www.w3.org/TR/epub-33/#sec-prefix-attr
|
|
|
1154
1162
|
|
|
1155
1163
|
> **getPageBreakSource**(): `Promise`\<[`EpubSource`](#epubsource) \| `null`\>
|
|
1156
1164
|
|
|
1157
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1165
|
+
Defined in: [libraries/epub/src/index.tsx:1080](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1080)
|
|
1158
1166
|
|
|
1159
1167
|
Retrieve the `pageBreakSource` property (EPUB 3.4, spec D.2.9), the
|
|
1160
1168
|
publication-level source for the source of its page break markers.
|
|
@@ -1175,7 +1183,7 @@ https://www.w3.org/TR/epub/#pageBreakSource
|
|
|
1175
1183
|
|
|
1176
1184
|
> **getPageList**(`__namedParameters`): `Promise`\<[`Navigation`](#navigation) \| `null`\>
|
|
1177
1185
|
|
|
1178
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1186
|
+
Defined in: [libraries/epub/src/index.tsx:2567](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2567)
|
|
1179
1187
|
|
|
1180
1188
|
Returns the structured page list navigation document
|
|
1181
1189
|
as a Navigation object
|
|
@@ -1199,7 +1207,7 @@ https://www.w3.org/TR/epub-33/#sec-nav-landmarks
|
|
|
1199
1207
|
|
|
1200
1208
|
> **getPublicationDate**(): `Promise`\<`Date` \| `null`\>
|
|
1201
1209
|
|
|
1202
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1210
|
+
Defined in: [libraries/epub/src/index.tsx:1425](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1425)
|
|
1203
1211
|
|
|
1204
1212
|
Retrieve the publication date from the dc:date element
|
|
1205
1213
|
in the EPUB metadata as a Date object.
|
|
@@ -1218,7 +1226,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcdate
|
|
|
1218
1226
|
|
|
1219
1227
|
> **getRootfile**(): `Promise`\<`string`\>
|
|
1220
1228
|
|
|
1221
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1229
|
+
Defined in: [libraries/epub/src/index.tsx:549](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L549)
|
|
1222
1230
|
|
|
1223
1231
|
##### Returns
|
|
1224
1232
|
|
|
@@ -1228,7 +1236,7 @@ Defined in: [libraries/epub/src/index.tsx:526](https://gitlab.com/storyteller-pl
|
|
|
1228
1236
|
|
|
1229
1237
|
> **getSources**(): `Promise`\<[`EpubSource`](#epubsource)[]\>
|
|
1230
1238
|
|
|
1231
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1239
|
+
Defined in: [libraries/epub/src/index.tsx:1057](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1057)
|
|
1232
1240
|
|
|
1233
1241
|
Retrieve every `dc:source` entry, returned as found.
|
|
1234
1242
|
|
|
@@ -1248,7 +1256,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcsource
|
|
|
1248
1256
|
|
|
1249
1257
|
> **getSpineItems**(): `Promise`\<[`ManifestItem`](#manifestitem) & `object`[]\>
|
|
1250
1258
|
|
|
1251
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1259
|
+
Defined in: [libraries/epub/src/index.tsx:2343](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2343)
|
|
1252
1260
|
|
|
1253
1261
|
Retrieve the manifest items that make up the Epub's spine.
|
|
1254
1262
|
|
|
@@ -1267,7 +1275,7 @@ https://www.w3.org/TR/epub-33/#sec-spine-elem
|
|
|
1267
1275
|
|
|
1268
1276
|
> **getSubjects**(): `Promise`\<(`string` \| [`DcSubject`](#dcsubject))[]\>
|
|
1269
1277
|
|
|
1270
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1278
|
+
Defined in: [libraries/epub/src/index.tsx:1603](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1603)
|
|
1271
1279
|
|
|
1272
1280
|
Retrieve the list of subjects for this EPUB.
|
|
1273
1281
|
|
|
@@ -1288,7 +1296,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcsubject
|
|
|
1288
1296
|
|
|
1289
1297
|
> **getSubtitle**(): `Promise`\<`string` \| `null`\>
|
|
1290
1298
|
|
|
1291
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1299
|
+
Defined in: [libraries/epub/src/index.tsx:1718](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1718)
|
|
1292
1300
|
|
|
1293
1301
|
Retrieve the subtitle of the Epub, if it exists.
|
|
1294
1302
|
|
|
@@ -1304,7 +1312,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dctitle
|
|
|
1304
1312
|
|
|
1305
1313
|
> **getTableOfContents**(`__namedParameters`): `Promise`\<[`Navigation`](#navigation) \| `null`\>
|
|
1306
1314
|
|
|
1307
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1315
|
+
Defined in: [libraries/epub/src/index.tsx:2537](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2537)
|
|
1308
1316
|
|
|
1309
1317
|
Returns the structured table of contents navigation document
|
|
1310
1318
|
as a Navigation object.
|
|
@@ -1328,7 +1336,7 @@ https://www.w3.org/TR/epub-33/#sec-nav-toc
|
|
|
1328
1336
|
|
|
1329
1337
|
> **getTitle**(`expanded`): `Promise`\<`string` \| `null`\>
|
|
1330
1338
|
|
|
1331
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1339
|
+
Defined in: [libraries/epub/src/index.tsx:1694](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1694)
|
|
1332
1340
|
|
|
1333
1341
|
Retrieve the title of the Epub.
|
|
1334
1342
|
|
|
@@ -1350,7 +1358,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dctitle
|
|
|
1350
1358
|
|
|
1351
1359
|
> **getTitles**(): `Promise`\<`object`[]\>
|
|
1352
1360
|
|
|
1353
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1361
|
+
Defined in: [libraries/epub/src/index.tsx:1730](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1730)
|
|
1354
1362
|
|
|
1355
1363
|
Retrieve all title entries of the Epub.
|
|
1356
1364
|
|
|
@@ -1366,7 +1374,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dctitle
|
|
|
1366
1374
|
|
|
1367
1375
|
> **getType**(): `Promise`\<[`MetadataEntry`](#metadataentry) \| `null`\>
|
|
1368
1376
|
|
|
1369
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1377
|
+
Defined in: [libraries/epub/src/index.tsx:1525](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1525)
|
|
1370
1378
|
|
|
1371
1379
|
Retrieve the publication type from the dc:type element
|
|
1372
1380
|
in the EPUB metadata.
|
|
@@ -1385,7 +1393,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dctype
|
|
|
1385
1393
|
|
|
1386
1394
|
> **getUniqueIdentifier**(): `Promise`\<`string` \| `null`\>
|
|
1387
1395
|
|
|
1388
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1396
|
+
Defined in: [libraries/epub/src/index.tsx:909](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L909)
|
|
1389
1397
|
|
|
1390
1398
|
Retrieve the identifier with the unique identifier id
|
|
1391
1399
|
in the EPUB metadata.
|
|
@@ -1404,7 +1412,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcidentifier
|
|
|
1404
1412
|
|
|
1405
1413
|
> **getUniqueIdentifierId**(): `Promise`\<`string` \| `null`\>
|
|
1406
1414
|
|
|
1407
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1415
|
+
Defined in: [libraries/epub/src/index.tsx:981](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L981)
|
|
1408
1416
|
|
|
1409
1417
|
Retrieve the id of the publication's unique identifier, as declared by the
|
|
1410
1418
|
package element's `unique-identifier` attribute.
|
|
@@ -1421,7 +1429,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcidentifier
|
|
|
1421
1429
|
|
|
1422
1430
|
> **getVersion**(): `Promise`\<`string`\>
|
|
1423
1431
|
|
|
1424
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1432
|
+
Defined in: [libraries/epub/src/index.tsx:3217](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3217)
|
|
1425
1433
|
|
|
1426
1434
|
Returns the EPUB version declared on the package element.
|
|
1427
1435
|
|
|
@@ -1435,7 +1443,7 @@ Returns the EPUB version declared on the package element.
|
|
|
1435
1443
|
|
|
1436
1444
|
> **readFileContents**(`href`, `relativeTo?`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\>
|
|
1437
1445
|
|
|
1438
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1446
|
+
Defined in: [libraries/epub/src/index.tsx:2673](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2673)
|
|
1439
1447
|
|
|
1440
1448
|
Retrieve the contents of a file, given its href.
|
|
1441
1449
|
|
|
@@ -1457,7 +1465,7 @@ and an encoding parameter.
|
|
|
1457
1465
|
|
|
1458
1466
|
> **readFileContents**(`href`, `relativeTo`, `encoding`): `Promise`\<`string`\>
|
|
1459
1467
|
|
|
1460
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1468
|
+
Defined in: [libraries/epub/src/index.tsx:2674](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2674)
|
|
1461
1469
|
|
|
1462
1470
|
Retrieve the contents of a file, given its href.
|
|
1463
1471
|
|
|
@@ -1482,7 +1490,7 @@ and an encoding parameter.
|
|
|
1482
1490
|
|
|
1483
1491
|
> **readItemContents**(`id`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\>
|
|
1484
1492
|
|
|
1485
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1493
|
+
Defined in: [libraries/epub/src/index.tsx:2706](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2706)
|
|
1486
1494
|
|
|
1487
1495
|
Retrieve the contents of a manifest item, given its id.
|
|
1488
1496
|
|
|
@@ -1504,7 +1512,7 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
|
|
|
1504
1512
|
|
|
1505
1513
|
> **readItemContents**(`id`, `encoding`): `Promise`\<`string`\>
|
|
1506
1514
|
|
|
1507
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1515
|
+
Defined in: [libraries/epub/src/index.tsx:2707](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2707)
|
|
1508
1516
|
|
|
1509
1517
|
Retrieve the contents of a manifest item, given its id.
|
|
1510
1518
|
|
|
@@ -1529,7 +1537,7 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
|
|
|
1529
1537
|
|
|
1530
1538
|
> **readXhtmlItemContents**(`id`, `as?`): `Promise`\<[`Document`](#document-1)\>
|
|
1531
1539
|
|
|
1532
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1540
|
+
Defined in: [libraries/epub/src/index.tsx:2818](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2818)
|
|
1533
1541
|
|
|
1534
1542
|
Retrieves the contents of an XHTML item, given its manifest id.
|
|
1535
1543
|
|
|
@@ -1552,7 +1560,7 @@ https://www.w3.org/TR/epub-33/#sec-xhtml
|
|
|
1552
1560
|
|
|
1553
1561
|
> **readXhtmlItemContents**(`id`, `as`): `Promise`\<`string`\>
|
|
1554
1562
|
|
|
1555
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1563
|
+
Defined in: [libraries/epub/src/index.tsx:2819](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2819)
|
|
1556
1564
|
|
|
1557
1565
|
Retrieves the contents of an XHTML item, given its manifest id.
|
|
1558
1566
|
|
|
@@ -1575,7 +1583,7 @@ https://www.w3.org/TR/epub-33/#sec-xhtml
|
|
|
1575
1583
|
|
|
1576
1584
|
> **removeCollection**(`index`): `Promise`\<`void`\>
|
|
1577
1585
|
|
|
1578
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1586
|
+
Defined in: [libraries/epub/src/index.tsx:2057](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2057)
|
|
1579
1587
|
|
|
1580
1588
|
Remove a collection from the EPUB metadata.
|
|
1581
1589
|
|
|
@@ -1596,7 +1604,7 @@ refers to the array returned by `epub.getCollections()`.
|
|
|
1596
1604
|
|
|
1597
1605
|
> **removeContributor**(`index`): `Promise`\<`void`\>
|
|
1598
1606
|
|
|
1599
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1607
|
+
Defined in: [libraries/epub/src/index.tsx:2286](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2286)
|
|
1600
1608
|
|
|
1601
1609
|
Remove a contributor from the EPUB metadata.
|
|
1602
1610
|
|
|
@@ -1624,7 +1632,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccreator
|
|
|
1624
1632
|
|
|
1625
1633
|
> **removeCreator**(`index`, `type`): `Promise`\<`void`\>
|
|
1626
1634
|
|
|
1627
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1635
|
+
Defined in: [libraries/epub/src/index.tsx:2249](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2249)
|
|
1628
1636
|
|
|
1629
1637
|
Remove a creator from the EPUB metadata.
|
|
1630
1638
|
|
|
@@ -1650,7 +1658,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccreator
|
|
|
1650
1658
|
|
|
1651
1659
|
> **removeManifestItem**(`id`): `Promise`\<`void`\>
|
|
1652
1660
|
|
|
1653
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1661
|
+
Defined in: [libraries/epub/src/index.tsx:2918](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2918)
|
|
1654
1662
|
|
|
1655
1663
|
##### Parameters
|
|
1656
1664
|
|
|
@@ -1666,7 +1674,7 @@ Defined in: [libraries/epub/src/index.tsx:2863](https://gitlab.com/storyteller-p
|
|
|
1666
1674
|
|
|
1667
1675
|
> **removeMetadata**(`predicate`): `Promise`\<`void`\>
|
|
1668
1676
|
|
|
1669
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1677
|
+
Defined in: [libraries/epub/src/index.tsx:3192](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3192)
|
|
1670
1678
|
|
|
1671
1679
|
Remove one or more metadata entries.
|
|
1672
1680
|
|
|
@@ -1692,7 +1700,7 @@ https://www.w3.org/TR/epub-33/#sec-pkg-metadata
|
|
|
1692
1700
|
|
|
1693
1701
|
> **removeSpineItem**(`index`): `Promise`\<`void`\>
|
|
1694
1702
|
|
|
1695
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1703
|
+
Defined in: [libraries/epub/src/index.tsx:2416](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2416)
|
|
1696
1704
|
|
|
1697
1705
|
Remove the spine item at the specified index.
|
|
1698
1706
|
|
|
@@ -1714,7 +1722,7 @@ https://www.w3.org/TR/epub-33/#sec-spine-elem
|
|
|
1714
1722
|
|
|
1715
1723
|
> **removeSubject**(`index`): `Promise`\<`void`\>
|
|
1716
1724
|
|
|
1717
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1725
|
+
Defined in: [libraries/epub/src/index.tsx:1575](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1575)
|
|
1718
1726
|
|
|
1719
1727
|
Remove a subject from the EPUB metadata.
|
|
1720
1728
|
|
|
@@ -1739,7 +1747,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccreator
|
|
|
1739
1747
|
|
|
1740
1748
|
> **replaceMetadata**(`predicate`, `entry`): `Promise`\<`void`\>
|
|
1741
1749
|
|
|
1742
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1750
|
+
Defined in: [libraries/epub/src/index.tsx:3141](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3141)
|
|
1743
1751
|
|
|
1744
1752
|
Replace a metadata entry with a new one.
|
|
1745
1753
|
|
|
@@ -1766,7 +1774,7 @@ https://www.w3.org/TR/epub-33/#sec-pkg-metadata
|
|
|
1766
1774
|
|
|
1767
1775
|
> **resolveHref**(`href`, `relativeTo?`, `__namedParameters?`): `Promise`\<`string`\>
|
|
1768
1776
|
|
|
1769
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1777
|
+
Defined in: [libraries/epub/src/index.tsx:2631](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2631)
|
|
1770
1778
|
|
|
1771
1779
|
Returns a path-relative-scheme-less URL, relative to the
|
|
1772
1780
|
container root.
|
|
@@ -1791,7 +1799,7 @@ a navigation document, is handed back unchanged.
|
|
|
1791
1799
|
|
|
1792
1800
|
> **saveAndClose**(): `Promise`\<`void`\>
|
|
1793
1801
|
|
|
1794
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1802
|
+
Defined in: [libraries/epub/src/index.tsx:3338](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3338)
|
|
1795
1803
|
|
|
1796
1804
|
Write the current contents of the Epub to a new
|
|
1797
1805
|
EPUB archive on disk.
|
|
@@ -1808,7 +1816,7 @@ timestamp.
|
|
|
1808
1816
|
|
|
1809
1817
|
> **setCoverImage**(`href`, `data`): `Promise`\<`void`\>
|
|
1810
1818
|
|
|
1811
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1819
|
+
Defined in: [libraries/epub/src/index.tsx:1402](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1402)
|
|
1812
1820
|
|
|
1813
1821
|
Set the cover image for the EPUB.
|
|
1814
1822
|
|
|
@@ -1831,7 +1839,7 @@ the provided href within the publication.
|
|
|
1831
1839
|
|
|
1832
1840
|
> **setDescription**(`description`): `Promise`\<`void`\>
|
|
1833
1841
|
|
|
1834
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1842
|
+
Defined in: [libraries/epub/src/index.tsx:1795](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1795)
|
|
1835
1843
|
|
|
1836
1844
|
Update the Epub's description metadata entry.
|
|
1837
1845
|
|
|
@@ -1853,7 +1861,7 @@ Otherwise creates a new element. Any non-ASCII symbols,
|
|
|
1853
1861
|
|
|
1854
1862
|
> **setIdentifier**(`identifier`): `Promise`\<`void`\>
|
|
1855
1863
|
|
|
1856
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1864
|
+
Defined in: [libraries/epub/src/index.tsx:893](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L893)
|
|
1857
1865
|
|
|
1858
1866
|
Set the dc:identifier metadata element with the provided string.
|
|
1859
1867
|
|
|
@@ -1882,7 +1890,7 @@ Use [setUniqueIdentifier](#setuniqueidentifier) instead.
|
|
|
1882
1890
|
|
|
1883
1891
|
> **setIdentifiers**(`identifiers`): `Promise`\<`void`\>
|
|
1884
1892
|
|
|
1885
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1893
|
+
Defined in: [libraries/epub/src/index.tsx:1149](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1149)
|
|
1886
1894
|
|
|
1887
1895
|
Replace the publication's `dc:identifier` entries.
|
|
1888
1896
|
|
|
@@ -1919,7 +1927,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcidentifier
|
|
|
1919
1927
|
|
|
1920
1928
|
> **setLanguage**(`locale`): `Promise`\<`void`\>
|
|
1921
1929
|
|
|
1922
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1930
|
+
Defined in: [libraries/epub/src/index.tsx:1677](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1677)
|
|
1923
1931
|
|
|
1924
1932
|
Update the Epub's language metadata entry.
|
|
1925
1933
|
|
|
@@ -1944,7 +1952,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dclanguage
|
|
|
1944
1952
|
|
|
1945
1953
|
> **setPackageVocabularyPrefix**(`prefix`, `uri`): `Promise`\<`void`\>
|
|
1946
1954
|
|
|
1947
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1955
|
+
Defined in: [libraries/epub/src/index.tsx:1846](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1846)
|
|
1948
1956
|
|
|
1949
1957
|
Set a custom vocabulary prefix on the root package element.
|
|
1950
1958
|
|
|
@@ -1967,7 +1975,7 @@ https://www.w3.org/TR/epub-33/#sec-prefix-attr
|
|
|
1967
1975
|
|
|
1968
1976
|
> **setPageBreakSource**(`value`): `Promise`\<`void`\>
|
|
1969
1977
|
|
|
1970
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
1978
|
+
Defined in: [libraries/epub/src/index.tsx:1116](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1116)
|
|
1971
1979
|
|
|
1972
1980
|
Set the `pageBreakSource` property (EPUB 3.4, spec D.2.9), or remove it when
|
|
1973
1981
|
passed null. Replaces an existing `pageBreakSource` meta if present.
|
|
@@ -1992,7 +2000,7 @@ https://www.w3.org/TR/epub/#pageBreakSource
|
|
|
1992
2000
|
|
|
1993
2001
|
> **setPublicationDate**(`date`): `Promise`\<`void`\>
|
|
1994
2002
|
|
|
1995
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2003
|
+
Defined in: [libraries/epub/src/index.tsx:1440](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1440)
|
|
1996
2004
|
|
|
1997
2005
|
Set the dc:date metadata element with the provided date.
|
|
1998
2006
|
|
|
@@ -2017,7 +2025,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcdate
|
|
|
2017
2025
|
|
|
2018
2026
|
> **setSources**(`sources`): `Promise`\<`void`\>
|
|
2019
2027
|
|
|
2020
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2028
|
+
Defined in: [libraries/epub/src/index.tsx:1254](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1254)
|
|
2021
2029
|
|
|
2022
2030
|
Replace the publication's `dc:source` entries.
|
|
2023
2031
|
|
|
@@ -2048,7 +2056,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcsource
|
|
|
2048
2056
|
|
|
2049
2057
|
> **setTitle**(`title`): `Promise`\<`void`\>
|
|
2050
2058
|
|
|
2051
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2059
|
+
Defined in: [libraries/epub/src/index.tsx:1882](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1882)
|
|
2052
2060
|
|
|
2053
2061
|
Set the title of the Epub.
|
|
2054
2062
|
|
|
@@ -2075,7 +2083,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dctitle
|
|
|
2075
2083
|
|
|
2076
2084
|
> **setTitles**(`entries`): `Promise`\<`void`\>
|
|
2077
2085
|
|
|
2078
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2086
|
+
Defined in: [libraries/epub/src/index.tsx:1904](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1904)
|
|
2079
2087
|
|
|
2080
2088
|
##### Parameters
|
|
2081
2089
|
|
|
@@ -2091,7 +2099,7 @@ Defined in: [libraries/epub/src/index.tsx:1852](https://gitlab.com/storyteller-p
|
|
|
2091
2099
|
|
|
2092
2100
|
> **setType**(`type`): `Promise`\<`void`\>
|
|
2093
2101
|
|
|
2094
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2102
|
+
Defined in: [libraries/epub/src/index.tsx:1509](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1509)
|
|
2095
2103
|
|
|
2096
2104
|
Set the dc:type metadata element.
|
|
2097
2105
|
|
|
@@ -2116,7 +2124,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dctype
|
|
|
2116
2124
|
|
|
2117
2125
|
> **setUniqueIdentifier**(`identifier`): `Promise`\<`void`\>
|
|
2118
2126
|
|
|
2119
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2127
|
+
Defined in: [libraries/epub/src/index.tsx:934](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L934)
|
|
2120
2128
|
|
|
2121
2129
|
Set the unique identifier id for the EPUB.
|
|
2122
2130
|
|
|
@@ -2143,7 +2151,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcidentifier
|
|
|
2143
2151
|
|
|
2144
2152
|
> **updateManifestItem**(`id`, `newItem`): `Promise`\<`void`\>
|
|
2145
2153
|
|
|
2146
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2154
|
+
Defined in: [libraries/epub/src/index.tsx:3059](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3059)
|
|
2147
2155
|
|
|
2148
2156
|
Update the manifest entry for an existing item.
|
|
2149
2157
|
|
|
@@ -2169,14 +2177,15 @@ https://www.w3.org/TR/epub-33/#sec-pkg-manifest
|
|
|
2169
2177
|
|
|
2170
2178
|
> **withPackage**(`producer`): `Promise`\<`void`\>
|
|
2171
2179
|
|
|
2172
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2180
|
+
Defined in: [libraries/epub/src/index.tsx:655](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L655)
|
|
2173
2181
|
|
|
2174
2182
|
Safely modify the package document, without race conditions.
|
|
2175
2183
|
|
|
2176
2184
|
Since the reading the package document is an async process,
|
|
2177
2185
|
multiple simultaneously dispatched function calls that all
|
|
2178
2186
|
attempt to modify it can clobber each other's changes. This
|
|
2179
|
-
method uses a
|
|
2187
|
+
method uses a read/write lock to ensure that each update runs
|
|
2188
|
+
exclusively.
|
|
2180
2189
|
|
|
2181
2190
|
##### Parameters
|
|
2182
2191
|
|
|
@@ -2194,7 +2203,7 @@ method uses a mutex to ensure that each update runs exclusively.
|
|
|
2194
2203
|
|
|
2195
2204
|
> **writeItemContents**(`id`, `contents`): `Promise`\<`void`\>
|
|
2196
2205
|
|
|
2197
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2206
|
+
Defined in: [libraries/epub/src/index.tsx:2874](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2874)
|
|
2198
2207
|
|
|
2199
2208
|
Write new contents for an existing manifest item,
|
|
2200
2209
|
specified by its id.
|
|
@@ -2221,7 +2230,7 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
|
|
|
2221
2230
|
|
|
2222
2231
|
> **writeItemContents**(`id`, `contents`, `encoding`): `Promise`\<`void`\>
|
|
2223
2232
|
|
|
2224
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2233
|
+
Defined in: [libraries/epub/src/index.tsx:2875](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2875)
|
|
2225
2234
|
|
|
2226
2235
|
Write new contents for an existing manifest item,
|
|
2227
2236
|
specified by its id.
|
|
@@ -2249,7 +2258,7 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
|
|
|
2249
2258
|
|
|
2250
2259
|
> **writeXhtmlItemContents**(`id`, `contents`): `Promise`\<`void`\>
|
|
2251
2260
|
|
|
2252
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2261
|
+
Defined in: [libraries/epub/src/index.tsx:2914](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2914)
|
|
2253
2262
|
|
|
2254
2263
|
Write new contents for an existing XHTML item,
|
|
2255
2264
|
specified by its id.
|
|
@@ -2276,7 +2285,7 @@ https://www.w3.org/TR/epub-33/#sec-xhtml
|
|
|
2276
2285
|
|
|
2277
2286
|
> `static` **assertEpub3**(`epub`): `Promise`\<`void`\>
|
|
2278
2287
|
|
|
2279
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2288
|
+
Defined in: [libraries/epub/src/index.tsx:502](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L502)
|
|
2280
2289
|
|
|
2281
2290
|
##### Parameters
|
|
2282
2291
|
|
|
@@ -2292,7 +2301,7 @@ Defined in: [libraries/epub/src/index.tsx:479](https://gitlab.com/storyteller-pl
|
|
|
2292
2301
|
|
|
2293
2302
|
> `static` **create**(`path`, `dublinCore`, `additionalMetadata`): `Promise`\<[`Epub`](#epub)\>
|
|
2294
2303
|
|
|
2295
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2304
|
+
Defined in: [libraries/epub/src/index.tsx:450](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L450)
|
|
2296
2305
|
|
|
2297
2306
|
Construct a new EPUB on a writable backend, optionally seeded
|
|
2298
2307
|
with the provided metadata. Equivalent to
|
|
@@ -2314,7 +2323,7 @@ with the provided metadata. Equivalent to
|
|
|
2314
2323
|
|
|
2315
2324
|
> `static` **formatSmilDuration**(`duration`): `string`
|
|
2316
2325
|
|
|
2317
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2326
|
+
Defined in: [libraries/epub/src/index.tsx:381](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L381)
|
|
2318
2327
|
|
|
2319
2328
|
Format a duration, provided as a number of seconds, as
|
|
2320
2329
|
a SMIL clock value, to be used for Media Overlays.
|
|
@@ -2339,7 +2348,7 @@ https://www.w3.org/TR/epub-33/#sec-duration
|
|
|
2339
2348
|
|
|
2340
2349
|
> `static` **from**(`pathOrData`): `Promise`\<[`Epub`](#epub)\>
|
|
2341
2350
|
|
|
2342
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2351
|
+
Defined in: [libraries/epub/src/index.tsx:486](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L486)
|
|
2343
2352
|
|
|
2344
2353
|
Open an existing EPUB publication, extracting it to a temp directory
|
|
2345
2354
|
so writes can mutate the unpacked tree and rezip with `saveAndClose`.
|
|
@@ -2367,7 +2376,7 @@ when the archive is not a valid EPUB 3
|
|
|
2367
2376
|
|
|
2368
2377
|
> `static` **from**(`pathOrData`, `options`): `Promise`\<[`EpubReader`](#epubreader)\>
|
|
2369
2378
|
|
|
2370
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2379
|
+
Defined in: [libraries/epub/src/index.tsx:487](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L487)
|
|
2371
2380
|
|
|
2372
2381
|
Open an existing EPUB publication, extracting it to a temp directory
|
|
2373
2382
|
so writes can mutate the unpacked tree and rezip with `saveAndClose`.
|
|
@@ -2396,7 +2405,7 @@ when the archive is not a valid EPUB 3
|
|
|
2396
2405
|
|
|
2397
2406
|
> `static` **from**(`pathOrData`, `options?`): `Promise`\<[`Epub`](#epub) \| [`EpubReader`](#epubreader)\>
|
|
2398
2407
|
|
|
2399
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2408
|
+
Defined in: [libraries/epub/src/index.tsx:491](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L491)
|
|
2400
2409
|
|
|
2401
2410
|
Open an existing EPUB publication, extracting it to a temp directory
|
|
2402
2411
|
so writes can mutate the unpacked tree and rezip with `saveAndClose`.
|
|
@@ -2425,7 +2434,7 @@ when the archive is not a valid EPUB 3
|
|
|
2425
2434
|
|
|
2426
2435
|
> `static` **upgrade**(`path`, `options`): `Promise`\<[`Epub`](#epub)\>
|
|
2427
2436
|
|
|
2428
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2437
|
+
Defined in: [libraries/epub/src/index.tsx:3366](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3366)
|
|
2429
2438
|
|
|
2430
2439
|
Upgrade an EPUB 2 publication to EPUB 3 in place, returning a new,
|
|
2431
2440
|
valid Epub 3 instance. Equivalent to
|
|
@@ -2446,7 +2455,7 @@ valid Epub 3 instance. Equivalent to
|
|
|
2446
2455
|
|
|
2447
2456
|
> `static` **using**\<`A`\>(`adapterClass`): [`EpubFactory`](#epubfactory)\<`A`\>
|
|
2448
2457
|
|
|
2449
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2458
|
+
Defined in: [libraries/epub/src/index.tsx:470](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L470)
|
|
2450
2459
|
|
|
2451
2460
|
Specify the storage backend to use for the EPUB
|
|
2452
2461
|
|
|
@@ -2480,7 +2489,7 @@ using reader = await Epub.using(MemoryAdapter).from(buffer, { cache: false });
|
|
|
2480
2489
|
|
|
2481
2490
|
## EpubFactory\<A\>
|
|
2482
2491
|
|
|
2483
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2492
|
+
Defined in: [libraries/epub/src/index.tsx:3395](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3395)
|
|
2484
2493
|
|
|
2485
2494
|
Adapter-bound factory returned by [Epub.using](#using).
|
|
2486
2495
|
|
|
@@ -2501,7 +2510,7 @@ gracefully when the adapter doesn't support the operation: `create` and
|
|
|
2501
2510
|
|
|
2502
2511
|
> **new EpubFactory**\<`A`\>(`adapterClass`): [`EpubFactory`](#epubfactory)\<`A`\>
|
|
2503
2512
|
|
|
2504
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2513
|
+
Defined in: [libraries/epub/src/index.tsx:3396](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3396)
|
|
2505
2514
|
|
|
2506
2515
|
##### Parameters
|
|
2507
2516
|
|
|
@@ -2519,7 +2528,7 @@ Defined in: [libraries/epub/src/index.tsx:3337](https://gitlab.com/storyteller-p
|
|
|
2519
2528
|
|
|
2520
2529
|
> `readonly` **adapterClass**: `A`
|
|
2521
2530
|
|
|
2522
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2531
|
+
Defined in: [libraries/epub/src/index.tsx:3396](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3396)
|
|
2523
2532
|
|
|
2524
2533
|
### Methods
|
|
2525
2534
|
|
|
@@ -2527,7 +2536,7 @@ Defined in: [libraries/epub/src/index.tsx:3337](https://gitlab.com/storyteller-p
|
|
|
2527
2536
|
|
|
2528
2537
|
> **create**(`path`, `__namedParameters`, `additionalMetadata`): `Promise`\<[`EpubInstanceFor`](#epubinstancefor)\<`A`\>\>
|
|
2529
2538
|
|
|
2530
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2539
|
+
Defined in: [libraries/epub/src/index.tsx:3476](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3476)
|
|
2531
2540
|
|
|
2532
2541
|
Construct a new EPUB on this factory's adapter, optionally seeded
|
|
2533
2542
|
with the provided metadata. Requires a writable adapter that
|
|
@@ -2555,7 +2564,7 @@ when the adapter is read-only or does not implement initEmpty
|
|
|
2555
2564
|
|
|
2556
2565
|
> **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`\>
|
|
2557
2566
|
|
|
2558
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2567
|
+
Defined in: [libraries/epub/src/index.tsx:3403](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3403)
|
|
2559
2568
|
|
|
2560
2569
|
Open an existing EPUB through this factory's adapter
|
|
2561
2570
|
|
|
@@ -2578,7 +2587,7 @@ when the archive is not a valid EPUB 3
|
|
|
2578
2587
|
|
|
2579
2588
|
> **from**(`source`, `options?`): `Promise`\<[`EpubInstanceFor`](#epubinstancefor)\<`A`\> & `object`\>
|
|
2580
2589
|
|
|
2581
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2590
|
+
Defined in: [libraries/epub/src/index.tsx:3407](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3407)
|
|
2582
2591
|
|
|
2583
2592
|
Open an existing EPUB through this factory's adapter
|
|
2584
2593
|
|
|
@@ -2601,7 +2610,7 @@ when the archive is not a valid EPUB 3
|
|
|
2601
2610
|
|
|
2602
2611
|
> **readPackageDocumentSource**(`source`, `options`): `Promise`\<`string`\>
|
|
2603
2612
|
|
|
2604
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2613
|
+
Defined in: [libraries/epub/src/index.tsx:3450](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3450)
|
|
2605
2614
|
|
|
2606
2615
|
##### Parameters
|
|
2607
2616
|
|
|
@@ -2618,7 +2627,7 @@ Defined in: [libraries/epub/src/index.tsx:3391](https://gitlab.com/storyteller-p
|
|
|
2618
2627
|
|
|
2619
2628
|
> **upgrade**(`path`, `options`): `Promise`\<[`EpubInstanceFor`](#epubinstancefor)\<`A`\>\>
|
|
2620
2629
|
|
|
2621
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2630
|
+
Defined in: [libraries/epub/src/index.tsx:3603](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3603)
|
|
2622
2631
|
|
|
2623
2632
|
Upgrade an EPUB 2 publication to EPUB 3 in place using this
|
|
2624
2633
|
factory's adapter, returning a new, valid Epub 3 instance.
|
|
@@ -2656,7 +2665,7 @@ when the adapter is read-only
|
|
|
2656
2665
|
|
|
2657
2666
|
## EpubReadOnlyError
|
|
2658
2667
|
|
|
2659
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2668
|
+
Defined in: [libraries/epub/src/index.tsx:255](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L255)
|
|
2660
2669
|
|
|
2661
2670
|
### Extends
|
|
2662
2671
|
|
|
@@ -2885,7 +2894,7 @@ https://v8.dev/docs/stack-trace-api#customizing-stack-traces
|
|
|
2885
2894
|
|
|
2886
2895
|
## EpubVersionError
|
|
2887
2896
|
|
|
2888
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
2897
|
+
Defined in: [libraries/epub/src/index.tsx:254](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L254)
|
|
2889
2898
|
|
|
2890
2899
|
### Extends
|
|
2891
2900
|
|
|
@@ -3560,7 +3569,7 @@ Defined in: [libraries/epub/src/adapters/tmpfs.ts:79](https://gitlab.com/storyte
|
|
|
3560
3569
|
|
|
3561
3570
|
## AlternateScript
|
|
3562
3571
|
|
|
3563
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
3572
|
+
Defined in: [libraries/epub/src/index.tsx:171](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L171)
|
|
3564
3573
|
|
|
3565
3574
|
### Properties
|
|
3566
3575
|
|
|
@@ -3568,13 +3577,13 @@ Defined in: [libraries/epub/src/index.tsx:159](https://gitlab.com/storyteller-pl
|
|
|
3568
3577
|
|
|
3569
3578
|
> **locale**: `Locale`
|
|
3570
3579
|
|
|
3571
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
3580
|
+
Defined in: [libraries/epub/src/index.tsx:173](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L173)
|
|
3572
3581
|
|
|
3573
3582
|
#### name
|
|
3574
3583
|
|
|
3575
3584
|
> **name**: `string`
|
|
3576
3585
|
|
|
3577
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
3586
|
+
Defined in: [libraries/epub/src/index.tsx:172](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L172)
|
|
3578
3587
|
|
|
3579
3588
|
---
|
|
3580
3589
|
|
|
@@ -4501,7 +4510,7 @@ Defined in: node_modules/@xmldom/xmldom/index.d.ts:588
|
|
|
4501
4510
|
|
|
4502
4511
|
## Collection
|
|
4503
4512
|
|
|
4504
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
4513
|
+
Defined in: [libraries/epub/src/index.tsx:195](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L195)
|
|
4505
4514
|
|
|
4506
4515
|
### Properties
|
|
4507
4516
|
|
|
@@ -4509,25 +4518,25 @@ Defined in: [libraries/epub/src/index.tsx:183](https://gitlab.com/storyteller-pl
|
|
|
4509
4518
|
|
|
4510
4519
|
> **name**: `string`
|
|
4511
4520
|
|
|
4512
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
4521
|
+
Defined in: [libraries/epub/src/index.tsx:196](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L196)
|
|
4513
4522
|
|
|
4514
4523
|
#### position?
|
|
4515
4524
|
|
|
4516
4525
|
> `optional` **position**: `string`
|
|
4517
4526
|
|
|
4518
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
4527
|
+
Defined in: [libraries/epub/src/index.tsx:198](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L198)
|
|
4519
4528
|
|
|
4520
4529
|
#### type?
|
|
4521
4530
|
|
|
4522
4531
|
> `optional` **type**: `string`
|
|
4523
4532
|
|
|
4524
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
4533
|
+
Defined in: [libraries/epub/src/index.tsx:197](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L197)
|
|
4525
4534
|
|
|
4526
4535
|
---
|
|
4527
4536
|
|
|
4528
4537
|
## DcCreator
|
|
4529
4538
|
|
|
4530
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
4539
|
+
Defined in: [libraries/epub/src/index.tsx:176](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L176)
|
|
4531
4540
|
|
|
4532
4541
|
### Properties
|
|
4533
4542
|
|
|
@@ -4535,37 +4544,37 @@ Defined in: [libraries/epub/src/index.tsx:164](https://gitlab.com/storyteller-pl
|
|
|
4535
4544
|
|
|
4536
4545
|
> `optional` **alternateScripts**: [`AlternateScript`](#alternatescript)[]
|
|
4537
4546
|
|
|
4538
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
4547
|
+
Defined in: [libraries/epub/src/index.tsx:181](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L181)
|
|
4539
4548
|
|
|
4540
4549
|
#### fileAs?
|
|
4541
4550
|
|
|
4542
4551
|
> `optional` **fileAs**: `string`
|
|
4543
4552
|
|
|
4544
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
4553
|
+
Defined in: [libraries/epub/src/index.tsx:180](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L180)
|
|
4545
4554
|
|
|
4546
4555
|
#### name
|
|
4547
4556
|
|
|
4548
4557
|
> **name**: `string`
|
|
4549
4558
|
|
|
4550
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
4559
|
+
Defined in: [libraries/epub/src/index.tsx:177](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L177)
|
|
4551
4560
|
|
|
4552
4561
|
#### role?
|
|
4553
4562
|
|
|
4554
4563
|
> `optional` **role**: `string`
|
|
4555
4564
|
|
|
4556
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
4565
|
+
Defined in: [libraries/epub/src/index.tsx:178](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L178)
|
|
4557
4566
|
|
|
4558
4567
|
#### roleScheme?
|
|
4559
4568
|
|
|
4560
4569
|
> `optional` **roleScheme**: `string`
|
|
4561
4570
|
|
|
4562
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
4571
|
+
Defined in: [libraries/epub/src/index.tsx:179](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L179)
|
|
4563
4572
|
|
|
4564
4573
|
---
|
|
4565
4574
|
|
|
4566
4575
|
## DcSubject
|
|
4567
4576
|
|
|
4568
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
4577
|
+
Defined in: [libraries/epub/src/index.tsx:138](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L138)
|
|
4569
4578
|
|
|
4570
4579
|
### Properties
|
|
4571
4580
|
|
|
@@ -4573,19 +4582,19 @@ Defined in: [libraries/epub/src/index.tsx:126](https://gitlab.com/storyteller-pl
|
|
|
4573
4582
|
|
|
4574
4583
|
> **authority**: `string`
|
|
4575
4584
|
|
|
4576
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
4585
|
+
Defined in: [libraries/epub/src/index.tsx:140](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L140)
|
|
4577
4586
|
|
|
4578
4587
|
#### term
|
|
4579
4588
|
|
|
4580
4589
|
> **term**: `string`
|
|
4581
4590
|
|
|
4582
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
4591
|
+
Defined in: [libraries/epub/src/index.tsx:141](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L141)
|
|
4583
4592
|
|
|
4584
4593
|
#### value
|
|
4585
4594
|
|
|
4586
4595
|
> **value**: `string`
|
|
4587
4596
|
|
|
4588
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
4597
|
+
Defined in: [libraries/epub/src/index.tsx:139](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L139)
|
|
4589
4598
|
|
|
4590
4599
|
---
|
|
4591
4600
|
|
|
@@ -6881,7 +6890,7 @@ Defined in: node_modules/@xmldom/xmldom/index.d.ts:588
|
|
|
6881
6890
|
|
|
6882
6891
|
## DublinCore
|
|
6883
6892
|
|
|
6884
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
6893
|
+
Defined in: [libraries/epub/src/index.tsx:184](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L184)
|
|
6885
6894
|
|
|
6886
6895
|
### Properties
|
|
6887
6896
|
|
|
@@ -6889,49 +6898,49 @@ Defined in: [libraries/epub/src/index.tsx:172](https://gitlab.com/storyteller-pl
|
|
|
6889
6898
|
|
|
6890
6899
|
> `optional` **contributors**: [`DcCreator`](#dccreator)[]
|
|
6891
6900
|
|
|
6892
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
6901
|
+
Defined in: [libraries/epub/src/index.tsx:191](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L191)
|
|
6893
6902
|
|
|
6894
6903
|
#### creators?
|
|
6895
6904
|
|
|
6896
6905
|
> `optional` **creators**: [`DcCreator`](#dccreator)[]
|
|
6897
6906
|
|
|
6898
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
6907
|
+
Defined in: [libraries/epub/src/index.tsx:190](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L190)
|
|
6899
6908
|
|
|
6900
6909
|
#### date?
|
|
6901
6910
|
|
|
6902
6911
|
> `optional` **date**: `Date`
|
|
6903
6912
|
|
|
6904
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
6913
|
+
Defined in: [libraries/epub/src/index.tsx:188](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L188)
|
|
6905
6914
|
|
|
6906
6915
|
#### identifier
|
|
6907
6916
|
|
|
6908
6917
|
> **identifier**: `string`
|
|
6909
6918
|
|
|
6910
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
6919
|
+
Defined in: [libraries/epub/src/index.tsx:187](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L187)
|
|
6911
6920
|
|
|
6912
6921
|
#### language
|
|
6913
6922
|
|
|
6914
6923
|
> **language**: `Locale`
|
|
6915
6924
|
|
|
6916
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
6925
|
+
Defined in: [libraries/epub/src/index.tsx:186](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L186)
|
|
6917
6926
|
|
|
6918
6927
|
#### subjects?
|
|
6919
6928
|
|
|
6920
6929
|
> `optional` **subjects**: (`string` \| [`DcSubject`](#dcsubject))[]
|
|
6921
6930
|
|
|
6922
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
6931
|
+
Defined in: [libraries/epub/src/index.tsx:189](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L189)
|
|
6923
6932
|
|
|
6924
6933
|
#### title
|
|
6925
6934
|
|
|
6926
6935
|
> **title**: `string`
|
|
6927
6936
|
|
|
6928
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
6937
|
+
Defined in: [libraries/epub/src/index.tsx:185](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L185)
|
|
6929
6938
|
|
|
6930
6939
|
#### type?
|
|
6931
6940
|
|
|
6932
6941
|
> `optional` **type**: `string`
|
|
6933
6942
|
|
|
6934
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
6943
|
+
Defined in: [libraries/epub/src/index.tsx:192](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L192)
|
|
6935
6944
|
|
|
6936
6945
|
---
|
|
6937
6946
|
|
|
@@ -8274,7 +8283,7 @@ Whether to remove the NCX file, as it's technically optional in EPUB 3.
|
|
|
8274
8283
|
|
|
8275
8284
|
## EpubIdentifier
|
|
8276
8285
|
|
|
8277
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
8286
|
+
Defined in: [libraries/epub/src/index.tsx:144](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L144)
|
|
8278
8287
|
|
|
8279
8288
|
### Properties
|
|
8280
8289
|
|
|
@@ -8282,13 +8291,13 @@ Defined in: [libraries/epub/src/index.tsx:132](https://gitlab.com/storyteller-pl
|
|
|
8282
8291
|
|
|
8283
8292
|
> `optional` **id**: `string`
|
|
8284
8293
|
|
|
8285
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
8294
|
+
Defined in: [libraries/epub/src/index.tsx:146](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L146)
|
|
8286
8295
|
|
|
8287
8296
|
#### identifierType?
|
|
8288
8297
|
|
|
8289
8298
|
> `optional` **identifierType**: `string`
|
|
8290
8299
|
|
|
8291
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
8300
|
+
Defined in: [libraries/epub/src/index.tsx:148](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L148)
|
|
8292
8301
|
|
|
8293
8302
|
the value of a refining `identifier-type` meta, if present
|
|
8294
8303
|
|
|
@@ -8296,7 +8305,7 @@ the value of a refining `identifier-type` meta, if present
|
|
|
8296
8305
|
|
|
8297
8306
|
> `optional` **scheme**: `string`
|
|
8298
8307
|
|
|
8299
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
8308
|
+
Defined in: [libraries/epub/src/index.tsx:150](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L150)
|
|
8300
8309
|
|
|
8301
8310
|
the `scheme` of a refining `identifier-type` meta, or a legacy `opf:scheme` attribute
|
|
8302
8311
|
|
|
@@ -8304,7 +8313,7 @@ the `scheme` of a refining `identifier-type` meta, or a legacy `opf:scheme` attr
|
|
|
8304
8313
|
|
|
8305
8314
|
> **value**: `string`
|
|
8306
8315
|
|
|
8307
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
8316
|
+
Defined in: [libraries/epub/src/index.tsx:145](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L145)
|
|
8308
8317
|
|
|
8309
8318
|
---
|
|
8310
8319
|
|
|
@@ -8334,7 +8343,7 @@ the entry name, as it appears in the archive
|
|
|
8334
8343
|
|
|
8335
8344
|
## EpubSource
|
|
8336
8345
|
|
|
8337
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
8346
|
+
Defined in: [libraries/epub/src/index.tsx:153](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L153)
|
|
8338
8347
|
|
|
8339
8348
|
### Properties
|
|
8340
8349
|
|
|
@@ -8342,13 +8351,13 @@ Defined in: [libraries/epub/src/index.tsx:141](https://gitlab.com/storyteller-pl
|
|
|
8342
8351
|
|
|
8343
8352
|
> `optional` **id**: `string`
|
|
8344
8353
|
|
|
8345
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
8354
|
+
Defined in: [libraries/epub/src/index.tsx:155](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L155)
|
|
8346
8355
|
|
|
8347
8356
|
#### identifierType?
|
|
8348
8357
|
|
|
8349
8358
|
> `optional` **identifierType**: `string`
|
|
8350
8359
|
|
|
8351
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
8360
|
+
Defined in: [libraries/epub/src/index.tsx:157](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L157)
|
|
8352
8361
|
|
|
8353
8362
|
the value of a refining `identifier-type` meta, if present
|
|
8354
8363
|
|
|
@@ -8356,7 +8365,7 @@ the value of a refining `identifier-type` meta, if present
|
|
|
8356
8365
|
|
|
8357
8366
|
> `optional` **isPageBreakSource**: `boolean`
|
|
8358
8367
|
|
|
8359
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
8368
|
+
Defined in: [libraries/epub/src/index.tsx:168](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L168)
|
|
8360
8369
|
|
|
8361
8370
|
whether this source has a `source-of="pagination"` refinement
|
|
8362
8371
|
or of a `<meta property="pageBreakSource">` element
|
|
@@ -8369,7 +8378,7 @@ be sure to get the source of pagination, use [Epub.getPageBreakSource](#getpageb
|
|
|
8369
8378
|
|
|
8370
8379
|
> `optional` **scheme**: `string`
|
|
8371
8380
|
|
|
8372
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
8381
|
+
Defined in: [libraries/epub/src/index.tsx:159](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L159)
|
|
8373
8382
|
|
|
8374
8383
|
the `scheme` of a refining `identifier-type` meta, or a legacy `opf:scheme` attribute
|
|
8375
8384
|
|
|
@@ -8377,7 +8386,7 @@ the `scheme` of a refining `identifier-type` meta, or a legacy `opf:scheme` attr
|
|
|
8377
8386
|
|
|
8378
8387
|
> **value**: `string`
|
|
8379
8388
|
|
|
8380
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
8389
|
+
Defined in: [libraries/epub/src/index.tsx:154](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L154)
|
|
8381
8390
|
|
|
8382
8391
|
---
|
|
8383
8392
|
|
|
@@ -8669,7 +8678,7 @@ when false, the Epub class refuses every mutation method at runtime
|
|
|
8669
8678
|
|
|
8670
8679
|
## FromOptions
|
|
8671
8680
|
|
|
8672
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
8681
|
+
Defined in: [libraries/epub/src/index.tsx:222](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L222)
|
|
8673
8682
|
|
|
8674
8683
|
### Properties
|
|
8675
8684
|
|
|
@@ -8677,7 +8686,7 @@ Defined in: [libraries/epub/src/index.tsx:210](https://gitlab.com/storyteller-pl
|
|
|
8677
8686
|
|
|
8678
8687
|
> `optional` **readonly**: `boolean`
|
|
8679
8688
|
|
|
8680
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
8689
|
+
Defined in: [libraries/epub/src/index.tsx:227](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L227)
|
|
8681
8690
|
|
|
8682
8691
|
when true, mutation methods throw [EpubReadOnlyError](#epubreadonlyerror) at runtime
|
|
8683
8692
|
|
|
@@ -8691,7 +8700,7 @@ false;
|
|
|
8691
8700
|
|
|
8692
8701
|
## GuideItem
|
|
8693
8702
|
|
|
8694
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
8703
|
+
Defined in: [libraries/epub/src/index.tsx:216](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L216)
|
|
8695
8704
|
|
|
8696
8705
|
### Properties
|
|
8697
8706
|
|
|
@@ -8699,19 +8708,19 @@ Defined in: [libraries/epub/src/index.tsx:204](https://gitlab.com/storyteller-pl
|
|
|
8699
8708
|
|
|
8700
8709
|
> **href**: `string`
|
|
8701
8710
|
|
|
8702
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
8711
|
+
Defined in: [libraries/epub/src/index.tsx:217](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L217)
|
|
8703
8712
|
|
|
8704
8713
|
#### title
|
|
8705
8714
|
|
|
8706
8715
|
> **title**: `string`
|
|
8707
8716
|
|
|
8708
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
8717
|
+
Defined in: [libraries/epub/src/index.tsx:218](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L218)
|
|
8709
8718
|
|
|
8710
8719
|
#### type
|
|
8711
8720
|
|
|
8712
8721
|
> **type**: `string`
|
|
8713
8722
|
|
|
8714
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
8723
|
+
Defined in: [libraries/epub/src/index.tsx:219](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L219)
|
|
8715
8724
|
|
|
8716
8725
|
---
|
|
8717
8726
|
|
|
@@ -8773,7 +8782,7 @@ Defined in: [libraries/epub/src/adapters/memory.ts:21](https://gitlab.com/storyt
|
|
|
8773
8782
|
|
|
8774
8783
|
## Navigation
|
|
8775
8784
|
|
|
8776
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
8785
|
+
Defined in: [libraries/epub/src/index.tsx:210](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L210)
|
|
8777
8786
|
|
|
8778
8787
|
### Properties
|
|
8779
8788
|
|
|
@@ -8781,25 +8790,25 @@ Defined in: [libraries/epub/src/index.tsx:198](https://gitlab.com/storyteller-pl
|
|
|
8781
8790
|
|
|
8782
8791
|
> **children**: [`NavigationList`](#navigationlist)
|
|
8783
8792
|
|
|
8784
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
8793
|
+
Defined in: [libraries/epub/src/index.tsx:213](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L213)
|
|
8785
8794
|
|
|
8786
8795
|
#### role
|
|
8787
8796
|
|
|
8788
8797
|
> **role**: `string`
|
|
8789
8798
|
|
|
8790
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
8799
|
+
Defined in: [libraries/epub/src/index.tsx:212](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L212)
|
|
8791
8800
|
|
|
8792
8801
|
#### title?
|
|
8793
8802
|
|
|
8794
8803
|
> `optional` **title**: `string`
|
|
8795
8804
|
|
|
8796
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
8805
|
+
Defined in: [libraries/epub/src/index.tsx:211](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L211)
|
|
8797
8806
|
|
|
8798
8807
|
---
|
|
8799
8808
|
|
|
8800
8809
|
## NavigationItem
|
|
8801
8810
|
|
|
8802
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
8811
|
+
Defined in: [libraries/epub/src/index.tsx:201](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L201)
|
|
8803
8812
|
|
|
8804
8813
|
### Properties
|
|
8805
8814
|
|
|
@@ -8807,25 +8816,25 @@ Defined in: [libraries/epub/src/index.tsx:189](https://gitlab.com/storyteller-pl
|
|
|
8807
8816
|
|
|
8808
8817
|
> `optional` **children**: [`NavigationList`](#navigationlist)
|
|
8809
8818
|
|
|
8810
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
8819
|
+
Defined in: [libraries/epub/src/index.tsx:205](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L205)
|
|
8811
8820
|
|
|
8812
8821
|
#### href?
|
|
8813
8822
|
|
|
8814
8823
|
> `optional` **href**: `string`
|
|
8815
8824
|
|
|
8816
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
8825
|
+
Defined in: [libraries/epub/src/index.tsx:203](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L203)
|
|
8817
8826
|
|
|
8818
8827
|
#### role?
|
|
8819
8828
|
|
|
8820
8829
|
> `optional` **role**: `string`
|
|
8821
8830
|
|
|
8822
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
8831
|
+
Defined in: [libraries/epub/src/index.tsx:204](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L204)
|
|
8823
8832
|
|
|
8824
8833
|
#### title
|
|
8825
8834
|
|
|
8826
8835
|
> **title**: `string`
|
|
8827
8836
|
|
|
8828
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
8837
|
+
Defined in: [libraries/epub/src/index.tsx:202](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L202)
|
|
8829
8838
|
|
|
8830
8839
|
---
|
|
8831
8840
|
|
|
@@ -10636,7 +10645,7 @@ Element.
|
|
|
10636
10645
|
|
|
10637
10646
|
> **EpubInstanceFor**\<`A`\> = `A`\[`"capabilities"`\]\[`"writable"`\] _extends_ `true` ? [`Epub`](#epub) : [`EpubReader`](#epubreader)
|
|
10638
10647
|
|
|
10639
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
10648
|
+
Defined in: [libraries/epub/src/index.tsx:3384](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3384)
|
|
10640
10649
|
|
|
10641
10650
|
Resolves to [Epub](#epub) for writable adapters, [EpubReader](#epubreader) for read-only ones.
|
|
10642
10651
|
|
|
@@ -10655,7 +10664,7 @@ The conditional pivots on `capabilities.writable`, which must be a literal
|
|
|
10655
10664
|
|
|
10656
10665
|
> **EpubMetadata** = [`MetadataEntry`](#metadataentry)[]
|
|
10657
10666
|
|
|
10658
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
10667
|
+
Defined in: [libraries/epub/src/index.tsx:136](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L136)
|
|
10659
10668
|
|
|
10660
10669
|
---
|
|
10661
10670
|
|
|
@@ -10663,7 +10672,7 @@ Defined in: [libraries/epub/src/index.tsx:124](https://gitlab.com/storyteller-pl
|
|
|
10663
10672
|
|
|
10664
10673
|
> **EpubReader** = `Pick`\<[`Epub`](#epub), `"storage"` \| `"findMetadataItem"` \| `"findAllMetadataItems"` \| `"resolveHref"` \| `"readFileContents"` \| `"readItemContents"` \| `"readXhtmlItemContents"` \| `"discardAndClose"` \| `Extract`\<keyof [`Epub`](#epub), `` `get${string}` ``\>\> & `Disposable`
|
|
10665
10674
|
|
|
10666
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
10675
|
+
Defined in: [libraries/epub/src/index.tsx:234](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L234)
|
|
10667
10676
|
|
|
10668
10677
|
Read-only view of an EPUB
|
|
10669
10678
|
Returned by Epub.using(MemoryAdapter).from(...) and by Epub.from(path, { readonly: true })
|
|
@@ -10691,7 +10700,7 @@ Built-in adapters:
|
|
|
10691
10700
|
|
|
10692
10701
|
> **InMemoryEpubReader** = [`EpubReader`](#epubreader) & `object`
|
|
10693
10702
|
|
|
10694
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
10703
|
+
Defined in: [libraries/epub/src/index.tsx:252](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L252)
|
|
10695
10704
|
|
|
10696
10705
|
Readonly Epub-instance backed by an in-memory zip handle
|
|
10697
10706
|
Returned by `Epub.using(MemoryAdapter).from(...)`
|
|
@@ -10708,18 +10717,10 @@ Returned by `Epub.using(MemoryAdapter).from(...)`
|
|
|
10708
10717
|
|
|
10709
10718
|
> **ManifestItem** = `object`
|
|
10710
10719
|
|
|
10711
|
-
Defined in: [libraries/epub/src/index.tsx:
|
|
10720
|
+
Defined in: [libraries/epub/src/index.tsx:119](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L119)
|
|
10712
10721
|
|
|
10713
10722
|
### Properties
|
|
10714
10723
|
|
|
10715
10724
|
#### fallback?
|
|
10716
10725
|
|
|
10717
|
-
> `optional` **fallback
|
|
10718
|
-
|
|
10719
|
-
Defined in: [libraries/epub/src/index.tsx:112](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L112)
|
|
10720
|
-
|
|
10721
|
-
#### href
|
|
10722
|
-
|
|
10723
|
-
> **href**: `string`
|
|
10724
|
-
|
|
10725
|
-
Defined in: [libraries/epub/src/index.tsx:109](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/li
|
|
10726
|
+
> `optional` **fallback*
|