@storyteller-platform/epub 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -14,7 +14,6 @@ publications.
14
14
  - [Creating from scratch](#creating-from-scratch)
15
15
  - [Adding a chapter](#adding-a-chapter)
16
16
  - [Writing to disk](#writing-to-disk)
17
- - [Writing to a byte array](#writing-to-a-byte-array)
18
17
  - [Upgrading an EPUB 2 to EPUB 3](#upgrading-an-epub-2-to-epub-3)
19
18
  - [Browser support](#browser-support)
20
19
  - [Development](#development)
@@ -98,12 +97,12 @@ scratch.
98
97
  ### Reading from a file
99
98
 
100
99
  ```ts
101
- import { Epub } from "@storyteller-platform/epub";
100
+ import { Epub } from "@storyteller-platform/epub"
102
101
 
103
- using epub = await Epub.from("path/to/book.epub");
102
+ using epub = await Epub.from("path/to/book.epub")
104
103
  // equivalent to
105
104
  // using epub = await Epub.using(TmpFsAdapter).from("path/to/book.epub")
106
- console.log(await epub.getTitle());
105
+ console.log(await epub.getTitle())
107
106
  ```
108
107
 
109
108
  If you want to be a little more efficient and not unpack the entire EPUB file
@@ -112,10 +111,10 @@ Overlays/audio contents), you can instead lazily read the contents of the EPUB
112
111
  file into memory.
113
112
 
114
113
  ```ts
115
- import { Epub, MemoryAdapter } from "@storyteller-platform/epub";
114
+ import { Epub, MemoryAdapter } from "@storyteller-platform/epub"
116
115
 
117
- using epub = await Epub.using(MemoryAdapter).from("path/to/book.epub");
118
- console.log(await epub.getTitle());
116
+ using epub = await Epub.using(MemoryAdapter).from("path/to/book.epub")
117
+ console.log(await epub.getTitle())
119
118
  ```
120
119
 
121
120
  ### Creating from scratch
@@ -129,9 +128,9 @@ non-core metadata may also be provided at creation time, or may be added
129
128
  incrementally after creation.
130
129
 
131
130
  ```ts
132
- import { randomUUID } from "node:crypto";
131
+ import { randomUUID } from "node:crypto"
133
132
 
134
- import { Epub } from "@storyteller-platform/epub";
133
+ import { Epub } from "@storyteller-platform/epub"
135
134
 
136
135
  // Implicitly uses the TmpFsAdapter
137
136
  const epub = await Epub.create("/path/to/book.epub", {
@@ -141,15 +140,15 @@ const epub = await Epub.create("/path/to/book.epub", {
141
140
  language: new Intl.Locale("en-US"),
142
141
  // This can be any unique identifier, including UUIDs, ISBNs, etc
143
142
  identifier: randomUUID(),
144
- });
143
+ })
145
144
  ```
146
145
 
147
146
  ### Adding a chapter
148
147
 
149
148
  ```tsx
150
- import { Epub, type ManifestItem, x } from "@storyteller-platform/epub";
149
+ import { Epub, type ManifestItem, x } from "@storyteller-platform/epub"
151
150
 
152
- const epub = await Epub.from("path/to/book.epub");
151
+ const epub = await Epub.from("path/to/book.epub")
153
152
 
154
153
  // Construct a manifest item describing the chapter
155
154
  const manifestItem: ManifestItem = {
@@ -158,7 +157,7 @@ const manifestItem: ManifestItem = {
158
157
  // EPUB archive.
159
158
  href: "XHTML/chapter-one.xhtml",
160
159
  mediaType: "application/xhtml+xml",
161
- };
160
+ }
162
161
 
163
162
  // You can specify the contents as a string
164
163
  const contents = `<?xml version="1.0" encoding="UTF-8"?>
@@ -171,41 +170,41 @@ const contents = `<?xml version="1.0" encoding="UTF-8"?>
171
170
  <h1>Chapter 1</h1>
172
171
  <p>At first, there were s'mores.</p>
173
172
  </body>
174
- </html>`;
173
+ </html>`
175
174
 
176
175
  // Or you can specify the contents as an XML structure
177
176
  const xmlContents = await epub.createXhtmlDocument([
178
177
  x("h1", null, "Chapter 1"),
179
178
  x("p", null, "At first, there were s'mores."),
180
- ]);
179
+ ])
181
180
 
182
181
  // Or, using JSX
183
182
  /** @jsxImportSource @storyteller-platform/epub */
184
183
  const xmlContents = await epub.createXhtmlDocument([
185
184
  <h1>Chapter 1</h1>,
186
185
  <p>At first, there were s'mores.</p>,
187
- ]);
186
+ ])
188
187
 
189
188
  // First, add the new item to the manifest, and add
190
189
  // its contents to the publication
191
- await epub.addManifestItem(manifestItem, contents, "utf-8");
190
+ await epub.addManifestItem(manifestItem, contents, "utf-8")
192
191
 
193
192
  // OR, using the XMl:
194
- await epub.addManifestItem(manifestItem, xmlContents, "xml");
193
+ await epub.addManifestItem(manifestItem, xmlContents, "xml")
195
194
 
196
195
  // Then add the item to the spine
197
- await epub.addSpineItem(manifestItem.id);
196
+ await epub.addSpineItem(manifestItem.id)
198
197
  ```
199
198
 
200
199
  ### Writing to disk
201
200
 
202
201
  ```ts
203
- import { Epub } from "@storyteller-platform/epub";
202
+ import { Epub } from "@storyteller-platform/epub"
204
203
 
205
- const epub = await Epub.from("path/to/book.epub");
206
- await epub.setTitle("S'mores for Everyone");
204
+ const epub = await Epub.from("path/to/book.epub")
205
+ await epub.setTitle("S'mores for Everyone")
207
206
 
208
- await epub.saveAndClose();
207
+ await epub.saveAndClose()
209
208
  ```
210
209
 
211
210
  For more details about using the API, see the [API documentation](#epub).
@@ -219,15 +218,15 @@ However, it does support upgrading an EPUB 2 file to EPUB 3, after which you can
219
218
  use the library like normal.
220
219
 
221
220
  ```ts
222
- import { Epub } from "@storyteller-platform/epub";
221
+ import { Epub } from "@storyteller-platform/epub"
223
222
 
224
223
  using epub = await Epub.upgrade("path/to/epub2.epub", {
225
224
  // optional. if omitted the Epub
226
225
  outputPath: "path/to/epub3.epub",
227
- });
226
+ })
228
227
 
229
228
  // if .saveAndClose() is not called and `outputPath` isn't provided, the Epub will return to it's unupgraded state
230
- await epub.saveAndClose();
229
+ await epub.saveAndClose()
231
230
 
232
231
  // Do Epub stuff
233
232
  ```
@@ -240,45 +239,45 @@ In the browser, currently you can only use the `MemoryAdapter` to read EPUB
240
239
  files.
241
240
 
242
241
  ```tsx
243
- import { useState, useEffect } from "react";
242
+ import { useState, useEffect } from "react"
244
243
 
245
244
  import {
246
245
  Epub,
247
246
  type EpubReader,
248
247
  MemoryAdapter,
249
- } from "@storyteller-platform/epub";
248
+ } from "@storyteller-platform/epub"
250
249
 
251
250
  export function BookCover(file: File) {
252
- const [cover, setCover] = useState<string | null>(null);
251
+ const [cover, setCover] = useState<string | null>(null)
253
252
 
254
253
  useEffect(() => {
255
- let epub: EpubReader | null = null;
256
- let coverUrl: string | null = null;
254
+ let epub: EpubReader | null = null
255
+ let coverUrl: string | null = null
257
256
 
258
257
  async function loadCover() {
259
258
  // unfortunately Safari does not support `using` syntax yet
260
259
  try {
261
- epub = await Epub.using(MemoryAdapter).from(file);
262
- const cover = await epub.getCoverImage();
260
+ epub = await Epub.using(MemoryAdapter).from(file)
261
+ const cover = await epub.getCoverImage()
263
262
  if (cover) {
264
- coverUrl = URL.createObjectURL(new Blob([new Uint8Array(cover)]));
265
- setCover(coverUrl);
263
+ coverUrl = URL.createObjectURL(new Blob([new Uint8Array(cover)]))
264
+ setCover(coverUrl)
266
265
  }
267
266
  } finally {
268
- epub?.discardAndClose();
267
+ epub?.discardAndClose()
269
268
  }
270
269
  }
271
270
 
272
- loadCover();
271
+ loadCover()
273
272
 
274
273
  return () => {
275
274
  if (coverUrl) {
276
- URL.revokeObjectURL(coverUrl);
275
+ URL.revokeObjectURL(coverUrl)
277
276
  }
278
- };
279
- }, [file]);
277
+ }
278
+ }, [file])
280
279
 
281
- return cover ? <img src={cover} alt="Cover" /> : null;
280
+ return cover ? <img src={cover} alt="Cover" /> : null
282
281
  }
283
282
  ```
284
283
 
@@ -298,7 +297,7 @@ To get started with developing in the Storyteller monorepo, check out the
298
297
 
299
298
  ## Epub
300
299
 
301
- Defined in: [libraries/epub/src/index.tsx:352](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L352)
300
+ Defined in: [libraries/epub/src/index.tsx:351](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L351)
302
301
 
303
302
  A single EPUB instance.
304
303
 
@@ -314,7 +313,7 @@ import {
314
313
  textContent,
315
314
  } from "@storyteller-platform/epub";
316
315
 
317
- const epub = await Epub.from("./path/to/book.epub");
316
+ using epub = await Epub.from("./path/to/book.epub");
318
317
  const title = await epub.getTitle();
319
318
  const spineItems = await epub.getSpineItems();
320
319
  const chptOne = spineItems[0];
@@ -325,8 +324,7 @@ const h1 = findXmlChildByName("h1", body);
325
324
  const headingText = textContent(h1);
326
325
 
327
326
  await epub.setTitle(headingText);
328
- await epub.writeToFile("./path/to/updated.epub");
329
- await epub.close();
327
+ await epub.saveAndClose();
330
328
  ```
331
329
 
332
330
  ### Link
@@ -339,7 +337,7 @@ https://www.w3.org/TR/epub-33/
339
337
 
340
338
  > **new Epub**(`adapterClass`, `adapter`, `inputPath`, `readonlyOverride`): [`Epub`](#epub)
341
339
 
342
- Defined in: [libraries/epub/src/index.tsx:393](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L393)
340
+ Defined in: [libraries/epub/src/index.tsx:392](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L392)
343
341
 
344
342
  Prefer the static factories ([Epub.using](#using), [Epub.from](#from),
345
343
  [Epub.create](#create), [Epub.upgrade](#upgrade)) over calling this constructor
@@ -365,31 +363,31 @@ else should need to.
365
363
 
366
364
  > `protected` **adapter**: [`EpubStorageAdapter`](#epubstorageadapter)
367
365
 
368
- Defined in: [libraries/epub/src/index.tsx:395](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L395)
366
+ Defined in: [libraries/epub/src/index.tsx:394](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L394)
369
367
 
370
368
  #### adapterClass
371
369
 
372
370
  > `protected` **adapterClass**: [`EpubStorageAdapterClass`](#epubstorageadapterclass)
373
371
 
374
- Defined in: [libraries/epub/src/index.tsx:394](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L394)
372
+ Defined in: [libraries/epub/src/index.tsx:393](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L393)
375
373
 
376
374
  #### inputPath
377
375
 
378
376
  > `protected` **inputPath**: `string` \| `undefined`
379
377
 
380
- Defined in: [libraries/epub/src/index.tsx:396](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L396)
378
+ Defined in: [libraries/epub/src/index.tsx:395](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L395)
381
379
 
382
380
  #### readonlyOverride
383
381
 
384
382
  > `protected` **readonlyOverride**: `boolean` = `false`
385
383
 
386
- Defined in: [libraries/epub/src/index.tsx:397](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L397)
384
+ Defined in: [libraries/epub/src/index.tsx:396](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L396)
387
385
 
388
386
  #### storage
389
387
 
390
388
  > `readonly` **storage**: [`EpubStorageKind`](#epubstoragekind)
391
389
 
392
- Defined in: [libraries/epub/src/index.tsx:385](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L385)
390
+ Defined in: [libraries/epub/src/index.tsx:384](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L384)
393
391
 
394
392
  Storage backend kind in use for this instance
395
393
 
@@ -403,7 +401,7 @@ and the adapter's capability bag)
403
401
 
404
402
  > **\[dispose\]**(): `void`
405
403
 
406
- Defined in: [libraries/epub/src/index.tsx:3317](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3317)
404
+ Defined in: [libraries/epub/src/index.tsx:3314](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3314)
407
405
 
408
406
  ##### Returns
409
407
 
@@ -413,7 +411,7 @@ Defined in: [libraries/epub/src/index.tsx:3317](https://gitlab.com/storyteller-p
413
411
 
414
412
  > **addCollection**(`collection`, `index?`): `Promise`\<`void`\>
415
413
 
416
- Defined in: [libraries/epub/src/index.tsx:1942](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1942)
414
+ Defined in: [libraries/epub/src/index.tsx:1941](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1941)
417
415
 
418
416
  Add a collection to the EPUB metadata.
419
417
 
@@ -436,7 +434,7 @@ will be added to the end of the list.
436
434
 
437
435
  > **addContributor**(`contributor`, `index?`): `Promise`\<`void`\>
438
436
 
439
- Defined in: [libraries/epub/src/index.tsx:2251](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2251)
437
+ Defined in: [libraries/epub/src/index.tsx:2250](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2250)
440
438
 
441
439
  Add a contributor to the EPUB metadata.
442
440
 
@@ -466,7 +464,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccreator
466
464
 
467
465
  > **addCreator**(`creator`, `index?`, `type?`): `Promise`\<`void`\>
468
466
 
469
- Defined in: [libraries/epub/src/index.tsx:2116](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2116)
467
+ Defined in: [libraries/epub/src/index.tsx:2115](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2115)
470
468
 
471
469
  Add a creator to the EPUB metadata.
472
470
 
@@ -496,7 +494,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccreator
496
494
 
497
495
  > **addManifestItem**(`item`, `contents`, `encoding`): `Promise`\<`void`\>
498
496
 
499
- Defined in: [libraries/epub/src/index.tsx:2916](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2916)
497
+ Defined in: [libraries/epub/src/index.tsx:2913](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2913)
500
498
 
501
499
  Create a new manifest item and write its contents to a
502
500
  new entry.
@@ -525,7 +523,7 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
525
523
 
526
524
  > **addManifestItem**(`item`, `contents`, `encoding`): `Promise`\<`void`\>
527
525
 
528
- Defined in: [libraries/epub/src/index.tsx:2921](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2921)
526
+ Defined in: [libraries/epub/src/index.tsx:2918](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2918)
529
527
 
530
528
  Create a new manifest item and write its contents to a
531
529
  new entry.
@@ -554,7 +552,7 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
554
552
 
555
553
  > **addManifestItem**(`item`, `contents`): `Promise`\<`void`\>
556
554
 
557
- Defined in: [libraries/epub/src/index.tsx:2926](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2926)
555
+ Defined in: [libraries/epub/src/index.tsx:2923](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2923)
558
556
 
559
557
  Create a new manifest item and write its contents to a
560
558
  new entry.
@@ -582,7 +580,7 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
582
580
 
583
581
  > **addMetadata**(`entry`): `Promise`\<`void`\>
584
582
 
585
- Defined in: [libraries/epub/src/index.tsx:3050](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3050)
583
+ Defined in: [libraries/epub/src/index.tsx:3047](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3047)
586
584
 
587
585
  Add a new metadata entry to the Epub.
588
586
 
@@ -609,7 +607,7 @@ https://www.w3.org/TR/epub-33/#sec-pkg-metadata
609
607
 
610
608
  > **addSpineItem**(`manifestId`, `index?`): `Promise`\<`void`\>
611
609
 
612
- Defined in: [libraries/epub/src/index.tsx:2317](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2317)
610
+ Defined in: [libraries/epub/src/index.tsx:2316](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2316)
613
611
 
614
612
  Add an item to the spine of the EPUB.
615
613
 
@@ -639,7 +637,7 @@ https://www.w3.org/TR/epub-33/#sec-spine-elem
639
637
 
640
638
  > **addSubject**(`subject`): `Promise`\<`void`\>
641
639
 
642
- Defined in: [libraries/epub/src/index.tsx:1497](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1497)
640
+ Defined in: [libraries/epub/src/index.tsx:1496](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1496)
643
641
 
644
642
  Add a subject to the EPUB metadata.
645
643
 
@@ -661,7 +659,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcsubject
661
659
 
662
660
  > **copy**(`path?`): `Promise`\<[`Epub`](#epub)\>
663
661
 
664
- Defined in: [libraries/epub/src/index.tsx:490](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L490)
662
+ Defined in: [libraries/epub/src/index.tsx:489](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L489)
665
663
 
666
664
  ##### Parameters
667
665
 
@@ -677,7 +675,7 @@ Defined in: [libraries/epub/src/index.tsx:490](https://gitlab.com/storyteller-pl
677
675
 
678
676
  > **createXhtmlDocument**(`body`, `head?`, `language?`): `Promise`\<[`Document`](#document-1)\>
679
677
 
680
- Defined in: [libraries/epub/src/index.tsx:2716](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2716)
678
+ Defined in: [libraries/epub/src/index.tsx:2713](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2713)
681
679
 
682
680
  Create a new XHTML document with the given body
683
681
  and head.
@@ -698,7 +696,7 @@ and head.
698
696
 
699
697
  > **createXmlDocument**(`root`): [`Document`](#document-1)
700
698
 
701
- Defined in: [libraries/epub/src/index.tsx:2680](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2680)
699
+ Defined in: [libraries/epub/src/index.tsx:2677](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2677)
702
700
 
703
701
  Create a new XML document with the given root node.
704
702
 
@@ -716,7 +714,7 @@ Create a new XML document with the given root node.
716
714
 
717
715
  > **discardAndClose**(): `void`
718
716
 
719
- Defined in: [libraries/epub/src/index.tsx:3267](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3267)
717
+ Defined in: [libraries/epub/src/index.tsx:3264](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3264)
720
718
 
721
719
  ##### Returns
722
720
 
@@ -726,7 +724,7 @@ Defined in: [libraries/epub/src/index.tsx:3267](https://gitlab.com/storyteller-p
726
724
 
727
725
  > **findAllMetadataItems**(`predicate`): `Promise`\<[`MetadataEntry`](#metadataentry)[]\>
728
726
 
729
- Defined in: [libraries/epub/src/index.tsx:744](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L744)
727
+ Defined in: [libraries/epub/src/index.tsx:743](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L743)
730
728
 
731
729
  Returns the item in the metadata element's children array
732
730
  that matches the provided predicate.
@@ -745,7 +743,7 @@ that matches the provided predicate.
745
743
 
746
744
  > **findMetadataItem**(`predicate`): `Promise`\<[`MetadataEntry`](#metadataentry) \| `null`\>
747
745
 
748
- Defined in: [libraries/epub/src/index.tsx:735](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L735)
746
+ Defined in: [libraries/epub/src/index.tsx:734](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L734)
749
747
 
750
748
  Returns the item in the metadata element's children array
751
749
  that matches the provided predicate.
@@ -764,7 +762,7 @@ that matches the provided predicate.
764
762
 
765
763
  > **getBaseDirection**(): `Promise`\<`"auto"` \| `"rtl"` \| `"ltr"`\>
766
764
 
767
- Defined in: [libraries/epub/src/index.tsx:1451](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1451)
765
+ Defined in: [libraries/epub/src/index.tsx:1450](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1450)
768
766
 
769
767
  Retrieve the base direction from the package element.
770
768
 
@@ -783,7 +781,7 @@ https://www.w3.org/TR/epub-33/#attrdef-dir
783
781
 
784
782
  > **getCollections**(): `Promise`\<[`Collection`](#collection)[]\>
785
783
 
786
- Defined in: [libraries/epub/src/index.tsx:1902](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1902)
784
+ Defined in: [libraries/epub/src/index.tsx:1901](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1901)
787
785
 
788
786
  Retrieve the list of collections.
789
787
 
@@ -795,7 +793,7 @@ Retrieve the list of collections.
795
793
 
796
794
  > **getContributors**(): `Promise`\<[`DcCreator`](#dccreator)[]\>
797
795
 
798
- Defined in: [libraries/epub/src/index.tsx:2103](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2103)
796
+ Defined in: [libraries/epub/src/index.tsx:2102](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2102)
799
797
 
800
798
  Retrieve the list of contributors.
801
799
 
@@ -814,7 +812,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccontributor
814
812
 
815
813
  > **getCoverImage**(): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\> \| `null`\>
816
814
 
817
- Defined in: [libraries/epub/src/index.tsx:1347](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1347)
815
+ Defined in: [libraries/epub/src/index.tsx:1346](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1346)
818
816
 
819
817
  Retrieve the cover image data as a byte array.
820
818
 
@@ -834,7 +832,7 @@ https://www.w3.org/TR/epub-33/#sec-cover-image
834
832
 
835
833
  > **getCoverImageItem**(): `Promise`\<[`ManifestItem`](#manifestitem) \| `null`\>
836
834
 
837
- Defined in: [libraries/epub/src/index.tsx:1328](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1328)
835
+ Defined in: [libraries/epub/src/index.tsx:1327](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1327)
838
836
 
839
837
  Retrieve the cover image manifest item.
840
838
 
@@ -855,7 +853,7 @@ https://www.w3.org/TR/epub-33/#sec-cover-image
855
853
 
856
854
  > **getCreators**(`type`): `Promise`\<[`DcCreator`](#dccreator)[]\>
857
855
 
858
- Defined in: [libraries/epub/src/index.tsx:2039](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2039)
856
+ Defined in: [libraries/epub/src/index.tsx:2038](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2038)
859
857
 
860
858
  Retrieve the list of creators.
861
859
 
@@ -877,7 +875,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccreator
877
875
 
878
876
  > **getDescription**(): `Promise`\<`string` \| `null`\>
879
877
 
880
- Defined in: [libraries/epub/src/index.tsx:1770](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1770)
878
+ Defined in: [libraries/epub/src/index.tsx:1769](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1769)
881
879
 
882
880
  Retrieve the Epub's description as specified in its
883
881
  package document metadata.
@@ -894,7 +892,7 @@ include HTML markup.
894
892
 
895
893
  > **getGuideEntries**(): `Promise`\<[`GuideItem`](#guideitem)[]\>
896
894
 
897
- Defined in: [libraries/epub/src/index.tsx:3250](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3250)
895
+ Defined in: [libraries/epub/src/index.tsx:3247](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3247)
898
896
 
899
897
  Retrieve the guide entries from the package document.
900
898
 
@@ -909,7 +907,7 @@ the landmarks nav, but many publications still include it.
909
907
 
910
908
  > **getIdentifier**(): `Promise`\<`string` \| `null`\>
911
909
 
912
- Defined in: [libraries/epub/src/index.tsx:836](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L836)
910
+ Defined in: [libraries/epub/src/index.tsx:835](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L835)
913
911
 
914
912
  Retrieve the first identifier from the dc:identifier element
915
913
  in the EPUB metadata.
@@ -933,7 +931,7 @@ or [getIdentifiers](#getidentifiers) to get all identifiers.
933
931
 
934
932
  > **getIdentifiers**(): `Promise`\<[`EpubIdentifier`](#epubidentifier)[]\>
935
933
 
936
- Defined in: [libraries/epub/src/index.tsx:1002](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1002)
934
+ Defined in: [libraries/epub/src/index.tsx:1001](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1001)
937
935
 
938
936
  Retrieve every `dc:identifier` entry, returned as found.
939
937
 
@@ -954,7 +952,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcidentifier
954
952
 
955
953
  > **getItemArchiveLength**(`id`): `Promise`\<`number`\>
956
954
 
957
- Defined in: [libraries/epub/src/index.tsx:516](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L516)
955
+ Defined in: [libraries/epub/src/index.tsx:515](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L515)
958
956
 
959
957
  Length of the underlying archive entry for a manifest item, in bytes
960
958
  Necessary to compute the readium page count which is for COMPRESSED content
@@ -977,7 +975,7 @@ Necessary to compute the readium page count which is for COMPRESSED content
977
975
 
978
976
  > **getLandmarks**(`__namedParameters`): `Promise`\<[`Navigation`](#navigation) \| `null`\>
979
977
 
980
- Defined in: [libraries/epub/src/index.tsx:2502](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2502)
978
+ Defined in: [libraries/epub/src/index.tsx:2501](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2501)
981
979
 
982
980
  Returns the structured landmarks navigation document
983
981
  as a Navigation object
@@ -1001,7 +999,7 @@ https://www.w3.org/TR/epub-33/#sec-nav-landmarks
1001
999
 
1002
1000
  > **getLanguage**(): `Promise`\<`Locale` \| `null`\>
1003
1001
 
1004
- Defined in: [libraries/epub/src/index.tsx:1607](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1607)
1002
+ Defined in: [libraries/epub/src/index.tsx:1606](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1606)
1005
1003
 
1006
1004
  Retrieve the Epub's language as specified in its
1007
1005
  package document metadata.
@@ -1021,7 +1019,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dclanguage
1021
1019
 
1022
1020
  > **getLayout**(): `Promise`\<`"pre-paginated"` \| `"reflowable"`\>
1023
1021
 
1024
- Defined in: [libraries/epub/src/index.tsx:1432](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1432)
1022
+ Defined in: [libraries/epub/src/index.tsx:1431](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1431)
1025
1023
 
1026
1024
  Retrieve the layout from the rendition:layout meta element
1027
1025
  in the EPUB metadata.
@@ -1040,7 +1038,7 @@ https://www.w3.org/TR/epub-33/#layout
1040
1038
 
1041
1039
  > **getManifest**(): `Promise`\<`Record`\<`string`, [`ManifestItem`](#manifestitem)\>\>
1042
1040
 
1043
- Defined in: [libraries/epub/src/index.tsx:662](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L662)
1041
+ Defined in: [libraries/epub/src/index.tsx:661](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L661)
1044
1042
 
1045
1043
  Retrieve the manifest for the Epub.
1046
1044
 
@@ -1059,7 +1057,7 @@ https://www.w3.org/TR/epub-33/#sec-pkg-manifest
1059
1057
 
1060
1058
  > **getMetadata**(): `Promise`\<[`EpubMetadata`](#epubmetadata)\>
1061
1059
 
1062
- Defined in: [libraries/epub/src/index.tsx:804](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L804)
1060
+ Defined in: [libraries/epub/src/index.tsx:803](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L803)
1063
1061
 
1064
1062
  Retrieve the metadata entries for the Epub.
1065
1063
 
@@ -1081,7 +1079,7 @@ https://www.w3.org/TR/epub-33/#sec-pkg-metadata
1081
1079
 
1082
1080
  > **getModifiedDate**(): `Promise`\<`Date` \| `null`\>
1083
1081
 
1084
- Defined in: [libraries/epub/src/index.tsx:1415](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1415)
1082
+ Defined in: [libraries/epub/src/index.tsx:1414](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1414)
1085
1083
 
1086
1084
  Retrieve the modified date from the dcterms:modified metadata
1087
1085
  in the EPUB metadata as a Date object.
@@ -1100,7 +1098,7 @@ https://www.w3.org/TR/epub-33/#sec-metadata-last-modified
1100
1098
 
1101
1099
  > **getNcxTableOfContents**(): `Promise`\<[`NavigationList`](#navigationlist)\>
1102
1100
 
1103
- Defined in: [libraries/epub/src/index.tsx:3174](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3174)
1101
+ Defined in: [libraries/epub/src/index.tsx:3171](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3171)
1104
1102
 
1105
1103
  Parse the NCX table of contents, if one exists, and return
1106
1104
  a tree of TocEntry nodes.
@@ -1117,7 +1115,7 @@ NCX for backwards compatibility.
1117
1115
 
1118
1116
  > **getPackageDocumentSource**(): `Promise`\<`string`\>
1119
1117
 
1120
- Defined in: [libraries/epub/src/index.tsx:570](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L570)
1118
+ Defined in: [libraries/epub/src/index.tsx:569](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L569)
1121
1119
 
1122
1120
  ##### Returns
1123
1121
 
@@ -1127,7 +1125,7 @@ Defined in: [libraries/epub/src/index.tsx:570](https://gitlab.com/storyteller-pl
1127
1125
 
1128
1126
  > **getPackageElement**(): `Promise`\<[`Element`](#element-1)\>
1129
1127
 
1130
- Defined in: [libraries/epub/src/index.tsx:593](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L593)
1128
+ Defined in: [libraries/epub/src/index.tsx:592](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L592)
1131
1129
 
1132
1130
  ##### Returns
1133
1131
 
@@ -1137,7 +1135,7 @@ Defined in: [libraries/epub/src/index.tsx:593](https://gitlab.com/storyteller-pl
1137
1135
 
1138
1136
  > **getPackageVocabularyPrefixes**(): `Promise`\<`Record`\<`string`, `string`\>\>
1139
1137
 
1140
- Defined in: [libraries/epub/src/index.tsx:1787](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1787)
1138
+ Defined in: [libraries/epub/src/index.tsx:1786](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1786)
1141
1139
 
1142
1140
  Return the set of custom vocabulary prefixes set on this publication's
1143
1141
  root package element.
@@ -1156,7 +1154,7 @@ https://www.w3.org/TR/epub-33/#sec-prefix-attr
1156
1154
 
1157
1155
  > **getPageBreakSource**(): `Promise`\<[`EpubSource`](#epubsource) \| `null`\>
1158
1156
 
1159
- Defined in: [libraries/epub/src/index.tsx:1039](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1039)
1157
+ Defined in: [libraries/epub/src/index.tsx:1038](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1038)
1160
1158
 
1161
1159
  Retrieve the `pageBreakSource` property (EPUB 3.4, spec D.2.9), the
1162
1160
  publication-level source for the source of its page break markers.
@@ -1177,7 +1175,7 @@ https://www.w3.org/TR/epub/#pageBreakSource
1177
1175
 
1178
1176
  > **getPageList**(`__namedParameters`): `Promise`\<[`Navigation`](#navigation) \| `null`\>
1179
1177
 
1180
- Defined in: [libraries/epub/src/index.tsx:2514](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2514)
1178
+ Defined in: [libraries/epub/src/index.tsx:2513](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2513)
1181
1179
 
1182
1180
  Returns the structured page list navigation document
1183
1181
  as a Navigation object
@@ -1201,7 +1199,7 @@ https://www.w3.org/TR/epub-33/#sec-nav-landmarks
1201
1199
 
1202
1200
  > **getPublicationDate**(): `Promise`\<`Date` \| `null`\>
1203
1201
 
1204
- Defined in: [libraries/epub/src/index.tsx:1384](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1384)
1202
+ Defined in: [libraries/epub/src/index.tsx:1383](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1383)
1205
1203
 
1206
1204
  Retrieve the publication date from the dc:date element
1207
1205
  in the EPUB metadata as a Date object.
@@ -1220,7 +1218,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcdate
1220
1218
 
1221
1219
  > **getRootfile**(): `Promise`\<`string`\>
1222
1220
 
1223
- Defined in: [libraries/epub/src/index.tsx:527](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L527)
1221
+ Defined in: [libraries/epub/src/index.tsx:526](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L526)
1224
1222
 
1225
1223
  ##### Returns
1226
1224
 
@@ -1230,7 +1228,7 @@ Defined in: [libraries/epub/src/index.tsx:527](https://gitlab.com/storyteller-pl
1230
1228
 
1231
1229
  > **getSources**(): `Promise`\<[`EpubSource`](#epubsource)[]\>
1232
1230
 
1233
- Defined in: [libraries/epub/src/index.tsx:1016](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1016)
1231
+ Defined in: [libraries/epub/src/index.tsx:1015](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1015)
1234
1232
 
1235
1233
  Retrieve every `dc:source` entry, returned as found.
1236
1234
 
@@ -1250,7 +1248,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcsource
1250
1248
 
1251
1249
  > **getSpineItems**(): `Promise`\<[`ManifestItem`](#manifestitem) & `object`[]\>
1252
1250
 
1253
- Defined in: [libraries/epub/src/index.tsx:2290](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2290)
1251
+ Defined in: [libraries/epub/src/index.tsx:2289](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2289)
1254
1252
 
1255
1253
  Retrieve the manifest items that make up the Epub's spine.
1256
1254
 
@@ -1269,7 +1267,7 @@ https://www.w3.org/TR/epub-33/#sec-spine-elem
1269
1267
 
1270
1268
  > **getSubjects**(): `Promise`\<(`string` \| [`DcSubject`](#dcsubject))[]\>
1271
1269
 
1272
- Defined in: [libraries/epub/src/index.tsx:1562](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1562)
1270
+ Defined in: [libraries/epub/src/index.tsx:1561](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1561)
1273
1271
 
1274
1272
  Retrieve the list of subjects for this EPUB.
1275
1273
 
@@ -1290,7 +1288,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcsubject
1290
1288
 
1291
1289
  > **getSubtitle**(): `Promise`\<`string` \| `null`\>
1292
1290
 
1293
- Defined in: [libraries/epub/src/index.tsx:1677](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1677)
1291
+ Defined in: [libraries/epub/src/index.tsx:1676](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1676)
1294
1292
 
1295
1293
  Retrieve the subtitle of the Epub, if it exists.
1296
1294
 
@@ -1306,7 +1304,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dctitle
1306
1304
 
1307
1305
  > **getTableOfContents**(`__namedParameters`): `Promise`\<[`Navigation`](#navigation) \| `null`\>
1308
1306
 
1309
- Defined in: [libraries/epub/src/index.tsx:2484](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2484)
1307
+ Defined in: [libraries/epub/src/index.tsx:2483](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2483)
1310
1308
 
1311
1309
  Returns the structured table of contents navigation document
1312
1310
  as a Navigation object.
@@ -1330,7 +1328,7 @@ https://www.w3.org/TR/epub-33/#sec-nav-toc
1330
1328
 
1331
1329
  > **getTitle**(`expanded`): `Promise`\<`string` \| `null`\>
1332
1330
 
1333
- Defined in: [libraries/epub/src/index.tsx:1653](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1653)
1331
+ Defined in: [libraries/epub/src/index.tsx:1652](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1652)
1334
1332
 
1335
1333
  Retrieve the title of the Epub.
1336
1334
 
@@ -1352,7 +1350,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dctitle
1352
1350
 
1353
1351
  > **getTitles**(): `Promise`\<`object`[]\>
1354
1352
 
1355
- Defined in: [libraries/epub/src/index.tsx:1689](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1689)
1353
+ Defined in: [libraries/epub/src/index.tsx:1688](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1688)
1356
1354
 
1357
1355
  Retrieve all title entries of the Epub.
1358
1356
 
@@ -1368,7 +1366,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dctitle
1368
1366
 
1369
1367
  > **getType**(): `Promise`\<[`MetadataEntry`](#metadataentry) \| `null`\>
1370
1368
 
1371
- Defined in: [libraries/epub/src/index.tsx:1484](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1484)
1369
+ Defined in: [libraries/epub/src/index.tsx:1483](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1483)
1372
1370
 
1373
1371
  Retrieve the publication type from the dc:type element
1374
1372
  in the EPUB metadata.
@@ -1387,7 +1385,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dctype
1387
1385
 
1388
1386
  > **getUniqueIdentifier**(): `Promise`\<`string` \| `null`\>
1389
1387
 
1390
- Defined in: [libraries/epub/src/index.tsx:868](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L868)
1388
+ Defined in: [libraries/epub/src/index.tsx:867](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L867)
1391
1389
 
1392
1390
  Retrieve the identifier with the unique identifier id
1393
1391
  in the EPUB metadata.
@@ -1406,7 +1404,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcidentifier
1406
1404
 
1407
1405
  > **getUniqueIdentifierId**(): `Promise`\<`string` \| `null`\>
1408
1406
 
1409
- Defined in: [libraries/epub/src/index.tsx:940](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L940)
1407
+ Defined in: [libraries/epub/src/index.tsx:939](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L939)
1410
1408
 
1411
1409
  Retrieve the id of the publication's unique identifier, as declared by the
1412
1410
  package element's `unique-identifier` attribute.
@@ -1423,7 +1421,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcidentifier
1423
1421
 
1424
1422
  > **getVersion**(): `Promise`\<`string`\>
1425
1423
 
1426
- Defined in: [libraries/epub/src/index.tsx:3161](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3161)
1424
+ Defined in: [libraries/epub/src/index.tsx:3158](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3158)
1427
1425
 
1428
1426
  Returns the EPUB version declared on the package element.
1429
1427
 
@@ -1437,7 +1435,7 @@ Returns the EPUB version declared on the package element.
1437
1435
 
1438
1436
  > **readFileContents**(`href`, `relativeTo?`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\>
1439
1437
 
1440
- Defined in: [libraries/epub/src/index.tsx:2621](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2621)
1438
+ Defined in: [libraries/epub/src/index.tsx:2618](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2618)
1441
1439
 
1442
1440
  Retrieve the contents of a file, given its href.
1443
1441
 
@@ -1459,7 +1457,7 @@ and an encoding parameter.
1459
1457
 
1460
1458
  > **readFileContents**(`href`, `relativeTo`, `encoding`): `Promise`\<`string`\>
1461
1459
 
1462
- Defined in: [libraries/epub/src/index.tsx:2622](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2622)
1460
+ Defined in: [libraries/epub/src/index.tsx:2619](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2619)
1463
1461
 
1464
1462
  Retrieve the contents of a file, given its href.
1465
1463
 
@@ -1484,7 +1482,7 @@ and an encoding parameter.
1484
1482
 
1485
1483
  > **readItemContents**(`id`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\>
1486
1484
 
1487
- Defined in: [libraries/epub/src/index.tsx:2654](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2654)
1485
+ Defined in: [libraries/epub/src/index.tsx:2651](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2651)
1488
1486
 
1489
1487
  Retrieve the contents of a manifest item, given its id.
1490
1488
 
@@ -1506,7 +1504,7 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
1506
1504
 
1507
1505
  > **readItemContents**(`id`, `encoding`): `Promise`\<`string`\>
1508
1506
 
1509
- Defined in: [libraries/epub/src/index.tsx:2655](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2655)
1507
+ Defined in: [libraries/epub/src/index.tsx:2652](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2652)
1510
1508
 
1511
1509
  Retrieve the contents of a manifest item, given its id.
1512
1510
 
@@ -1531,7 +1529,7 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
1531
1529
 
1532
1530
  > **readXhtmlItemContents**(`id`, `as?`): `Promise`\<[`Document`](#document-1)\>
1533
1531
 
1534
- Defined in: [libraries/epub/src/index.tsx:2766](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2766)
1532
+ Defined in: [libraries/epub/src/index.tsx:2763](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2763)
1535
1533
 
1536
1534
  Retrieves the contents of an XHTML item, given its manifest id.
1537
1535
 
@@ -1554,7 +1552,7 @@ https://www.w3.org/TR/epub-33/#sec-xhtml
1554
1552
 
1555
1553
  > **readXhtmlItemContents**(`id`, `as`): `Promise`\<`string`\>
1556
1554
 
1557
- Defined in: [libraries/epub/src/index.tsx:2767](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2767)
1555
+ Defined in: [libraries/epub/src/index.tsx:2764](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2764)
1558
1556
 
1559
1557
  Retrieves the contents of an XHTML item, given its manifest id.
1560
1558
 
@@ -1577,7 +1575,7 @@ https://www.w3.org/TR/epub-33/#sec-xhtml
1577
1575
 
1578
1576
  > **removeCollection**(`index`): `Promise`\<`void`\>
1579
1577
 
1580
- Defined in: [libraries/epub/src/index.tsx:2006](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2006)
1578
+ Defined in: [libraries/epub/src/index.tsx:2005](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2005)
1581
1579
 
1582
1580
  Remove a collection from the EPUB metadata.
1583
1581
 
@@ -1598,7 +1596,7 @@ refers to the array returned by `epub.getCollections()`.
1598
1596
 
1599
1597
  > **removeContributor**(`index`): `Promise`\<`void`\>
1600
1598
 
1601
- Defined in: [libraries/epub/src/index.tsx:2235](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2235)
1599
+ Defined in: [libraries/epub/src/index.tsx:2234](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2234)
1602
1600
 
1603
1601
  Remove a contributor from the EPUB metadata.
1604
1602
 
@@ -1626,7 +1624,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccreator
1626
1624
 
1627
1625
  > **removeCreator**(`index`, `type`): `Promise`\<`void`\>
1628
1626
 
1629
- Defined in: [libraries/epub/src/index.tsx:2198](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2198)
1627
+ Defined in: [libraries/epub/src/index.tsx:2197](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2197)
1630
1628
 
1631
1629
  Remove a creator from the EPUB metadata.
1632
1630
 
@@ -1652,7 +1650,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccreator
1652
1650
 
1653
1651
  > **removeManifestItem**(`id`): `Promise`\<`void`\>
1654
1652
 
1655
- Defined in: [libraries/epub/src/index.tsx:2866](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2866)
1653
+ Defined in: [libraries/epub/src/index.tsx:2863](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2863)
1656
1654
 
1657
1655
  ##### Parameters
1658
1656
 
@@ -1668,7 +1666,7 @@ Defined in: [libraries/epub/src/index.tsx:2866](https://gitlab.com/storyteller-p
1668
1666
 
1669
1667
  > **removeMetadata**(`predicate`): `Promise`\<`void`\>
1670
1668
 
1671
- Defined in: [libraries/epub/src/index.tsx:3136](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3136)
1669
+ Defined in: [libraries/epub/src/index.tsx:3133](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3133)
1672
1670
 
1673
1671
  Remove one or more metadata entries.
1674
1672
 
@@ -1694,7 +1692,7 @@ https://www.w3.org/TR/epub-33/#sec-pkg-metadata
1694
1692
 
1695
1693
  > **removeSpineItem**(`index`): `Promise`\<`void`\>
1696
1694
 
1697
- Defined in: [libraries/epub/src/index.tsx:2363](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2363)
1695
+ Defined in: [libraries/epub/src/index.tsx:2362](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2362)
1698
1696
 
1699
1697
  Remove the spine item at the specified index.
1700
1698
 
@@ -1716,7 +1714,7 @@ https://www.w3.org/TR/epub-33/#sec-spine-elem
1716
1714
 
1717
1715
  > **removeSubject**(`index`): `Promise`\<`void`\>
1718
1716
 
1719
- Defined in: [libraries/epub/src/index.tsx:1534](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1534)
1717
+ Defined in: [libraries/epub/src/index.tsx:1533](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1533)
1720
1718
 
1721
1719
  Remove a subject from the EPUB metadata.
1722
1720
 
@@ -1741,7 +1739,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dccreator
1741
1739
 
1742
1740
  > **replaceMetadata**(`predicate`, `entry`): `Promise`\<`void`\>
1743
1741
 
1744
- Defined in: [libraries/epub/src/index.tsx:3085](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3085)
1742
+ Defined in: [libraries/epub/src/index.tsx:3082](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3082)
1745
1743
 
1746
1744
  Replace a metadata entry with a new one.
1747
1745
 
@@ -1768,7 +1766,7 @@ https://www.w3.org/TR/epub-33/#sec-pkg-metadata
1768
1766
 
1769
1767
  > **resolveHref**(`href`, `relativeTo?`, `__namedParameters?`): `Promise`\<`string`\>
1770
1768
 
1771
- Defined in: [libraries/epub/src/index.tsx:2577](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2577)
1769
+ Defined in: [libraries/epub/src/index.tsx:2576](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2576)
1772
1770
 
1773
1771
  Returns a path-relative-scheme-less URL, relative to the
1774
1772
  container root.
@@ -1793,7 +1791,7 @@ a navigation document, is handed back unchanged.
1793
1791
 
1794
1792
  > **saveAndClose**(): `Promise`\<`void`\>
1795
1793
 
1796
- Defined in: [libraries/epub/src/index.tsx:3282](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3282)
1794
+ Defined in: [libraries/epub/src/index.tsx:3279](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3279)
1797
1795
 
1798
1796
  Write the current contents of the Epub to a new
1799
1797
  EPUB archive on disk.
@@ -1810,7 +1808,7 @@ timestamp.
1810
1808
 
1811
1809
  > **setCoverImage**(`href`, `data`): `Promise`\<`void`\>
1812
1810
 
1813
- Defined in: [libraries/epub/src/index.tsx:1361](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1361)
1811
+ Defined in: [libraries/epub/src/index.tsx:1360](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1360)
1814
1812
 
1815
1813
  Set the cover image for the EPUB.
1816
1814
 
@@ -1833,7 +1831,7 @@ the provided href within the publication.
1833
1831
 
1834
1832
  > **setDescription**(`description`): `Promise`\<`void`\>
1835
1833
 
1836
- Defined in: [libraries/epub/src/index.tsx:1754](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1754)
1834
+ Defined in: [libraries/epub/src/index.tsx:1753](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1753)
1837
1835
 
1838
1836
  Update the Epub's description metadata entry.
1839
1837
 
@@ -1855,7 +1853,7 @@ Otherwise creates a new element. Any non-ASCII symbols,
1855
1853
 
1856
1854
  > **setIdentifier**(`identifier`): `Promise`\<`void`\>
1857
1855
 
1858
- Defined in: [libraries/epub/src/index.tsx:852](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L852)
1856
+ Defined in: [libraries/epub/src/index.tsx:851](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L851)
1859
1857
 
1860
1858
  Set the dc:identifier metadata element with the provided string.
1861
1859
 
@@ -1884,7 +1882,7 @@ Use [setUniqueIdentifier](#setuniqueidentifier) instead.
1884
1882
 
1885
1883
  > **setIdentifiers**(`identifiers`): `Promise`\<`void`\>
1886
1884
 
1887
- Defined in: [libraries/epub/src/index.tsx:1108](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1108)
1885
+ Defined in: [libraries/epub/src/index.tsx:1107](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1107)
1888
1886
 
1889
1887
  Replace the publication's `dc:identifier` entries.
1890
1888
 
@@ -1921,7 +1919,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcidentifier
1921
1919
 
1922
1920
  > **setLanguage**(`locale`): `Promise`\<`void`\>
1923
1921
 
1924
- Defined in: [libraries/epub/src/index.tsx:1636](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1636)
1922
+ Defined in: [libraries/epub/src/index.tsx:1635](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1635)
1925
1923
 
1926
1924
  Update the Epub's language metadata entry.
1927
1925
 
@@ -1946,7 +1944,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dclanguage
1946
1944
 
1947
1945
  > **setPackageVocabularyPrefix**(`prefix`, `uri`): `Promise`\<`void`\>
1948
1946
 
1949
- Defined in: [libraries/epub/src/index.tsx:1805](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1805)
1947
+ Defined in: [libraries/epub/src/index.tsx:1804](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1804)
1950
1948
 
1951
1949
  Set a custom vocabulary prefix on the root package element.
1952
1950
 
@@ -1969,7 +1967,7 @@ https://www.w3.org/TR/epub-33/#sec-prefix-attr
1969
1967
 
1970
1968
  > **setPageBreakSource**(`value`): `Promise`\<`void`\>
1971
1969
 
1972
- Defined in: [libraries/epub/src/index.tsx:1075](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1075)
1970
+ Defined in: [libraries/epub/src/index.tsx:1074](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1074)
1973
1971
 
1974
1972
  Set the `pageBreakSource` property (EPUB 3.4, spec D.2.9), or remove it when
1975
1973
  passed null. Replaces an existing `pageBreakSource` meta if present.
@@ -1994,7 +1992,7 @@ https://www.w3.org/TR/epub/#pageBreakSource
1994
1992
 
1995
1993
  > **setPublicationDate**(`date`): `Promise`\<`void`\>
1996
1994
 
1997
- Defined in: [libraries/epub/src/index.tsx:1399](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1399)
1995
+ Defined in: [libraries/epub/src/index.tsx:1398](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1398)
1998
1996
 
1999
1997
  Set the dc:date metadata element with the provided date.
2000
1998
 
@@ -2019,7 +2017,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcdate
2019
2017
 
2020
2018
  > **setSources**(`sources`): `Promise`\<`void`\>
2021
2019
 
2022
- Defined in: [libraries/epub/src/index.tsx:1213](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1213)
2020
+ Defined in: [libraries/epub/src/index.tsx:1212](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1212)
2023
2021
 
2024
2022
  Replace the publication's `dc:source` entries.
2025
2023
 
@@ -2050,7 +2048,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcsource
2050
2048
 
2051
2049
  > **setTitle**(`title`): `Promise`\<`void`\>
2052
2050
 
2053
- Defined in: [libraries/epub/src/index.tsx:1831](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1831)
2051
+ Defined in: [libraries/epub/src/index.tsx:1830](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1830)
2054
2052
 
2055
2053
  Set the title of the Epub.
2056
2054
 
@@ -2077,7 +2075,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dctitle
2077
2075
 
2078
2076
  > **setTitles**(`entries`): `Promise`\<`void`\>
2079
2077
 
2080
- Defined in: [libraries/epub/src/index.tsx:1853](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1853)
2078
+ Defined in: [libraries/epub/src/index.tsx:1852](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1852)
2081
2079
 
2082
2080
  ##### Parameters
2083
2081
 
@@ -2093,7 +2091,7 @@ Defined in: [libraries/epub/src/index.tsx:1853](https://gitlab.com/storyteller-p
2093
2091
 
2094
2092
  > **setType**(`type`): `Promise`\<`void`\>
2095
2093
 
2096
- Defined in: [libraries/epub/src/index.tsx:1468](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1468)
2094
+ Defined in: [libraries/epub/src/index.tsx:1467](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L1467)
2097
2095
 
2098
2096
  Set the dc:type metadata element.
2099
2097
 
@@ -2118,7 +2116,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dctype
2118
2116
 
2119
2117
  > **setUniqueIdentifier**(`identifier`): `Promise`\<`void`\>
2120
2118
 
2121
- Defined in: [libraries/epub/src/index.tsx:893](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L893)
2119
+ Defined in: [libraries/epub/src/index.tsx:892](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L892)
2122
2120
 
2123
2121
  Set the unique identifier id for the EPUB.
2124
2122
 
@@ -2145,7 +2143,7 @@ https://www.w3.org/TR/epub-33/#sec-opf-dcidentifier
2145
2143
 
2146
2144
  > **updateManifestItem**(`id`, `newItem`): `Promise`\<`void`\>
2147
2145
 
2148
- Defined in: [libraries/epub/src/index.tsx:3002](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3002)
2146
+ Defined in: [libraries/epub/src/index.tsx:2999](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2999)
2149
2147
 
2150
2148
  Update the manifest entry for an existing item.
2151
2149
 
@@ -2171,7 +2169,7 @@ https://www.w3.org/TR/epub-33/#sec-pkg-manifest
2171
2169
 
2172
2170
  > **withPackage**(`producer`): `Promise`\<`void`\>
2173
2171
 
2174
- Defined in: [libraries/epub/src/index.tsx:622](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L622)
2172
+ Defined in: [libraries/epub/src/index.tsx:621](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L621)
2175
2173
 
2176
2174
  Safely modify the package document, without race conditions.
2177
2175
 
@@ -2196,7 +2194,7 @@ method uses a mutex to ensure that each update runs exclusively.
2196
2194
 
2197
2195
  > **writeItemContents**(`id`, `contents`): `Promise`\<`void`\>
2198
2196
 
2199
- Defined in: [libraries/epub/src/index.tsx:2822](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2822)
2197
+ Defined in: [libraries/epub/src/index.tsx:2819](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2819)
2200
2198
 
2201
2199
  Write new contents for an existing manifest item,
2202
2200
  specified by its id.
@@ -2223,7 +2221,7 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
2223
2221
 
2224
2222
  > **writeItemContents**(`id`, `contents`, `encoding`): `Promise`\<`void`\>
2225
2223
 
2226
- Defined in: [libraries/epub/src/index.tsx:2823](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2823)
2224
+ Defined in: [libraries/epub/src/index.tsx:2820](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2820)
2227
2225
 
2228
2226
  Write new contents for an existing manifest item,
2229
2227
  specified by its id.
@@ -2251,7 +2249,7 @@ https://www.w3.org/TR/epub-33/#sec-contentdocs
2251
2249
 
2252
2250
  > **writeXhtmlItemContents**(`id`, `contents`): `Promise`\<`void`\>
2253
2251
 
2254
- Defined in: [libraries/epub/src/index.tsx:2862](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2862)
2252
+ Defined in: [libraries/epub/src/index.tsx:2859](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L2859)
2255
2253
 
2256
2254
  Write new contents for an existing XHTML item,
2257
2255
  specified by its id.
@@ -2278,7 +2276,7 @@ https://www.w3.org/TR/epub-33/#sec-xhtml
2278
2276
 
2279
2277
  > `static` **assertEpub3**(`epub`): `Promise`\<`void`\>
2280
2278
 
2281
- Defined in: [libraries/epub/src/index.tsx:480](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L480)
2279
+ Defined in: [libraries/epub/src/index.tsx:479](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L479)
2282
2280
 
2283
2281
  ##### Parameters
2284
2282
 
@@ -2294,7 +2292,7 @@ Defined in: [libraries/epub/src/index.tsx:480](https://gitlab.com/storyteller-pl
2294
2292
 
2295
2293
  > `static` **create**(`path`, `dublinCore`, `additionalMetadata`): `Promise`\<[`Epub`](#epub)\>
2296
2294
 
2297
- Defined in: [libraries/epub/src/index.tsx:428](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L428)
2295
+ Defined in: [libraries/epub/src/index.tsx:427](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L427)
2298
2296
 
2299
2297
  Construct a new EPUB on a writable backend, optionally seeded
2300
2298
  with the provided metadata. Equivalent to
@@ -2316,7 +2314,7 @@ with the provided metadata. Equivalent to
2316
2314
 
2317
2315
  > `static` **formatSmilDuration**(`duration`): `string`
2318
2316
 
2319
- Defined in: [libraries/epub/src/index.tsx:359](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L359)
2317
+ Defined in: [libraries/epub/src/index.tsx:358](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L358)
2320
2318
 
2321
2319
  Format a duration, provided as a number of seconds, as
2322
2320
  a SMIL clock value, to be used for Media Overlays.
@@ -2341,7 +2339,7 @@ https://www.w3.org/TR/epub-33/#sec-duration
2341
2339
 
2342
2340
  > `static` **from**(`pathOrData`): `Promise`\<[`Epub`](#epub)\>
2343
2341
 
2344
- Defined in: [libraries/epub/src/index.tsx:464](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L464)
2342
+ Defined in: [libraries/epub/src/index.tsx:463](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L463)
2345
2343
 
2346
2344
  Open an existing EPUB publication, extracting it to a temp directory
2347
2345
  so writes can mutate the unpacked tree and rezip with `saveAndClose`.
@@ -2369,7 +2367,7 @@ when the archive is not a valid EPUB 3
2369
2367
 
2370
2368
  > `static` **from**(`pathOrData`, `options`): `Promise`\<[`EpubReader`](#epubreader)\>
2371
2369
 
2372
- Defined in: [libraries/epub/src/index.tsx:465](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L465)
2370
+ Defined in: [libraries/epub/src/index.tsx:464](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L464)
2373
2371
 
2374
2372
  Open an existing EPUB publication, extracting it to a temp directory
2375
2373
  so writes can mutate the unpacked tree and rezip with `saveAndClose`.
@@ -2398,7 +2396,7 @@ when the archive is not a valid EPUB 3
2398
2396
 
2399
2397
  > `static` **from**(`pathOrData`, `options?`): `Promise`\<[`Epub`](#epub) \| [`EpubReader`](#epubreader)\>
2400
2398
 
2401
- Defined in: [libraries/epub/src/index.tsx:469](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L469)
2399
+ Defined in: [libraries/epub/src/index.tsx:468](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L468)
2402
2400
 
2403
2401
  Open an existing EPUB publication, extracting it to a temp directory
2404
2402
  so writes can mutate the unpacked tree and rezip with `saveAndClose`.
@@ -2427,7 +2425,7 @@ when the archive is not a valid EPUB 3
2427
2425
 
2428
2426
  > `static` **upgrade**(`path`, `options`): `Promise`\<[`Epub`](#epub)\>
2429
2427
 
2430
- Defined in: [libraries/epub/src/index.tsx:3310](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3310)
2428
+ Defined in: [libraries/epub/src/index.tsx:3307](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3307)
2431
2429
 
2432
2430
  Upgrade an EPUB 2 publication to EPUB 3 in place, returning a new,
2433
2431
  valid Epub 3 instance. Equivalent to
@@ -2448,7 +2446,7 @@ valid Epub 3 instance. Equivalent to
2448
2446
 
2449
2447
  > `static` **using**\<`A`\>(`adapterClass`): [`EpubFactory`](#epubfactory)\<`A`\>
2450
2448
 
2451
- Defined in: [libraries/epub/src/index.tsx:448](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L448)
2449
+ Defined in: [libraries/epub/src/index.tsx:447](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L447)
2452
2450
 
2453
2451
  Specify the storage backend to use for the EPUB
2454
2452
 
@@ -2482,7 +2480,7 @@ using reader = await Epub.using(MemoryAdapter).from(buffer, { cache: false });
2482
2480
 
2483
2481
  ## EpubFactory\<A\>
2484
2482
 
2485
- Defined in: [libraries/epub/src/index.tsx:3339](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3339)
2483
+ Defined in: [libraries/epub/src/index.tsx:3336](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3336)
2486
2484
 
2487
2485
  Adapter-bound factory returned by [Epub.using](#using).
2488
2486
 
@@ -2503,7 +2501,7 @@ gracefully when the adapter doesn't support the operation: `create` and
2503
2501
 
2504
2502
  > **new EpubFactory**\<`A`\>(`adapterClass`): [`EpubFactory`](#epubfactory)\<`A`\>
2505
2503
 
2506
- Defined in: [libraries/epub/src/index.tsx:3340](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3340)
2504
+ Defined in: [libraries/epub/src/index.tsx:3337](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3337)
2507
2505
 
2508
2506
  ##### Parameters
2509
2507
 
@@ -2521,7 +2519,7 @@ Defined in: [libraries/epub/src/index.tsx:3340](https://gitlab.com/storyteller-p
2521
2519
 
2522
2520
  > `readonly` **adapterClass**: `A`
2523
2521
 
2524
- Defined in: [libraries/epub/src/index.tsx:3340](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3340)
2522
+ Defined in: [libraries/epub/src/index.tsx:3337](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3337)
2525
2523
 
2526
2524
  ### Methods
2527
2525
 
@@ -2529,7 +2527,7 @@ Defined in: [libraries/epub/src/index.tsx:3340](https://gitlab.com/storyteller-p
2529
2527
 
2530
2528
  > **create**(`path`, `__namedParameters`, `additionalMetadata`): `Promise`\<[`EpubInstanceFor`](#epubinstancefor)\<`A`\>\>
2531
2529
 
2532
- Defined in: [libraries/epub/src/index.tsx:3420](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3420)
2530
+ Defined in: [libraries/epub/src/index.tsx:3417](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3417)
2533
2531
 
2534
2532
  Construct a new EPUB on this factory's adapter, optionally seeded
2535
2533
  with the provided metadata. Requires a writable adapter that
@@ -2557,7 +2555,7 @@ when the adapter is read-only or does not implement initEmpty
2557
2555
 
2558
2556
  > **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`\>
2559
2557
 
2560
- Defined in: [libraries/epub/src/index.tsx:3347](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3347)
2558
+ Defined in: [libraries/epub/src/index.tsx:3344](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3344)
2561
2559
 
2562
2560
  Open an existing EPUB through this factory's adapter
2563
2561
 
@@ -2580,7 +2578,7 @@ when the archive is not a valid EPUB 3
2580
2578
 
2581
2579
  > **from**(`source`, `options?`): `Promise`\<[`EpubInstanceFor`](#epubinstancefor)\<`A`\> & `object`\>
2582
2580
 
2583
- Defined in: [libraries/epub/src/index.tsx:3351](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3351)
2581
+ Defined in: [libraries/epub/src/index.tsx:3348](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3348)
2584
2582
 
2585
2583
  Open an existing EPUB through this factory's adapter
2586
2584
 
@@ -2603,7 +2601,7 @@ when the archive is not a valid EPUB 3
2603
2601
 
2604
2602
  > **readPackageDocumentSource**(`source`, `options`): `Promise`\<`string`\>
2605
2603
 
2606
- Defined in: [libraries/epub/src/index.tsx:3394](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3394)
2604
+ Defined in: [libraries/epub/src/index.tsx:3391](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3391)
2607
2605
 
2608
2606
  ##### Parameters
2609
2607
 
@@ -2620,7 +2618,7 @@ Defined in: [libraries/epub/src/index.tsx:3394](https://gitlab.com/storyteller-p
2620
2618
 
2621
2619
  > **upgrade**(`path`, `options`): `Promise`\<[`EpubInstanceFor`](#epubinstancefor)\<`A`\>\>
2622
2620
 
2623
- Defined in: [libraries/epub/src/index.tsx:3547](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3547)
2621
+ Defined in: [libraries/epub/src/index.tsx:3544](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3544)
2624
2622
 
2625
2623
  Upgrade an EPUB 2 publication to EPUB 3 in place using this
2626
2624
  factory's adapter, returning a new, valid Epub 3 instance.
@@ -10638,7 +10636,7 @@ Element.
10638
10636
 
10639
10637
  > **EpubInstanceFor**\<`A`\> = `A`\[`"capabilities"`\]\[`"writable"`\] _extends_ `true` ? [`Epub`](#epub) : [`EpubReader`](#epubreader)
10640
10638
 
10641
- Defined in: [libraries/epub/src/index.tsx:3328](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3328)
10639
+ Defined in: [libraries/epub/src/index.tsx:3325](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L3325)
10642
10640
 
10643
10641
  Resolves to [Epub](#epub) for writable adapters, [EpubReader](#epubreader) for read-only ones.
10644
10642
 
@@ -10724,819 +10722,4 @@ Defined in: [libraries/epub/src/index.tsx:112](https://gitlab.com/storyteller-pl
10724
10722
 
10725
10723
  > **href**: `string`
10726
10724
 
10727
- Defined in: [libraries/epub/src/index.tsx:109](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L109)
10728
-
10729
- #### id
10730
-
10731
- > **id**: `string`
10732
-
10733
- Defined in: [libraries/epub/src/index.tsx:108](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L108)
10734
-
10735
- #### mediaOverlay?
10736
-
10737
- > `optional` **mediaOverlay**: `string`
10738
-
10739
- Defined in: [libraries/epub/src/index.tsx:113](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L113)
10740
-
10741
- #### mediaType?
10742
-
10743
- > `optional` **mediaType**: `string`
10744
-
10745
- Defined in: [libraries/epub/src/index.tsx:111](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L111)
10746
-
10747
- #### properties?
10748
-
10749
- > `optional` **properties**: `string`[]
10750
-
10751
- Defined in: [libraries/epub/src/index.tsx:114](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L114)
10752
-
10753
- #### title?
10754
-
10755
- > `optional` **title**: `string`
10756
-
10757
- Defined in: [libraries/epub/src/index.tsx:110](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L110)
10758
-
10759
- ---
10760
-
10761
- ## MetadataEntry
10762
-
10763
- > **MetadataEntry** = `object`
10764
-
10765
- Defined in: [libraries/epub/src/index.tsx:117](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L117)
10766
-
10767
- ### Properties
10768
-
10769
- #### id?
10770
-
10771
- > `optional` **id**: `string`
10772
-
10773
- Defined in: [libraries/epub/src/index.tsx:118](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L118)
10774
-
10775
- #### properties
10776
-
10777
- > **properties**: `Record`\<`string`, `string`\>
10778
-
10779
- Defined in: [libraries/epub/src/index.tsx:120](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L120)
10780
-
10781
- #### type
10782
-
10783
- > **type**: `string`
10784
-
10785
- Defined in: [libraries/epub/src/index.tsx:119](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L119)
10786
-
10787
- #### value
10788
-
10789
- > **value**: `string` \| `undefined`
10790
-
10791
- Defined in: [libraries/epub/src/index.tsx:121](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L121)
10792
-
10793
- ---
10794
-
10795
- ## NavigationList
10796
-
10797
- > **NavigationList** = [`NavigationItem`](#navigationitem)[]
10798
-
10799
- Defined in: [libraries/epub/src/index.tsx:196](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/index.tsx#L196)
10800
-
10801
- ---
10802
-
10803
- ## Node
10804
-
10805
- > **Node** = `InstanceOf`\<[`Node`](#node-1)\> & `object`
10806
-
10807
- Defined in: node_modules/@xmldom/xmldom/index.d.ts:368
10808
-
10809
- ### Type Declaration
10810
-
10811
- #### ATTRIBUTE_NODE
10812
-
10813
- > `readonly` **ATTRIBUTE_NODE**: `2`
10814
-
10815
- #### CDATA_SECTION_NODE
10816
-
10817
- > `readonly` **CDATA_SECTION_NODE**: `4`
10818
-
10819
- node is a CDATASection node.
10820
-
10821
- #### COMMENT_NODE
10822
-
10823
- > `readonly` **COMMENT_NODE**: `8`
10824
-
10825
- node is a Comment node.
10826
-
10827
- #### DOCUMENT_FRAGMENT_NODE
10828
-
10829
- > `readonly` **DOCUMENT_FRAGMENT_NODE**: `11`
10830
-
10831
- node is a DocumentFragment node.
10832
-
10833
- #### DOCUMENT_NODE
10834
-
10835
- > `readonly` **DOCUMENT_NODE**: `9`
10836
-
10837
- node is a document.
10838
-
10839
- #### DOCUMENT_POSITION_CONTAINED_BY
10840
-
10841
- > `readonly` **DOCUMENT_POSITION_CONTAINED_BY**: `16`
10842
-
10843
- Set when other is a descendant of node.
10844
-
10845
- #### DOCUMENT_POSITION_CONTAINS
10846
-
10847
- > `readonly` **DOCUMENT_POSITION_CONTAINS**: `8`
10848
-
10849
- Set when other is an ancestor of node.
10850
-
10851
- #### DOCUMENT_POSITION_DISCONNECTED
10852
-
10853
- > `readonly` **DOCUMENT_POSITION_DISCONNECTED**: `1`
10854
-
10855
- Set when node and other are not in the same tree.
10856
-
10857
- #### DOCUMENT_POSITION_FOLLOWING
10858
-
10859
- > `readonly` **DOCUMENT_POSITION_FOLLOWING**: `4`
10860
-
10861
- Set when other is following node.
10862
-
10863
- #### DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC
10864
-
10865
- > `readonly` **DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC**: `32`
10866
-
10867
- #### DOCUMENT_POSITION_PRECEDING
10868
-
10869
- > `readonly` **DOCUMENT_POSITION_PRECEDING**: `2`
10870
-
10871
- Set when other is preceding node.
10872
-
10873
- #### DOCUMENT_TYPE_NODE
10874
-
10875
- > `readonly` **DOCUMENT_TYPE_NODE**: `10`
10876
-
10877
- node is a doctype.
10878
-
10879
- #### ELEMENT_NODE
10880
-
10881
- > `readonly` **ELEMENT_NODE**: `1`
10882
-
10883
- node is an element.
10884
-
10885
- #### ENTITY_NODE
10886
-
10887
- > `readonly` **ENTITY_NODE**: `6`
10888
-
10889
- #### ENTITY_REFERENCE_NODE
10890
-
10891
- > `readonly` **ENTITY_REFERENCE_NODE**: `5`
10892
-
10893
- #### NOTATION_NODE
10894
-
10895
- > `readonly` **NOTATION_NODE**: `12`
10896
-
10897
- #### PROCESSING_INSTRUCTION_NODE
10898
-
10899
- > `readonly` **PROCESSING_INSTRUCTION_NODE**: `7`
10900
-
10901
- node is a ProcessingInstruction node.
10902
-
10903
- #### TEXT_NODE
10904
-
10905
- > `readonly` **TEXT_NODE**: `3`
10906
-
10907
- node is a Text node.
10908
-
10909
- ---
10910
-
10911
- ## Text
10912
-
10913
- > **Text** = `InstanceOf`\<[`Text`](#text-1)\>
10914
-
10915
- Defined in: node_modules/@xmldom/xmldom/index.d.ts:1051
10916
-
10917
- The textual content of Element or Attr. If an element has no markup within its content, it has
10918
- a single child implementing Text that contains the element's text. However, if the element
10919
- contains markup, it is parsed into information items and Text nodes that form its children.
10920
-
10921
- **This implementation differs from the specification:** not constructable,
10922
- use `document.createTextNode(data)` instead.
10923
-
10924
- [MDN Reference](https://developer.mozilla.org/docs/Web/API/Text)
10925
-
10926
- ---
10927
-
10928
- ## XmlDiagnostic
10929
-
10930
- > **XmlDiagnostic** = `object`
10931
-
10932
- Defined in: [libraries/epub/src/xml.ts:233](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/xml.ts#L233)
10933
-
10934
- ### Properties
10935
-
10936
- #### column?
10937
-
10938
- > `optional` **column**: `number`
10939
-
10940
- Defined in: [libraries/epub/src/xml.ts:238](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/xml.ts#L238)
10941
-
10942
- #### level
10943
-
10944
- > **level**: `"warning"` \| `"error"` \| `"fatalError"`
10945
-
10946
- Defined in: [libraries/epub/src/xml.ts:235](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/xml.ts#L235)
10947
-
10948
- #### line?
10949
-
10950
- > `optional` **line**: `number`
10951
-
10952
- Defined in: [libraries/epub/src/xml.ts:237](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/xml.ts#L237)
10953
-
10954
- #### message
10955
-
10956
- > **message**: `string`
10957
-
10958
- Defined in: [libraries/epub/src/xml.ts:236](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/xml.ts#L236)
10959
-
10960
- ---
10961
-
10962
- ## NS
10963
-
10964
- > `const` **NS**: `object`
10965
-
10966
- Defined in: [libraries/epub/src/xml.ts:283](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/xml.ts#L283)
10967
-
10968
- The XML surface. Publication-level operations live on [Epub](#epub); for
10969
- building and inspecting XML trees directly, use these.
10970
-
10971
- The DOM node types are re-exported so that callers do not need to depend on
10972
- `@xmldom/xmldom` themselves.
10973
-
10974
- ### Type Declaration
10975
-
10976
- #### dc
10977
-
10978
- > **dc**: `string` = `"http://purl.org/dc/elements/1.1/"`
10979
-
10980
- #### epub
10981
-
10982
- > **epub**: `string` = `"http://www.idpf.org/2007/ops"`
10983
-
10984
- #### opf
10985
-
10986
- > **opf**: `string` = `"http://www.idpf.org/2007/opf"`
10987
-
10988
- #### xhtml
10989
-
10990
- > **xhtml**: `string` = `"http://www.w3.org/1999/xhtml"`
10991
-
10992
- #### xml
10993
-
10994
- > **xml**: `string` = `"http://www.w3.org/XML/1998/namespace"`
10995
-
10996
- #### xmlns
10997
-
10998
- > **xmlns**: `string` = `"http://www.w3.org/2000/xmlns/"`
10999
-
11000
- ---
11001
-
11002
- ## XMLSerializer
11003
-
11004
- > **XMLSerializer**: _typeof_ `XMLSerializer`
11005
-
11006
- Defined in: [libraries/epub/src/xml.ts:12](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/xml.ts#L12)
11007
-
11008
- The XML surface. Publication-level operations live on [Epub](#epub); for
11009
- building and inspecting XML trees directly, use these.
11010
-
11011
- The DOM node types are re-exported so that callers do not need to depend on
11012
- `@xmldom/xmldom` themselves.
11013
-
11014
- ---
11015
-
11016
- ## addLinkToXhtmlHead()
11017
-
11018
- > **addLinkToXhtmlHead**(`document`, `link`): `void`
11019
-
11020
- Defined in: [libraries/epub/src/xml.ts:215](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/xml.ts#L215)
11021
-
11022
- The XML surface. Publication-level operations live on [Epub](#epub); for
11023
- building and inspecting XML trees directly, use these.
11024
-
11025
- The DOM node types are re-exported so that callers do not need to depend on
11026
- `@xmldom/xmldom` themselves.
11027
-
11028
- ### Parameters
11029
-
11030
- | Parameter | Type |
11031
- | ----------- | ---------------------------------------------------------- |
11032
- | `document` | [`Document`](#document-1) |
11033
- | `link` | \{ `href`: `string`; `rel`: `string`; `type`: `string`; \} |
11034
- | `link.href` | `string` |
11035
- | `link.rel` | `string` |
11036
- | `link.type` | `string` |
11037
-
11038
- ### Returns
11039
-
11040
- `void`
11041
-
11042
- ---
11043
-
11044
- ## adoptNamespaces()
11045
-
11046
- > **adoptNamespaces**(`node`): `void`
11047
-
11048
- Defined in: [libraries/epub/src/xml.ts:54](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/xml.ts#L54)
11049
-
11050
- The XML surface. Publication-level operations live on [Epub](#epub); for
11051
- building and inspecting XML trees directly, use these.
11052
-
11053
- The DOM node types are re-exported so that callers do not need to depend on
11054
- `@xmldom/xmldom` themselves.
11055
-
11056
- ### Parameters
11057
-
11058
- | Parameter | Type |
11059
- | --------- | ----------------------- |
11060
- | `node` | [`Element`](#element-1) |
11061
-
11062
- ### Returns
11063
-
11064
- `void`
11065
-
11066
- ### Privateremarks
11067
-
11068
- `x()` builds elements in no namespace. That serializes correctly, because a
11069
- child in no namespace inherits the enclosing default namespace on the way
11070
- out, but in memory the elements report `namespaceURI === null` and so are
11071
- invisible to namespace-aware queries such as `getElementsByTagNameNS`.
11072
- Calling this after inserting a node makes the tree report the namespace its
11073
- position implies.
11074
-
11075
- ---
11076
-
11077
- ## createDocument()
11078
-
11079
- > **createDocument**(`namespaceUri`, `qualifiedName`, `docType?`): [`Document`](#document-1)
11080
-
11081
- Defined in: [libraries/epub/src/xml.ts:351](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/xml.ts#L351)
11082
-
11083
- The XML surface. Publication-level operations live on [Epub](#epub); for
11084
- building and inspecting XML trees directly, use these.
11085
-
11086
- The DOM node types are re-exported so that callers do not need to depend on
11087
- `@xmldom/xmldom` themselves.
11088
-
11089
- ### Parameters
11090
-
11091
- | Parameter | Type |
11092
- | --------------- | ------------------------------------------- |
11093
- | `namespaceUri` | `string` \| `null` |
11094
- | `qualifiedName` | `string` |
11095
- | `docType?` | [`DocumentType`](#documenttype-2) \| `null` |
11096
-
11097
- ### Returns
11098
-
11099
- [`Document`](#document-1)
11100
-
11101
- ---
11102
-
11103
- ## createDocumentType()
11104
-
11105
- > **createDocumentType**(`qualifiedName`, `publicId?`, `systemId?`): [`DocumentType`](#documenttype-2)
11106
-
11107
- Defined in: [libraries/epub/src/xml.ts:363](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/xml.ts#L363)
11108
-
11109
- The XML surface. Publication-level operations live on [Epub](#epub); for
11110
- building and inspecting XML trees directly, use these.
11111
-
11112
- The DOM node types are re-exported so that callers do not need to depend on
11113
- `@xmldom/xmldom` themselves.
11114
-
11115
- ### Parameters
11116
-
11117
- | Parameter | Type |
11118
- | --------------- | -------- |
11119
- | `qualifiedName` | `string` |
11120
- | `publicId?` | `string` |
11121
- | `systemId?` | `string` |
11122
-
11123
- ### Returns
11124
-
11125
- [`DocumentType`](#documenttype-2)
11126
-
11127
- ---
11128
-
11129
- ## declareDefaultNamespace()
11130
-
11131
- > **declareDefaultNamespace**(`element`, `uri`): `void`
11132
-
11133
- Defined in: [libraries/epub/src/xml.ts:78](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/xml.ts#L78)
11134
-
11135
- The XML surface. Publication-level operations live on [Epub](#epub); for
11136
- building and inspecting XML trees directly, use these.
11137
-
11138
- The DOM node types are re-exported so that callers do not need to depend on
11139
- `@xmldom/xmldom` themselves.
11140
-
11141
- ### Parameters
11142
-
11143
- | Parameter | Type |
11144
- | --------- | ----------------------- |
11145
- | `element` | [`Element`](#element-1) |
11146
- | `uri` | `string` |
11147
-
11148
- ### Returns
11149
-
11150
- `void`
11151
-
11152
- ---
11153
-
11154
- ## findXmlChildByName()
11155
-
11156
- > **findXmlChildByName**(`name`, `element`, `filter?`): [`Element`](#element-1) \| `undefined`
11157
-
11158
- Defined in: [libraries/epub/src/xml.ts:157](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/xml.ts#L157)
11159
-
11160
- The XML surface. Publication-level operations live on [Epub](#epub); for
11161
- building and inspecting XML trees directly, use these.
11162
-
11163
- The DOM node types are re-exported so that callers do not need to depend on
11164
- `@xmldom/xmldom` themselves.
11165
-
11166
- ### Parameters
11167
-
11168
- | Parameter | Type |
11169
- | --------- | ----------------------- |
11170
- | `name` | `string` |
11171
- | `element` | [`Element`](#element-1) |
11172
- | `filter?` | (`node`) => `boolean` |
11173
-
11174
- ### Returns
11175
-
11176
- [`Element`](#element-1) \| `undefined`
11177
-
11178
- ---
11179
-
11180
- ## findXmlChildByNameNS()
11181
-
11182
- > **findXmlChildByNameNS**(`namespaceUri`, `name`, `element`, `filter?`): [`Element`](#element-1) \| `undefined`
11183
-
11184
- Defined in: [libraries/epub/src/xml.ts:134](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/xml.ts#L134)
11185
-
11186
- The XML surface. Publication-level operations live on [Epub](#epub); for
11187
- building and inspecting XML trees directly, use these.
11188
-
11189
- The DOM node types are re-exported so that callers do not need to depend on
11190
- `@xmldom/xmldom` themselves.
11191
-
11192
- ### Parameters
11193
-
11194
- | Parameter | Type |
11195
- | -------------- | ----------------------- |
11196
- | `namespaceUri` | `string` \| `null` |
11197
- | `name` | `string` |
11198
- | `element` | [`Element`](#element-1) |
11199
- | `filter?` | (`node`) => `boolean` |
11200
-
11201
- ### Returns
11202
-
11203
- [`Element`](#element-1) \| `undefined`
11204
-
11205
- ---
11206
-
11207
- ## findXmlDescendantByName()
11208
-
11209
- > **findXmlDescendantByName**(`name`, `element`, `filter?`): [`Element`](#element-1) \| `undefined`
11210
-
11211
- Defined in: [libraries/epub/src/xml.ts:203](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/xml.ts#L203)
11212
-
11213
- The XML surface. Publication-level operations live on [Epub](#epub); for
11214
- building and inspecting XML trees directly, use these.
11215
-
11216
- The DOM node types are re-exported so that callers do not need to depend on
11217
- `@xmldom/xmldom` themselves.
11218
-
11219
- ### Parameters
11220
-
11221
- | Parameter | Type |
11222
- | --------- | ----------------------- |
11223
- | `name` | `string` |
11224
- | `element` | [`Element`](#element-1) |
11225
- | `filter?` | (`node`) => `boolean` |
11226
-
11227
- ### Returns
11228
-
11229
- [`Element`](#element-1) \| `undefined`
11230
-
11231
- ---
11232
-
11233
- ## findXmlDescendantByNameNS()
11234
-
11235
- > **findXmlDescendantByNameNS**(`namespaceUri`, `name`, `element`, `filter?`): [`Element`](#element-1) \| `undefined`
11236
-
11237
- Defined in: [libraries/epub/src/xml.ts:172](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/xml.ts#L172)
11238
-
11239
- The XML surface. Publication-level operations live on [Epub](#epub); for
11240
- building and inspecting XML trees directly, use these.
11241
-
11242
- The DOM node types are re-exported so that callers do not need to depend on
11243
- `@xmldom/xmldom` themselves.
11244
-
11245
- ### Parameters
11246
-
11247
- | Parameter | Type |
11248
- | -------------- | ----------------------- |
11249
- | `namespaceUri` | `string` \| `null` |
11250
- | `name` | `string` |
11251
- | `element` | [`Element`](#element-1) |
11252
- | `filter?` | (`node`) => `boolean` |
11253
-
11254
- ### Returns
11255
-
11256
- [`Element`](#element-1) \| `undefined`
11257
-
11258
- ---
11259
-
11260
- ## getXhtmlBody()
11261
-
11262
- > **getXhtmlBody**(`document`): [`Element`](#element-1)
11263
-
11264
- Defined in: [libraries/epub/src/xml.ts:120](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/xml.ts#L120)
11265
-
11266
- The XML surface. Publication-level operations live on [Epub](#epub); for
11267
- building and inspecting XML trees directly, use these.
11268
-
11269
- The DOM node types are re-exported so that callers do not need to depend on
11270
- `@xmldom/xmldom` themselves.
11271
-
11272
- ### Parameters
11273
-
11274
- | Parameter | Type |
11275
- | ---------- | ------------------------- |
11276
- | `document` | [`Document`](#document-1) |
11277
-
11278
- ### Returns
11279
-
11280
- [`Element`](#element-1)
11281
-
11282
- ---
11283
-
11284
- ## insert()
11285
-
11286
- > **insert**\<`T`\>(`parent`, `child`, `reference?`): `T`
11287
-
11288
- Defined in: [libraries/epub/src/xml.ts:89](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/xml.ts#L89)
11289
-
11290
- The XML surface. Publication-level operations live on [Epub](#epub); for
11291
- building and inspecting XML trees directly, use these.
11292
-
11293
- The DOM node types are re-exported so that callers do not need to depend on
11294
- `@xmldom/xmldom` themselves.
11295
-
11296
- ### Type Parameters
11297
-
11298
- | Type Parameter |
11299
- | ------------------------------- |
11300
- | `T` _extends_ [`Node`](#node-1) |
11301
-
11302
- ### Parameters
11303
-
11304
- | Parameter | Type |
11305
- | ------------ | --------------------------- |
11306
- | `parent` | [`Element`](#element-1) |
11307
- | `child` | `T` |
11308
- | `reference?` | [`Node`](#node-1) \| `null` |
11309
-
11310
- ### Returns
11311
-
11312
- `T`
11313
-
11314
- ---
11315
-
11316
- ## isCdata()
11317
-
11318
- > **isCdata**(`n`): `n is CharacterData`
11319
-
11320
- Defined in: [libraries/epub/src/xml.ts:22](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/xml.ts#L22)
11321
-
11322
- The XML surface. Publication-level operations live on [Epub](#epub); for
11323
- building and inspecting XML trees directly, use these.
11324
-
11325
- The DOM node types are re-exported so that callers do not need to depend on
11326
- `@xmldom/xmldom` themselves.
11327
-
11328
- ### Parameters
11329
-
11330
- | Parameter | Type |
11331
- | --------- | ----------------- |
11332
- | `n` | [`Node`](#node-1) |
11333
-
11334
- ### Returns
11335
-
11336
- `n is CharacterData`
11337
-
11338
- ---
11339
-
11340
- ## isComment()
11341
-
11342
- > **isComment**(`n`): `n is CharacterData`
11343
-
11344
- Defined in: [libraries/epub/src/xml.ts:26](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/xml.ts#L26)
11345
-
11346
- The XML surface. Publication-level operations live on [Epub](#epub); for
11347
- building and inspecting XML trees directly, use these.
11348
-
11349
- The DOM node types are re-exported so that callers do not need to depend on
11350
- `@xmldom/xmldom` themselves.
11351
-
11352
- ### Parameters
11353
-
11354
- | Parameter | Type |
11355
- | --------- | ----------------- |
11356
- | `n` | [`Node`](#node-1) |
11357
-
11358
- ### Returns
11359
-
11360
- `n is CharacterData`
11361
-
11362
- ---
11363
-
11364
- ## isElement()
11365
-
11366
- > **isElement**(`n`): `n is Element`
11367
-
11368
- Defined in: [libraries/epub/src/xml.ts:14](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/xml.ts#L14)
11369
-
11370
- The XML surface. Publication-level operations live on [Epub](#epub); for
11371
- building and inspecting XML trees directly, use these.
11372
-
11373
- The DOM node types are re-exported so that callers do not need to depend on
11374
- `@xmldom/xmldom` themselves.
11375
-
11376
- ### Parameters
11377
-
11378
- | Parameter | Type |
11379
- | --------- | ----------------- |
11380
- | `n` | [`Node`](#node-1) |
11381
-
11382
- ### Returns
11383
-
11384
- `n is Element`
11385
-
11386
- ---
11387
-
11388
- ## isText()
11389
-
11390
- > **isText**(`n`): `n is CharacterData`
11391
-
11392
- Defined in: [libraries/epub/src/xml.ts:18](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/xml.ts#L18)
11393
-
11394
- The XML surface. Publication-level operations live on [Epub](#epub); for
11395
- building and inspecting XML trees directly, use these.
11396
-
11397
- The DOM node types are re-exported so that callers do not need to depend on
11398
- `@xmldom/xmldom` themselves.
11399
-
11400
- ### Parameters
11401
-
11402
- | Parameter | Type |
11403
- | --------- | ----------------- |
11404
- | `n` | [`Node`](#node-1) |
11405
-
11406
- ### Returns
11407
-
11408
- `n is CharacterData`
11409
-
11410
- ---
11411
-
11412
- ## parse()
11413
-
11414
- > **parse**(`xml`, `mediaType`, `onError?`): [`Document`](#document-1)
11415
-
11416
- Defined in: [libraries/epub/src/xml.ts:241](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/xml.ts#L241)
11417
-
11418
- The XML surface. Publication-level operations live on [Epub](#epub); for
11419
- building and inspecting XML trees directly, use these.
11420
-
11421
- The DOM node types are re-exported so that callers do not need to depend on
11422
- `@xmldom/xmldom` themselves.
11423
-
11424
- ### Parameters
11425
-
11426
- | Parameter | Type |
11427
- | ----------- | ------------------------ |
11428
- | `xml` | `string` |
11429
- | `mediaType` | `string` |
11430
- | `onError?` | (`diagnostic`) => `void` |
11431
-
11432
- ### Returns
11433
-
11434
- [`Document`](#document-1)
11435
-
11436
- ---
11437
-
11438
- ## replace()
11439
-
11440
- > **replace**\<`T`\>(`parent`, `newChild`, `oldChild`): `T`
11441
-
11442
- Defined in: [libraries/epub/src/xml.ts:105](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/xml.ts#L105)
11443
-
11444
- The XML surface. Publication-level operations live on [Epub](#epub); for
11445
- building and inspecting XML trees directly, use these.
11446
-
11447
- The DOM node types are re-exported so that callers do not need to depend on
11448
- `@xmldom/xmldom` themselves.
11449
-
11450
- ### Type Parameters
11451
-
11452
- | Type Parameter |
11453
- | ------------------------------- |
11454
- | `T` _extends_ [`Node`](#node-1) |
11455
-
11456
- ### Parameters
11457
-
11458
- | Parameter | Type |
11459
- | ---------- | ----------------------- |
11460
- | `parent` | [`Element`](#element-1) |
11461
- | `newChild` | `T` |
11462
- | `oldChild` | [`Node`](#node-1) |
11463
-
11464
- ### Returns
11465
-
11466
- `T`
11467
-
11468
- ---
11469
-
11470
- ## serialize()
11471
-
11472
- > **serialize**(`doc`, `options?`): `string`
11473
-
11474
- Defined in: [libraries/epub/src/xml.ts:261](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/xml.ts#L261)
11475
-
11476
- The XML surface. Publication-level operations live on [Epub](#epub); for
11477
- building and inspecting XML trees directly, use these.
11478
-
11479
- The DOM node types are re-exported so that callers do not need to depend on
11480
- `@xmldom/xmldom` themselves.
11481
-
11482
- ### Parameters
11483
-
11484
- | Parameter | Type |
11485
- | ------------------- | ----------------------------- |
11486
- | `doc` | [`Node`](#node-1) |
11487
- | `options?` | \{ `validate?`: `boolean`; \} |
11488
- | `options.validate?` | `boolean` |
11489
-
11490
- ### Returns
11491
-
11492
- `string`
11493
-
11494
- ---
11495
-
11496
- ## text()
11497
-
11498
- > **text**(`data`): [`Text`](#text-1)
11499
-
11500
- Defined in: [libraries/epub/src/xml.ts:347](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/xml.ts#L347)
11501
-
11502
- The XML surface. Publication-level operations live on [Epub](#epub); for
11503
- building and inspecting XML trees directly, use these.
11504
-
11505
- The DOM node types are re-exported so that callers do not need to depend on
11506
- `@xmldom/xmldom` themselves.
11507
-
11508
- ### Parameters
11509
-
11510
- | Parameter | Type |
11511
- | --------- | -------- |
11512
- | `data` | `string` |
11513
-
11514
- ### Returns
11515
-
11516
- [`Text`](#text-1)
11517
-
11518
- ---
11519
-
11520
- ## x()
11521
-
11522
- > **x**(`name`, `attributes?`, ...`children?`): [`Element`](#element-1)
11523
-
11524
- Defined in: [libraries/epub/src/xml.ts:294](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/libraries/epub/src/xml.ts#L294)
11525
-
11526
- The XML surface. Publication-level operations live on [Epub](#epub); for
11527
- building and inspecting XML trees directly, use these.
11528
-
11529
- The DOM node types are re-exported so that callers do not need to depend on
11530
- `@xmldom/xmldom` themselves.
11531
-
11532
- ### Parameters
11533
-
11534
- | Parameter | Type |
11535
- | -------------- | ---------------------------------------------------------- |
11536
- | `name` | `string` |
11537
- | `attributes?` | `Record`\<`string`, `string` \| `undefined`\> \| `null` |
11538
- | ...`children?` | (`string` \| [`Node`](#node-1) \| `null` \| `undefined`)[] |
11539
-
11540
- ### Returns
11541
-
11542
- [`Element`](#element-1)
10725
+ Defined in: [libraries/epub/src/index.tsx:109](https://gitlab.com/storyteller-platform/storyteller/-/blob/main/li