@d-i-t-a/reader 1.11.0-beta.2 → 1.11.0-beta.6
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 +6 -1
- package/dist/modules/AnnotationModule.d.ts +3 -0
- 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 +19 -44
- package/dist/modules/highlight/TextHighlighterFXL.d.ts +278 -0
- package/dist/modules/highlight/common/highlight.d.ts +4 -1
- 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 +3 -0
- package/dist/modules/search/DefinitionsModule.d.ts +52 -0
- package/dist/modules/search/Popup.d.ts +8 -0
- package/dist/modules/search/SearchModule.d.ts +8 -5
- package/dist/modules/search/searchWithDomSeek.d.ts +1 -1
- package/dist/navigator/IFrameNavigator.d.ts +8 -0
- 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 +1 -2
- package/dist/store/LocalAnnotator.d.ts +1 -2
- package/dist/utils/EventHandler.d.ts +5 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/views/BookView.d.ts +3 -2
- package/dist/views/FixedBookView.d.ts +3 -0
- package/dist/views/ReflowableBookView.d.ts +1 -1
- package/package.json +4 -3
- package/dist/.DS_Store +0 -0
- package/dist/store/LocalPositions.d.ts +0 -18
- package/dist/store/Positions.d.ts +0 -9
|
@@ -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>;
|
|
@@ -17,7 +16,7 @@ interface Annotator {
|
|
|
17
16
|
getAnnotations(): Promise<any>;
|
|
18
17
|
getAnnotation(annotation: IHighlight): Promise<any>;
|
|
19
18
|
getAnnotationByID(id: string): Promise<any>;
|
|
20
|
-
getAnnotationPosition(id: any, iframeWin:
|
|
19
|
+
getAnnotationPosition(id: any, iframeWin: any): Promise<any>;
|
|
21
20
|
}
|
|
22
21
|
export declare enum AnnotationType {
|
|
23
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,7 +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>;
|
|
31
30
|
getAnnotationByID(id: string): Promise<any>;
|
|
32
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/index.d.ts
CHANGED
package/dist/views/BookView.d.ts
CHANGED
|
@@ -9,9 +9,10 @@ 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;
|
|
@@ -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.11.0-beta.
|
|
3
|
+
"version": "1.11.0-beta.6",
|
|
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",
|
|
@@ -28,13 +28,14 @@
|
|
|
28
28
|
"cssesc": "^3.0.0",
|
|
29
29
|
"debounce": "^1.2.1",
|
|
30
30
|
"detect-browser": "^5.2.0",
|
|
31
|
-
"devtools-detector": "^2.0.
|
|
31
|
+
"devtools-detector": "^2.0.6",
|
|
32
32
|
"jscrypto": "0.0.1",
|
|
33
|
+
"lodash.clonedeep": "^4.5.0",
|
|
33
34
|
"mark.js": "^8.11.1",
|
|
34
35
|
"promise-polyfill": "^8.2.0",
|
|
35
|
-
"sentence-splitter": "^3.2.1",
|
|
36
36
|
"r2-shared-js": "^1.0.51",
|
|
37
37
|
"sanitize-html": "^2.3.3",
|
|
38
|
+
"sentence-splitter": "^3.2.1",
|
|
38
39
|
"whatwg-fetch": "^3.6.2"
|
|
39
40
|
},
|
|
40
41
|
"browserslist": {
|
package/dist/.DS_Store
DELETED
|
Binary file
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import Store from "./Store";
|
|
2
|
-
import Positions from "./Positions";
|
|
3
|
-
export interface LocalAnnotatorConfig {
|
|
4
|
-
store: Store;
|
|
5
|
-
}
|
|
6
|
-
/** Annotator that stores annotations locally, in the browser. */
|
|
7
|
-
export default class LocalPositions implements Positions {
|
|
8
|
-
private readonly store;
|
|
9
|
-
private static readonly POSITIONS;
|
|
10
|
-
private static readonly WEIGHT;
|
|
11
|
-
constructor(config: LocalAnnotatorConfig);
|
|
12
|
-
savePositions(positions: any): Promise<any>;
|
|
13
|
-
deletePositions(): Promise<any>;
|
|
14
|
-
getPositions(): Promise<any>;
|
|
15
|
-
saveWeights(weights: any): Promise<any>;
|
|
16
|
-
deleteWeights(): Promise<any>;
|
|
17
|
-
getWeights(): Promise<any>;
|
|
18
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
interface Positions {
|
|
2
|
-
savePositions(positions: any): Promise<any>;
|
|
3
|
-
deletePositions(): Promise<any>;
|
|
4
|
-
getPositions(): Promise<any>;
|
|
5
|
-
saveWeights(weights: any): Promise<any>;
|
|
6
|
-
deleteWeights(): Promise<any>;
|
|
7
|
-
getWeights(): Promise<any>;
|
|
8
|
-
}
|
|
9
|
-
export default Positions;
|