@d-i-t-a/reader 2.3.14 → 2.3.16

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.
@@ -20,7 +20,7 @@ export declare class Enumerable extends UserProperty {
20
20
  constructor(value: any, values: Array<any>, ref: string, name: string);
21
21
  toString(): string;
22
22
  }
23
- export declare type UserSettingsIncrementable = "fontSize" | "letterSpacing" | "lineHeight" | "wordSpacing";
23
+ export type UserSettingsIncrementable = "fontSize" | "letterSpacing" | "lineHeight" | "wordSpacing";
24
24
  export declare class Incremental extends UserProperty {
25
25
  value: number;
26
26
  min: number;
@@ -5,7 +5,7 @@ import { TextHighlighter } from "./highlight/TextHighlighter";
5
5
  import { ReaderModule } from "./ReaderModule";
6
6
  import { IHighlight } from "./highlight/common/highlight";
7
7
  import { Annotation } from "../model/Locator";
8
- export declare type Highlight = (highlight: Annotation) => Promise<Annotation>;
8
+ export type Highlight = (highlight: Annotation) => Promise<Annotation>;
9
9
  export interface AnnotationModuleAPI {
10
10
  addAnnotation: Highlight;
11
11
  deleteAnnotation: Highlight;
@@ -60,7 +60,7 @@ export interface ITTSUserSettings {
60
60
  volume?: number;
61
61
  voice?: TTSVoice;
62
62
  }
63
- export declare type TTSIncrementable = "pitch" | "rate" | "volume";
63
+ export type TTSIncrementable = "pitch" | "rate" | "volume";
64
64
  export declare class TTSSettings implements ITTSUserSettings {
65
65
  private readonly store;
66
66
  private readonly TTSSETTINGS;
@@ -29,7 +29,7 @@ export interface IMediaOverlayUserSettings {
29
29
  playing?: boolean;
30
30
  wait?: number;
31
31
  }
32
- export declare type MediaOverlayIncrementable = "mo_volume" | "mo_rate";
32
+ export type MediaOverlayIncrementable = "mo_volume" | "mo_rate";
33
33
  export declare class MediaOverlaySettings implements IMediaOverlayUserSettings {
34
34
  private readonly store;
35
35
  private readonly MEDIAOVERLAYSETTINGS;
@@ -16,6 +16,7 @@ export interface ContentProtectionModuleProperties {
16
16
  hideTargetUrl: boolean;
17
17
  disableDrag: boolean;
18
18
  supportedBrowsers: string[];
19
+ excludeNodes: string[];
19
20
  }
20
21
  export interface ContentProtectionModuleConfig extends Partial<ContentProtectionModuleProperties> {
21
22
  api?: ContentProtectionModuleAPI;
@@ -21,8 +21,8 @@ import LineFocusModule, { LineFocusModuleConfig } from "../modules/linefocus/Lin
21
21
  import { HistoryModule } from "../modules/history/HistoryModule";
22
22
  import CitationModule, { CitationModuleConfig } from "../modules/citation/CitationModule";
23
23
  import { ConsumptionModule, ConsumptionModuleConfig } from "../modules/consumption/ConsumptionModule";
24
- export declare type GetContent = (href: string) => Promise<string>;
25
- export declare type GetContentBytesLength = (href: string, requestConfig?: RequestConfig) => Promise<number>;
24
+ export type GetContent = (href: string) => Promise<string>;
25
+ export type GetContentBytesLength = (href: string, requestConfig?: RequestConfig) => Promise<number>;
26
26
  export interface RequestConfig extends RequestInit {
27
27
  encoded?: boolean;
28
28
  }
@@ -145,7 +145,7 @@ export default class D2Reader {
145
145
  };
146
146
  resetUserSettings: () => Promise<void>;
147
147
  applyUserSettings: (userSettings: Partial<UserSettings>) => Promise<void>;
148
- scroll: (value: boolean, direction?: string | undefined) => Promise<void>;
148
+ scroll: (value: boolean, direction?: string) => Promise<void>;
149
149
  private isTTSIncrementable;
150
150
  private isMOIncrementable;
151
151
  /**
@@ -1,14 +1,14 @@
1
1
  export interface IStringMap {
2
2
  [key: string]: string;
3
3
  }
4
- export declare type AnyJson = JsonPrimitives | JsonArray | JsonMap;
5
- export declare type JsonPrimitives = string | number | boolean | null;
4
+ export type AnyJson = JsonPrimitives | JsonArray | JsonMap;
5
+ export type JsonPrimitives = string | number | boolean | null;
6
6
  export interface JsonMap {
7
7
  [key: string]: AnyJson;
8
8
  }
9
9
  export interface JsonArray extends Array<AnyJson> {
10
10
  }
11
- declare type TConstructor<T> = new (value?: any) => T;
11
+ type TConstructor<T> = new (value?: any) => T;
12
12
  export declare function TaJsonDeserialize<T>(json: any, type: TConstructor<T>): T;
13
13
  export declare function TaJsonSerialize<T>(obj: T): JsonMap;
14
14
  export {};
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@d-i-t-a/reader",
3
- "version": "2.3.14",
3
+ "version": "2.3.16",
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",
7
7
  "main": "dist/esm/index.js",
8
8
  "typings": "dist/types/index.d.ts",
9
9
  "engines": {
10
- "node": ">8.0.0"
10
+ "node": ">=14"
11
11
  },
12
12
  "publishConfig": {
13
13
  "registry": "https://registry.npmjs.org/"
@@ -24,24 +24,25 @@
24
24
  "example:react": "parcel examples/react/index.html --dist-dir parcel-dist"
25
25
  },
26
26
  "dependencies": {
27
- "@types/sass": "^1.43.1",
27
+ "@babel/plugin-proposal-private-property-in-object": "^7.21.11",
28
28
  "@types/pdfjs-dist": "^2.7.4",
29
- "browserslist-useragent": "^3.0.3",
29
+ "@types/sass": "^1.43.1",
30
+ "browserslist-useragent": "^4.0.0",
30
31
  "cssesc": "^3.0.0",
31
32
  "detect-browser": "^5.2.0",
32
33
  "devtools-detector": "^2.0.14",
33
- "eventemitter3": "^4.0.7",
34
+ "eventemitter3": "^5.0.1",
34
35
  "jscrypto": "^1.0.3",
35
36
  "lodash.clonedeep": "^4.5.0",
36
37
  "loglevel": "^1.8.0",
37
38
  "mark.js": "^8.11.1",
38
- "pdfjs-dist": "2.14.305",
39
+ "pdfjs-dist": "3.11.174",
39
40
  "promise-polyfill": "^8.2.0",
40
41
  "r2-shared-js": "^1.0.51",
41
42
  "recursive-readdir": "^2.2.2",
42
43
  "sanitize-html": "^2.3.3",
43
44
  "sass": "^1.54.4",
44
- "sentence-splitter": "^3.2.1",
45
+ "sentence-splitter": "^4.2.1",
45
46
  "util": "^0.12.4",
46
47
  "whatwg-fetch": "^3.6.2"
47
48
  },
@@ -68,20 +69,20 @@
68
69
  "@types/jquery": "^3.5.5",
69
70
  "@types/mark.js": "^8.11.5",
70
71
  "@types/mocha": "^10.0.1",
71
- "@types/pako": "^1.0.1",
72
- "@types/parse5": "^6.0.0",
72
+ "@types/pako": "^2.0.0",
73
+ "@types/parse5": "^7.0.0",
73
74
  "@types/promise-polyfill": "^6.0.3",
74
- "@types/react": "^17.0.11",
75
- "@types/react-dom": "^17.0.7",
76
- "@types/rimraf": "^3.0.0",
77
- "@types/sanitize-html": "^1.27.1",
78
- "@types/uuid": "^8.3.0",
79
- "@typescript-eslint/eslint-plugin": "^4.21.0",
80
- "@typescript-eslint/parser": "^4.21.0",
75
+ "@types/react": "^18.2.22",
76
+ "@types/react-dom": "^18.2.7",
77
+ "@types/rimraf": "^3.0.2",
78
+ "@types/sanitize-html": "^2.9.0",
79
+ "@types/uuid": "^9.0.4",
80
+ "@typescript-eslint/eslint-plugin": "^5.62.0",
81
+ "@typescript-eslint/parser": "^5.62.0",
81
82
  "ansi-regex": ">=5.0.1",
82
83
  "babel-eslint": "^10.1.0",
83
84
  "braces": ">=3.0.2",
84
- "browserslist-useragent-regexp": "^3.0.0",
85
+ "browserslist-useragent-regexp": "^4.1.0",
85
86
  "buffer": "^6.0.3",
86
87
  "chai": "^4.3.4",
87
88
  "chalk": "^4.1.2",
@@ -90,16 +91,16 @@
90
91
  "debounce": "^1.2.1",
91
92
  "dita-streamer-js": "^1.1.3",
92
93
  "ecstatic": "^4.1.4",
93
- "esbuild": "^0.12.11",
94
- "eslint": "^7.23.0",
95
- "eslint-config-prettier": "^8.1.0",
96
- "eslint-config-react-app": "^6.0.0",
97
- "eslint-plugin-flowtype": "^5.6.0",
98
- "eslint-plugin-import": "^2.22.1",
94
+ "esbuild": "^0.19.3",
95
+ "eslint": "^8.49.0",
96
+ "eslint-config-prettier": "^9.0.0",
97
+ "eslint-config-react-app": "^7.0.1",
98
+ "eslint-plugin-flowtype": "^8.0.3",
99
+ "eslint-plugin-import": "^2.28.1",
99
100
  "eslint-plugin-jsx-a11y": "^6.4.1",
100
- "eslint-plugin-prettier": "^3.3.1",
101
- "eslint-plugin-react": "^7.29.4",
102
- "eslint-plugin-react-hooks": "^4.2.0",
101
+ "eslint-plugin-prettier": "^5.0.0",
102
+ "eslint-plugin-react": "^7.33.2",
103
+ "eslint-plugin-react-hooks": "^4.6.0",
103
104
  "express": "^4.17.1",
104
105
  "json-schema": ">=0.4.0",
105
106
  "minimist": "^1.2.6",
@@ -111,22 +112,22 @@
111
112
  "parcel-plugin-static-files-copy": "^2.6.0",
112
113
  "parcel-reporter-static-files-copy": "^1.4.0",
113
114
  "path-parse": "^1.0.7",
114
- "prettier": "^2.2.1",
115
+ "prettier": "^3.0.3",
115
116
  "process": "^0.11.10",
116
117
  "rangy": "^1.3.0",
117
- "react": "^17.0.2",
118
- "react-app-polyfill": "^2.0.0",
119
- "react-dom": "^17.0.2",
118
+ "react": "^18.2.0",
119
+ "react-app-polyfill": "^3.0.0",
120
+ "react-dom": "^18.2.0",
120
121
  "regenerator-runtime": "^0.14.0",
121
122
  "rimraf": "^3.0.2",
122
- "sinon": "^10.0.0",
123
+ "sinon": "^16.0.0",
123
124
  "ta-json-x": "^2.5.3",
124
125
  "tar": ">=6.1.9",
125
- "ts-loader": "^8.0.18",
126
+ "ts-loader": "^9.4.4",
126
127
  "ts-node": "^10.4.0",
127
- "typedoc": "^0.22.15",
128
- "typedoc-plugin-rename-defaults": "^0.5.1",
129
- "typescript": "^4.5.2",
128
+ "typedoc": "^0.25.1",
129
+ "typedoc-plugin-rename-defaults": "^0.6.6",
130
+ "typescript": "5.1.6",
130
131
  "urijs": "^1.19.11"
131
132
  },
132
133
  "files": [