@d-i-t-a/reader 1.11.0-beta.8 → 1.11.1
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/.DS_Store +0 -0
- package/dist/modules/AnnotationModule.d.ts +1 -0
- package/dist/modules/BookmarkModule.d.ts +2 -2
- package/dist/modules/TTS/TTSSettings.d.ts +1 -0
- package/dist/modules/highlight/LayerSettings.d.ts +19 -0
- package/dist/modules/highlight/TextHighlighter.d.ts +21 -14
- package/dist/modules/highlight/common/highlight.d.ts +1 -1
- package/dist/modules/highlight/common/styles.d.ts +0 -35
- package/dist/modules/mediaoverlays/MediaOverlayModule.d.ts +1 -0
- package/dist/modules/pagebreak/PageBreakModule.d.ts +5 -1
- package/dist/modules/search/DefinitionsModule.d.ts +3 -3
- package/dist/modules/search/SearchModule.d.ts +1 -0
- package/dist/navigator/IFrameNavigator.d.ts +3 -1
- package/dist/reader.js +1 -1
- package/dist/reader.js.map +1 -1
- package/dist/store/LocalPositions.d.ts +18 -0
- package/dist/store/Positions.d.ts +9 -0
- package/package.json +3 -2
- package/dist/injectables/footnotes/footnotes.js.LICENSE.txt +0 -6
- package/dist/modules/citations/CitationModule.d.ts +0 -37
- package/dist/modules/footnotes/FootnotesEventHandler.d.ts +0 -0
- package/dist/modules/highlight/TextHighlighterFXL.d.ts +0 -278
- package/dist/modules/linefocus/LineFocusModule.d.ts +0 -43
package/dist/.DS_Store
ADDED
|
Binary file
|
|
@@ -10,15 +10,15 @@ export interface BookmarkModuleAPI {
|
|
|
10
10
|
getBookmarks: Array<any>;
|
|
11
11
|
}
|
|
12
12
|
export interface BookmarkModuleProperties {
|
|
13
|
+
hideLayer?: boolean;
|
|
13
14
|
}
|
|
14
|
-
export interface BookmarkModuleConfig {
|
|
15
|
+
export interface BookmarkModuleConfig extends BookmarkModuleProperties {
|
|
15
16
|
annotator: Annotator;
|
|
16
17
|
headerMenu: HTMLElement;
|
|
17
18
|
rights: ReaderRights;
|
|
18
19
|
publication: Publication;
|
|
19
20
|
delegate: IFrameNavigator;
|
|
20
21
|
initialAnnotations?: any;
|
|
21
|
-
properties: BookmarkModuleProperties;
|
|
22
22
|
api: BookmarkModuleAPI;
|
|
23
23
|
}
|
|
24
24
|
export default class BookmarkModule implements ReaderModule {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import Store from "../../store/Store";
|
|
2
|
+
import { UserProperty, UserProperties } from "../../model/user-settings/UserProperties";
|
|
3
|
+
export interface LayerConfig {
|
|
4
|
+
store: Store;
|
|
5
|
+
}
|
|
6
|
+
export interface ILayerSettings {
|
|
7
|
+
}
|
|
8
|
+
export declare class LayerSettings implements ILayerSettings {
|
|
9
|
+
private readonly store;
|
|
10
|
+
private readonly LAYERSETTINGS;
|
|
11
|
+
userProperties: UserProperties;
|
|
12
|
+
static create(config: LayerConfig): Promise<any>;
|
|
13
|
+
protected constructor(store: Store);
|
|
14
|
+
stop(): Promise<void>;
|
|
15
|
+
private initialize;
|
|
16
|
+
private getLayerSettings;
|
|
17
|
+
saveProperty(property: UserProperty): Promise<any>;
|
|
18
|
+
getProperty(name: string): Promise<UserProperty>;
|
|
19
|
+
}
|
|
@@ -3,15 +3,19 @@ import { ISelectionInfo } from "./common/selection";
|
|
|
3
3
|
import { IRectSimple } from "./common/rect-utils";
|
|
4
4
|
import { AnnotationMarker } from "../../model/Locator";
|
|
5
5
|
import IFrameNavigator from "../../navigator/IFrameNavigator";
|
|
6
|
-
|
|
7
|
-
export declare
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
import { LayerSettings } from "./LayerSettings";
|
|
7
|
+
export declare enum HighlightContainer {
|
|
8
|
+
R2_ID_HIGHLIGHTS_CONTAINER = "R2_ID_HIGHLIGHTS_CONTAINER",
|
|
9
|
+
R2_ID_BOOKMAKRS_CONTAINER = "R2_ID_BOOKMAKRS_CONTAINER",
|
|
10
|
+
R2_ID_READALOUD_CONTAINER = "R2_ID_READALOUD_CONTAINER",
|
|
11
|
+
R2_ID_PAGEBREAK_CONTAINER = "R2_ID_PAGEBREAK_CONTAINER",
|
|
12
|
+
R2_ID_SEARCH_CONTAINER = "R2_ID_SEARCH_CONTAINER",
|
|
13
|
+
R2_ID_DEFINITIONS_CONTAINER = "R2_ID_DEFINITIONS_CONTAINER"
|
|
14
|
+
}
|
|
11
15
|
export declare const CLASS_HIGHLIGHT_CONTAINER = "R2_CLASS_HIGHLIGHT_CONTAINER";
|
|
16
|
+
export declare const CLASS_HIGHLIGHT_BOUNDING_AREA = "R2_CLASS_HIGHLIGHT_BOUNDING_AREA";
|
|
12
17
|
export declare const CLASS_HIGHLIGHT_AREA = "R2_CLASS_HIGHLIGHT_AREA";
|
|
13
18
|
export declare const CLASS_HIGHLIGHT_ICON = "R2_CLASS_HIGHLIGHT_ICON";
|
|
14
|
-
export declare const CLASS_HIGHLIGHT_BOUNDING_AREA = "R2_CLASS_HIGHLIGHT_BOUNDING_AREA";
|
|
15
19
|
export declare const DEFAULT_BACKGROUND_COLOR: {
|
|
16
20
|
blue: number;
|
|
17
21
|
green: number;
|
|
@@ -43,10 +47,12 @@ export interface TextHighlighterProperties {
|
|
|
43
47
|
export interface TextHighlighterConfig extends TextHighlighterProperties {
|
|
44
48
|
delegate: IFrameNavigator;
|
|
45
49
|
api: TextSelectorAPI;
|
|
50
|
+
layerSettings: LayerSettings;
|
|
46
51
|
}
|
|
47
52
|
export default class TextHighlighter {
|
|
48
53
|
private options;
|
|
49
|
-
private delegate;
|
|
54
|
+
private readonly delegate;
|
|
55
|
+
layerSettings: LayerSettings;
|
|
50
56
|
private lastSelectedHighlight;
|
|
51
57
|
properties: TextHighlighterProperties;
|
|
52
58
|
private api;
|
|
@@ -230,18 +236,19 @@ export default class TextHighlighter {
|
|
|
230
236
|
static hexToRgbA(hex: string): string;
|
|
231
237
|
static hexToRgbAWithOpacity(hex: string, opacity: number): string;
|
|
232
238
|
resetHighlightBoundingStyle(_win: any, highlightBounding: HTMLElement): void;
|
|
233
|
-
resetHighlightAreaStyle(
|
|
234
|
-
setHighlightAreaStyle(
|
|
239
|
+
resetHighlightAreaStyle(win: any, highlightArea: HTMLElement, id_container: string): void;
|
|
240
|
+
setHighlightAreaStyle(win: any, highlightAreas: Array<HTMLElement>, highlight: IHighlight): void;
|
|
235
241
|
setAndResetSearchHighlight(highlight: any, highlights: any): void;
|
|
236
242
|
isIOS(): boolean;
|
|
237
243
|
isAndroid(): boolean;
|
|
238
|
-
getScrollingElement: (
|
|
244
|
+
getScrollingElement: (doc: Document) => Element;
|
|
239
245
|
processMouseEvent(win: any, ev: MouseEvent): Promise<void>;
|
|
240
|
-
ensureHighlightsContainer(win: any, id: string): HTMLElement
|
|
241
|
-
hideAllhighlights(
|
|
242
|
-
destroyAllhighlights(
|
|
246
|
+
ensureHighlightsContainer(win: any, id: string): Promise<HTMLElement>;
|
|
247
|
+
hideAllhighlights(doc: Document): void;
|
|
248
|
+
destroyAllhighlights(doc: Document): void;
|
|
249
|
+
removeAllChildNodes(parent: any): void;
|
|
243
250
|
destroyHighlights(type: HighlightType): void;
|
|
244
|
-
destroyHighlight(
|
|
251
|
+
destroyHighlight(doc: Document, id: string): void;
|
|
245
252
|
createHighlight(win: any, selectionInfo: ISelectionInfo, color: string | undefined, pointerInteraction: boolean, marker: AnnotationMarker, icon?: IMarkerIcon | undefined, popup?: IPopupStyle | undefined, style?: IStyle | undefined, type?: HighlightType | undefined, prefix?: string | undefined): [IHighlight, HTMLDivElement];
|
|
246
253
|
createHighlightDom(win: any, highlight: IHighlight): HTMLDivElement | undefined;
|
|
247
254
|
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
export declare const ROOT_CLASS_REDUCE_MOTION = "r2-reduce-motion";
|
|
2
|
-
export declare const ROOT_CLASS_NO_FOOTNOTES = "r2-no-popup-foonotes";
|
|
3
|
-
export declare const POPUP_DIALOG_CLASS = "r2-popup-dialog";
|
|
4
|
-
export declare const FOOTNOTES_CONTAINER_CLASS = "r2-footnote-container";
|
|
5
|
-
export declare const FOOTNOTES_CLOSE_BUTTON_CLASS = "r2-footnote-close";
|
|
6
|
-
export declare const FOOTNOTE_FORCE_SHOW = "r2-footnote-force-show";
|
|
7
|
-
export declare const footnotesCssStyles: string;
|
|
8
|
-
export declare const TTS_ID_PREVIOUS = "r2-tts-previous";
|
|
9
|
-
export declare const TTS_ID_NEXT = "r2-tts-next";
|
|
10
|
-
export declare const TTS_ID_SLIDER = "r2-tts-slider";
|
|
11
|
-
export declare const TTS_ID_ACTIVE_WORD = "r2-tts-active-word";
|
|
12
|
-
export declare const TTS_ID_ACTIVE_UTTERANCE = "r2-tts-active-utterance";
|
|
13
|
-
export declare const TTS_CLASS_UTTERANCE = "r2-tts-utterance";
|
|
14
|
-
export declare const TTS_ID_CONTAINER = "r2-tts-txt";
|
|
15
|
-
export declare const TTS_ID_INFO = "r2-tts-info";
|
|
16
|
-
export declare const TTS_NAV_BUTTON_CLASS = "r2-tts-button";
|
|
17
|
-
export declare const TTS_ID_SPEAKING_DOC_ELEMENT = "r2-tts-speaking-el";
|
|
18
|
-
export declare const TTS_CLASS_INJECTED_SPAN = "r2-tts-speaking-txt";
|
|
19
|
-
export declare const TTS_CLASS_INJECTED_SUBSPAN = "r2-tts-speaking-word";
|
|
20
|
-
export declare const TTS_ID_INJECTED_PARENT = "r2-tts-speaking-txt-parent";
|
|
21
|
-
export declare const TTS_POPUP_DIALOG_CLASS = "r2-tts-popup-dialog";
|
|
22
|
-
export declare const ttsCssStyles: string;
|
|
23
|
-
export declare const ROOT_CLASS_INVISIBLE_MASK = "r2-visibility-mask";
|
|
24
|
-
export declare const visibilityMaskCssStyles: string;
|
|
25
|
-
export declare const ROOT_CLASS_KEYBOARD_INTERACT = "r2-keyboard-interact";
|
|
26
|
-
export declare const CSS_CLASS_NO_FOCUS_OUTLINE = "r2-no-focus-outline";
|
|
27
|
-
export declare const focusCssStyles: string;
|
|
28
|
-
export declare const targetCssStyles = "\n@keyframes readium2ElectronAnimation_TARGET {\n 0% {\n }\n 100% {\n outline: inherit;\n }\n}\n:root[style] *:target,\n:root *:target {\n outline-color: green !important;\n outline-style: solid !important;\n outline-width: 2px !important;\n outline-offset: 2px !important;\n\n animation-name: readium2ElectronAnimation_TARGET;\n animation-duration: 3s;\n animation-delay: 1s;\n animation-fill-mode: forwards;\n animation-timing-function: linear;\n}\n:root[style] *.r2-no-target-outline:target,\n:root *.r2-no-target-outline:target {\n outline: inherit !important;\n}\n";
|
|
29
|
-
export declare const selectionCssStyles = "\n:root[style] ::selection,\n:root ::selection {\nbackground: rgb(155, 179, 240) !important;\ncolor: black !important;\n}\n\n:root[style*=\"readium-night-on\"] ::selection {\nbackground: rgb(100, 122, 177) !important;\ncolor: white !important;\n}\n";
|
|
30
|
-
export declare const scrollBarCssStyles = "\n::-webkit-scrollbar-button {\nheight: 0px !important;\nwidth: 0px !important;\n}\n\n::-webkit-scrollbar-corner {\nbackground: transparent !important;\n}\n\n/*::-webkit-scrollbar-track-piece {\nbackground: red;\n} */\n\n::-webkit-scrollbar {\nwidth: 14px;\nheight: 14px;\n}\n\n::-webkit-scrollbar-thumb {\nbackground: #727272;\nbackground-clip: padding-box !important;\nborder: 3px solid transparent !important;\nborder-radius: 30px;\n}\n\n::-webkit-scrollbar-thumb:hover {\nbackground: #4d4d4d;\n}\n\n::-webkit-scrollbar-track {\nbox-shadow: inset 0 0 3px rgba(40, 40, 40, 0.2);\nbackground: #dddddd;\nbox-sizing: content-box;\n}\n\n::-webkit-scrollbar-track:horizontal {\nborder-top: 1px solid silver;\n}\n::-webkit-scrollbar-track:vertical {\nborder-left: 1px solid silver;\n}\n\n:root[style*=\"readium-night-on\"] ::-webkit-scrollbar-thumb {\nbackground: #a4a4a4;\nborder: 3px solid #545454;\n}\n\n:root[style*=\"readium-night-on\"] ::-webkit-scrollbar-thumb:hover {\nbackground: #dedede;\n}\n\n:root[style*=\"readium-night-on\"] ::-webkit-scrollbar-track {\nbackground: #545454;\n}\n\n:root[style*=\"readium-night-on\"] ::-webkit-scrollbar-track:horizontal {\nborder-top: 1px solid black;\n}\n:root[style*=\"readium-night-on\"] ::-webkit-scrollbar-track:vertical {\nborder-left: 1px solid black;\n}";
|
|
31
|
-
export declare const readPosCssStylesAttr1 = "data-readium2-read-pos1";
|
|
32
|
-
export declare const readPosCssStylesAttr2 = "data-readium2-read-pos2";
|
|
33
|
-
export declare const readPosCssStylesAttr3 = "data-readium2-read-pos3";
|
|
34
|
-
export declare const readPosCssStylesAttr4 = "data-readium2-read-pos4";
|
|
35
|
-
export declare const readPosCssStyles: string;
|
|
@@ -3,7 +3,10 @@ import ReaderModule from "../ReaderModule";
|
|
|
3
3
|
import { IHighlight } from "../highlight/common/highlight";
|
|
4
4
|
import { ISelectionInfo } from "../highlight/common/selection";
|
|
5
5
|
import { Publication } from "../../model/Publication";
|
|
6
|
-
export interface
|
|
6
|
+
export interface PageBreakModuleProperties {
|
|
7
|
+
hideLayer?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface PageBreakModuleConfig extends PageBreakModuleProperties {
|
|
7
10
|
delegate: IFrameNavigator;
|
|
8
11
|
headerMenu: HTMLElement;
|
|
9
12
|
publication: Publication;
|
|
@@ -12,6 +15,7 @@ export default class PageBreakModule implements ReaderModule {
|
|
|
12
15
|
private delegate;
|
|
13
16
|
private readonly headerMenu;
|
|
14
17
|
private publication;
|
|
18
|
+
private properties;
|
|
15
19
|
private goToPageView;
|
|
16
20
|
private goToPageNumberInput;
|
|
17
21
|
private goToPageNumberButton;
|
|
@@ -19,7 +19,7 @@ export interface DefinitionsModuleProperties {
|
|
|
19
19
|
definitions: Definition[];
|
|
20
20
|
color?: string;
|
|
21
21
|
fullWordSearch?: boolean;
|
|
22
|
-
|
|
22
|
+
hideLayer?: boolean;
|
|
23
23
|
}
|
|
24
24
|
export interface DefinitionsModuleConfig extends DefinitionsModuleProperties {
|
|
25
25
|
api: DefinitionsModuleAPI;
|
|
@@ -44,9 +44,9 @@ export default class DefinitionsModule implements ReaderModule {
|
|
|
44
44
|
clear(): void;
|
|
45
45
|
};
|
|
46
46
|
define(item: Definition): Promise<void>;
|
|
47
|
-
drawDefinitions(): void
|
|
47
|
+
drawDefinitions(): Promise<void>;
|
|
48
48
|
handleResize(): Promise<void>;
|
|
49
|
-
|
|
49
|
+
createDefinitionHighlight(selectionInfo: ISelectionInfo, item: Definition): IHighlight;
|
|
50
50
|
addDefinition(definition: any): Promise<void>;
|
|
51
51
|
clearDefinitions(): Promise<void>;
|
|
52
52
|
}
|
|
@@ -14,7 +14,7 @@ import MediaOverlayModule, { MediaOverlayModuleConfig } from "../modules/mediaov
|
|
|
14
14
|
import { D2Link, Link } from "../model/Link";
|
|
15
15
|
import ReaderModule from "../modules/ReaderModule";
|
|
16
16
|
import { TTSModuleConfig } from "../modules/TTS/TTSSettings";
|
|
17
|
-
import PageBreakModule from "../modules/pagebreak/PageBreakModule";
|
|
17
|
+
import PageBreakModule, { PageBreakModuleConfig } from "../modules/pagebreak/PageBreakModule";
|
|
18
18
|
import DefinitionsModule, { DefinitionsModuleConfig } from "../modules/search/DefinitionsModule";
|
|
19
19
|
export declare type GetContent = (href: string) => Promise<string>;
|
|
20
20
|
export declare type GetContentBytesLength = (href: string) => Promise<number>;
|
|
@@ -90,6 +90,7 @@ export interface ReaderRights {
|
|
|
90
90
|
enableTimeline?: boolean;
|
|
91
91
|
autoGeneratePositions?: boolean;
|
|
92
92
|
enableMediaOverlays?: boolean;
|
|
93
|
+
enablePageBreaks?: boolean;
|
|
93
94
|
}
|
|
94
95
|
export interface ReaderUI {
|
|
95
96
|
settings: UserSettingsUIConfig;
|
|
@@ -108,6 +109,7 @@ export interface ReaderConfig {
|
|
|
108
109
|
define?: DefinitionsModuleConfig;
|
|
109
110
|
protection?: ContentProtectionModuleConfig;
|
|
110
111
|
mediaOverlays?: MediaOverlayModuleConfig;
|
|
112
|
+
pagebreak?: PageBreakModuleConfig;
|
|
111
113
|
annotations?: AnnotationModuleConfig;
|
|
112
114
|
bookmarks?: BookmarkModuleConfig;
|
|
113
115
|
highlighter?: TextHighlighterConfig;
|