@likecoin/epub-ts 0.4.4 → 0.4.5
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 +15 -15
- package/dist/book.d.ts +6 -6
- package/dist/epub.cjs +3 -3
- package/dist/epub.cjs.map +1 -1
- package/dist/epub.js +143 -141
- package/dist/epub.js.map +1 -1
- package/dist/epub.umd.js +3 -3
- package/dist/epub.umd.js.map +1 -1
- package/dist/managers/continuous/index.d.ts +8 -8
- package/dist/managers/default/index.d.ts +5 -5
- package/dist/managers/helpers/snap.d.ts +9 -8
- package/dist/managers/views/iframe.d.ts +12 -7
- package/dist/navigation.d.ts +1 -1
- package/dist/packaging.d.ts +20 -9
- package/dist/rendition.d.ts +6 -7
- package/dist/spine.d.ts +10 -10
- package/dist/themes.d.ts +1 -1
- package/dist/types.d.ts +17 -3
- package/dist/utils/hook.d.ts +6 -5
- package/dist/utils/path.d.ts +0 -1
- package/package.json +1 -1
package/dist/annotations.d.ts
CHANGED
|
@@ -2,12 +2,12 @@ import { IEventEmitter } from './types';
|
|
|
2
2
|
import { default as Rendition } from './rendition';
|
|
3
3
|
interface AnnotationView {
|
|
4
4
|
index: number;
|
|
5
|
-
highlight:
|
|
6
|
-
underline:
|
|
7
|
-
mark:
|
|
8
|
-
unhighlight:
|
|
9
|
-
ununderline:
|
|
10
|
-
unmark:
|
|
5
|
+
highlight: (cfiRange: string, data?: Record<string, string>, cb?: EventListener, className?: string, styles?: Record<string, string>) => object | undefined;
|
|
6
|
+
underline: (cfiRange: string, data?: Record<string, string>, cb?: EventListener, className?: string, styles?: Record<string, string>) => object | undefined;
|
|
7
|
+
mark: (cfiRange: string, data?: Record<string, string>, cb?: EventListener) => object | null | undefined;
|
|
8
|
+
unhighlight: (cfiRange: string) => void;
|
|
9
|
+
ununderline: (cfiRange: string) => void;
|
|
10
|
+
unmark: (cfiRange: string) => void;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
13
|
* Handles managing adding & removing Annotations
|
|
@@ -32,7 +32,7 @@ declare class Annotations {
|
|
|
32
32
|
* @param {object} styles CSS styles to assign to annotation
|
|
33
33
|
* @returns {Annotation} annotation
|
|
34
34
|
*/
|
|
35
|
-
add(type: string, cfiRange: string, data?: Record<string, any>, cb?:
|
|
35
|
+
add(type: string, cfiRange: string, data?: Record<string, any>, cb?: EventListener, className?: string, styles?: Record<string, string>): Annotation;
|
|
36
36
|
/**
|
|
37
37
|
* Remove an annotation from store
|
|
38
38
|
* @param {EpubCFI} cfiRange EpubCFI range the annotation is attached to
|
|
@@ -57,7 +57,7 @@ declare class Annotations {
|
|
|
57
57
|
* @param {string} className CSS class to assign to annotation
|
|
58
58
|
* @param {object} styles CSS styles to assign to annotation
|
|
59
59
|
*/
|
|
60
|
-
highlight(cfiRange: string, data?: Record<string, any>, cb?:
|
|
60
|
+
highlight(cfiRange: string, data?: Record<string, any>, cb?: EventListener, className?: string, styles?: Record<string, string>): Annotation;
|
|
61
61
|
/**
|
|
62
62
|
* Add a underline to the store
|
|
63
63
|
* @param {EpubCFI} cfiRange EpubCFI range to attach annotation to
|
|
@@ -66,14 +66,14 @@ declare class Annotations {
|
|
|
66
66
|
* @param {string} className CSS class to assign to annotation
|
|
67
67
|
* @param {object} styles CSS styles to assign to annotation
|
|
68
68
|
*/
|
|
69
|
-
underline(cfiRange: string, data?: Record<string, any>, cb?:
|
|
69
|
+
underline(cfiRange: string, data?: Record<string, any>, cb?: EventListener, className?: string, styles?: Record<string, string>): Annotation;
|
|
70
70
|
/**
|
|
71
71
|
* Add a mark to the store
|
|
72
72
|
* @param {EpubCFI} cfiRange EpubCFI range to attach annotation to
|
|
73
73
|
* @param {object} data Data to assign to annotation
|
|
74
74
|
* @param {function} cb Callback after annotation is clicked
|
|
75
75
|
*/
|
|
76
|
-
mark(cfiRange: string, data?: Record<string, any>, cb?:
|
|
76
|
+
mark(cfiRange: string, data?: Record<string, any>, cb?: EventListener): Annotation;
|
|
77
77
|
/**
|
|
78
78
|
* iterate over annotations in the store
|
|
79
79
|
*/
|
|
@@ -119,8 +119,8 @@ declare class Annotation implements IEventEmitter {
|
|
|
119
119
|
cfiRange: string;
|
|
120
120
|
data: Record<string, any>;
|
|
121
121
|
sectionIndex: number;
|
|
122
|
-
mark: object | undefined;
|
|
123
|
-
cb:
|
|
122
|
+
mark: object | null | undefined;
|
|
123
|
+
cb: EventListener;
|
|
124
124
|
className: string;
|
|
125
125
|
styles: Record<string, string>;
|
|
126
126
|
on: IEventEmitter["on"];
|
|
@@ -131,7 +131,7 @@ declare class Annotation implements IEventEmitter {
|
|
|
131
131
|
cfiRange: string;
|
|
132
132
|
data?: Record<string, any>;
|
|
133
133
|
sectionIndex?: number;
|
|
134
|
-
cb?:
|
|
134
|
+
cb?: EventListener;
|
|
135
135
|
className?: string;
|
|
136
136
|
styles?: Record<string, string>;
|
|
137
137
|
});
|
|
@@ -144,12 +144,12 @@ declare class Annotation implements IEventEmitter {
|
|
|
144
144
|
* Add to a view
|
|
145
145
|
* @param {View} view
|
|
146
146
|
*/
|
|
147
|
-
attach(view: AnnotationView): object | undefined;
|
|
147
|
+
attach(view: AnnotationView): object | null | undefined;
|
|
148
148
|
/**
|
|
149
149
|
* Remove from a view
|
|
150
150
|
* @param {View} view
|
|
151
151
|
*/
|
|
152
|
-
detach(view: AnnotationView):
|
|
152
|
+
detach(view: AnnotationView): void;
|
|
153
153
|
/**
|
|
154
154
|
* [Not Implemented] Get text of an annotation
|
|
155
155
|
* @TODO: needs implementation in contents
|
package/dist/book.d.ts
CHANGED
|
@@ -56,15 +56,15 @@ interface BookLoadedState {
|
|
|
56
56
|
declare class Book implements IEventEmitter {
|
|
57
57
|
settings: BookOptions;
|
|
58
58
|
opening: defer<Book>;
|
|
59
|
-
opened: Promise<Book
|
|
59
|
+
opened: Promise<Book>;
|
|
60
60
|
isOpen: boolean;
|
|
61
|
-
loading: BookLoadingState
|
|
62
|
-
loaded: BookLoadedState
|
|
63
|
-
ready: Promise<[PackagingManifestObject, Spine, PackagingMetadataObject, string, Navigation, Resources, DisplayOptions]
|
|
61
|
+
loading: BookLoadingState;
|
|
62
|
+
loaded: BookLoadedState;
|
|
63
|
+
ready: Promise<[PackagingManifestObject, Spine, PackagingMetadataObject, string, Navigation, Resources, DisplayOptions]>;
|
|
64
64
|
isRendered: boolean;
|
|
65
65
|
request: RequestFunction;
|
|
66
|
-
spine: Spine
|
|
67
|
-
locations: Locations
|
|
66
|
+
spine: Spine;
|
|
67
|
+
locations: Locations;
|
|
68
68
|
navigation: Navigation | undefined;
|
|
69
69
|
pageList: PageList | undefined;
|
|
70
70
|
url: Url | undefined;
|