@d-i-t-a/reader 1.10.0 → 1.11.0-beta.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/index.d.ts +12 -1
- package/dist/injectables/footnotes/footnotes.js.LICENSE.txt +6 -0
- package/dist/model/Locator.d.ts +3 -18
- package/dist/modules/AnnotationModule.d.ts +16 -5
- package/dist/modules/BookmarkModule.d.ts +12 -1
- package/dist/modules/TTS/TTSModule.d.ts +2 -27
- package/dist/modules/TTS/TTSModule2.d.ts +73 -0
- package/dist/modules/TTS/TTSSettings.d.ts +29 -5
- package/dist/modules/citations/CitationModule.d.ts +37 -0
- package/dist/modules/footnotes/FootnotesEventHandler.d.ts +0 -0
- package/dist/modules/highlight/TextHighlighter.d.ts +36 -46
- package/dist/modules/highlight/TextHighlighterFXL.d.ts +278 -0
- package/dist/modules/highlight/common/highlight.d.ts +53 -2
- package/dist/modules/highlight/common/rect-utils.d.ts +1 -1
- package/dist/modules/highlight/common/selection.d.ts +5 -0
- package/dist/modules/highlight/renderer/iframe/state.d.ts +0 -3
- package/dist/modules/linefocus/LineFocusModule.d.ts +43 -0
- package/dist/modules/pagebreak/PageBreakModule.d.ts +26 -0
- package/dist/modules/search/DefinitionsModule.d.ts +49 -0
- package/dist/modules/search/Popup.d.ts +8 -0
- package/dist/modules/search/SearchModule.d.ts +8 -5
- package/dist/navigator/IFrameNavigator.d.ts +17 -12
- package/dist/reader.css +0 -3
- package/dist/reader.css.map +1 -1
- package/dist/reader.js +1 -1
- package/dist/reader.js.LICENSE.txt +9 -0
- package/dist/reader.js.map +1 -1
- package/dist/store/Annotator.d.ts +2 -2
- package/dist/store/LocalAnnotator.d.ts +2 -2
- package/dist/utils/EventHandler.d.ts +5 -0
- package/dist/utils/IconLib.d.ts +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/views/BookView.d.ts +4 -3
- package/dist/views/FixedBookView.d.ts +4 -1
- package/dist/views/ReflowableBookView.d.ts +2 -2
- package/package.json +3 -1
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ReadingPosition } from "../model/Locator";
|
|
2
2
|
import { IHighlight } from "../modules/highlight/common/highlight";
|
|
3
|
-
import { IReadiumIFrameWindow } from "../modules/highlight/renderer/iframe/state";
|
|
4
3
|
interface Annotator {
|
|
5
4
|
initLastReadingPosition(position: ReadingPosition): Promise<void>;
|
|
6
5
|
getLastReadingPosition(): Promise<any>;
|
|
@@ -16,7 +15,8 @@ interface Annotator {
|
|
|
16
15
|
deleteSelectedAnnotation(annotation: any): Promise<any>;
|
|
17
16
|
getAnnotations(): Promise<any>;
|
|
18
17
|
getAnnotation(annotation: IHighlight): Promise<any>;
|
|
19
|
-
|
|
18
|
+
getAnnotationByID(id: string): Promise<any>;
|
|
19
|
+
getAnnotationPosition(id: any, iframeWin: any): Promise<any>;
|
|
20
20
|
}
|
|
21
21
|
export declare enum AnnotationType {
|
|
22
22
|
Bookmark = 0,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import Annotator, { AnnotationType } from "./Annotator";
|
|
2
2
|
import Store from "./Store";
|
|
3
3
|
import { ReadingPosition } from "../model/Locator";
|
|
4
|
-
import { IReadiumIFrameWindow } from "../modules/highlight/renderer/iframe/state";
|
|
5
4
|
import { IHighlight } from "../modules/highlight/common/highlight";
|
|
6
5
|
export interface LocalAnnotatorConfig {
|
|
7
6
|
store: Store;
|
|
@@ -26,6 +25,7 @@ export default class LocalAnnotator implements Annotator {
|
|
|
26
25
|
deleteAnnotation(id: any): Promise<any>;
|
|
27
26
|
deleteSelectedAnnotation(annotation: any): Promise<any>;
|
|
28
27
|
getAnnotations(): Promise<any>;
|
|
29
|
-
getAnnotationPosition(id: any, iframeWin:
|
|
28
|
+
getAnnotationPosition(id: any, iframeWin: any): Promise<any>;
|
|
30
29
|
getAnnotation(highlight: IHighlight): Promise<any>;
|
|
30
|
+
getAnnotationByID(id: string): Promise<any>;
|
|
31
31
|
}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
+
import IFrameNavigator from "../navigator/IFrameNavigator";
|
|
2
|
+
import Popup from "../modules/search/Popup";
|
|
1
3
|
export declare function addEventListenerOptional(element: any, eventType: string, eventListener: any): void;
|
|
2
4
|
export declare function removeEventListenerOptional(element: any, eventType: string, eventListener: any): void;
|
|
3
5
|
export default class EventHandler {
|
|
6
|
+
navigator: IFrameNavigator;
|
|
7
|
+
popup: Popup;
|
|
8
|
+
constructor(navigator: IFrameNavigator);
|
|
4
9
|
onInternalLink: (event: UIEvent) => void;
|
|
5
10
|
onClickThrough: (event: UIEvent) => void;
|
|
6
11
|
setupEvents(element: HTMLElement | Document | null): void;
|
package/dist/utils/IconLib.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export declare const WIDTH_ATTR: number;
|
|
2
2
|
export declare const HEIGHT_ATTR: number;
|
|
3
3
|
export declare const VIEWBOX_ATTR: string;
|
|
4
|
+
export declare const iconTemplateColored: (id: string, title: string, path: string, classAttr: string, size: number, fill: string) => string;
|
|
4
5
|
export declare const icons: {
|
|
5
6
|
error: string;
|
|
6
7
|
home: string;
|
package/dist/utils/index.d.ts
CHANGED
package/dist/views/BookView.d.ts
CHANGED
|
@@ -9,16 +9,17 @@ interface BookView {
|
|
|
9
9
|
delegate: IFrameNavigator;
|
|
10
10
|
attributes: IFrameAttributes;
|
|
11
11
|
setMode?(scroll: boolean): any;
|
|
12
|
-
isScrollMode
|
|
13
|
-
isPaginated
|
|
12
|
+
isScrollMode(): any;
|
|
13
|
+
isPaginated(): any;
|
|
14
14
|
goToElement?(element: HTMLElement | null, relative?: boolean): void;
|
|
15
|
+
setSize(): void;
|
|
15
16
|
setIframeHeight?(iframe: any): any;
|
|
16
17
|
/** Load this view in its book element, at the specified position. */
|
|
17
18
|
start(): void;
|
|
18
19
|
/** Remove this view from its book element. */
|
|
19
20
|
stop(): void;
|
|
20
21
|
getCurrentPosition(): number;
|
|
21
|
-
|
|
22
|
+
goToProgression(position: number): void;
|
|
22
23
|
goToFragment(fragment: string): void;
|
|
23
24
|
goToCssSelector(cssSelector: string): void;
|
|
24
25
|
snap(element: HTMLElement | null, relative?: boolean): void;
|
|
@@ -15,10 +15,13 @@ export default class FixedBookView implements BookView {
|
|
|
15
15
|
start(): void;
|
|
16
16
|
stop(): void;
|
|
17
17
|
getCurrentPosition(): number;
|
|
18
|
-
|
|
18
|
+
goToProgression(_position: number): void;
|
|
19
19
|
goToCssSelector(_cssSelector: string, _relative?: boolean): void;
|
|
20
20
|
goToFragment(_fragment: string, _relative?: boolean): void;
|
|
21
21
|
snap(_element: HTMLElement, _relative?: boolean): void;
|
|
22
22
|
getCurrentPage(): number;
|
|
23
23
|
getPageCount(): number;
|
|
24
|
+
setSize(): void;
|
|
25
|
+
isPaginated(): boolean;
|
|
26
|
+
isScrollMode(): boolean;
|
|
24
27
|
}
|
|
@@ -19,7 +19,7 @@ export default class ReflowableBookView implements BookView {
|
|
|
19
19
|
start(): void;
|
|
20
20
|
stop(): void;
|
|
21
21
|
getCurrentPosition(): number;
|
|
22
|
-
|
|
22
|
+
goToProgression(position: number): void;
|
|
23
23
|
goToCssSelector(cssSelector: string, relative?: boolean): void;
|
|
24
24
|
goToFragment(fragment: string, relative?: boolean): void;
|
|
25
25
|
snap(element: HTMLElement | null, _relative?: boolean): void;
|
|
@@ -37,7 +37,7 @@ export default class ReflowableBookView implements BookView {
|
|
|
37
37
|
setIframeHeight(iframe: any): void;
|
|
38
38
|
protected hasFixedScrollWidth: boolean;
|
|
39
39
|
protected checkForFixedScrollWidth(): void;
|
|
40
|
-
|
|
40
|
+
setSize(): void;
|
|
41
41
|
/** Returns the total width of the columns that are currently
|
|
42
42
|
positioned to the left of the iframe viewport. */
|
|
43
43
|
private getLeftColumnsWidth;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@d-i-t-a/reader",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.11.0-beta.5",
|
|
4
4
|
"description": "A viewer application for EPUB files.",
|
|
5
5
|
"repository": "https://github.com/d-i-t-a/R2D2BC",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,6 +32,8 @@
|
|
|
32
32
|
"jscrypto": "0.0.1",
|
|
33
33
|
"mark.js": "^8.11.1",
|
|
34
34
|
"promise-polyfill": "^8.2.0",
|
|
35
|
+
"sentence-splitter": "^3.2.1",
|
|
36
|
+
"lodash.clonedeep": "^4.5.0",
|
|
35
37
|
"r2-shared-js": "^1.0.51",
|
|
36
38
|
"sanitize-html": "^2.3.3",
|
|
37
39
|
"whatwg-fetch": "^3.6.2"
|