@internetarchive/bookreader 5.0.0-80 → 5.0.0-82
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/BookReader/BookReader.js +1 -1
- package/BookReader/BookReader.js.map +1 -1
- package/BookReader/ia-bookreader-bundle.js +103 -103
- package/BookReader/ia-bookreader-bundle.js.map +1 -1
- package/BookReader/icons/chevron-right.svg +1 -1
- package/BookReader/icons/magnify-minus.svg +1 -1
- package/BookReader/icons/magnify-plus.svg +1 -1
- package/BookReader/icons/pause.svg +1 -1
- package/BookReader/icons/playback-speed.svg +1 -1
- package/BookReader/icons/read-aloud.svg +1 -1
- package/BookReader/icons/voice.svg +1 -1
- package/BookReader/icons/volume-full.svg +1 -1
- package/BookReader/images/BRicons.svg +2 -2
- package/BookReader/images/books_graphic.svg +1 -1
- package/BookReader/images/icon_book.svg +1 -1
- package/BookReader/images/icon_gear.svg +1 -1
- package/BookReader/images/icon_home.svg +1 -1
- package/BookReader/images/icon_info.svg +1 -1
- package/BookReader/images/icon_playback-rate.svg +1 -1
- package/BookReader/images/icon_search_button.svg +1 -1
- package/BookReader/images/icon_share.svg +1 -1
- package/BookReader/images/icon_speaker.svg +1 -1
- package/BookReader/images/icon_speaker_open.svg +1 -1
- package/BookReader/images/icon_toc.svg +1 -1
- package/BookReader/images/unviewable_page.png +0 -0
- package/BookReader/jquery-3.js +1 -1
- package/BookReader/plugins/plugin.archive_analytics.js +1 -1
- package/BookReader/plugins/plugin.autoplay.js +1 -1
- package/BookReader/plugins/plugin.autoplay.js.map +1 -1
- package/BookReader/plugins/plugin.chapters.js +3 -3
- package/BookReader/plugins/plugin.chapters.js.map +1 -1
- package/BookReader/plugins/plugin.iframe.js +1 -1
- package/BookReader/plugins/plugin.iiif.js +1 -1
- package/BookReader/plugins/plugin.iiif.js.map +1 -1
- package/BookReader/plugins/plugin.resume.js +1 -1
- package/BookReader/plugins/plugin.search.js +1 -1
- package/BookReader/plugins/plugin.search.js.map +1 -1
- package/BookReader/plugins/plugin.text_selection.js +1 -1
- package/BookReader/plugins/plugin.text_selection.js.map +1 -1
- package/BookReader/plugins/plugin.tts.js +1 -1
- package/BookReader/plugins/plugin.tts.js.map +1 -1
- package/BookReader/plugins/plugin.url.js +1 -1
- package/BookReader/plugins/plugin.url.js.map +1 -1
- package/BookReader/plugins/plugin.vendor-fullscreen.js +1 -1
- package/BookReader/plugins/plugin.vendor-fullscreen.js.map +1 -1
- package/BookReader/webcomponents-bundle.js +1 -1
- package/BookReader/webcomponents-bundle.js.map +1 -1
- package/BookReaderDemo/demo-preview-pages.html +524 -524
- package/CHANGELOG.md +9 -0
- package/package.json +15 -15
- package/src/BookNavigator/assets/button-base.js +1 -0
- package/src/BookNavigator/visual-adjustments/visual-adjustments-provider.js +2 -2
- package/src/BookNavigator/visual-adjustments/visual-adjustments.js +1 -1
- package/src/BookReader/BookModel.js +11 -6
- package/src/BookReader/options.js +9 -0
- package/src/assets/images/unviewable_page.png +0 -0
- package/tests/jest/BookNavigator/visual-adjustments.test.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
# 5.0.0-82
|
|
2
|
+
- Feature: New option to control unviewable page image: `unviewablePageURI` @cdrini
|
|
3
|
+
|
|
4
|
+
# 5.0.0-81
|
|
5
|
+
- Dev: Update test dependencies @cdrini
|
|
6
|
+
- Dev: Update build dependencies @cdrini
|
|
7
|
+
- Fix: BookReader buttons inherit font @rebecca-shoptaw
|
|
8
|
+
- Fix: Better visual adjustment text @rebecca-shoptaw
|
|
9
|
+
|
|
1
10
|
# 5.0.0-80
|
|
2
11
|
- Dev: Fix/modernize IIIF demo @cdrini
|
|
3
12
|
- Dev: Fix sharing panel erroring when no IA item metadata specified @cdrini
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@internetarchive/bookreader",
|
|
3
|
-
"version": "5.0.0-
|
|
3
|
+
"version": "5.0.0-82",
|
|
4
4
|
"description": "The Internet Archive BookReader.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -40,20 +40,20 @@
|
|
|
40
40
|
"lit": "^2.5.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@babel/core": "7.
|
|
44
|
-
"@babel/eslint-parser": "7.
|
|
43
|
+
"@babel/core": "7.24.7",
|
|
44
|
+
"@babel/eslint-parser": "7.24.7",
|
|
45
45
|
"@babel/plugin-proposal-class-properties": "7.18.6",
|
|
46
|
-
"@babel/plugin-proposal-decorators": "7.
|
|
47
|
-
"@babel/preset-env": "7.
|
|
46
|
+
"@babel/plugin-proposal-decorators": "7.24.7",
|
|
47
|
+
"@babel/preset-env": "7.24.7",
|
|
48
48
|
"@iiif/presentation-2": "^1.0.4",
|
|
49
49
|
"@iiif/presentation-3": "^2.1.3",
|
|
50
|
-
"@open-wc/testing-helpers": "3.0.
|
|
50
|
+
"@open-wc/testing-helpers": "3.0.1",
|
|
51
51
|
"@types/jest": "29.5.12",
|
|
52
52
|
"@webcomponents/webcomponentsjs": "^2.6.0",
|
|
53
53
|
"babel-loader": "9.1.3",
|
|
54
54
|
"codecov": "^3.8.3",
|
|
55
55
|
"concurrently": "8.2.2",
|
|
56
|
-
"core-js": "3.
|
|
56
|
+
"core-js": "3.37.1",
|
|
57
57
|
"cpx2": "4.2.3",
|
|
58
58
|
"eslint": "^7.32.0",
|
|
59
59
|
"eslint-plugin-no-jquery": "^2.7.0",
|
|
@@ -69,14 +69,14 @@
|
|
|
69
69
|
"jquery-ui-touch-punch": "0.2.3",
|
|
70
70
|
"jquery.browser": "0.1.0",
|
|
71
71
|
"live-server": "1.2.2",
|
|
72
|
-
"regenerator-runtime": "0.14.
|
|
73
|
-
"sass": "1.
|
|
74
|
-
"sinon": "
|
|
72
|
+
"regenerator-runtime": "0.14.1",
|
|
73
|
+
"sass": "1.77.6",
|
|
74
|
+
"sinon": "18.0.0",
|
|
75
75
|
"soundmanager2": "2.97.20170602",
|
|
76
|
-
"svgo": "3.
|
|
77
|
-
"testcafe": "3.
|
|
76
|
+
"svgo": "3.3.2",
|
|
77
|
+
"testcafe": "3.6.1",
|
|
78
78
|
"testcafe-browser-provider-browserstack": "^1.13.2-alpha.1",
|
|
79
|
-
"webpack": "5.
|
|
79
|
+
"webpack": "5.92.0",
|
|
80
80
|
"webpack-cli": "5.1.4"
|
|
81
81
|
},
|
|
82
82
|
"jest": {
|
|
@@ -110,8 +110,8 @@
|
|
|
110
110
|
"clean": "rm -r BookReader/ || true",
|
|
111
111
|
"lint": "npx eslint src/ tests/ *.js",
|
|
112
112
|
"lint:fix": "npx eslint --fix src/ tests/ *.js",
|
|
113
|
-
"serve": "npx http-server . --port
|
|
114
|
-
"serve-live": "npx live-server . --cors --port
|
|
113
|
+
"serve": "npx http-server . --port=8000",
|
|
114
|
+
"serve-live": "npx live-server . --cors --port=8000 --watch=index.html,BookReader,BookReaderDemo",
|
|
115
115
|
"serve-dev": "env NODE_ENV='development' npm run build-css && env NODE_ENV='development' npx concurrently --kill-others npm:serve-live npm:build-*:watch",
|
|
116
116
|
"test": "npx jest --coverage --colors",
|
|
117
117
|
"test:watch": "npx jest --watch",
|
|
@@ -20,11 +20,11 @@ const visualAdjustmentOptions = [{
|
|
|
20
20
|
value: 100,
|
|
21
21
|
}, {
|
|
22
22
|
id: 'invert',
|
|
23
|
-
name: '
|
|
23
|
+
name: 'Invert colors (dark mode)',
|
|
24
24
|
active: false,
|
|
25
25
|
}, {
|
|
26
26
|
id: 'grayscale',
|
|
27
|
-
name: '
|
|
27
|
+
name: 'Convert to grayscale',
|
|
28
28
|
active: false,
|
|
29
29
|
}];
|
|
30
30
|
|
|
@@ -157,7 +157,7 @@ export class IABookVisualAdjustments extends LitElement {
|
|
|
157
157
|
|
|
158
158
|
get zoomControls() {
|
|
159
159
|
return html`
|
|
160
|
-
<h4>
|
|
160
|
+
<h4>Adjust zoom</h4>
|
|
161
161
|
<button class="zoom_out" @click=${this.emitZoomOut} title="zoom out">
|
|
162
162
|
<ia-icon-magnify-minus></ia-icon-magnify-minus>
|
|
163
163
|
</button>
|
|
@@ -4,11 +4,6 @@ import { clamp } from './utils.js';
|
|
|
4
4
|
/** @typedef {import('./options.js').PageData} PageData */
|
|
5
5
|
/** @typedef {import('../BookReader.js').default} BookReader */
|
|
6
6
|
|
|
7
|
-
// URI to display when a page is not viewable.
|
|
8
|
-
// TODO Render configurable html for the user instead.
|
|
9
|
-
// FIXME Don't reference files on archive.org
|
|
10
|
-
const UNVIEWABLE_PAGE_URI = '/bookreader/static/preview-default.png';
|
|
11
|
-
|
|
12
7
|
/**
|
|
13
8
|
* Contains information about the Book/Document independent of the way it is
|
|
14
9
|
* being rendering. Nothing here should reference e.g. the mode, zoom, etc.
|
|
@@ -160,7 +155,17 @@ export class BookModel {
|
|
|
160
155
|
*/
|
|
161
156
|
// eslint-disable-next-line no-unused-vars
|
|
162
157
|
getPageURI(index, reduce, rotate) {
|
|
163
|
-
|
|
158
|
+
if (!this.getPageProp(index, 'viewable', true)) {
|
|
159
|
+
const uri = this.br.options.unviewablePageURI;
|
|
160
|
+
if (uri.startsWith('.')) {
|
|
161
|
+
// It's a relative path, so make it relative to the images path
|
|
162
|
+
return this.br.options.imagesBaseURL + uri;
|
|
163
|
+
} else {
|
|
164
|
+
return uri;
|
|
165
|
+
}
|
|
166
|
+
} else {
|
|
167
|
+
return this.getPageProp(index, 'uri');
|
|
168
|
+
}
|
|
164
169
|
}
|
|
165
170
|
|
|
166
171
|
/**
|
|
@@ -301,6 +301,15 @@ export const DEFAULT_OPTIONS = {
|
|
|
301
301
|
* On init, by default, we want to use srcSet for images
|
|
302
302
|
*/
|
|
303
303
|
useSrcSet: false,
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* @type {string}
|
|
307
|
+
* Path to the image to display when a page is unviewable (i.e. when
|
|
308
|
+
* displaying a preview of a book).
|
|
309
|
+
*
|
|
310
|
+
* Relative to the imagesBaseURL if a relative path is specified.
|
|
311
|
+
*/
|
|
312
|
+
unviewablePageURI: './unviewable_page.png',
|
|
304
313
|
};
|
|
305
314
|
|
|
306
315
|
/**
|
|
Binary file
|