@internetarchive/bookreader 5.0.0-87 → 5.0.0-88-alpha.2

Sign up to get free protection for your applications and to get access to all the features.
package/index.d.ts ADDED
@@ -0,0 +1,21 @@
1
+ export type BookreaderOptions = typeof import('./src/BookReader/options').DEFAULT_OPTIONS;
2
+
3
+ export declare class Bookreader {
4
+ version: string;
5
+ constMode1up: number;
6
+ constMode2up: number;
7
+ constModeThumb: number;
8
+ constNavAnimationDuration: number;
9
+ constResizeAnimationDuration: number;
10
+ setup(options: BookreaderOptions): void;
11
+ trigger(name: string, props: object): void;
12
+ bind(name: string, callback: Function): void;
13
+ unbind(name: string, callback: Function): void;
14
+ resize(): void;
15
+ setupKeyListeners(): void;
16
+ drawLeafs(): void;
17
+ bindGestures(): void;
18
+ zoom(direction: number): void;
19
+ resizeBRcontainer(animated: boolean): void;
20
+ centerPageView(): void;
21
+ }
package/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export { default as BookReader } from './src/BookReader.js';
2
+ export { IaBookReader } from './src/ia-bookreader/ia-bookreader.js';
package/jsconfig.json CHANGED
@@ -9,6 +9,8 @@
9
9
  }
10
10
  },
11
11
  "include": [
12
+ "index.js",
13
+ "index.d.ts",
12
14
  "src/**/*.js",
13
15
  "tests/**/*.js",
14
16
  ],
@@ -16,4 +18,4 @@
16
18
  "node_modules",
17
19
  "BookReader"
18
20
  ]
19
- }
21
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@internetarchive/bookreader",
3
- "version": "5.0.0-87",
3
+ "version": "5.0.0-88-alpha.2",
4
4
  "description": "The Internet Archive BookReader.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -9,7 +9,9 @@
9
9
  "publishConfig": {
10
10
  "access": "public"
11
11
  },
12
- "module": "src/ia-bookreader/ia-bookreader.js",
12
+ "main": "index.js",
13
+ "module": "index.js",
14
+ "types": "index.d.ts",
13
15
  "keywords": [
14
16
  "online",
15
17
  "bookreader",
@@ -25,8 +27,8 @@
25
27
  "homepage": "https://github.com/internetarchive/bookreader#readme",
26
28
  "private": false,
27
29
  "dependencies": {
28
- "@internetarchive/ia-activity-indicator": "^0.0.4",
29
- "@internetarchive/ia-item-navigator": "^2.1.2",
30
+ "@internetarchive/ia-activity-indicator": "^0.0.6",
31
+ "@internetarchive/ia-item-navigator": "^2.1.3-alpha.1",
30
32
  "@internetarchive/icon-bookmark": "^1.3.4",
31
33
  "@internetarchive/icon-dl": "^1.3.4",
32
34
  "@internetarchive/icon-edit-pencil": "^1.3.4",
@@ -35,9 +37,9 @@
35
37
  "@internetarchive/icon-search": "^1.3.4",
36
38
  "@internetarchive/icon-toc": "^1.3.4",
37
39
  "@internetarchive/icon-visual-adjustment": "^1.3.4",
38
- "@internetarchive/modal-manager": "^0.2.12",
40
+ "@internetarchive/modal-manager": "^2.0.1",
39
41
  "@internetarchive/shared-resize-observer": "^0.2.0",
40
- "lit": "^2.5.0"
42
+ "lit": "^2.8.0"
41
43
  },
42
44
  "devDependencies": {
43
45
  "@babel/core": "7.25.8",
@@ -1,7 +1,7 @@
1
1
  /* eslint-disable class-methods-use-this */
2
2
  import { unsafeHTML } from 'lit/directives/unsafe-html.js';
3
3
  import { css, html, LitElement, nothing } from 'lit';
4
- import '@internetarchive/ia-activity-indicator/ia-activity-indicator';
4
+ import '@internetarchive/ia-activity-indicator';
5
5
  import checkmarkIcon from '../assets/icon_checkmark.js';
6
6
  import closeIcon from '../assets/icon_close.js';
7
7
  import buttonCSS from '../assets/button-base.js';