@likecoin/epub-ts 0.3.95 → 0.3.96
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/dist/annotations.d.ts +1 -1
- package/dist/book.d.ts +12 -11
- package/dist/contents.d.ts +1 -1
- package/dist/epub.cjs +5 -5
- package/dist/epub.cjs.map +1 -1
- package/dist/epub.d.ts +3 -1
- package/dist/epub.js +700 -673
- package/dist/epub.js.map +1 -1
- package/dist/epub.umd.js +5 -5
- package/dist/epub.umd.js.map +1 -1
- package/dist/epubcfi.d.ts +5 -5
- package/dist/index.d.ts +13 -1
- package/dist/locations.d.ts +8 -2
- package/dist/managers/continuous/index.d.ts +2 -2
- package/dist/managers/default/index.d.ts +4 -4
- package/dist/mapping.d.ts +5 -3
- package/dist/rendition.d.ts +6 -5
- package/dist/section.d.ts +2 -2
- package/dist/spine.d.ts +1 -1
- package/dist/store.d.ts +3 -3
- package/dist/types.d.ts +3 -6
- package/package.json +1 -1
package/dist/annotations.d.ts
CHANGED
package/dist/book.d.ts
CHANGED
|
@@ -12,7 +12,8 @@ import { default as Rendition } from './rendition';
|
|
|
12
12
|
import { default as Archive } from './archive';
|
|
13
13
|
import { default as Store } from './store';
|
|
14
14
|
import { default as DisplayOptions } from './displayoptions';
|
|
15
|
-
import {
|
|
15
|
+
import { default as JSZip } from 'jszip';
|
|
16
|
+
import { IEventEmitter, BookOptions, RenditionOptions, RequestFunction, PackagingManifestObject, PackagingMetadataObject } from './types';
|
|
16
17
|
import { default as Section } from './section';
|
|
17
18
|
interface BookLoadingState {
|
|
18
19
|
manifest: defer;
|
|
@@ -25,14 +26,14 @@ interface BookLoadingState {
|
|
|
25
26
|
displayOptions: defer;
|
|
26
27
|
}
|
|
27
28
|
interface BookLoadedState {
|
|
28
|
-
manifest: Promise<
|
|
29
|
-
spine: Promise<
|
|
30
|
-
metadata: Promise<
|
|
31
|
-
cover: Promise<
|
|
32
|
-
navigation: Promise<
|
|
33
|
-
pageList: Promise<
|
|
34
|
-
resources: Promise<
|
|
35
|
-
displayOptions: Promise<
|
|
29
|
+
manifest: Promise<PackagingManifestObject>;
|
|
30
|
+
spine: Promise<Spine>;
|
|
31
|
+
metadata: Promise<PackagingMetadataObject>;
|
|
32
|
+
cover: Promise<string>;
|
|
33
|
+
navigation: Promise<Navigation>;
|
|
34
|
+
pageList: Promise<PageList>;
|
|
35
|
+
resources: Promise<Resources>;
|
|
36
|
+
displayOptions: Promise<DisplayOptions>;
|
|
36
37
|
}
|
|
37
38
|
/**
|
|
38
39
|
* An Epub representation with methods for the loading, parsing and manipulation
|
|
@@ -59,7 +60,7 @@ declare class Book implements IEventEmitter {
|
|
|
59
60
|
isOpen: boolean;
|
|
60
61
|
loading: BookLoadingState | undefined;
|
|
61
62
|
loaded: BookLoadedState | undefined;
|
|
62
|
-
ready: Promise<
|
|
63
|
+
ready: Promise<[PackagingManifestObject, Spine, PackagingMetadataObject, string, Navigation, Resources, DisplayOptions]> | undefined;
|
|
63
64
|
isRendered: boolean;
|
|
64
65
|
request: RequestFunction;
|
|
65
66
|
spine: Spine | undefined;
|
|
@@ -188,7 +189,7 @@ declare class Book implements IEventEmitter {
|
|
|
188
189
|
* @param {string} [encoding]
|
|
189
190
|
* @return {Archive}
|
|
190
191
|
*/
|
|
191
|
-
unarchive(input: string | ArrayBuffer | Blob, encoding?: string): Promise<
|
|
192
|
+
unarchive(input: string | ArrayBuffer | Blob, encoding?: string): Promise<JSZip>;
|
|
192
193
|
/**
|
|
193
194
|
* Store the epubs contents
|
|
194
195
|
* @private
|
package/dist/contents.d.ts
CHANGED
|
@@ -216,7 +216,7 @@ declare class Contents implements IEventEmitter {
|
|
|
216
216
|
* @param {array | object} rules
|
|
217
217
|
* @param {string} key If the key is the same, the CSS will be replaced instead of inserted
|
|
218
218
|
*/
|
|
219
|
-
addStylesheetRules(rules:
|
|
219
|
+
addStylesheetRules(rules: Record<string, Record<string, string> | Array<Record<string, string>>> | Array<Array<string | string[]>>, key?: string): void;
|
|
220
220
|
/**
|
|
221
221
|
* Append a script tag to the document head
|
|
222
222
|
* @param {string} src url
|