@d-i-t-a/reader 1.11.0-beta.3 → 1.11.0-beta.7
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 +5 -2
- package/dist/injectables/footnotes/footnotes.js.LICENSE.txt +6 -0
- package/dist/modules/AnnotationModule.d.ts +2 -1
- 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 +18 -44
- package/dist/modules/highlight/TextHighlighterFXL.d.ts +278 -0
- package/dist/modules/highlight/common/highlight.d.ts +4 -1
- package/dist/modules/highlight/common/styles.d.ts +35 -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 +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 +7 -1
- package/dist/reader.js +1 -1
- 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 -4
- package/dist/.DS_Store +0 -0
- package/dist/store/LocalPositions.d.ts +0 -18
- package/dist/store/Positions.d.ts +0 -9
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import IFrameNavigator from "../../navigator/IFrameNavigator";
|
|
2
|
+
export default class Popup {
|
|
3
|
+
navigator: IFrameNavigator;
|
|
4
|
+
constructor(navigator: IFrameNavigator);
|
|
5
|
+
handleFootnote(link: HTMLLIElement, event: MouseEvent | TouchEvent): Promise<void>;
|
|
6
|
+
showPopup(element: any, event: MouseEvent | TouchEvent): void;
|
|
7
|
+
private getScrollingElement;
|
|
8
|
+
}
|
|
@@ -2,11 +2,13 @@ import { Publication } from "../../model/Publication";
|
|
|
2
2
|
import IFrameNavigator from "../../navigator/IFrameNavigator";
|
|
3
3
|
import ReaderModule from "../ReaderModule";
|
|
4
4
|
import TextHighlighter from "../highlight/TextHighlighter";
|
|
5
|
+
import { IHighlight } from "../highlight/common/highlight";
|
|
6
|
+
import { ISelectionInfo } from "../highlight/common/selection";
|
|
5
7
|
export interface SearchModuleAPI {
|
|
6
8
|
}
|
|
7
9
|
export interface SearchModuleProperties {
|
|
8
|
-
color
|
|
9
|
-
current
|
|
10
|
+
color?: string;
|
|
11
|
+
current?: string;
|
|
10
12
|
}
|
|
11
13
|
export interface SearchModuleConfig extends SearchModuleProperties {
|
|
12
14
|
api: SearchModuleAPI;
|
|
@@ -16,7 +18,7 @@ export interface SearchModuleConfig extends SearchModuleProperties {
|
|
|
16
18
|
highlighter: TextHighlighter;
|
|
17
19
|
}
|
|
18
20
|
export default class SearchModule implements ReaderModule {
|
|
19
|
-
|
|
21
|
+
properties: SearchModuleProperties;
|
|
20
22
|
private api;
|
|
21
23
|
private publication;
|
|
22
24
|
private readonly headerMenu;
|
|
@@ -25,7 +27,7 @@ export default class SearchModule implements ReaderModule {
|
|
|
25
27
|
private searchGo;
|
|
26
28
|
private currentChapterSearchResult;
|
|
27
29
|
private bookSearchResult;
|
|
28
|
-
private
|
|
30
|
+
private currentSearchHighlights;
|
|
29
31
|
private highlighter;
|
|
30
32
|
static create(config: SearchModuleConfig): Promise<SearchModule>;
|
|
31
33
|
private constructor();
|
|
@@ -34,8 +36,9 @@ export default class SearchModule implements ReaderModule {
|
|
|
34
36
|
private handleSearch;
|
|
35
37
|
handleSearchChapter(index?: number): Promise<void>;
|
|
36
38
|
searchAndPaintChapter(term: string, index: number, callback: (result: any) => any): Promise<void>;
|
|
39
|
+
createSearchHighlight(selectionInfo: ISelectionInfo, color: string): IHighlight;
|
|
37
40
|
clearSearch(): void;
|
|
38
|
-
search(term:
|
|
41
|
+
search(term: string, current: boolean): Promise<any>;
|
|
39
42
|
goToSearchID(href: any, index: number, current: boolean): Promise<void>;
|
|
40
43
|
goToSearchIndex(href: any, index: number, current: boolean): Promise<void>;
|
|
41
44
|
private handleSearchBook;
|
|
@@ -11,4 +11,4 @@ export interface ISearchResult {
|
|
|
11
11
|
}
|
|
12
12
|
export declare function escapeRegExp(str: string): string;
|
|
13
13
|
export declare const reset: () => void;
|
|
14
|
-
export declare function searchDocDomSeek(searchInput: string, doc: Document, href: string, title: string): Promise<ISearchResult[]>;
|
|
14
|
+
export declare function searchDocDomSeek(searchInput: string, doc: Document, href: string, title: string, fullWordSearch?: boolean): Promise<ISearchResult[]>;
|
|
@@ -15,6 +15,7 @@ import { D2Link, Link } from "../model/Link";
|
|
|
15
15
|
import ReaderModule from "../modules/ReaderModule";
|
|
16
16
|
import { TTSModuleConfig } from "../modules/TTS/TTSSettings";
|
|
17
17
|
import PageBreakModule from "../modules/pagebreak/PageBreakModule";
|
|
18
|
+
import DefinitionsModule, { DefinitionsModuleConfig } from "../modules/search/DefinitionsModule";
|
|
18
19
|
export declare type GetContent = (href: string) => Promise<string>;
|
|
19
20
|
export declare type GetContentBytesLength = (href: string) => Promise<number>;
|
|
20
21
|
export interface NavigatorAPI {
|
|
@@ -83,6 +84,7 @@ export interface ReaderRights {
|
|
|
83
84
|
enableAnnotations?: boolean;
|
|
84
85
|
enableTTS?: boolean;
|
|
85
86
|
enableSearch?: boolean;
|
|
87
|
+
enableDefinitions?: boolean;
|
|
86
88
|
enableContentProtection?: boolean;
|
|
87
89
|
enableMaterial?: boolean;
|
|
88
90
|
enableTimeline?: boolean;
|
|
@@ -103,6 +105,7 @@ export interface ReaderConfig {
|
|
|
103
105
|
api?: NavigatorAPI;
|
|
104
106
|
tts?: TTSModuleConfig;
|
|
105
107
|
search?: SearchModuleConfig;
|
|
108
|
+
define?: DefinitionsModuleConfig;
|
|
106
109
|
protection?: ContentProtectionModuleConfig;
|
|
107
110
|
mediaOverlays?: MediaOverlayModuleConfig;
|
|
108
111
|
annotations?: AnnotationModuleConfig;
|
|
@@ -126,6 +129,7 @@ export default class IFrameNavigator implements Navigator {
|
|
|
126
129
|
annotationModule?: AnnotationModule;
|
|
127
130
|
ttsModule?: ReaderModule;
|
|
128
131
|
searchModule?: SearchModule;
|
|
132
|
+
definitionsModule?: DefinitionsModule;
|
|
129
133
|
contentProtectionModule?: ContentProtectionModule;
|
|
130
134
|
highlighter?: TextHighlighter;
|
|
131
135
|
timelineModule?: TimelineModule;
|
|
@@ -274,6 +278,8 @@ export default class IFrameNavigator implements Navigator {
|
|
|
274
278
|
private static createBase;
|
|
275
279
|
private static createCssLink;
|
|
276
280
|
private static createJavascriptLink;
|
|
277
|
-
activateMarker(id: any): void;
|
|
281
|
+
activateMarker(id: any, position: any): void;
|
|
278
282
|
deactivateMarker(): void;
|
|
283
|
+
showLayer(layer: any): void;
|
|
284
|
+
hideLayer(layer: any): void;
|
|
279
285
|
}
|