@d-i-t-a/reader 2.1.3 → 2.1.5
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 +416 -226
- package/dist/esm/index.js.map +3 -3
- package/dist/reader.js +29 -29
- package/dist/reader.js.map +3 -3
- package/dist/types/modules/highlight/TextHighlighter.d.ts +1 -0
- package/dist/types/modules/protection/ContentProtectionModule.d.ts +22 -0
- package/dist/types/reader.d.ts +1 -0
- package/package.json +2 -2
|
@@ -6,6 +6,8 @@ export interface ContentProtectionModuleProperties {
|
|
|
6
6
|
enableObfuscation: boolean;
|
|
7
7
|
disablePrint: boolean;
|
|
8
8
|
disableCopy: boolean;
|
|
9
|
+
canCopy: boolean;
|
|
10
|
+
charactersToCopy: number;
|
|
9
11
|
detectInspect: boolean;
|
|
10
12
|
clearOnInspect: boolean;
|
|
11
13
|
detectInspectInitDelay: number;
|
|
@@ -75,6 +77,26 @@ export declare class ContentProtectionModule implements ReaderModule {
|
|
|
75
77
|
preventDefault: () => void;
|
|
76
78
|
stopPropagation: () => void;
|
|
77
79
|
}): boolean;
|
|
80
|
+
preventCopyKey(event: {
|
|
81
|
+
keyCode: any;
|
|
82
|
+
metaKey: any;
|
|
83
|
+
ctrlKey: any;
|
|
84
|
+
key: string;
|
|
85
|
+
preventDefault: () => void;
|
|
86
|
+
stopPropagation: () => void;
|
|
87
|
+
}): boolean;
|
|
88
|
+
restrictCopy(event: {
|
|
89
|
+
clipboardData: {
|
|
90
|
+
getData: (arg0: string) => any;
|
|
91
|
+
setData: (arg0: string, arg1: any) => void;
|
|
92
|
+
};
|
|
93
|
+
preventDefault: () => void;
|
|
94
|
+
stopPropagation: () => void;
|
|
95
|
+
}): boolean;
|
|
96
|
+
restrictCopyKey(event: any): boolean;
|
|
97
|
+
copyToClipboard(textToClipboard: any): void;
|
|
98
|
+
createElementForExecCommand(textToClipboard: any): HTMLDivElement;
|
|
99
|
+
selectContent(element: any): void;
|
|
78
100
|
beforePrint(event: {
|
|
79
101
|
preventDefault: () => void;
|
|
80
102
|
stopPropagation: () => void;
|
package/dist/types/reader.d.ts
CHANGED
|
@@ -176,6 +176,7 @@ export default class D2Reader {
|
|
|
176
176
|
goTo: (locator: Locator) => Promise<void>;
|
|
177
177
|
goToPosition: (value: number) => Promise<void>;
|
|
178
178
|
goToPage: (page: number) => Promise<void>;
|
|
179
|
+
copyToClipboard: (text: any) => void;
|
|
179
180
|
nextResource: () => void;
|
|
180
181
|
previousResource: () => void;
|
|
181
182
|
nextPage: () => Promise<void>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@d-i-t-a/reader",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.5",
|
|
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",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"browserslist-useragent": "^3.0.3",
|
|
29
29
|
"cssesc": "^3.0.0",
|
|
30
30
|
"detect-browser": "^5.2.0",
|
|
31
|
-
"devtools-detector": "^2.0.
|
|
31
|
+
"devtools-detector": "^2.0.14",
|
|
32
32
|
"eventemitter3": "^4.0.7",
|
|
33
33
|
"jscrypto": "^1.0.3",
|
|
34
34
|
"lodash.clonedeep": "^4.5.0",
|