@d-i-t-a/reader 1.11.0 → 1.12.0-beta.4
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 -0
- package/dist/modules/highlight/TextHighlighter.d.ts +2 -1
- package/dist/modules/highlight/common/highlight.d.ts +2 -1
- package/dist/modules/linefocus/LineFocusModule.d.ts +5 -4
- package/dist/navigator/IFrameNavigator.d.ts +4 -0
- package/dist/reader.js +1 -1
- package/dist/reader.js.map +1 -1
- package/package.json +7 -2
- package/NOTICE +0 -20
package/dist/index.d.ts
CHANGED
|
@@ -32,6 +32,12 @@ export declare function totalResources(): number;
|
|
|
32
32
|
export declare function publicationLanguage(): string[];
|
|
33
33
|
export declare function resetUserSettings(): Promise<void>;
|
|
34
34
|
export declare function applyUserSettings(userSettings: any): Promise<void>;
|
|
35
|
+
export declare function applyLineFocusSettings(userSettings: any): Promise<void>;
|
|
36
|
+
export declare function lineUp(): void;
|
|
37
|
+
export declare function lineDown(): void;
|
|
38
|
+
export declare function enableLineFocus(): Promise<void>;
|
|
39
|
+
export declare function lineFocus(active: boolean): Promise<void>;
|
|
40
|
+
export declare function disableLineFocus(): void;
|
|
35
41
|
export declare function currentSettings(): Promise<{
|
|
36
42
|
appearance: string;
|
|
37
43
|
fontFamily: string;
|
|
@@ -10,7 +10,8 @@ export declare enum HighlightContainer {
|
|
|
10
10
|
R2_ID_READALOUD_CONTAINER = "R2_ID_READALOUD_CONTAINER",
|
|
11
11
|
R2_ID_PAGEBREAK_CONTAINER = "R2_ID_PAGEBREAK_CONTAINER",
|
|
12
12
|
R2_ID_SEARCH_CONTAINER = "R2_ID_SEARCH_CONTAINER",
|
|
13
|
-
R2_ID_DEFINITIONS_CONTAINER = "R2_ID_DEFINITIONS_CONTAINER"
|
|
13
|
+
R2_ID_DEFINITIONS_CONTAINER = "R2_ID_DEFINITIONS_CONTAINER",
|
|
14
|
+
R2_ID_LINEFOCUS_CONTAINER = "R2_ID_LINEFOCUS_CONTAINER"
|
|
14
15
|
}
|
|
15
16
|
export declare const CLASS_HIGHLIGHT_CONTAINER = "R2_CLASS_HIGHLIGHT_CONTAINER";
|
|
16
17
|
export declare const CLASS_HIGHLIGHT_BOUNDING_AREA = "R2_CLASS_HIGHLIGHT_BOUNDING_AREA";
|
|
@@ -6,9 +6,7 @@ export interface LineFocusModuleAPI {
|
|
|
6
6
|
}
|
|
7
7
|
export interface LineFocusModuleProperties {
|
|
8
8
|
api?: LineFocusModuleAPI;
|
|
9
|
-
|
|
10
|
-
startIndex: number;
|
|
11
|
-
currentIndex: number;
|
|
9
|
+
lines: number;
|
|
12
10
|
}
|
|
13
11
|
export interface LineFocusModuleConfig extends LineFocusModuleProperties {
|
|
14
12
|
api: LineFocusModuleAPI;
|
|
@@ -25,12 +23,15 @@ export default class LineFocusModule implements ReaderModule {
|
|
|
25
23
|
index: number;
|
|
26
24
|
isActive: boolean;
|
|
27
25
|
isDebug: boolean;
|
|
26
|
+
lineFocusContainer: HTMLElement;
|
|
27
|
+
lineFocusTopBlinder: HTMLElement;
|
|
28
|
+
lineFocusBottomBlinder: HTMLElement;
|
|
28
29
|
static create(config: LineFocusModuleConfig): Promise<LineFocusModule>;
|
|
29
30
|
private constructor();
|
|
30
31
|
stop(): Promise<void>;
|
|
31
32
|
protected start(): Promise<void>;
|
|
32
33
|
handleResize(): void;
|
|
33
|
-
enableLineFocus(): void
|
|
34
|
+
enableLineFocus(): Promise<void>;
|
|
34
35
|
disableLineFocus(): void;
|
|
35
36
|
lineFocus(): void;
|
|
36
37
|
currentLine(): void;
|
|
@@ -16,6 +16,7 @@ import ReaderModule from "../modules/ReaderModule";
|
|
|
16
16
|
import { TTSModuleConfig } from "../modules/TTS/TTSSettings";
|
|
17
17
|
import PageBreakModule, { PageBreakModuleConfig } from "../modules/pagebreak/PageBreakModule";
|
|
18
18
|
import DefinitionsModule, { DefinitionsModuleConfig } from "../modules/search/DefinitionsModule";
|
|
19
|
+
import LineFocusModule, { LineFocusModuleConfig } from "../modules/linefocus/LineFocusModule";
|
|
19
20
|
export declare type GetContent = (href: string) => Promise<string>;
|
|
20
21
|
export declare type GetContentBytesLength = (href: string) => Promise<number>;
|
|
21
22
|
export interface NavigatorAPI {
|
|
@@ -91,6 +92,7 @@ export interface ReaderRights {
|
|
|
91
92
|
autoGeneratePositions?: boolean;
|
|
92
93
|
enableMediaOverlays?: boolean;
|
|
93
94
|
enablePageBreaks?: boolean;
|
|
95
|
+
enableLineFocus?: boolean;
|
|
94
96
|
}
|
|
95
97
|
export interface ReaderUI {
|
|
96
98
|
settings: UserSettingsUIConfig;
|
|
@@ -112,6 +114,7 @@ export interface ReaderConfig {
|
|
|
112
114
|
pagebreak?: PageBreakModuleConfig;
|
|
113
115
|
annotations?: AnnotationModuleConfig;
|
|
114
116
|
bookmarks?: BookmarkModuleConfig;
|
|
117
|
+
lineFocus?: LineFocusModuleConfig;
|
|
115
118
|
highlighter?: TextHighlighterConfig;
|
|
116
119
|
injectables: Array<Injectable>;
|
|
117
120
|
injectablesFixed: Array<Injectable>;
|
|
@@ -137,6 +140,7 @@ export default class IFrameNavigator implements Navigator {
|
|
|
137
140
|
timelineModule?: TimelineModule;
|
|
138
141
|
pageBreakModule?: PageBreakModule;
|
|
139
142
|
mediaOverlayModule?: MediaOverlayModule;
|
|
143
|
+
lineFocusModule?: LineFocusModule;
|
|
140
144
|
sideNavExpanded: boolean;
|
|
141
145
|
material: boolean;
|
|
142
146
|
mTabs: Array<any>;
|