@d-i-t-a/reader 2.4.0 → 2.4.2
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/esm/index.js +9997 -15189
- package/dist/esm/index.js.map +4 -4
- package/dist/reader.js +50 -54
- package/dist/reader.js.map +4 -4
- package/dist/types/model/user-settings/UserSettings.d.ts +1 -0
- package/dist/types/modules/protection/ContentProtectionModule.d.ts +2 -2
- package/dist/types/navigator/IFrameNavigator.d.ts +2 -0
- package/dist/types/navigator/Navigator.d.ts +2 -0
- package/dist/types/navigator/PDFNavigator.d.ts +2 -0
- package/dist/types/reader.d.ts +5 -0
- package/dist/types/utils/KeyboardEventHandler.d.ts +4 -0
- package/package.json +7 -7
|
@@ -131,6 +131,7 @@ export declare class UserSettings implements IUserSettings {
|
|
|
131
131
|
* Parses a scroll setting from a variety of inputs to a simple boolean
|
|
132
132
|
*/
|
|
133
133
|
private static parseScrollSetting;
|
|
134
|
+
private static parseAppearanceSetting;
|
|
134
135
|
scroll(scroll: boolean): Promise<void>;
|
|
135
136
|
increase(incremental: UserSettingsIncrementable): Promise<void>;
|
|
136
137
|
decrease(incremental: any): Promise<void>;
|
|
@@ -58,7 +58,7 @@ export declare class ContentProtectionModule implements ReaderModule {
|
|
|
58
58
|
initializeResource(): void;
|
|
59
59
|
initialize(): Promise<void>;
|
|
60
60
|
handleScroll(): void;
|
|
61
|
-
handleResize(): void
|
|
61
|
+
handleResize(): Promise<void>;
|
|
62
62
|
disableContext(e: {
|
|
63
63
|
preventDefault: () => void;
|
|
64
64
|
stopPropagation: () => void;
|
|
@@ -95,7 +95,7 @@ export declare class ContentProtectionModule implements ReaderModule {
|
|
|
95
95
|
stopPropagation: () => void;
|
|
96
96
|
}): false | undefined;
|
|
97
97
|
restrictCopyKey(event: any): boolean;
|
|
98
|
-
copyToClipboard(textToClipboard:
|
|
98
|
+
copyToClipboard(textToClipboard: string | undefined): void;
|
|
99
99
|
createElementForExecCommand(textToClipboard: any): HTMLDivElement;
|
|
100
100
|
selectContent(element: any): void;
|
|
101
101
|
beforePrint(event: {
|
|
@@ -245,6 +245,8 @@ export declare class IFrameNavigator extends EventEmitter implements Navigator {
|
|
|
245
245
|
currentResource(): number | undefined;
|
|
246
246
|
currentLink(): Array<Link | undefined>;
|
|
247
247
|
tableOfContents(): any;
|
|
248
|
+
landmarks(): any;
|
|
249
|
+
pageList(): any;
|
|
248
250
|
readingOrder(): any;
|
|
249
251
|
atStart(): boolean;
|
|
250
252
|
atEnd(): boolean;
|
|
@@ -18,6 +18,8 @@ interface Navigator {
|
|
|
18
18
|
activateMarker?(id: string, position: string): any;
|
|
19
19
|
deactivateMarker?(): any;
|
|
20
20
|
tableOfContents(): any;
|
|
21
|
+
landmarks(): any;
|
|
22
|
+
pageList(): any;
|
|
21
23
|
readingOrder(): any;
|
|
22
24
|
currentResource(): any;
|
|
23
25
|
mostRecentNavigatedTocItem?(): any;
|
|
@@ -45,6 +45,8 @@ export declare class PDFNavigator extends EventEmitter implements Navigator {
|
|
|
45
45
|
queueRenderPage(num: any): void;
|
|
46
46
|
readingOrder(): any;
|
|
47
47
|
tableOfContents(): any;
|
|
48
|
+
landmarks(): any;
|
|
49
|
+
pageList(): any;
|
|
48
50
|
currentResource(): any;
|
|
49
51
|
totalResources(): any;
|
|
50
52
|
currentLocator(): any;
|
package/dist/types/reader.d.ts
CHANGED
|
@@ -97,12 +97,17 @@ export default class D2Reader {
|
|
|
97
97
|
addDefinition: (definition: any) => Promise<void>;
|
|
98
98
|
/** Table of Contents */
|
|
99
99
|
get tableOfContents(): any;
|
|
100
|
+
/** Landmarks */
|
|
101
|
+
get landmarks(): any;
|
|
102
|
+
/** Page List */
|
|
103
|
+
get pageList(): any;
|
|
100
104
|
/** Reading Order or Spine */
|
|
101
105
|
get readingOrder(): any;
|
|
102
106
|
/** Current Bookmarks */
|
|
103
107
|
get bookmarks(): any;
|
|
104
108
|
/** Current Annotations */
|
|
105
109
|
get annotations(): any;
|
|
110
|
+
get publicationLayout(): any;
|
|
106
111
|
/** History */
|
|
107
112
|
get history(): Locator[] | undefined;
|
|
108
113
|
/** Current index of history */
|
|
@@ -5,6 +5,10 @@ export default class KeyboardEventHandler {
|
|
|
5
5
|
onBackwardSwipe: (event: UIEvent) => void;
|
|
6
6
|
onForwardSwipe: (event: UIEvent) => void;
|
|
7
7
|
setupEvents: (element: HTMLElement | Document | null) => void;
|
|
8
|
+
removeEvents: (element: HTMLElement | Document | null) => void;
|
|
8
9
|
focusin: (element: HTMLElement | Document) => void;
|
|
9
10
|
keydown: (element: HTMLElement | Document) => void;
|
|
11
|
+
private handlers;
|
|
12
|
+
private onFocusIn;
|
|
13
|
+
private onKeyDown;
|
|
10
14
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@d-i-t-a/reader",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.2",
|
|
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",
|
|
@@ -36,13 +36,13 @@
|
|
|
36
36
|
"lodash.clonedeep": "^4.5.0",
|
|
37
37
|
"loglevel": "^1.8.0",
|
|
38
38
|
"mark.js": "^8.11.1",
|
|
39
|
-
"pdfjs-dist": "
|
|
39
|
+
"pdfjs-dist": "2.14.305",
|
|
40
40
|
"promise-polyfill": "^8.2.0",
|
|
41
41
|
"r2-shared-js": "^1.0.51",
|
|
42
42
|
"recursive-readdir": "^2.2.2",
|
|
43
43
|
"sanitize-html": "^2.3.3",
|
|
44
44
|
"sass": "^1.54.4",
|
|
45
|
-
"sentence-splitter": "^
|
|
45
|
+
"sentence-splitter": "^5.0.0",
|
|
46
46
|
"util": "^0.12.4",
|
|
47
47
|
"whatwg-fetch": "^3.6.2"
|
|
48
48
|
},
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"@types/promise-polyfill": "^6.0.5",
|
|
75
75
|
"@types/react": "^18.2.31",
|
|
76
76
|
"@types/react-dom": "^18.2.14",
|
|
77
|
-
"@types/rimraf": "^
|
|
77
|
+
"@types/rimraf": "^4.0.5",
|
|
78
78
|
"@types/sanitize-html": "^2.9.0",
|
|
79
79
|
"@types/uuid": "^9.0.4",
|
|
80
80
|
"@typescript-eslint/eslint-plugin": "^6.9.0",
|
|
@@ -84,14 +84,14 @@
|
|
|
84
84
|
"braces": ">=3.0.2",
|
|
85
85
|
"browserslist-useragent-regexp": "^4.1.0",
|
|
86
86
|
"buffer": "^6.0.3",
|
|
87
|
-
"chai": "^
|
|
87
|
+
"chai": "^5.0.3",
|
|
88
88
|
"chalk": "^4.1.2",
|
|
89
89
|
"chokidar": "^3.5.2",
|
|
90
90
|
"copy": "^0.3.2",
|
|
91
91
|
"debounce": "^1.2.1",
|
|
92
92
|
"dita-streamer-js": "^1.1.3",
|
|
93
93
|
"ecstatic": "^4.1.4",
|
|
94
|
-
"esbuild": "^0.
|
|
94
|
+
"esbuild": "^0.20.0",
|
|
95
95
|
"eslint": "^8.52.0",
|
|
96
96
|
"eslint-config-prettier": "^9.0.0",
|
|
97
97
|
"eslint-config-react-app": "^7.0.1",
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
"ts-loader": "^9.4.4",
|
|
127
127
|
"ts-node": "^10.9.1",
|
|
128
128
|
"typedoc": "^0.25.1",
|
|
129
|
-
"typedoc-plugin-rename-defaults": "^0.
|
|
129
|
+
"typedoc-plugin-rename-defaults": "^0.7.0",
|
|
130
130
|
"typescript": "5.1.6",
|
|
131
131
|
"urijs": "^1.19.11"
|
|
132
132
|
},
|