@storyteller-platform/epub 0.4.9 → 0.5.0
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 +753 -136
- package/dist/chunk-BIEQXUOY.js +50 -0
- package/dist/index.cjs +421 -27
- package/dist/index.d.cts +2 -744
- package/dist/index.d.ts +2 -744
- package/dist/index.js +423 -71
- package/dist/upgrade.cjs +555 -0
- package/dist/upgrade.d.cts +909 -0
- package/dist/upgrade.d.ts +909 -0
- package/dist/upgrade.js +515 -0
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -220,7 +220,7 @@ To get started with developing in the Storyteller monorepo, check out the
|
|
|
220
220
|
## Epub
|
|
221
221
|
|
|
222
222
|
Defined in:
|
|
223
|
-
[epub/index.ts:
|
|
223
|
+
[epub/index.ts:229](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L229)
|
|
224
224
|
|
|
225
225
|
A single EPUB instance.
|
|
226
226
|
|
|
@@ -262,7 +262,7 @@ https://www.w3.org/TR/epub-33/
|
|
|
262
262
|
> `protected` **new Epub**(`extractPath`, `inputPath`): [`Epub`](#epub)
|
|
263
263
|
|
|
264
264
|
Defined in:
|
|
265
|
-
[epub/index.ts:
|
|
265
|
+
[epub/index.ts:480](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L480)
|
|
266
266
|
|
|
267
267
|
##### Parameters
|
|
268
268
|
|
|
@@ -282,42 +282,42 @@ Defined in:
|
|
|
282
282
|
> `protected` **extractPath**: `string`
|
|
283
283
|
|
|
284
284
|
Defined in:
|
|
285
|
-
[epub/index.ts:
|
|
285
|
+
[epub/index.ts:481](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L481)
|
|
286
286
|
|
|
287
287
|
#### inputPath
|
|
288
288
|
|
|
289
289
|
> `protected` **inputPath**: `undefined` \| `string`
|
|
290
290
|
|
|
291
291
|
Defined in:
|
|
292
|
-
[epub/index.ts:
|
|
292
|
+
[epub/index.ts:482](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L482)
|
|
293
293
|
|
|
294
294
|
#### xhtmlBuilder
|
|
295
295
|
|
|
296
296
|
> `static` **xhtmlBuilder**: `XMLBuilder`
|
|
297
297
|
|
|
298
298
|
Defined in:
|
|
299
|
-
[epub/index.ts:
|
|
299
|
+
[epub/index.ts:277](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L277)
|
|
300
300
|
|
|
301
301
|
#### xhtmlParser
|
|
302
302
|
|
|
303
303
|
> `static` **xhtmlParser**: `XMLParser`
|
|
304
304
|
|
|
305
305
|
Defined in:
|
|
306
|
-
[epub/index.ts:
|
|
306
|
+
[epub/index.ts:237](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L237)
|
|
307
307
|
|
|
308
308
|
#### xmlBuilder
|
|
309
309
|
|
|
310
310
|
> `static` **xmlBuilder**: `XMLBuilder`
|
|
311
311
|
|
|
312
312
|
Defined in:
|
|
313
|
-
[epub/index.ts:
|
|
313
|
+
[epub/index.ts:270](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L270)
|
|
314
314
|
|
|
315
315
|
#### xmlParser
|
|
316
316
|
|
|
317
317
|
> `static` **xmlParser**: `XMLParser`
|
|
318
318
|
|
|
319
319
|
Defined in:
|
|
320
|
-
[epub/index.ts:
|
|
320
|
+
[epub/index.ts:230](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L230)
|
|
321
321
|
|
|
322
322
|
### Methods
|
|
323
323
|
|
|
@@ -326,7 +326,7 @@ Defined in:
|
|
|
326
326
|
> **\[dispose\]**(): `void`
|
|
327
327
|
|
|
328
328
|
Defined in:
|
|
329
|
-
[epub/index.ts:
|
|
329
|
+
[epub/index.ts:3098](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L3098)
|
|
330
330
|
|
|
331
331
|
##### Returns
|
|
332
332
|
|
|
@@ -337,7 +337,7 @@ Defined in:
|
|
|
337
337
|
> **addCollection**(`collection`, `index?`): `Promise`\<`void`\>
|
|
338
338
|
|
|
339
339
|
Defined in:
|
|
340
|
-
[epub/index.ts:
|
|
340
|
+
[epub/index.ts:1698](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1698)
|
|
341
341
|
|
|
342
342
|
Add a collection to the EPUB metadata.
|
|
343
343
|
|
|
@@ -360,7 +360,7 @@ collections. Otherwise, it will be added to the end of the list.
|
|
|
360
360
|
> **addContributor**(`contributor`, `index?`): `Promise`\<`void`\>
|
|
361
361
|
|
|
362
362
|
Defined in:
|
|
363
|
-
[epub/index.ts:
|
|
363
|
+
[epub/index.ts:2040](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2040)
|
|
364
364
|
|
|
365
365
|
Add a contributor to the EPUB metadata.
|
|
366
366
|
|
|
@@ -390,7 +390,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccreator
|
|
|
390
390
|
> **addCreator**(`creator`, `index?`, `type?`): `Promise`\<`void`\>
|
|
391
391
|
|
|
392
392
|
Defined in:
|
|
393
|
-
[epub/index.ts:
|
|
393
|
+
[epub/index.ts:1885](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1885)
|
|
394
394
|
|
|
395
395
|
Add a creator to the EPUB metadata.
|
|
396
396
|
|
|
@@ -420,7 +420,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccreator
|
|
|
420
420
|
> **addManifestItem**(`item`, `contents`, `encoding`): `Promise`\<`void`\>
|
|
421
421
|
|
|
422
422
|
Defined in:
|
|
423
|
-
[epub/index.ts:
|
|
423
|
+
[epub/index.ts:2570](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2570)
|
|
424
424
|
|
|
425
425
|
Create a new manifest item and write its contents to a new entry.
|
|
426
426
|
|
|
@@ -449,7 +449,7 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
|
|
|
449
449
|
> **addManifestItem**(`item`, `contents`, `encoding`): `Promise`\<`void`\>
|
|
450
450
|
|
|
451
451
|
Defined in:
|
|
452
|
-
[epub/index.ts:
|
|
452
|
+
[epub/index.ts:2575](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2575)
|
|
453
453
|
|
|
454
454
|
Create a new manifest item and write its contents to a new entry.
|
|
455
455
|
|
|
@@ -478,7 +478,7 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
|
|
|
478
478
|
> **addManifestItem**(`item`, `contents`): `Promise`\<`void`\>
|
|
479
479
|
|
|
480
480
|
Defined in:
|
|
481
|
-
[epub/index.ts:
|
|
481
|
+
[epub/index.ts:2580](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2580)
|
|
482
482
|
|
|
483
483
|
Create a new manifest item and write its contents to a new entry.
|
|
484
484
|
|
|
@@ -506,7 +506,7 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
|
|
|
506
506
|
> **addMetadata**(`entry`): `Promise`\<`void`\>
|
|
507
507
|
|
|
508
508
|
Defined in:
|
|
509
|
-
[epub/index.ts:
|
|
509
|
+
[epub/index.ts:2692](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2692)
|
|
510
510
|
|
|
511
511
|
Add a new metadata entry to the Epub.
|
|
512
512
|
|
|
@@ -533,7 +533,7 @@ https://www.w3.org/TR/epub-33/#sec-pkg-metadata
|
|
|
533
533
|
> **addSpineItem**(`manifestId`, `index?`): `Promise`\<`void`\>
|
|
534
534
|
|
|
535
535
|
Defined in:
|
|
536
|
-
[epub/index.ts:
|
|
536
|
+
[epub/index.ts:2094](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2094)
|
|
537
537
|
|
|
538
538
|
Add an item to the spine of the EPUB.
|
|
539
539
|
|
|
@@ -563,7 +563,7 @@ https://www.w3.org/TR/epub-33/#sec-spine-elem
|
|
|
563
563
|
> **addSubject**(`subject`): `Promise`\<`void`\>
|
|
564
564
|
|
|
565
565
|
Defined in:
|
|
566
|
-
[epub/index.ts:
|
|
566
|
+
[epub/index.ts:1227](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1227)
|
|
567
567
|
|
|
568
568
|
Add a subject to the EPUB metadata.
|
|
569
569
|
|
|
@@ -586,7 +586,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcsubject
|
|
|
586
586
|
> **copy**(`path?`): `Promise`\<[`Epub`](#epub)\>
|
|
587
587
|
|
|
588
588
|
Defined in:
|
|
589
|
-
[epub/index.ts:
|
|
589
|
+
[epub/index.ts:652](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L652)
|
|
590
590
|
|
|
591
591
|
##### Parameters
|
|
592
592
|
|
|
@@ -601,11 +601,11 @@ Defined in:
|
|
|
601
601
|
#### createXhtmlDocument()
|
|
602
602
|
|
|
603
603
|
> **createXhtmlDocument**(`body`, `head?`, `language?`):
|
|
604
|
-
> `Promise`\<([`XmlElement`](#xmlelement)\<`"
|
|
605
|
-
> [`XmlElement`](#xmlelement)\<`"
|
|
604
|
+
> `Promise`\<([`XmlElement`](#xmlelement)\<`"?xml"`\> \|
|
|
605
|
+
> [`XmlElement`](#xmlelement)\<`"html"`\>)[]\>
|
|
606
606
|
|
|
607
607
|
Defined in:
|
|
608
|
-
[epub/index.ts:
|
|
608
|
+
[epub/index.ts:2396](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2396)
|
|
609
609
|
|
|
610
610
|
Create a new XHTML document with the given body and head.
|
|
611
611
|
|
|
@@ -619,15 +619,15 @@ Create a new XHTML document with the given body and head.
|
|
|
619
619
|
|
|
620
620
|
##### Returns
|
|
621
621
|
|
|
622
|
-
`Promise`\<([`XmlElement`](#xmlelement)\<`"
|
|
623
|
-
[`XmlElement`](#xmlelement)\<`"
|
|
622
|
+
`Promise`\<([`XmlElement`](#xmlelement)\<`"?xml"`\> \|
|
|
623
|
+
[`XmlElement`](#xmlelement)\<`"html"`\>)[]\>
|
|
624
624
|
|
|
625
625
|
#### discardAndClose()
|
|
626
626
|
|
|
627
627
|
> **discardAndClose**(): `void`
|
|
628
628
|
|
|
629
629
|
Defined in:
|
|
630
|
-
[epub/index.ts:
|
|
630
|
+
[epub/index.ts:2935](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2935)
|
|
631
631
|
|
|
632
632
|
##### Returns
|
|
633
633
|
|
|
@@ -638,7 +638,7 @@ Defined in:
|
|
|
638
638
|
> **findAllMetadataItems**(`predicate`): `Promise`\<`object`[]\>
|
|
639
639
|
|
|
640
640
|
Defined in:
|
|
641
|
-
[epub/index.ts:
|
|
641
|
+
[epub/index.ts:897](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L897)
|
|
642
642
|
|
|
643
643
|
Returns the item in the metadata element's children array that matches the
|
|
644
644
|
provided predicate.
|
|
@@ -678,7 +678,7 @@ provided predicate.
|
|
|
678
678
|
> \}\>
|
|
679
679
|
|
|
680
680
|
Defined in:
|
|
681
|
-
[epub/index.ts:
|
|
681
|
+
[epub/index.ts:888](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L888)
|
|
682
682
|
|
|
683
683
|
Returns the item in the metadata element's children array that matches the
|
|
684
684
|
provided predicate.
|
|
@@ -712,12 +712,31 @@ provided predicate.
|
|
|
712
712
|
`` `Y${string}` `` \| `` `Z${string}` `` \| `` `?${string}` ``; `value`:
|
|
713
713
|
`undefined` \| `string`; \}\>
|
|
714
714
|
|
|
715
|
+
#### getBaseDirection()
|
|
716
|
+
|
|
717
|
+
> **getBaseDirection**(): `Promise`\<`"auto"` \| `"rtl"` \| `"ltr"`\>
|
|
718
|
+
|
|
719
|
+
Defined in:
|
|
720
|
+
[epub/index.ts:1181](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1181)
|
|
721
|
+
|
|
722
|
+
Retrieve the base direction from the package element.
|
|
723
|
+
|
|
724
|
+
If there is no `dir` attribute on the package element, returns 'auto'.
|
|
725
|
+
|
|
726
|
+
##### Returns
|
|
727
|
+
|
|
728
|
+
`Promise`\<`"auto"` \| `"rtl"` \| `"ltr"`\>
|
|
729
|
+
|
|
730
|
+
##### Link
|
|
731
|
+
|
|
732
|
+
https://www.w3.org/TR/epub-33/#attrdef-dir
|
|
733
|
+
|
|
715
734
|
#### getCollections()
|
|
716
735
|
|
|
717
736
|
> **getCollections**(): `Promise`\<[`Collection`](#collection)[]\>
|
|
718
737
|
|
|
719
738
|
Defined in:
|
|
720
|
-
[epub/index.ts:
|
|
739
|
+
[epub/index.ts:1658](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1658)
|
|
721
740
|
|
|
722
741
|
Retrieve the list of collections.
|
|
723
742
|
|
|
@@ -730,7 +749,7 @@ Retrieve the list of collections.
|
|
|
730
749
|
> **getContributors**(): `Promise`\<[`DcCreator`](#dccreator)[]\>
|
|
731
750
|
|
|
732
751
|
Defined in:
|
|
733
|
-
[epub/index.ts:
|
|
752
|
+
[epub/index.ts:1872](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1872)
|
|
734
753
|
|
|
735
754
|
Retrieve the list of contributors.
|
|
736
755
|
|
|
@@ -749,7 +768,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccontributor
|
|
|
749
768
|
> **getCoverImage**(): `Promise`\<`null` \| `Uint8Array`\<`ArrayBufferLike`\>\>
|
|
750
769
|
|
|
751
770
|
Defined in:
|
|
752
|
-
[epub/index.ts:
|
|
771
|
+
[epub/index.ts:1077](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1077)
|
|
753
772
|
|
|
754
773
|
Retrieve the cover image data as a byte array.
|
|
755
774
|
|
|
@@ -770,7 +789,7 @@ https://www.w3.org/TR/epub-33/#sec-cover-image
|
|
|
770
789
|
> [`ManifestItem`](#manifestitem)\>
|
|
771
790
|
|
|
772
791
|
Defined in:
|
|
773
|
-
[epub/index.ts:
|
|
792
|
+
[epub/index.ts:1058](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1058)
|
|
774
793
|
|
|
775
794
|
Retrieve the cover image manifest item.
|
|
776
795
|
|
|
@@ -790,7 +809,7 @@ https://www.w3.org/TR/epub-33/#sec-cover-image
|
|
|
790
809
|
> **getCreators**(`type`): `Promise`\<[`DcCreator`](#dccreator)[]\>
|
|
791
810
|
|
|
792
811
|
Defined in:
|
|
793
|
-
[epub/index.ts:
|
|
812
|
+
[epub/index.ts:1811](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1811)
|
|
794
813
|
|
|
795
814
|
Retrieve the list of creators.
|
|
796
815
|
|
|
@@ -813,7 +832,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccreator
|
|
|
813
832
|
> **getDescription**(): `Promise`\<`null` \| `string`\>
|
|
814
833
|
|
|
815
834
|
Defined in:
|
|
816
|
-
[epub/index.ts:
|
|
835
|
+
[epub/index.ts:1509](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1509)
|
|
817
836
|
|
|
818
837
|
Retrieve the Epub's description as specified in its package document metadata.
|
|
819
838
|
|
|
@@ -824,12 +843,28 @@ as a string. Descriptions may include HTML markup.
|
|
|
824
843
|
|
|
825
844
|
`Promise`\<`null` \| `string`\>
|
|
826
845
|
|
|
846
|
+
#### getGuideEntries()
|
|
847
|
+
|
|
848
|
+
> **getGuideEntries**(): `Promise`\<`GuideItem`[]\>
|
|
849
|
+
|
|
850
|
+
Defined in:
|
|
851
|
+
[epub/index.ts:2912](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2912)
|
|
852
|
+
|
|
853
|
+
Retrieve the guide entries from the package document.
|
|
854
|
+
|
|
855
|
+
The guide element is deprecated in EPUB 3 in favor of the landmarks nav, but
|
|
856
|
+
many publications still include it.
|
|
857
|
+
|
|
858
|
+
##### Returns
|
|
859
|
+
|
|
860
|
+
`Promise`\<`GuideItem`[]\>
|
|
861
|
+
|
|
827
862
|
#### getIdentifier()
|
|
828
863
|
|
|
829
864
|
> **getIdentifier**(): `Promise`\<`null` \| `string`\>
|
|
830
865
|
|
|
831
866
|
Defined in:
|
|
832
|
-
[epub/index.ts:
|
|
867
|
+
[epub/index.ts:992](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L992)
|
|
833
868
|
|
|
834
869
|
Retrieve the identifier from the dc:identifier element in the EPUB metadata.
|
|
835
870
|
|
|
@@ -843,12 +878,37 @@ If there is no dc:identifier element, returns null.
|
|
|
843
878
|
|
|
844
879
|
https://www.w3.org/TR/epub-33/#sec-opf-dcidentifier
|
|
845
880
|
|
|
881
|
+
#### getLandmarks()
|
|
882
|
+
|
|
883
|
+
> **getLandmarks**(`__namedParameters`): `Promise`\<`null` \|
|
|
884
|
+
> [`Navigation`](#navigation)\>
|
|
885
|
+
|
|
886
|
+
Defined in:
|
|
887
|
+
[epub/index.ts:2273](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2273)
|
|
888
|
+
|
|
889
|
+
Returns the structured landmarks navigation document as a Navigation object
|
|
890
|
+
|
|
891
|
+
##### Parameters
|
|
892
|
+
|
|
893
|
+
| Parameter | Type |
|
|
894
|
+
| ---------------------------------- | ---------------------------------- |
|
|
895
|
+
| `__namedParameters` | \{ `resolveToRoot?`: `boolean`; \} |
|
|
896
|
+
| `__namedParameters.resolveToRoot?` | `boolean` |
|
|
897
|
+
|
|
898
|
+
##### Returns
|
|
899
|
+
|
|
900
|
+
`Promise`\<`null` \| [`Navigation`](#navigation)\>
|
|
901
|
+
|
|
902
|
+
##### Link
|
|
903
|
+
|
|
904
|
+
https://www.w3.org/TR/epub-33/#sec-nav-landmarks
|
|
905
|
+
|
|
846
906
|
#### getLanguage()
|
|
847
907
|
|
|
848
908
|
> **getLanguage**(): `Promise`\<`null` \| `Locale`\>
|
|
849
909
|
|
|
850
910
|
Defined in:
|
|
851
|
-
[epub/index.ts:
|
|
911
|
+
[epub/index.ts:1346](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1346)
|
|
852
912
|
|
|
853
913
|
Retrieve the Epub's language as specified in its package document metadata.
|
|
854
914
|
|
|
@@ -863,13 +923,32 @@ Intl.Locale instance.
|
|
|
863
923
|
|
|
864
924
|
https://www.w3.org/TR/epub-33/#sec-opf-dclanguage
|
|
865
925
|
|
|
926
|
+
#### getLayout()
|
|
927
|
+
|
|
928
|
+
> **getLayout**(): `Promise`\<`"pre-paginated"` \| `"reflowable"`\>
|
|
929
|
+
|
|
930
|
+
Defined in:
|
|
931
|
+
[epub/index.ts:1162](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1162)
|
|
932
|
+
|
|
933
|
+
Retrieve the layout from the rendition:layout meta element in the EPUB metadata.
|
|
934
|
+
|
|
935
|
+
If there is no meta element, returns 'reflowable'.
|
|
936
|
+
|
|
937
|
+
##### Returns
|
|
938
|
+
|
|
939
|
+
`Promise`\<`"pre-paginated"` \| `"reflowable"`\>
|
|
940
|
+
|
|
941
|
+
##### Link
|
|
942
|
+
|
|
943
|
+
https://www.w3.org/TR/epub-33/#layout
|
|
944
|
+
|
|
866
945
|
#### getManifest()
|
|
867
946
|
|
|
868
947
|
> **getManifest**(): `Promise`\<`Record`\<`string`,
|
|
869
948
|
> [`ManifestItem`](#manifestitem)\>\>
|
|
870
949
|
|
|
871
950
|
Defined in:
|
|
872
|
-
[epub/index.ts:
|
|
951
|
+
[epub/index.ts:813](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L813)
|
|
873
952
|
|
|
874
953
|
Retrieve the manifest for the Epub.
|
|
875
954
|
|
|
@@ -889,7 +968,7 @@ https://www.w3.org/TR/epub-33/#sec-pkg-manifest
|
|
|
889
968
|
> **getMetadata**(): `Promise`\<[`EpubMetadata`](#epubmetadata)\>
|
|
890
969
|
|
|
891
970
|
Defined in:
|
|
892
|
-
[epub/index.ts:
|
|
971
|
+
[epub/index.ts:964](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L964)
|
|
893
972
|
|
|
894
973
|
Retrieve the metadata entries for the Epub.
|
|
895
974
|
|
|
@@ -907,13 +986,50 @@ as `getTitle()` and `getAuthors()`.
|
|
|
907
986
|
|
|
908
987
|
https://www.w3.org/TR/epub-33/#sec-pkg-metadata
|
|
909
988
|
|
|
989
|
+
#### getModifiedDate()
|
|
990
|
+
|
|
991
|
+
> **getModifiedDate**(): `Promise`\<`null` \| `Date`\>
|
|
992
|
+
|
|
993
|
+
Defined in:
|
|
994
|
+
[epub/index.ts:1145](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1145)
|
|
995
|
+
|
|
996
|
+
Retrieve the modified date from the dcterms:modified metadata in the EPUB
|
|
997
|
+
metadata as a Date object.
|
|
998
|
+
|
|
999
|
+
If there is no meta element with dcterms:modified, returns null.
|
|
1000
|
+
|
|
1001
|
+
##### Returns
|
|
1002
|
+
|
|
1003
|
+
`Promise`\<`null` \| `Date`\>
|
|
1004
|
+
|
|
1005
|
+
##### Link
|
|
1006
|
+
|
|
1007
|
+
https://www.w3.org/TR/epub-33/#sec-metadata-last-modified
|
|
1008
|
+
|
|
1009
|
+
#### getNcxTableOfContents()
|
|
1010
|
+
|
|
1011
|
+
> **getNcxTableOfContents**(): `Promise`\<[`NavigationList`](#navigationlist)\>
|
|
1012
|
+
|
|
1013
|
+
Defined in:
|
|
1014
|
+
[epub/index.ts:2817](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2817)
|
|
1015
|
+
|
|
1016
|
+
Parse the NCX table of contents, if one exists, and return a tree of TocEntry
|
|
1017
|
+
nodes.
|
|
1018
|
+
|
|
1019
|
+
Useful for both EPUB 2 publications (where the NCX is the primary navigation)
|
|
1020
|
+
and EPUB 3 publications that retain an NCX for backwards compatibility.
|
|
1021
|
+
|
|
1022
|
+
##### Returns
|
|
1023
|
+
|
|
1024
|
+
`Promise`\<[`NavigationList`](#navigationlist)\>
|
|
1025
|
+
|
|
910
1026
|
#### getPackageVocabularyPrefixes()
|
|
911
1027
|
|
|
912
1028
|
> **getPackageVocabularyPrefixes**(): `Promise`\<`Record`\<`string`,
|
|
913
1029
|
> `string`\>\>
|
|
914
1030
|
|
|
915
1031
|
Defined in:
|
|
916
|
-
[epub/index.ts:
|
|
1032
|
+
[epub/index.ts:1526](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1526)
|
|
917
1033
|
|
|
918
1034
|
Return the set of custom vocabulary prefixes set on this publication's root
|
|
919
1035
|
package element.
|
|
@@ -928,12 +1044,37 @@ Returns a map from prefix to URI
|
|
|
928
1044
|
|
|
929
1045
|
https://www.w3.org/TR/epub-33/#sec-prefix-attr
|
|
930
1046
|
|
|
1047
|
+
#### getPageList()
|
|
1048
|
+
|
|
1049
|
+
> **getPageList**(`__namedParameters`): `Promise`\<`null` \|
|
|
1050
|
+
> [`Navigation`](#navigation)\>
|
|
1051
|
+
|
|
1052
|
+
Defined in:
|
|
1053
|
+
[epub/index.ts:2285](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2285)
|
|
1054
|
+
|
|
1055
|
+
Returns the structured page list navigation document as a Navigation object
|
|
1056
|
+
|
|
1057
|
+
##### Parameters
|
|
1058
|
+
|
|
1059
|
+
| Parameter | Type |
|
|
1060
|
+
| ---------------------------------- | ---------------------------------- |
|
|
1061
|
+
| `__namedParameters` | \{ `resolveToRoot?`: `boolean`; \} |
|
|
1062
|
+
| `__namedParameters.resolveToRoot?` | `boolean` |
|
|
1063
|
+
|
|
1064
|
+
##### Returns
|
|
1065
|
+
|
|
1066
|
+
`Promise`\<`null` \| [`Navigation`](#navigation)\>
|
|
1067
|
+
|
|
1068
|
+
##### Link
|
|
1069
|
+
|
|
1070
|
+
https://www.w3.org/TR/epub-33/#sec-nav-landmarks
|
|
1071
|
+
|
|
931
1072
|
#### getPublicationDate()
|
|
932
1073
|
|
|
933
1074
|
> **getPublicationDate**(): `Promise`\<`null` \| `Date`\>
|
|
934
1075
|
|
|
935
1076
|
Defined in:
|
|
936
|
-
[epub/index.ts:
|
|
1077
|
+
[epub/index.ts:1114](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1114)
|
|
937
1078
|
|
|
938
1079
|
Retrieve the publication date from the dc:date element in the EPUB metadata as a
|
|
939
1080
|
Date object.
|
|
@@ -953,7 +1094,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcdate
|
|
|
953
1094
|
> **getRootfile**(): `Promise`\<`string`\>
|
|
954
1095
|
|
|
955
1096
|
Defined in:
|
|
956
|
-
[epub/index.ts:
|
|
1097
|
+
[epub/index.ts:685](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L685)
|
|
957
1098
|
|
|
958
1099
|
##### Returns
|
|
959
1100
|
|
|
@@ -964,7 +1105,7 @@ Defined in:
|
|
|
964
1105
|
> **getSpineItems**(): `Promise`\<[`ManifestItem`](#manifestitem)[]\>
|
|
965
1106
|
|
|
966
1107
|
Defined in:
|
|
967
|
-
[epub/index.ts:
|
|
1108
|
+
[epub/index.ts:2075](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2075)
|
|
968
1109
|
|
|
969
1110
|
Retrieve the manifest items that make up the Epub's spine.
|
|
970
1111
|
|
|
@@ -984,7 +1125,7 @@ https://www.w3.org/TR/epub-33/#sec-spine-elem
|
|
|
984
1125
|
> **getSubjects**(): `Promise`\<(`string` \| [`DcSubject`](#dcsubject))[]\>
|
|
985
1126
|
|
|
986
1127
|
Defined in:
|
|
987
|
-
[epub/index.ts:
|
|
1128
|
+
[epub/index.ts:1301](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1301)
|
|
988
1129
|
|
|
989
1130
|
Retrieve the list of subjects for this EPUB.
|
|
990
1131
|
|
|
@@ -1005,7 +1146,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcsubject
|
|
|
1005
1146
|
> **getSubtitle**(): `Promise`\<`null` \| `string`\>
|
|
1006
1147
|
|
|
1007
1148
|
Defined in:
|
|
1008
|
-
[epub/index.ts:
|
|
1149
|
+
[epub/index.ts:1416](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1416)
|
|
1009
1150
|
|
|
1010
1151
|
Retrieve the subtitle of the Epub, if it exists.
|
|
1011
1152
|
|
|
@@ -1017,12 +1158,38 @@ Retrieve the subtitle of the Epub, if it exists.
|
|
|
1017
1158
|
|
|
1018
1159
|
https://www.w3.org/TR/epub-33/#sec-opf-dctitle
|
|
1019
1160
|
|
|
1161
|
+
#### getTableOfContents()
|
|
1162
|
+
|
|
1163
|
+
> **getTableOfContents**(`__namedParameters`): `Promise`\<`null` \|
|
|
1164
|
+
> [`Navigation`](#navigation)\>
|
|
1165
|
+
|
|
1166
|
+
Defined in:
|
|
1167
|
+
[epub/index.ts:2256](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2256)
|
|
1168
|
+
|
|
1169
|
+
Returns the structured table of contents navigation document as a Navigation
|
|
1170
|
+
object.
|
|
1171
|
+
|
|
1172
|
+
##### Parameters
|
|
1173
|
+
|
|
1174
|
+
| Parameter | Type |
|
|
1175
|
+
| ---------------------------------- | ---------------------------------- |
|
|
1176
|
+
| `__namedParameters` | \{ `resolveToRoot?`: `boolean`; \} |
|
|
1177
|
+
| `__namedParameters.resolveToRoot?` | `boolean` |
|
|
1178
|
+
|
|
1179
|
+
##### Returns
|
|
1180
|
+
|
|
1181
|
+
`Promise`\<`null` \| [`Navigation`](#navigation)\>
|
|
1182
|
+
|
|
1183
|
+
##### Link
|
|
1184
|
+
|
|
1185
|
+
https://www.w3.org/TR/epub-33/#sec-nav-toc
|
|
1186
|
+
|
|
1020
1187
|
#### getTitle()
|
|
1021
1188
|
|
|
1022
1189
|
> **getTitle**(`expanded`): `Promise`\<`null` \| `string`\>
|
|
1023
1190
|
|
|
1024
1191
|
Defined in:
|
|
1025
|
-
[epub/index.ts:
|
|
1192
|
+
[epub/index.ts:1392](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1392)
|
|
1026
1193
|
|
|
1027
1194
|
Retrieve the title of the Epub.
|
|
1028
1195
|
|
|
@@ -1045,7 +1212,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dctitle
|
|
|
1045
1212
|
> **getTitles**(): `Promise`\<`object`[]\>
|
|
1046
1213
|
|
|
1047
1214
|
Defined in:
|
|
1048
|
-
[epub/index.ts:
|
|
1215
|
+
[epub/index.ts:1428](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1428)
|
|
1049
1216
|
|
|
1050
1217
|
Retrieve all title entries of the Epub.
|
|
1051
1218
|
|
|
@@ -1062,7 +1229,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dctitle
|
|
|
1062
1229
|
> **getType**(): `Promise`\<`null` \| [`MetadataEntry`](#metadataentry)\>
|
|
1063
1230
|
|
|
1064
1231
|
Defined in:
|
|
1065
|
-
[epub/index.ts:
|
|
1232
|
+
[epub/index.ts:1214](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1214)
|
|
1066
1233
|
|
|
1067
1234
|
Retrieve the publication type from the dc:type element in the EPUB metadata.
|
|
1068
1235
|
|
|
@@ -1076,6 +1243,19 @@ If there is no dc:type element, returns null.
|
|
|
1076
1243
|
|
|
1077
1244
|
https://www.w3.org/TR/epub-33/#sec-opf-dctype
|
|
1078
1245
|
|
|
1246
|
+
#### getVersion()
|
|
1247
|
+
|
|
1248
|
+
> **getVersion**(): `Promise`\<`string`\>
|
|
1249
|
+
|
|
1250
|
+
Defined in:
|
|
1251
|
+
[epub/index.ts:2804](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2804)
|
|
1252
|
+
|
|
1253
|
+
Returns the EPUB version declared on the package element.
|
|
1254
|
+
|
|
1255
|
+
##### Returns
|
|
1256
|
+
|
|
1257
|
+
`Promise`\<`string`\>
|
|
1258
|
+
|
|
1079
1259
|
#### readFileContents()
|
|
1080
1260
|
|
|
1081
1261
|
##### Call Signature
|
|
@@ -1084,7 +1264,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dctype
|
|
|
1084
1264
|
> `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\>
|
|
1085
1265
|
|
|
1086
1266
|
Defined in:
|
|
1087
|
-
[epub/index.ts:
|
|
1267
|
+
[epub/index.ts:2335](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2335)
|
|
1088
1268
|
|
|
1089
1269
|
Retrieve the contents of a file, given its href.
|
|
1090
1270
|
|
|
@@ -1107,7 +1287,7 @@ encoding parameter.
|
|
|
1107
1287
|
> **readFileContents**(`href`, `relativeTo`, `encoding`): `Promise`\<`string`\>
|
|
1108
1288
|
|
|
1109
1289
|
Defined in:
|
|
1110
|
-
[epub/index.ts:
|
|
1290
|
+
[epub/index.ts:2336](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2336)
|
|
1111
1291
|
|
|
1112
1292
|
Retrieve the contents of a file, given its href.
|
|
1113
1293
|
|
|
@@ -1133,7 +1313,7 @@ encoding parameter.
|
|
|
1133
1313
|
> **readItemContents**(`id`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\>
|
|
1134
1314
|
|
|
1135
1315
|
Defined in:
|
|
1136
|
-
[epub/index.ts:
|
|
1316
|
+
[epub/index.ts:2368](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2368)
|
|
1137
1317
|
|
|
1138
1318
|
Retrieve the contents of a manifest item, given its id.
|
|
1139
1319
|
|
|
@@ -1156,7 +1336,7 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
|
|
|
1156
1336
|
> **readItemContents**(`id`, `encoding`): `Promise`\<`string`\>
|
|
1157
1337
|
|
|
1158
1338
|
Defined in:
|
|
1159
|
-
[epub/index.ts:
|
|
1339
|
+
[epub/index.ts:2369](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2369)
|
|
1160
1340
|
|
|
1161
1341
|
Retrieve the contents of a manifest item, given its id.
|
|
1162
1342
|
|
|
@@ -1182,7 +1362,7 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
|
|
|
1182
1362
|
> **readXhtmlItemContents**(`id`, `as?`): `Promise`\<[`ParsedXml`](#parsedxml)\>
|
|
1183
1363
|
|
|
1184
1364
|
Defined in:
|
|
1185
|
-
[epub/index.ts:
|
|
1365
|
+
[epub/index.ts:2431](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2431)
|
|
1186
1366
|
|
|
1187
1367
|
Retrieves the contents of an XHTML item, given its manifest id.
|
|
1188
1368
|
|
|
@@ -1206,7 +1386,7 @@ https://www.w3.org/TR/epub-33/#sec-xhtml
|
|
|
1206
1386
|
> **readXhtmlItemContents**(`id`, `as`): `Promise`\<`string`\>
|
|
1207
1387
|
|
|
1208
1388
|
Defined in:
|
|
1209
|
-
[epub/index.ts:
|
|
1389
|
+
[epub/index.ts:2432](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2432)
|
|
1210
1390
|
|
|
1211
1391
|
Retrieves the contents of an XHTML item, given its manifest id.
|
|
1212
1392
|
|
|
@@ -1230,7 +1410,7 @@ https://www.w3.org/TR/epub-33/#sec-xhtml
|
|
|
1230
1410
|
> **removeCollection**(`index`): `Promise`\<`void`\>
|
|
1231
1411
|
|
|
1232
1412
|
Defined in:
|
|
1233
|
-
[epub/index.ts:
|
|
1413
|
+
[epub/index.ts:1767](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1767)
|
|
1234
1414
|
|
|
1235
1415
|
Remove a collection from the EPUB metadata.
|
|
1236
1416
|
|
|
@@ -1252,7 +1432,7 @@ returned by `epub.getCollections()`.
|
|
|
1252
1432
|
> **removeContributor**(`index`): `Promise`\<`void`\>
|
|
1253
1433
|
|
|
1254
1434
|
Defined in:
|
|
1255
|
-
[epub/index.ts:
|
|
1435
|
+
[epub/index.ts:2024](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2024)
|
|
1256
1436
|
|
|
1257
1437
|
Remove a contributor from the EPUB metadata.
|
|
1258
1438
|
|
|
@@ -1280,7 +1460,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccreator
|
|
|
1280
1460
|
> **removeCreator**(`index`, `type`): `Promise`\<`void`\>
|
|
1281
1461
|
|
|
1282
1462
|
Defined in:
|
|
1283
|
-
[epub/index.ts:
|
|
1463
|
+
[epub/index.ts:1972](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1972)
|
|
1284
1464
|
|
|
1285
1465
|
Remove a creator from the EPUB metadata.
|
|
1286
1466
|
|
|
@@ -1307,7 +1487,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccreator
|
|
|
1307
1487
|
> **removeManifestItem**(`id`): `Promise`\<`void`\>
|
|
1308
1488
|
|
|
1309
1489
|
Defined in:
|
|
1310
|
-
[epub/index.ts:
|
|
1490
|
+
[epub/index.ts:2527](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2527)
|
|
1311
1491
|
|
|
1312
1492
|
##### Parameters
|
|
1313
1493
|
|
|
@@ -1324,7 +1504,7 @@ Defined in:
|
|
|
1324
1504
|
> **removeMetadata**(`predicate`): `Promise`\<`void`\>
|
|
1325
1505
|
|
|
1326
1506
|
Defined in:
|
|
1327
|
-
[epub/index.ts:
|
|
1507
|
+
[epub/index.ts:2776](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2776)
|
|
1328
1508
|
|
|
1329
1509
|
Remove one or more metadata entries.
|
|
1330
1510
|
|
|
@@ -1350,7 +1530,7 @@ https://www.w3.org/TR/epub-33/#sec-pkg-metadata
|
|
|
1350
1530
|
> **removeSpineItem**(`index`): `Promise`\<`void`\>
|
|
1351
1531
|
|
|
1352
1532
|
Defined in:
|
|
1353
|
-
[epub/index.ts:
|
|
1533
|
+
[epub/index.ts:2130](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2130)
|
|
1354
1534
|
|
|
1355
1535
|
Remove the spine item at the specified index.
|
|
1356
1536
|
|
|
@@ -1373,7 +1553,7 @@ https://www.w3.org/TR/epub-33/#sec-spine-elem
|
|
|
1373
1553
|
> **removeSubject**(`index`): `Promise`\<`void`\>
|
|
1374
1554
|
|
|
1375
1555
|
Defined in:
|
|
1376
|
-
[epub/index.ts:
|
|
1556
|
+
[epub/index.ts:1264](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1264)
|
|
1377
1557
|
|
|
1378
1558
|
Remove a subject from the EPUB metadata.
|
|
1379
1559
|
|
|
@@ -1399,7 +1579,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccreator
|
|
|
1399
1579
|
> **replaceMetadata**(`predicate`, `entry`): `Promise`\<`void`\>
|
|
1400
1580
|
|
|
1401
1581
|
Defined in:
|
|
1402
|
-
[epub/index.ts:
|
|
1582
|
+
[epub/index.ts:2731](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2731)
|
|
1403
1583
|
|
|
1404
1584
|
Replace a metadata entry with a new one.
|
|
1405
1585
|
|
|
@@ -1421,12 +1601,35 @@ first metadata entry that matches the predicate will be replaced.
|
|
|
1421
1601
|
|
|
1422
1602
|
https://www.w3.org/TR/epub-33/#sec-pkg-metadata
|
|
1423
1603
|
|
|
1604
|
+
#### resolveHref()
|
|
1605
|
+
|
|
1606
|
+
> **resolveHref**(`href`, `relativeTo?`, `__namedParameters?`):
|
|
1607
|
+
> `Promise`\<`string`\>
|
|
1608
|
+
|
|
1609
|
+
Defined in:
|
|
1610
|
+
[epub/index.ts:2307](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2307)
|
|
1611
|
+
|
|
1612
|
+
Returns a path-relative-scheme-less URL, relative to the container root.
|
|
1613
|
+
|
|
1614
|
+
##### Parameters
|
|
1615
|
+
|
|
1616
|
+
| Parameter | Type | Description |
|
|
1617
|
+
| --------------------------- | --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
|
|
1618
|
+
| `href` | `string` | The href to resolve |
|
|
1619
|
+
| `relativeTo?` | `string` | Optional - The href to resolve this href relative to. Use if resolving a relative href from a file other than the package document. |
|
|
1620
|
+
| `__namedParameters?` | \{ `toRoot?`: `boolean`; \} | - |
|
|
1621
|
+
| `__namedParameters.toRoot?` | `boolean` | - |
|
|
1622
|
+
|
|
1623
|
+
##### Returns
|
|
1624
|
+
|
|
1625
|
+
`Promise`\<`string`\>
|
|
1626
|
+
|
|
1424
1627
|
#### saveAndClose()
|
|
1425
1628
|
|
|
1426
1629
|
> **saveAndClose**(): `Promise`\<`void`\>
|
|
1427
1630
|
|
|
1428
1631
|
Defined in:
|
|
1429
|
-
[epub/index.ts:
|
|
1632
|
+
[epub/index.ts:2951](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2951)
|
|
1430
1633
|
|
|
1431
1634
|
Write the current contents of the Epub to a new EPUB archive on disk.
|
|
1432
1635
|
|
|
@@ -1442,7 +1645,7 @@ updated to the current UTC timestamp.
|
|
|
1442
1645
|
> **setCoverImage**(`href`, `data`): `Promise`\<`void`\>
|
|
1443
1646
|
|
|
1444
1647
|
Defined in:
|
|
1445
|
-
[epub/index.ts:
|
|
1648
|
+
[epub/index.ts:1091](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1091)
|
|
1446
1649
|
|
|
1447
1650
|
Set the cover image for the EPUB.
|
|
1448
1651
|
|
|
@@ -1465,7 +1668,7 @@ then writes the provided image data to the provided href within the publication.
|
|
|
1465
1668
|
> **setDescription**(`description`): `Promise`\<`void`\>
|
|
1466
1669
|
|
|
1467
1670
|
Defined in:
|
|
1468
|
-
[epub/index.ts:
|
|
1671
|
+
[epub/index.ts:1493](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1493)
|
|
1469
1672
|
|
|
1470
1673
|
Update the Epub's description metadata entry.
|
|
1471
1674
|
|
|
@@ -1488,7 +1691,7 @@ encoded as HTML entities.
|
|
|
1488
1691
|
> **setIdentifier**(`identifier`): `Promise`\<`void`\>
|
|
1489
1692
|
|
|
1490
1693
|
Defined in:
|
|
1491
|
-
[epub/index.ts:
|
|
1694
|
+
[epub/index.ts:1006](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1006)
|
|
1492
1695
|
|
|
1493
1696
|
Set the dc:identifier metadata element with the provided string.
|
|
1494
1697
|
|
|
@@ -1514,7 +1717,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcidentifier
|
|
|
1514
1717
|
> **setLanguage**(`locale`): `Promise`\<`void`\>
|
|
1515
1718
|
|
|
1516
1719
|
Defined in:
|
|
1517
|
-
[epub/index.ts:
|
|
1720
|
+
[epub/index.ts:1375](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1375)
|
|
1518
1721
|
|
|
1519
1722
|
Update the Epub's language metadata entry.
|
|
1520
1723
|
|
|
@@ -1540,7 +1743,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dclanguage
|
|
|
1540
1743
|
> **setPackageVocabularyPrefix**(`prefix`, `uri`): `Promise`\<`void`\>
|
|
1541
1744
|
|
|
1542
1745
|
Defined in:
|
|
1543
|
-
[epub/index.ts:
|
|
1746
|
+
[epub/index.ts:1544](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1544)
|
|
1544
1747
|
|
|
1545
1748
|
Set a custom vocabulary prefix on the root package element.
|
|
1546
1749
|
|
|
@@ -1564,7 +1767,7 @@ https://www.w3.org/TR/epub-33/#sec-prefix-attr
|
|
|
1564
1767
|
> **setPublicationDate**(`date`): `Promise`\<`void`\>
|
|
1565
1768
|
|
|
1566
1769
|
Defined in:
|
|
1567
|
-
[epub/index.ts:
|
|
1770
|
+
[epub/index.ts:1129](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1129)
|
|
1568
1771
|
|
|
1569
1772
|
Set the dc:date metadata element with the provided date.
|
|
1570
1773
|
|
|
@@ -1590,7 +1793,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcdate
|
|
|
1590
1793
|
> **setTitle**(`title`): `Promise`\<`void`\>
|
|
1591
1794
|
|
|
1592
1795
|
Defined in:
|
|
1593
|
-
[epub/index.ts:
|
|
1796
|
+
[epub/index.ts:1568](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1568)
|
|
1594
1797
|
|
|
1595
1798
|
Set the title of the Epub.
|
|
1596
1799
|
|
|
@@ -1618,7 +1821,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dctitle
|
|
|
1618
1821
|
> **setTitles**(`entries`): `Promise`\<`void`\>
|
|
1619
1822
|
|
|
1620
1823
|
Defined in:
|
|
1621
|
-
[epub/index.ts:
|
|
1824
|
+
[epub/index.ts:1596](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1596)
|
|
1622
1825
|
|
|
1623
1826
|
##### Parameters
|
|
1624
1827
|
|
|
@@ -1635,7 +1838,7 @@ Defined in:
|
|
|
1635
1838
|
> **setType**(`type`): `Promise`\<`void`\>
|
|
1636
1839
|
|
|
1637
1840
|
Defined in:
|
|
1638
|
-
[epub/index.ts:
|
|
1841
|
+
[epub/index.ts:1198](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L1198)
|
|
1639
1842
|
|
|
1640
1843
|
Set the dc:type metadata element.
|
|
1641
1844
|
|
|
@@ -1661,7 +1864,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dctype
|
|
|
1661
1864
|
> **updateManifestItem**(`id`, `newItem`): `Promise`\<`void`\>
|
|
1662
1865
|
|
|
1663
1866
|
Defined in:
|
|
1664
|
-
[epub/index.ts:
|
|
1867
|
+
[epub/index.ts:2643](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2643)
|
|
1665
1868
|
|
|
1666
1869
|
Update the manifest entry for an existing item.
|
|
1667
1870
|
|
|
@@ -1690,7 +1893,7 @@ https://www.w3.org/TR/epub-33/#sec-pkg-manifest
|
|
|
1690
1893
|
> **writeItemContents**(`id`, `contents`): `Promise`\<`void`\>
|
|
1691
1894
|
|
|
1692
1895
|
Defined in:
|
|
1693
|
-
[epub/index.ts:
|
|
1896
|
+
[epub/index.ts:2479](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2479)
|
|
1694
1897
|
|
|
1695
1898
|
Write new contents for an existing manifest item, specified by its id.
|
|
1696
1899
|
|
|
@@ -1717,7 +1920,7 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
|
|
|
1717
1920
|
> **writeItemContents**(`id`, `contents`, `encoding`): `Promise`\<`void`\>
|
|
1718
1921
|
|
|
1719
1922
|
Defined in:
|
|
1720
|
-
[epub/index.ts:
|
|
1923
|
+
[epub/index.ts:2480](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2480)
|
|
1721
1924
|
|
|
1722
1925
|
Write new contents for an existing manifest item, specified by its id.
|
|
1723
1926
|
|
|
@@ -1745,7 +1948,7 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
|
|
|
1745
1948
|
> **writeXhtmlItemContents**(`id`, `contents`): `Promise`\<`void`\>
|
|
1746
1949
|
|
|
1747
1950
|
Defined in:
|
|
1748
|
-
[epub/index.ts:
|
|
1951
|
+
[epub/index.ts:2519](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L2519)
|
|
1749
1952
|
|
|
1750
1953
|
Write new contents for an existing XHTML item, specified by its id.
|
|
1751
1954
|
|
|
@@ -1772,7 +1975,7 @@ https://www.w3.org/TR/epub-33/#sec-xhtml
|
|
|
1772
1975
|
> `static` **addLinkToXhtmlHead**(`xml`, `link`): `void`
|
|
1773
1976
|
|
|
1774
1977
|
Defined in:
|
|
1775
|
-
[epub/index.ts:
|
|
1978
|
+
[epub/index.ts:307](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L307)
|
|
1776
1979
|
|
|
1777
1980
|
Given an XML structure representing a complete XHTML document, add a `link`
|
|
1778
1981
|
element to the `head` of the document.
|
|
@@ -1799,7 +2002,7 @@ This method modifies the provided XML structure.
|
|
|
1799
2002
|
> `Promise`\<[`Epub`](#epub)\>
|
|
1800
2003
|
|
|
1801
2004
|
Defined in:
|
|
1802
|
-
[epub/index.ts:
|
|
2005
|
+
[epub/index.ts:500](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L500)
|
|
1803
2006
|
|
|
1804
2007
|
Construct an Epub instance, optionally beginning with the provided metadata.
|
|
1805
2008
|
|
|
@@ -1821,7 +2024,7 @@ Construct an Epub instance, optionally beginning with the provided metadata.
|
|
|
1821
2024
|
> [`XmlElement`](#xmlelement)\<`Name`\>
|
|
1822
2025
|
|
|
1823
2026
|
Defined in:
|
|
1824
|
-
[epub/index.ts:
|
|
2027
|
+
[epub/index.ts:342](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L342)
|
|
1825
2028
|
|
|
1826
2029
|
##### Type Parameters
|
|
1827
2030
|
|
|
@@ -1846,7 +2049,7 @@ Defined in:
|
|
|
1846
2049
|
> `static` **createXmlTextNode**(`text`): [`XmlTextNode`](#xmltextnode)
|
|
1847
2050
|
|
|
1848
2051
|
Defined in:
|
|
1849
|
-
[epub/index.ts:
|
|
2052
|
+
[epub/index.ts:355](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L355)
|
|
1850
2053
|
|
|
1851
2054
|
##### Parameters
|
|
1852
2055
|
|
|
@@ -1864,7 +2067,7 @@ Defined in:
|
|
|
1864
2067
|
> `undefined` \| [`XmlElement`](#xmlelement)\<`Name`\>
|
|
1865
2068
|
|
|
1866
2069
|
Defined in:
|
|
1867
|
-
[epub/index.ts:
|
|
2070
|
+
[epub/index.ts:428](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L428)
|
|
1868
2071
|
|
|
1869
2072
|
Given an XML structure, find the first child matching the provided name and
|
|
1870
2073
|
optional filter.
|
|
@@ -1887,12 +2090,44 @@ optional filter.
|
|
|
1887
2090
|
|
|
1888
2091
|
`undefined` \| [`XmlElement`](#xmlelement)\<`Name`\>
|
|
1889
2092
|
|
|
2093
|
+
#### findXmlDescendantByName()
|
|
2094
|
+
|
|
2095
|
+
> `static` **findXmlDescendantByName**\<`Name`\>(`name`, `xml`, `filter?`):
|
|
2096
|
+
> `undefined` \| [`XmlElement`](#xmlelement)\<`Name`\>
|
|
2097
|
+
|
|
2098
|
+
Defined in:
|
|
2099
|
+
[epub/index.ts:446](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L446)
|
|
2100
|
+
|
|
2101
|
+
Given an XML structure, find the first descendant matching the provided name and
|
|
2102
|
+
optional filter.
|
|
2103
|
+
|
|
2104
|
+
Will perform a breadth first search for the element, returning the highest
|
|
2105
|
+
element in the tree matching the name and filter.
|
|
2106
|
+
|
|
2107
|
+
##### Type Parameters
|
|
2108
|
+
|
|
2109
|
+
| Type Parameter |
|
|
2110
|
+
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
2111
|
+
| `Name` _extends_ `` `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}` `` \| `` `r${string}` `` \| `` `s${string}` `` \| `` `t${string}` `` \| `` `u${string}` `` \| `` `v${string}` `` \| `` `w${string}` `` \| `` `x${string}` `` \| `` `y${string}` `` \| `` `z${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}` `` \| `` `R${string}` `` \| `` `S${string}` `` \| `` `T${string}` `` \| `` `U${string}` `` \| `` `V${string}` `` \| `` `W${string}` `` \| `` `X${string}` `` \| `` `Y${string}` `` \| `` `Z${string}` `` \| `` `?${string}` `` |
|
|
2112
|
+
|
|
2113
|
+
##### Parameters
|
|
2114
|
+
|
|
2115
|
+
| Parameter | Type |
|
|
2116
|
+
| --------- | ------------------------- |
|
|
2117
|
+
| `name` | `Name` |
|
|
2118
|
+
| `xml` | [`ParsedXml`](#parsedxml) |
|
|
2119
|
+
| `filter?` | (`node`) => `boolean` |
|
|
2120
|
+
|
|
2121
|
+
##### Returns
|
|
2122
|
+
|
|
2123
|
+
`undefined` \| [`XmlElement`](#xmlelement)\<`Name`\>
|
|
2124
|
+
|
|
1890
2125
|
#### formatSmilDuration()
|
|
1891
2126
|
|
|
1892
2127
|
> `static` **formatSmilDuration**(`duration`): `string`
|
|
1893
2128
|
|
|
1894
2129
|
Defined in:
|
|
1895
|
-
[epub/index.ts:
|
|
2130
|
+
[epub/index.ts:290](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L290)
|
|
1896
2131
|
|
|
1897
2132
|
Format a duration, provided as a number of seconds, as a SMIL clock value, to be
|
|
1898
2133
|
used for Media Overlays.
|
|
@@ -1916,7 +2151,7 @@ https://www.w3.org/TR/epub-33/#sec-duration
|
|
|
1916
2151
|
> `static` **from**(`pathOrData`): `Promise`\<[`Epub`](#epub)\>
|
|
1917
2152
|
|
|
1918
2153
|
Defined in:
|
|
1919
|
-
[epub/index.ts:
|
|
2154
|
+
[epub/index.ts:583](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L583)
|
|
1920
2155
|
|
|
1921
2156
|
Construct an Epub instance by reading an existing EPUB publication.
|
|
1922
2157
|
|
|
@@ -1935,7 +2170,7 @@ Construct an Epub instance by reading an existing EPUB publication.
|
|
|
1935
2170
|
> `static` **getXhtmlBody**(`xml`): [`ParsedXml`](#parsedxml)
|
|
1936
2171
|
|
|
1937
2172
|
Defined in:
|
|
1938
|
-
[epub/index.ts:
|
|
2173
|
+
[epub/index.ts:332](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L332)
|
|
1939
2174
|
|
|
1940
2175
|
Given an XML structure representing a complete XHTML document, return the
|
|
1941
2176
|
sub-structure representing the children of the document's body element.
|
|
@@ -1955,7 +2190,7 @@ sub-structure representing the children of the document's body element.
|
|
|
1955
2190
|
> `static` **getXhtmlTextContent**(`xml`): `string`
|
|
1956
2191
|
|
|
1957
2192
|
Defined in:
|
|
1958
|
-
[epub/index.ts:
|
|
2193
|
+
[epub/index.ts:364](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L364)
|
|
1959
2194
|
|
|
1960
2195
|
Given an XML structure representing a complete XHTML document, return a string
|
|
1961
2196
|
representing the concatenation of all text nodes in the document.
|
|
@@ -1975,7 +2210,7 @@ representing the concatenation of all text nodes in the document.
|
|
|
1975
2210
|
> `static` **getXmlAttributes**(`element`): `Record`\<`string`, `string`\>
|
|
1976
2211
|
|
|
1977
2212
|
Defined in:
|
|
1978
|
-
[epub/index.ts:
|
|
2213
|
+
[epub/index.ts:381](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L381)
|
|
1979
2214
|
|
|
1980
2215
|
Given an XMLElement, return its attributes.
|
|
1981
2216
|
|
|
@@ -1994,7 +2229,7 @@ Given an XMLElement, return its attributes.
|
|
|
1994
2229
|
> `static` **getXmlChildren**\<`Name`\>(`element`): [`ParsedXml`](#parsedxml)
|
|
1995
2230
|
|
|
1996
2231
|
Defined in:
|
|
1997
|
-
[epub/index.ts:
|
|
2232
|
+
[epub/index.ts:408](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L408)
|
|
1998
2233
|
|
|
1999
2234
|
Given an XMLElement, return a list of its children
|
|
2000
2235
|
|
|
@@ -2019,7 +2254,7 @@ Given an XMLElement, return a list of its children
|
|
|
2019
2254
|
> `static` **getXmlElementName**\<`Name`\>(`element`): `Name`
|
|
2020
2255
|
|
|
2021
2256
|
Defined in:
|
|
2022
|
-
[epub/index.ts:
|
|
2257
|
+
[epub/index.ts:393](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L393)
|
|
2023
2258
|
|
|
2024
2259
|
Given an XMLElement, return its tag name.
|
|
2025
2260
|
|
|
@@ -2044,7 +2279,7 @@ Given an XMLElement, return its tag name.
|
|
|
2044
2279
|
> `static` **isXmlTextNode**(`node`): `node is XmlTextNode`
|
|
2045
2280
|
|
|
2046
2281
|
Defined in:
|
|
2047
|
-
[epub/index.ts:
|
|
2282
|
+
[epub/index.ts:468](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L468)
|
|
2048
2283
|
|
|
2049
2284
|
Given an XMLNode, determine whether it represents a text node or an XML element.
|
|
2050
2285
|
|
|
@@ -2063,7 +2298,7 @@ Given an XMLNode, determine whether it represents a text node or an XML element.
|
|
|
2063
2298
|
> `static` **replaceXmlChildren**\<`Name`\>(`element`, `children`): `void`
|
|
2064
2299
|
|
|
2065
2300
|
Defined in:
|
|
2066
|
-
[epub/index.ts:
|
|
2301
|
+
[epub/index.ts:416](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L416)
|
|
2067
2302
|
|
|
2068
2303
|
##### Type Parameters
|
|
2069
2304
|
|
|
@@ -2082,12 +2317,275 @@ Defined in:
|
|
|
2082
2317
|
|
|
2083
2318
|
`void`
|
|
2084
2319
|
|
|
2320
|
+
#### upgrade()
|
|
2321
|
+
|
|
2322
|
+
> `static` **upgrade**(`path`, `options`): `Promise`\<[`Epub`](#epub)\>
|
|
2323
|
+
|
|
2324
|
+
Defined in:
|
|
2325
|
+
[epub/index.ts:3022](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L3022)
|
|
2326
|
+
|
|
2327
|
+
Upgrade an EPUB 2 publication to EPUB 3 in place, returning a new, valid Epub 3
|
|
2328
|
+
instance.
|
|
2329
|
+
|
|
2330
|
+
Performs the following transformations:
|
|
2331
|
+
|
|
2332
|
+
- upgrades OPF metadata to EPUB 3 conventions
|
|
2333
|
+
- scans XHTML documents and adds manifest item properties
|
|
2334
|
+
- parses the NCX into a TOC tree and generates a nav.xhtml
|
|
2335
|
+
- removes the NCX file and the guide element (configurable)
|
|
2336
|
+
- fixes common font MIME types
|
|
2337
|
+
- bumps the package version to 3.0
|
|
2338
|
+
- goes over each xhtml item and rewrites it using XMLParser to make sure the
|
|
2339
|
+
output is valid XHTML
|
|
2340
|
+
|
|
2341
|
+
##### Parameters
|
|
2342
|
+
|
|
2343
|
+
| Parameter | Type |
|
|
2344
|
+
| --------- | --------------------------------------------- |
|
|
2345
|
+
| `path` | `string` |
|
|
2346
|
+
| `options` | [`Epub2UpgradeOptions`](#epub2upgradeoptions) |
|
|
2347
|
+
|
|
2348
|
+
##### Returns
|
|
2349
|
+
|
|
2350
|
+
`Promise`\<[`Epub`](#epub)\>
|
|
2351
|
+
|
|
2352
|
+
---
|
|
2353
|
+
|
|
2354
|
+
## EpubVersionError
|
|
2355
|
+
|
|
2356
|
+
Defined in:
|
|
2357
|
+
[epub/index.ts:200](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L200)
|
|
2358
|
+
|
|
2359
|
+
### Extends
|
|
2360
|
+
|
|
2361
|
+
- `Error`
|
|
2362
|
+
|
|
2363
|
+
### Constructors
|
|
2364
|
+
|
|
2365
|
+
#### Constructor
|
|
2366
|
+
|
|
2367
|
+
> **new EpubVersionError**(`message?`): [`EpubVersionError`](#epubversionerror)
|
|
2368
|
+
|
|
2369
|
+
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1082
|
|
2370
|
+
|
|
2371
|
+
##### Parameters
|
|
2372
|
+
|
|
2373
|
+
| Parameter | Type |
|
|
2374
|
+
| ---------- | -------- |
|
|
2375
|
+
| `message?` | `string` |
|
|
2376
|
+
|
|
2377
|
+
##### Returns
|
|
2378
|
+
|
|
2379
|
+
[`EpubVersionError`](#epubversionerror)
|
|
2380
|
+
|
|
2381
|
+
##### Inherited from
|
|
2382
|
+
|
|
2383
|
+
`Error.constructor`
|
|
2384
|
+
|
|
2385
|
+
#### Constructor
|
|
2386
|
+
|
|
2387
|
+
> **new EpubVersionError**(`message?`, `options?`):
|
|
2388
|
+
> [`EpubVersionError`](#epubversionerror)
|
|
2389
|
+
|
|
2390
|
+
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1082
|
|
2391
|
+
|
|
2392
|
+
##### Parameters
|
|
2393
|
+
|
|
2394
|
+
| Parameter | Type |
|
|
2395
|
+
| ---------- | -------------- |
|
|
2396
|
+
| `message?` | `string` |
|
|
2397
|
+
| `options?` | `ErrorOptions` |
|
|
2398
|
+
|
|
2399
|
+
##### Returns
|
|
2400
|
+
|
|
2401
|
+
[`EpubVersionError`](#epubversionerror)
|
|
2402
|
+
|
|
2403
|
+
##### Inherited from
|
|
2404
|
+
|
|
2405
|
+
`Error.constructor`
|
|
2406
|
+
|
|
2407
|
+
### Properties
|
|
2408
|
+
|
|
2409
|
+
#### cause?
|
|
2410
|
+
|
|
2411
|
+
> `optional` **cause**: `unknown`
|
|
2412
|
+
|
|
2413
|
+
Defined in: node_modules/typescript/lib/lib.es2022.error.d.ts:26
|
|
2414
|
+
|
|
2415
|
+
##### Inherited from
|
|
2416
|
+
|
|
2417
|
+
`Error.cause`
|
|
2418
|
+
|
|
2419
|
+
#### message
|
|
2420
|
+
|
|
2421
|
+
> **message**: `string`
|
|
2422
|
+
|
|
2423
|
+
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1077
|
|
2424
|
+
|
|
2425
|
+
##### Inherited from
|
|
2426
|
+
|
|
2427
|
+
`Error.message`
|
|
2428
|
+
|
|
2429
|
+
#### name
|
|
2430
|
+
|
|
2431
|
+
> **name**: `string`
|
|
2432
|
+
|
|
2433
|
+
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1076
|
|
2434
|
+
|
|
2435
|
+
##### Inherited from
|
|
2436
|
+
|
|
2437
|
+
`Error.name`
|
|
2438
|
+
|
|
2439
|
+
#### stack?
|
|
2440
|
+
|
|
2441
|
+
> `optional` **stack**: `string`
|
|
2442
|
+
|
|
2443
|
+
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1078
|
|
2444
|
+
|
|
2445
|
+
##### Inherited from
|
|
2446
|
+
|
|
2447
|
+
`Error.stack`
|
|
2448
|
+
|
|
2449
|
+
#### stackTraceLimit
|
|
2450
|
+
|
|
2451
|
+
> `static` **stackTraceLimit**: `number`
|
|
2452
|
+
|
|
2453
|
+
Defined in: node_modules/@types/node/globals.d.ts:68
|
|
2454
|
+
|
|
2455
|
+
The `Error.stackTraceLimit` property specifies the number of stack frames
|
|
2456
|
+
collected by a stack trace (whether generated by `new Error().stack` or
|
|
2457
|
+
`Error.captureStackTrace(obj)`).
|
|
2458
|
+
|
|
2459
|
+
The default value is `10` but may be set to any valid JavaScript number. Changes
|
|
2460
|
+
will affect any stack trace captured _after_ the value has been changed.
|
|
2461
|
+
|
|
2462
|
+
If set to a non-number value, or set to a negative number, stack traces will not
|
|
2463
|
+
capture any frames.
|
|
2464
|
+
|
|
2465
|
+
##### Inherited from
|
|
2466
|
+
|
|
2467
|
+
`Error.stackTraceLimit`
|
|
2468
|
+
|
|
2469
|
+
### Methods
|
|
2470
|
+
|
|
2471
|
+
#### captureStackTrace()
|
|
2472
|
+
|
|
2473
|
+
> `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void`
|
|
2474
|
+
|
|
2475
|
+
Defined in: node_modules/@types/node/globals.d.ts:52
|
|
2476
|
+
|
|
2477
|
+
Creates a `.stack` property on `targetObject`, which when accessed returns a
|
|
2478
|
+
string representing the location in the code at which
|
|
2479
|
+
`Error.captureStackTrace()` was called.
|
|
2480
|
+
|
|
2481
|
+
```js
|
|
2482
|
+
const myObject = {}
|
|
2483
|
+
Error.captureStackTrace(myObject)
|
|
2484
|
+
myObject.stack // Similar to `new Error().stack`
|
|
2485
|
+
```
|
|
2486
|
+
|
|
2487
|
+
The first line of the trace will be prefixed with
|
|
2488
|
+
`${myObject.name}: ${myObject.message}`.
|
|
2489
|
+
|
|
2490
|
+
The optional `constructorOpt` argument accepts a function. If given, all frames
|
|
2491
|
+
above `constructorOpt`, including `constructorOpt`, will be omitted from the
|
|
2492
|
+
generated stack trace.
|
|
2493
|
+
|
|
2494
|
+
The `constructorOpt` argument is useful for hiding implementation details of
|
|
2495
|
+
error generation from the user. For instance:
|
|
2496
|
+
|
|
2497
|
+
```js
|
|
2498
|
+
function a() {
|
|
2499
|
+
b()
|
|
2500
|
+
}
|
|
2501
|
+
|
|
2502
|
+
function b() {
|
|
2503
|
+
c()
|
|
2504
|
+
}
|
|
2505
|
+
|
|
2506
|
+
function c() {
|
|
2507
|
+
// Create an error without stack trace to avoid calculating the stack trace twice.
|
|
2508
|
+
const { stackTraceLimit } = Error
|
|
2509
|
+
Error.stackTraceLimit = 0
|
|
2510
|
+
const error = new Error()
|
|
2511
|
+
Error.stackTraceLimit = stackTraceLimit
|
|
2512
|
+
|
|
2513
|
+
// Capture the stack trace above function b
|
|
2514
|
+
Error.captureStackTrace(error, b) // Neither function c, nor b is included in the stack trace
|
|
2515
|
+
throw error
|
|
2516
|
+
}
|
|
2517
|
+
|
|
2518
|
+
a()
|
|
2519
|
+
```
|
|
2520
|
+
|
|
2521
|
+
##### Parameters
|
|
2522
|
+
|
|
2523
|
+
| Parameter | Type |
|
|
2524
|
+
| ----------------- | ---------- |
|
|
2525
|
+
| `targetObject` | `object` |
|
|
2526
|
+
| `constructorOpt?` | `Function` |
|
|
2527
|
+
|
|
2528
|
+
##### Returns
|
|
2529
|
+
|
|
2530
|
+
`void`
|
|
2531
|
+
|
|
2532
|
+
##### Inherited from
|
|
2533
|
+
|
|
2534
|
+
`Error.captureStackTrace`
|
|
2535
|
+
|
|
2536
|
+
#### isError()
|
|
2537
|
+
|
|
2538
|
+
> `static` **isError**(`error`): `error is Error`
|
|
2539
|
+
|
|
2540
|
+
Defined in: node_modules/typescript/lib/lib.esnext.error.d.ts:23
|
|
2541
|
+
|
|
2542
|
+
Indicates whether the argument provided is a built-in Error instance or not.
|
|
2543
|
+
|
|
2544
|
+
##### Parameters
|
|
2545
|
+
|
|
2546
|
+
| Parameter | Type |
|
|
2547
|
+
| --------- | --------- |
|
|
2548
|
+
| `error` | `unknown` |
|
|
2549
|
+
|
|
2550
|
+
##### Returns
|
|
2551
|
+
|
|
2552
|
+
`error is Error`
|
|
2553
|
+
|
|
2554
|
+
##### Inherited from
|
|
2555
|
+
|
|
2556
|
+
`Error.isError`
|
|
2557
|
+
|
|
2558
|
+
#### prepareStackTrace()
|
|
2559
|
+
|
|
2560
|
+
> `static` **prepareStackTrace**(`err`, `stackTraces`): `any`
|
|
2561
|
+
|
|
2562
|
+
Defined in: node_modules/@types/node/globals.d.ts:56
|
|
2563
|
+
|
|
2564
|
+
##### Parameters
|
|
2565
|
+
|
|
2566
|
+
| Parameter | Type |
|
|
2567
|
+
| ------------- | ------------ |
|
|
2568
|
+
| `err` | `Error` |
|
|
2569
|
+
| `stackTraces` | `CallSite`[] |
|
|
2570
|
+
|
|
2571
|
+
##### Returns
|
|
2572
|
+
|
|
2573
|
+
`any`
|
|
2574
|
+
|
|
2575
|
+
##### See
|
|
2576
|
+
|
|
2577
|
+
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
|
|
2578
|
+
|
|
2579
|
+
##### Inherited from
|
|
2580
|
+
|
|
2581
|
+
`Error.prepareStackTrace`
|
|
2582
|
+
|
|
2085
2583
|
---
|
|
2086
2584
|
|
|
2087
2585
|
## AlternateScript
|
|
2088
2586
|
|
|
2089
2587
|
Defined in:
|
|
2090
|
-
[epub/index.ts:
|
|
2588
|
+
[epub/index.ts:110](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L110)
|
|
2091
2589
|
|
|
2092
2590
|
### Properties
|
|
2093
2591
|
|
|
@@ -2096,21 +2594,21 @@ Defined in:
|
|
|
2096
2594
|
> **locale**: `Locale`
|
|
2097
2595
|
|
|
2098
2596
|
Defined in:
|
|
2099
|
-
[epub/index.ts:
|
|
2597
|
+
[epub/index.ts:112](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L112)
|
|
2100
2598
|
|
|
2101
2599
|
#### name
|
|
2102
2600
|
|
|
2103
2601
|
> **name**: `string`
|
|
2104
2602
|
|
|
2105
2603
|
Defined in:
|
|
2106
|
-
[epub/index.ts:
|
|
2604
|
+
[epub/index.ts:111](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L111)
|
|
2107
2605
|
|
|
2108
2606
|
---
|
|
2109
2607
|
|
|
2110
2608
|
## Collection
|
|
2111
2609
|
|
|
2112
2610
|
Defined in:
|
|
2113
|
-
[epub/index.ts:
|
|
2611
|
+
[epub/index.ts:134](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L134)
|
|
2114
2612
|
|
|
2115
2613
|
### Properties
|
|
2116
2614
|
|
|
@@ -2119,28 +2617,28 @@ Defined in:
|
|
|
2119
2617
|
> **name**: `string`
|
|
2120
2618
|
|
|
2121
2619
|
Defined in:
|
|
2122
|
-
[epub/index.ts:
|
|
2620
|
+
[epub/index.ts:135](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L135)
|
|
2123
2621
|
|
|
2124
2622
|
#### position?
|
|
2125
2623
|
|
|
2126
2624
|
> `optional` **position**: `string`
|
|
2127
2625
|
|
|
2128
2626
|
Defined in:
|
|
2129
|
-
[epub/index.ts:
|
|
2627
|
+
[epub/index.ts:137](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L137)
|
|
2130
2628
|
|
|
2131
2629
|
#### type?
|
|
2132
2630
|
|
|
2133
2631
|
> `optional` **type**: `string`
|
|
2134
2632
|
|
|
2135
2633
|
Defined in:
|
|
2136
|
-
[epub/index.ts:
|
|
2634
|
+
[epub/index.ts:136](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L136)
|
|
2137
2635
|
|
|
2138
2636
|
---
|
|
2139
2637
|
|
|
2140
2638
|
## DcCreator
|
|
2141
2639
|
|
|
2142
2640
|
Defined in:
|
|
2143
|
-
[epub/index.ts:
|
|
2641
|
+
[epub/index.ts:115](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L115)
|
|
2144
2642
|
|
|
2145
2643
|
### Properties
|
|
2146
2644
|
|
|
@@ -2149,42 +2647,42 @@ Defined in:
|
|
|
2149
2647
|
> `optional` **alternateScripts**: [`AlternateScript`](#alternatescript)[]
|
|
2150
2648
|
|
|
2151
2649
|
Defined in:
|
|
2152
|
-
[epub/index.ts:
|
|
2650
|
+
[epub/index.ts:120](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L120)
|
|
2153
2651
|
|
|
2154
2652
|
#### fileAs?
|
|
2155
2653
|
|
|
2156
2654
|
> `optional` **fileAs**: `string`
|
|
2157
2655
|
|
|
2158
2656
|
Defined in:
|
|
2159
|
-
[epub/index.ts:
|
|
2657
|
+
[epub/index.ts:119](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L119)
|
|
2160
2658
|
|
|
2161
2659
|
#### name
|
|
2162
2660
|
|
|
2163
2661
|
> **name**: `string`
|
|
2164
2662
|
|
|
2165
2663
|
Defined in:
|
|
2166
|
-
[epub/index.ts:
|
|
2664
|
+
[epub/index.ts:116](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L116)
|
|
2167
2665
|
|
|
2168
2666
|
#### role?
|
|
2169
2667
|
|
|
2170
2668
|
> `optional` **role**: `string`
|
|
2171
2669
|
|
|
2172
2670
|
Defined in:
|
|
2173
|
-
[epub/index.ts:
|
|
2671
|
+
[epub/index.ts:117](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L117)
|
|
2174
2672
|
|
|
2175
2673
|
#### roleScheme?
|
|
2176
2674
|
|
|
2177
2675
|
> `optional` **roleScheme**: `string`
|
|
2178
2676
|
|
|
2179
2677
|
Defined in:
|
|
2180
|
-
[epub/index.ts:
|
|
2678
|
+
[epub/index.ts:118](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L118)
|
|
2181
2679
|
|
|
2182
2680
|
---
|
|
2183
2681
|
|
|
2184
2682
|
## DcSubject
|
|
2185
2683
|
|
|
2186
2684
|
Defined in:
|
|
2187
|
-
[epub/index.ts:
|
|
2685
|
+
[epub/index.ts:104](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L104)
|
|
2188
2686
|
|
|
2189
2687
|
### Properties
|
|
2190
2688
|
|
|
@@ -2193,28 +2691,28 @@ Defined in:
|
|
|
2193
2691
|
> **authority**: `string`
|
|
2194
2692
|
|
|
2195
2693
|
Defined in:
|
|
2196
|
-
[epub/index.ts:
|
|
2694
|
+
[epub/index.ts:106](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L106)
|
|
2197
2695
|
|
|
2198
2696
|
#### term
|
|
2199
2697
|
|
|
2200
2698
|
> **term**: `string`
|
|
2201
2699
|
|
|
2202
2700
|
Defined in:
|
|
2203
|
-
[epub/index.ts:
|
|
2701
|
+
[epub/index.ts:107](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L107)
|
|
2204
2702
|
|
|
2205
2703
|
#### value
|
|
2206
2704
|
|
|
2207
2705
|
> **value**: `string`
|
|
2208
2706
|
|
|
2209
2707
|
Defined in:
|
|
2210
|
-
[epub/index.ts:
|
|
2708
|
+
[epub/index.ts:105](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L105)
|
|
2211
2709
|
|
|
2212
2710
|
---
|
|
2213
2711
|
|
|
2214
2712
|
## DublinCore
|
|
2215
2713
|
|
|
2216
2714
|
Defined in:
|
|
2217
|
-
[epub/index.ts:
|
|
2715
|
+
[epub/index.ts:123](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L123)
|
|
2218
2716
|
|
|
2219
2717
|
### Properties
|
|
2220
2718
|
|
|
@@ -2223,56 +2721,167 @@ Defined in:
|
|
|
2223
2721
|
> `optional` **contributors**: [`DcCreator`](#dccreator)[]
|
|
2224
2722
|
|
|
2225
2723
|
Defined in:
|
|
2226
|
-
[epub/index.ts:
|
|
2724
|
+
[epub/index.ts:130](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L130)
|
|
2227
2725
|
|
|
2228
2726
|
#### creators?
|
|
2229
2727
|
|
|
2230
2728
|
> `optional` **creators**: [`DcCreator`](#dccreator)[]
|
|
2231
2729
|
|
|
2232
2730
|
Defined in:
|
|
2233
|
-
[epub/index.ts:
|
|
2731
|
+
[epub/index.ts:129](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L129)
|
|
2234
2732
|
|
|
2235
2733
|
#### date?
|
|
2236
2734
|
|
|
2237
2735
|
> `optional` **date**: `Date`
|
|
2238
2736
|
|
|
2239
2737
|
Defined in:
|
|
2240
|
-
[epub/index.ts:
|
|
2738
|
+
[epub/index.ts:127](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L127)
|
|
2241
2739
|
|
|
2242
2740
|
#### identifier
|
|
2243
2741
|
|
|
2244
2742
|
> **identifier**: `string`
|
|
2245
2743
|
|
|
2246
2744
|
Defined in:
|
|
2247
|
-
[epub/index.ts:
|
|
2745
|
+
[epub/index.ts:126](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L126)
|
|
2248
2746
|
|
|
2249
2747
|
#### language
|
|
2250
2748
|
|
|
2251
2749
|
> **language**: `Locale`
|
|
2252
2750
|
|
|
2253
2751
|
Defined in:
|
|
2254
|
-
[epub/index.ts:
|
|
2752
|
+
[epub/index.ts:125](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L125)
|
|
2255
2753
|
|
|
2256
2754
|
#### subjects?
|
|
2257
2755
|
|
|
2258
2756
|
> `optional` **subjects**: (`string` \| [`DcSubject`](#dcsubject))[]
|
|
2259
2757
|
|
|
2260
2758
|
Defined in:
|
|
2261
|
-
[epub/index.ts:
|
|
2759
|
+
[epub/index.ts:128](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L128)
|
|
2262
2760
|
|
|
2263
2761
|
#### title
|
|
2264
2762
|
|
|
2265
2763
|
> **title**: `string`
|
|
2266
2764
|
|
|
2267
2765
|
Defined in:
|
|
2268
|
-
[epub/index.ts:
|
|
2766
|
+
[epub/index.ts:124](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L124)
|
|
2269
2767
|
|
|
2270
2768
|
#### type?
|
|
2271
2769
|
|
|
2272
2770
|
> `optional` **type**: `string`
|
|
2273
2771
|
|
|
2274
2772
|
Defined in:
|
|
2275
|
-
[epub/index.ts:
|
|
2773
|
+
[epub/index.ts:131](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L131)
|
|
2774
|
+
|
|
2775
|
+
---
|
|
2776
|
+
|
|
2777
|
+
## Epub2UpgradeOptions
|
|
2778
|
+
|
|
2779
|
+
Defined in:
|
|
2780
|
+
[epub/upgrade.ts:93](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/upgrade.ts#L93)
|
|
2781
|
+
|
|
2782
|
+
### Properties
|
|
2783
|
+
|
|
2784
|
+
#### outputPath?
|
|
2785
|
+
|
|
2786
|
+
> `optional` **outputPath**: `string`
|
|
2787
|
+
|
|
2788
|
+
Defined in:
|
|
2789
|
+
[epub/upgrade.ts:97](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/upgrade.ts#L97)
|
|
2790
|
+
|
|
2791
|
+
The path to the output file. If provided, the input file will be copied to the
|
|
2792
|
+
output path.
|
|
2793
|
+
|
|
2794
|
+
#### removeNcx?
|
|
2795
|
+
|
|
2796
|
+
> `optional` **removeNcx**: `boolean`
|
|
2797
|
+
|
|
2798
|
+
Defined in:
|
|
2799
|
+
[epub/upgrade.ts:101](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/upgrade.ts#L101)
|
|
2800
|
+
|
|
2801
|
+
Whether to remove the NCX file, as it's technically optional in EPUB 3.
|
|
2802
|
+
|
|
2803
|
+
---
|
|
2804
|
+
|
|
2805
|
+
## Landmark
|
|
2806
|
+
|
|
2807
|
+
Defined in:
|
|
2808
|
+
[epub/upgrade.ts:87](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/upgrade.ts#L87)
|
|
2809
|
+
|
|
2810
|
+
### Properties
|
|
2811
|
+
|
|
2812
|
+
#### href
|
|
2813
|
+
|
|
2814
|
+
> **href**: `string`
|
|
2815
|
+
|
|
2816
|
+
Defined in:
|
|
2817
|
+
[epub/upgrade.ts:88](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/upgrade.ts#L88)
|
|
2818
|
+
|
|
2819
|
+
#### title
|
|
2820
|
+
|
|
2821
|
+
> **title**: `string`
|
|
2822
|
+
|
|
2823
|
+
Defined in:
|
|
2824
|
+
[epub/upgrade.ts:89](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/upgrade.ts#L89)
|
|
2825
|
+
|
|
2826
|
+
#### type
|
|
2827
|
+
|
|
2828
|
+
> **type**: `string`
|
|
2829
|
+
|
|
2830
|
+
Defined in:
|
|
2831
|
+
[epub/upgrade.ts:90](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/upgrade.ts#L90)
|
|
2832
|
+
|
|
2833
|
+
---
|
|
2834
|
+
|
|
2835
|
+
## Navigation
|
|
2836
|
+
|
|
2837
|
+
Defined in:
|
|
2838
|
+
[epub/index.ts:148](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L148)
|
|
2839
|
+
|
|
2840
|
+
### Properties
|
|
2841
|
+
|
|
2842
|
+
#### children
|
|
2843
|
+
|
|
2844
|
+
> **children**: [`NavigationList`](#navigationlist)
|
|
2845
|
+
|
|
2846
|
+
Defined in:
|
|
2847
|
+
[epub/index.ts:150](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L150)
|
|
2848
|
+
|
|
2849
|
+
#### title?
|
|
2850
|
+
|
|
2851
|
+
> `optional` **title**: `string`
|
|
2852
|
+
|
|
2853
|
+
Defined in:
|
|
2854
|
+
[epub/index.ts:149](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L149)
|
|
2855
|
+
|
|
2856
|
+
---
|
|
2857
|
+
|
|
2858
|
+
## NavigationItem
|
|
2859
|
+
|
|
2860
|
+
Defined in:
|
|
2861
|
+
[epub/index.ts:140](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L140)
|
|
2862
|
+
|
|
2863
|
+
### Properties
|
|
2864
|
+
|
|
2865
|
+
#### children?
|
|
2866
|
+
|
|
2867
|
+
> `optional` **children**: [`NavigationList`](#navigationlist)
|
|
2868
|
+
|
|
2869
|
+
Defined in:
|
|
2870
|
+
[epub/index.ts:143](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L143)
|
|
2871
|
+
|
|
2872
|
+
#### href?
|
|
2873
|
+
|
|
2874
|
+
> `optional` **href**: `string`
|
|
2875
|
+
|
|
2876
|
+
Defined in:
|
|
2877
|
+
[epub/index.ts:142](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L142)
|
|
2878
|
+
|
|
2879
|
+
#### title
|
|
2880
|
+
|
|
2881
|
+
> **title**: `string`
|
|
2882
|
+
|
|
2883
|
+
Defined in:
|
|
2884
|
+
[epub/index.ts:141](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L141)
|
|
2276
2885
|
|
|
2277
2886
|
---
|
|
2278
2887
|
|
|
@@ -2282,7 +2891,7 @@ Defined in:
|
|
|
2282
2891
|
> \`$\{Letter \| Uppercase\<Letter\> \| QuestionMark\}$\{string\}\`
|
|
2283
2892
|
|
|
2284
2893
|
Defined in:
|
|
2285
|
-
[epub/index.ts:
|
|
2894
|
+
[epub/index.ts:65](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L65)
|
|
2286
2895
|
|
|
2287
2896
|
A valid name for an XML element (must start with a letter)
|
|
2288
2897
|
|
|
@@ -2293,7 +2902,7 @@ A valid name for an XML element (must start with a letter)
|
|
|
2293
2902
|
> **EpubMetadata** = [`MetadataEntry`](#metadataentry)[]
|
|
2294
2903
|
|
|
2295
2904
|
Defined in:
|
|
2296
|
-
[epub/index.ts:
|
|
2905
|
+
[epub/index.ts:102](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L102)
|
|
2297
2906
|
|
|
2298
2907
|
---
|
|
2299
2908
|
|
|
@@ -2302,7 +2911,7 @@ Defined in:
|
|
|
2302
2911
|
> **ManifestItem** = `object`
|
|
2303
2912
|
|
|
2304
2913
|
Defined in:
|
|
2305
|
-
[epub/index.ts:
|
|
2914
|
+
[epub/index.ts:86](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L86)
|
|
2306
2915
|
|
|
2307
2916
|
### Properties
|
|
2308
2917
|
|
|
@@ -2311,42 +2920,42 @@ Defined in:
|
|
|
2311
2920
|
> `optional` **fallback**: `string`
|
|
2312
2921
|
|
|
2313
2922
|
Defined in:
|
|
2314
|
-
[epub/index.ts:
|
|
2923
|
+
[epub/index.ts:90](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L90)
|
|
2315
2924
|
|
|
2316
2925
|
#### href
|
|
2317
2926
|
|
|
2318
2927
|
> **href**: `string`
|
|
2319
2928
|
|
|
2320
2929
|
Defined in:
|
|
2321
|
-
[epub/index.ts:
|
|
2930
|
+
[epub/index.ts:88](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L88)
|
|
2322
2931
|
|
|
2323
2932
|
#### id
|
|
2324
2933
|
|
|
2325
2934
|
> **id**: `string`
|
|
2326
2935
|
|
|
2327
2936
|
Defined in:
|
|
2328
|
-
[epub/index.ts:
|
|
2937
|
+
[epub/index.ts:87](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L87)
|
|
2329
2938
|
|
|
2330
2939
|
#### mediaOverlay?
|
|
2331
2940
|
|
|
2332
2941
|
> `optional` **mediaOverlay**: `string`
|
|
2333
2942
|
|
|
2334
2943
|
Defined in:
|
|
2335
|
-
[epub/index.ts:
|
|
2944
|
+
[epub/index.ts:91](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L91)
|
|
2336
2945
|
|
|
2337
2946
|
#### mediaType?
|
|
2338
2947
|
|
|
2339
2948
|
> `optional` **mediaType**: `string`
|
|
2340
2949
|
|
|
2341
2950
|
Defined in:
|
|
2342
|
-
[epub/index.ts:
|
|
2951
|
+
[epub/index.ts:89](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L89)
|
|
2343
2952
|
|
|
2344
2953
|
#### properties?
|
|
2345
2954
|
|
|
2346
2955
|
> `optional` **properties**: `string`[]
|
|
2347
2956
|
|
|
2348
2957
|
Defined in:
|
|
2349
|
-
[epub/index.ts:
|
|
2958
|
+
[epub/index.ts:92](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L92)
|
|
2350
2959
|
|
|
2351
2960
|
---
|
|
2352
2961
|
|
|
@@ -2355,7 +2964,7 @@ Defined in:
|
|
|
2355
2964
|
> **MetadataEntry** = `object`
|
|
2356
2965
|
|
|
2357
2966
|
Defined in:
|
|
2358
|
-
[epub/index.ts:
|
|
2967
|
+
[epub/index.ts:95](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L95)
|
|
2359
2968
|
|
|
2360
2969
|
### Properties
|
|
2361
2970
|
|
|
@@ -2364,38 +2973,46 @@ Defined in:
|
|
|
2364
2973
|
> `optional` **id**: `string`
|
|
2365
2974
|
|
|
2366
2975
|
Defined in:
|
|
2367
|
-
[epub/index.ts:
|
|
2976
|
+
[epub/index.ts:96](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L96)
|
|
2368
2977
|
|
|
2369
2978
|
#### properties
|
|
2370
2979
|
|
|
2371
2980
|
> **properties**: `Record`\<`string`, `string`\>
|
|
2372
2981
|
|
|
2373
2982
|
Defined in:
|
|
2374
|
-
[epub/index.ts:
|
|
2983
|
+
[epub/index.ts:98](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L98)
|
|
2375
2984
|
|
|
2376
2985
|
#### type
|
|
2377
2986
|
|
|
2378
2987
|
> **type**: [`ElementName`](#elementname)
|
|
2379
2988
|
|
|
2380
2989
|
Defined in:
|
|
2381
|
-
[epub/index.ts:
|
|
2990
|
+
[epub/index.ts:97](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L97)
|
|
2382
2991
|
|
|
2383
2992
|
#### value
|
|
2384
2993
|
|
|
2385
2994
|
> **value**: `string` \| `undefined`
|
|
2386
2995
|
|
|
2387
2996
|
Defined in:
|
|
2388
|
-
[epub/index.ts:
|
|
2997
|
+
[epub/index.ts:99](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L99)
|
|
2998
|
+
|
|
2999
|
+
---
|
|
3000
|
+
|
|
3001
|
+
## NavigationList
|
|
3002
|
+
|
|
3003
|
+
> **NavigationList** = [`NavigationItem`](#navigationitem)[]
|
|
3004
|
+
|
|
3005
|
+
Defined in:
|
|
3006
|
+
[epub/index.ts:146](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L146)
|
|
2389
3007
|
|
|
2390
3008
|
---
|
|
2391
3009
|
|
|
2392
3010
|
## PackageElement
|
|
2393
3011
|
|
|
2394
|
-
> **PackageElement** = [`XmlElement`](#xmlelement)\<`"package"`\>
|
|
2395
|
-
> [`XmlElement`](#xmlelement)\<`"opf:package"`\>
|
|
3012
|
+
> **PackageElement** = [`XmlElement`](#xmlelement)\<`"package"`\>
|
|
2396
3013
|
|
|
2397
3014
|
Defined in:
|
|
2398
|
-
[epub/index.ts:
|
|
3015
|
+
[epub/index.ts:159](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L159)
|
|
2399
3016
|
|
|
2400
3017
|
---
|
|
2401
3018
|
|
|
@@ -2404,7 +3021,7 @@ Defined in:
|
|
|
2404
3021
|
> **ParsedXml** = [`XmlNode`](#xmlnode)[]
|
|
2405
3022
|
|
|
2406
3023
|
Defined in:
|
|
2407
|
-
[epub/index.ts:
|
|
3024
|
+
[epub/index.ts:84](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L84)
|
|
2408
3025
|
|
|
2409
3026
|
An XML structure
|
|
2410
3027
|
|
|
@@ -2415,7 +3032,7 @@ An XML structure
|
|
|
2415
3032
|
> **XmlElement**\<`Name`\> = `object` & `{ [key in Name]: ParsedXml }`
|
|
2416
3033
|
|
|
2417
3034
|
Defined in:
|
|
2418
|
-
[epub/index.ts:
|
|
3035
|
+
[epub/index.ts:71](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L71)
|
|
2419
3036
|
|
|
2420
3037
|
An XML element
|
|
2421
3038
|
|
|
@@ -2438,7 +3055,7 @@ An XML element
|
|
|
2438
3055
|
> **XmlNode** = [`XmlElement`](#xmlelement) \| [`XmlTextNode`](#xmltextnode)
|
|
2439
3056
|
|
|
2440
3057
|
Defined in:
|
|
2441
|
-
[epub/index.ts:
|
|
3058
|
+
[epub/index.ts:81](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L81)
|
|
2442
3059
|
|
|
2443
3060
|
A valid XML node. May be either an element or a text node.
|
|
2444
3061
|
|
|
@@ -2449,7 +3066,7 @@ A valid XML node. May be either an element or a text node.
|
|
|
2449
3066
|
> **XmlTextNode** = `object`
|
|
2450
3067
|
|
|
2451
3068
|
Defined in:
|
|
2452
|
-
[epub/index.ts:
|
|
3069
|
+
[epub/index.ts:78](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L78)
|
|
2453
3070
|
|
|
2454
3071
|
A text node in an XML document
|
|
2455
3072
|
|
|
@@ -2460,4 +3077,4 @@ A text node in an XML document
|
|
|
2460
3077
|
> **#text**: `string`
|
|
2461
3078
|
|
|
2462
3079
|
Defined in:
|
|
2463
|
-
[epub/index.ts:
|
|
3080
|
+
[epub/index.ts:78](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/epub/index.ts#L78)
|