@d-i-t-a/reader 1.10.0-beta.7 → 1.11.0-beta.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.
@@ -16,6 +16,7 @@ interface Annotator {
16
16
  deleteSelectedAnnotation(annotation: any): Promise<any>;
17
17
  getAnnotations(): Promise<any>;
18
18
  getAnnotation(annotation: IHighlight): Promise<any>;
19
+ getAnnotationByID(id: string): Promise<any>;
19
20
  getAnnotationPosition(id: any, iframeWin: IReadiumIFrameWindow): Promise<any>;
20
21
  }
21
22
  export declare enum AnnotationType {
@@ -28,4 +28,5 @@ export default class LocalAnnotator implements Annotator {
28
28
  getAnnotations(): Promise<any>;
29
29
  getAnnotationPosition(id: any, iframeWin: IReadiumIFrameWindow): Promise<any>;
30
30
  getAnnotation(highlight: IHighlight): Promise<any>;
31
+ getAnnotationByID(id: string): Promise<any>;
31
32
  }
@@ -0,0 +1,18 @@
1
+ import Store from "./Store";
2
+ import Positions from "./Positions";
3
+ export interface LocalAnnotatorConfig {
4
+ store: Store;
5
+ }
6
+ /** Annotator that stores annotations locally, in the browser. */
7
+ export default class LocalPositions implements Positions {
8
+ private readonly store;
9
+ private static readonly POSITIONS;
10
+ private static readonly WEIGHT;
11
+ constructor(config: LocalAnnotatorConfig);
12
+ savePositions(positions: any): Promise<any>;
13
+ deletePositions(): Promise<any>;
14
+ getPositions(): Promise<any>;
15
+ saveWeights(weights: any): Promise<any>;
16
+ deleteWeights(): Promise<any>;
17
+ getWeights(): Promise<any>;
18
+ }
@@ -0,0 +1,9 @@
1
+ interface Positions {
2
+ savePositions(positions: any): Promise<any>;
3
+ deletePositions(): Promise<any>;
4
+ getPositions(): Promise<any>;
5
+ saveWeights(weights: any): Promise<any>;
6
+ deleteWeights(): Promise<any>;
7
+ getWeights(): Promise<any>;
8
+ }
9
+ export default Positions;
@@ -1,6 +1,7 @@
1
1
  export declare const WIDTH_ATTR: number;
2
2
  export declare const HEIGHT_ATTR: number;
3
3
  export declare const VIEWBOX_ATTR: string;
4
+ export declare const iconTemplateColored: (id: string, title: string, path: string, classAttr: string, size: number, fill: string) => string;
4
5
  export declare const icons: {
5
6
  error: string;
6
7
  home: string;
@@ -18,7 +18,7 @@ interface BookView {
18
18
  /** Remove this view from its book element. */
19
19
  stop(): void;
20
20
  getCurrentPosition(): number;
21
- goToPosition(position: number): void;
21
+ goToProgression(position: number): void;
22
22
  goToFragment(fragment: string): void;
23
23
  goToCssSelector(cssSelector: string): void;
24
24
  snap(element: HTMLElement | null, relative?: boolean): void;
@@ -15,7 +15,7 @@ export default class FixedBookView implements BookView {
15
15
  start(): void;
16
16
  stop(): void;
17
17
  getCurrentPosition(): number;
18
- goToPosition(_position: number): void;
18
+ goToProgression(_position: number): void;
19
19
  goToCssSelector(_cssSelector: string, _relative?: boolean): void;
20
20
  goToFragment(_fragment: string, _relative?: boolean): void;
21
21
  snap(_element: HTMLElement, _relative?: boolean): void;
@@ -19,7 +19,7 @@ export default class ReflowableBookView implements BookView {
19
19
  start(): void;
20
20
  stop(): void;
21
21
  getCurrentPosition(): number;
22
- goToPosition(position: number): void;
22
+ goToProgression(position: number): void;
23
23
  goToCssSelector(cssSelector: string, relative?: boolean): void;
24
24
  goToFragment(fragment: string, relative?: boolean): void;
25
25
  snap(element: HTMLElement | null, _relative?: boolean): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@d-i-t-a/reader",
3
- "version": "1.10.0-beta.7",
3
+ "version": "1.11.0-beta.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",
@@ -32,6 +32,7 @@
32
32
  "jscrypto": "0.0.1",
33
33
  "mark.js": "^8.11.1",
34
34
  "promise-polyfill": "^8.2.0",
35
+ "sentence-splitter": "^3.2.1",
35
36
  "r2-shared-js": "^1.0.51",
36
37
  "sanitize-html": "^2.3.3",
37
38
  "whatwg-fetch": "^3.6.2"
package/NOTICE DELETED
@@ -1,20 +0,0 @@
1
- R2D2BC
2
- Copyright 2018-2020 DITA (AM Consulting LLC)
3
-
4
- This project bundles the following dependencies under the MIT license.
5
- See bundled license files for details.
6
-
7
- - Materialize | Copyright (c) 2014-2018 Materialize
8
- -> in "styles/sass/materialize"
9
-
10
- This project bundles the following dependencies under the SIL Open Font License.
11
- See bundled license files for details.
12
-
13
- - OpenDyxslexic Font | Copyright (c) 12/2012 - 2019
14
- -> in "viewer/fonts/opendyslexic"
15
-
16
- This project bundles the following dependencies under the BSD license.
17
- See bundled license files for details.
18
-
19
- - Readium-CSS | Copyright (c) 2017, Readium
20
- -> in "viewer/readium-css"