@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.
@@ -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: string;
9
- current: string;
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
- private properties;
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 currentHighlights;
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: any, current: boolean): Promise<any>;
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
  }