@internetarchive/bookreader 5.0.0-82 → 5.0.0-83
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/.eslintrc.js +9 -9
- package/.github/workflows/node.js.yml +9 -7
- package/BookReader/BookReader.css +2 -2
- package/BookReader/BookReader.js +1 -1
- package/BookReader/BookReader.js.map +1 -1
- package/BookReader/ia-bookreader-bundle.js +32 -32
- package/BookReader/ia-bookreader-bundle.js.map +1 -1
- package/BookReader/plugins/plugin.archive_analytics.js.map +1 -1
- package/BookReader/plugins/plugin.autoplay.js.map +1 -1
- package/BookReader/plugins/plugin.chapters.js +1 -1
- package/BookReader/plugins/plugin.chapters.js.map +1 -1
- package/BookReader/plugins/plugin.iframe.js.map +1 -1
- package/BookReader/plugins/plugin.iiif.js +1 -1
- package/BookReader/plugins/plugin.iiif.js.map +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.map +1 -1
- package/BookReaderDemo/IADemoBr.js +10 -3
- package/BookReaderDemo/demo-iiif.html +1 -1
- package/BookReaderDemo/demo-internetarchive.html +1 -1
- package/CHANGELOG.md +12 -0
- package/babel.config.js +5 -5
- package/package.json +16 -18
- package/renovate.json +1 -1
- package/src/BookNavigator/book-navigator.js +8 -8
- package/src/BookNavigator/bookmarks/bookmarks-loginCTA.js +1 -1
- package/src/BookNavigator/bookmarks/bookmarks-provider.js +1 -1
- package/src/BookNavigator/bookmarks/ia-bookmarks.js +1 -1
- package/src/BookNavigator/downloads/downloads.js +1 -1
- package/src/BookNavigator/search/search-provider.js +2 -2
- package/src/BookNavigator/search/search-results.js +1 -1
- package/src/BookNavigator/sharing.js +1 -1
- package/src/BookNavigator/viewable-files.js +1 -1
- package/src/BookNavigator/visual-adjustments/visual-adjustments.js +3 -3
- package/src/BookReader/BookModel.js +1 -1
- package/src/BookReader/DragScrollable.js +2 -2
- package/src/BookReader/ModeSmoothZoom.js +5 -5
- package/src/BookReader/ModeThumb.js +2 -2
- package/src/BookReader/Navbar/Navbar.js +4 -4
- package/src/BookReader/ReduceSet.js +2 -2
- package/src/BookReader/Toolbar/Toolbar.js +4 -4
- package/src/BookReader/options.js +10 -10
- package/src/BookReader/utils/classes.js +1 -1
- package/src/BookReader.js +12 -12
- package/src/css/_BRicon.scss +8 -2
- package/src/ia-bookreader/ia-bookreader.js +1 -1
- package/src/plugins/plugin.archive_analytics.js +1 -1
- package/src/plugins/plugin.autoplay.js +2 -2
- package/src/plugins/plugin.chapters.js +3 -3
- package/src/plugins/plugin.iframe.js +1 -1
- package/src/plugins/plugin.iiif.js +9 -5
- package/src/plugins/plugin.text_selection.js +2 -2
- package/src/plugins/plugin.vendor-fullscreen.js +3 -3
- package/src/plugins/search/plugin.search.js +16 -11
- package/src/plugins/search/view.js +4 -1
- package/src/plugins/tts/AbstractTTSEngine.js +1 -1
- package/src/plugins/tts/FestivalTTSEngine.js +3 -3
- package/src/plugins/tts/PageChunk.js +2 -2
- package/src/plugins/tts/WebTTSEngine.js +1 -1
- package/src/plugins/tts/plugin.tts.js +1 -1
- package/src/plugins/tts/utils.js +1 -1
- package/src/plugins/url/plugin.url.js +1 -1
- package/tests/e2e/helpers/mockSearch.js +13 -13
- package/tests/jest/BookNavigator/book-navigator.test.js +27 -27
- package/tests/jest/BookNavigator/downloads/downloads-provider.test.js +5 -5
- package/tests/jest/BookNavigator/downloads/downloads.test.js +3 -3
- package/tests/jest/BookNavigator/search/search-provider.test.js +15 -15
- package/tests/jest/BookNavigator/search/search-results.test.js +1 -1
- package/tests/jest/BookNavigator/sharing/sharing-provider.test.js +5 -5
- package/tests/jest/BookNavigator/viewable-files/viewable-files-provider.test.js +8 -8
- package/tests/jest/BookReader/BookReaderPublicFunctions.test.js +3 -3
- package/tests/jest/BookReader/Mode1UpLit.test.js +2 -2
- package/tests/jest/BookReader/Mode2UpLit.test.js +3 -3
- package/tests/jest/BookReader/ModeSmoothZoom.test.js +4 -4
- package/tests/jest/BookReader/Navbar/Navbar.test.js +16 -16
- package/tests/jest/BookReader/Toolbar/Toolbar.test.js +1 -1
- package/tests/jest/BookReader.keyboard.test.js +1 -1
- package/tests/jest/BookReader.options.test.js +1 -1
- package/tests/jest/BookReader.test.js +4 -4
- package/tests/jest/plugins/plugin.chapters.test.js +3 -3
- package/tests/jest/plugins/plugin.iframe.test.js +2 -2
- package/tests/jest/plugins/plugin.text_selection.test.js +1 -1
- package/tests/jest/plugins/search/plugin.search.view.test.js +6 -6
- package/tests/jest/plugins/search/utils.js +3 -3
- package/tests/jest/plugins/tts/AbstractTTSEngine.test.js +1 -1
- package/tests/jest/plugins/tts/WebTTSEngine.test.js +2 -2
- package/tests/jest/plugins/url/UrlPlugin.test.js +2 -2
- package/tests/jest/plugins/url/plugin.url.test.js +6 -6
- package/webpack.config.js +6 -6
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
6
6
|
|
|
7
7
|
<!-- WC dependencies -->
|
|
8
|
-
<script type="text/javascript" src="https://
|
|
8
|
+
<script type="text/javascript" src="https://cdnjs.cloudflare.com/polyfill/v3/polyfill.min.js?features=es2015%2Ces5%2CglobalThis"></script>
|
|
9
9
|
<script type="text/javascript" src="https://unpkg.com/lit@2.1.2/polyfill-support.js"></script>
|
|
10
10
|
<script type="text/javascript" src="https://unpkg.com/@webcomponents/webcomponentsjs@2.2.10/webcomponents-bundle.js"></script>
|
|
11
11
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
9
9
|
|
|
10
10
|
<!-- WC dependencies -->
|
|
11
|
-
<script type="text/javascript" src="https://
|
|
11
|
+
<script type="text/javascript" src="https://cdnjs.cloudflare.com/polyfill/v3/polyfill.min.js?features=es2015%2Ces5%2CglobalThis"></script>
|
|
12
12
|
<script type="text/javascript" src="https://unpkg.com/lit@2.1.2/polyfill-support.js"></script>
|
|
13
13
|
<script type="text/javascript" src="https://unpkg.com/@webcomponents/webcomponentsjs@2.2.10/webcomponents-bundle.js"></script>
|
|
14
14
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
# 5.0.0-83
|
|
2
|
+
- Fix: Fix typo in search-results.js @sahalbelam
|
|
3
|
+
- Dev: Bump cache action to v4 @williamtheaker
|
|
4
|
+
- Fix: Fix toolbar requiring SearchView.init having already been called @cdrini
|
|
5
|
+
- Dev: Replace deprecated codecov npm package with github action @cdrini
|
|
6
|
+
- Dev: Add eslint trailing comma rule @cdrini
|
|
7
|
+
- Fix: Fix IIIF plugin missing last page + error when metadata unspecified @glorieux-f
|
|
8
|
+
- Fix: Remove polyfill.io from demo files @cdrini
|
|
9
|
+
- Dev: Update build dependencies @cdrini
|
|
10
|
+
- Dev: Update some dev deps @cdrini
|
|
11
|
+
- Fix: Switch to new Thorium URL @rebecca-shoptaw
|
|
12
|
+
|
|
1
13
|
# 5.0.0-82
|
|
2
14
|
- Feature: New option to control unviewable page image: `unviewablePageURI` @cdrini
|
|
3
15
|
|
package/babel.config.js
CHANGED
|
@@ -6,15 +6,15 @@ module.exports = {
|
|
|
6
6
|
process.env.NODE_ENV == "development" ? { targets: "last 2 Chrome versions, last 2 Firefox versions, last 2 Safari versions, last 2 Edge versions" } : {
|
|
7
7
|
targets: "> 2%, ie 11, edge 14, samsung > 9, OperaMini all, UCAndroid > 12, Safari >= 9",
|
|
8
8
|
useBuiltIns: "usage",
|
|
9
|
-
corejs: 3
|
|
10
|
-
}
|
|
11
|
-
]
|
|
9
|
+
corejs: 3,
|
|
10
|
+
},
|
|
11
|
+
],
|
|
12
12
|
],
|
|
13
13
|
plugins: [
|
|
14
14
|
["@babel/plugin-proposal-decorators", {
|
|
15
15
|
version: "2018-09",
|
|
16
|
-
decoratorsBeforeExport: true
|
|
16
|
+
decoratorsBeforeExport: true,
|
|
17
17
|
}],
|
|
18
18
|
["@babel/plugin-proposal-class-properties"],
|
|
19
|
-
]
|
|
19
|
+
],
|
|
20
20
|
};
|
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-83",
|
|
4
4
|
"description": "The Internet Archive BookReader.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -40,21 +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.25.8",
|
|
44
|
+
"@babel/eslint-parser": "7.25.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.25.7",
|
|
47
|
+
"@babel/preset-env": "7.25.8",
|
|
48
48
|
"@iiif/presentation-2": "^1.0.4",
|
|
49
49
|
"@iiif/presentation-3": "^2.1.3",
|
|
50
50
|
"@open-wc/testing-helpers": "3.0.1",
|
|
51
|
-
"@types/jest": "29.5.
|
|
51
|
+
"@types/jest": "29.5.13",
|
|
52
52
|
"@webcomponents/webcomponentsjs": "^2.6.0",
|
|
53
|
-
"babel-loader": "9.1
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"cpx2": "4.2.3",
|
|
53
|
+
"babel-loader": "9.2.1",
|
|
54
|
+
"concurrently": "9.0.1",
|
|
55
|
+
"core-js": "3.38.1",
|
|
56
|
+
"cpx2": "8.0.0",
|
|
58
57
|
"eslint": "^7.32.0",
|
|
59
58
|
"eslint-plugin-no-jquery": "^2.7.0",
|
|
60
59
|
"eslint-plugin-testcafe": "^0.2.1",
|
|
@@ -70,13 +69,13 @@
|
|
|
70
69
|
"jquery.browser": "0.1.0",
|
|
71
70
|
"live-server": "1.2.2",
|
|
72
71
|
"regenerator-runtime": "0.14.1",
|
|
73
|
-
"sass": "1.
|
|
74
|
-
"sinon": "
|
|
72
|
+
"sass": "1.79.5",
|
|
73
|
+
"sinon": "19.0.2",
|
|
75
74
|
"soundmanager2": "2.97.20170602",
|
|
76
75
|
"svgo": "3.3.2",
|
|
77
|
-
"testcafe": "3.6.
|
|
76
|
+
"testcafe": "3.6.2",
|
|
78
77
|
"testcafe-browser-provider-browserstack": "^1.13.2-alpha.1",
|
|
79
|
-
"webpack": "5.
|
|
78
|
+
"webpack": "5.95.0",
|
|
80
79
|
"webpack-cli": "5.1.4"
|
|
81
80
|
},
|
|
82
81
|
"jest": {
|
|
@@ -118,9 +117,8 @@
|
|
|
118
117
|
"test:e2e": "npm run build && npx testcafe",
|
|
119
118
|
"test:e2e:dev": "npx testcafe --live --dev",
|
|
120
119
|
"DOCS:update:test-deps": "If CI succeeds, these should be good to update",
|
|
121
|
-
"update:test-deps": "npm i @babel/eslint-parser@latest @open-wc/testing-helpers@latest @types/jest@latest
|
|
120
|
+
"update:test-deps": "npm i @babel/eslint-parser@latest @open-wc/testing-helpers@latest @types/jest@latest eslint@7 eslint-plugin-testcafe@latest jest@latest sinon@latest testcafe@latest",
|
|
122
121
|
"DOCS:update:build-deps": "These can cause strange changes, so do an npm run build + check file size (git diff --stat), and check the site is as expected",
|
|
123
|
-
"update:build-deps": "npm i @babel/core@latest @babel/preset-env@latest @babel/plugin-proposal-class-properties@latest @babel/plugin-proposal-decorators@latest babel-loader@latest core-js@latest regenerator-runtime@latest sass@latest svgo@latest webpack@latest webpack-cli@latest"
|
|
124
|
-
"codecov": "npx codecov"
|
|
122
|
+
"update:build-deps": "npm i @babel/core@latest @babel/preset-env@latest @babel/plugin-proposal-class-properties@latest @babel/plugin-proposal-decorators@latest babel-loader@latest core-js@latest regenerator-runtime@latest sass@latest svgo@latest webpack@latest webpack-cli@latest"
|
|
125
123
|
}
|
|
126
124
|
}
|
package/renovate.json
CHANGED
|
@@ -71,14 +71,14 @@ export class BookNavigator extends LitElement {
|
|
|
71
71
|
'volumes',
|
|
72
72
|
'chapters',
|
|
73
73
|
'search',
|
|
74
|
-
'bookmarks'
|
|
74
|
+
'bookmarks',
|
|
75
75
|
];
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
disconnectedCallback() {
|
|
79
79
|
this.sharedObserver.removeObserver({
|
|
80
80
|
target: this.mainBRContainer,
|
|
81
|
-
handler: this.sharedObserverHandler
|
|
81
|
+
handler: this.sharedObserverHandler,
|
|
82
82
|
});
|
|
83
83
|
}
|
|
84
84
|
|
|
@@ -148,7 +148,7 @@ export class BookNavigator extends LitElement {
|
|
|
148
148
|
item: this.itemMD,
|
|
149
149
|
signedIn: this.signedIn,
|
|
150
150
|
isAdmin: this.isAdmin,
|
|
151
|
-
onProviderChange: () => {}
|
|
151
|
+
onProviderChange: () => {},
|
|
152
152
|
};
|
|
153
153
|
}
|
|
154
154
|
|
|
@@ -220,7 +220,7 @@ export class BookNavigator extends LitElement {
|
|
|
220
220
|
const method = Object.keys(bookmarks).length ? 'add' : 'remove';
|
|
221
221
|
this[`${method}MenuShortcut`]('bookmarks');
|
|
222
222
|
this.updateMenuContents();
|
|
223
|
-
}
|
|
223
|
+
},
|
|
224
224
|
});
|
|
225
225
|
}
|
|
226
226
|
|
|
@@ -240,7 +240,7 @@ export class BookNavigator extends LitElement {
|
|
|
240
240
|
this.updateSideMenu('volumes', 'open');
|
|
241
241
|
});
|
|
242
242
|
}
|
|
243
|
-
}
|
|
243
|
+
},
|
|
244
244
|
});
|
|
245
245
|
}
|
|
246
246
|
|
|
@@ -311,7 +311,7 @@ export class BookNavigator extends LitElement {
|
|
|
311
311
|
*/
|
|
312
312
|
updateMenuContents() {
|
|
313
313
|
const {
|
|
314
|
-
search, downloads, visualAdjustments, share, bookmarks, volumes, chapters
|
|
314
|
+
search, downloads, visualAdjustments, share, bookmarks, volumes, chapters,
|
|
315
315
|
} = this.menuProviders;
|
|
316
316
|
const availableMenus = [volumes, chapters, search, bookmarks, visualAdjustments, share].filter((menu) => !!menu);
|
|
317
317
|
|
|
@@ -460,7 +460,7 @@ export class BookNavigator extends LitElement {
|
|
|
460
460
|
window.archive_analytics?.send_event(
|
|
461
461
|
'BookReader',
|
|
462
462
|
`contextmenu-${this.bookIsRestricted ? 'restricted' : 'unrestricted'}`,
|
|
463
|
-
e.target?.classList?.value
|
|
463
|
+
e.target?.classList?.value,
|
|
464
464
|
);
|
|
465
465
|
if (!this.bookIsRestricted) {
|
|
466
466
|
return;
|
|
@@ -479,7 +479,7 @@ export class BookNavigator extends LitElement {
|
|
|
479
479
|
this.sharedObserverHandler = { handleResize: this.handleResize.bind(this) };
|
|
480
480
|
this.sharedObserver?.addObserver({
|
|
481
481
|
target: this.mainBRContainer,
|
|
482
|
-
handler: this.sharedObserverHandler
|
|
482
|
+
handler: this.sharedObserverHandler,
|
|
483
483
|
});
|
|
484
484
|
}
|
|
485
485
|
|
|
@@ -62,7 +62,7 @@ class IABookmarks extends LitElement {
|
|
|
62
62
|
editedBookmark: { type: Object },
|
|
63
63
|
deleteModalConfig: { type: Object},
|
|
64
64
|
modal: { attribute: false },
|
|
65
|
-
loginOptions: { type: Object, attribute: false }
|
|
65
|
+
loginOptions: { type: Object, attribute: false },
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
68
|
|
|
@@ -75,7 +75,7 @@ export class IABookDownloads extends LitElement {
|
|
|
75
75
|
<ul>
|
|
76
76
|
<li><a href="https://librarysimplified.org/simplye/" rel="noopener noreferrer nofollow" target="_blank">Install SimplyE</a></li>
|
|
77
77
|
<li><a href="https://www.demarque.com/en-aldiko" rel="noopener noreferrer nofollow" target="_blank">Install Aldiko</a></li>
|
|
78
|
-
<li><a href="https://
|
|
78
|
+
<li><a href="https://thorium.edrlab.org/" rel="noopener noreferrer nofollow" target="_blank">Install Thorium</a></li>
|
|
79
79
|
</ul>
|
|
80
80
|
`;
|
|
81
81
|
}
|
|
@@ -13,7 +13,7 @@ let searchState = {
|
|
|
13
13
|
export default class SearchProvider {
|
|
14
14
|
constructor({
|
|
15
15
|
onProviderChange,
|
|
16
|
-
bookreader
|
|
16
|
+
bookreader,
|
|
17
17
|
}) {
|
|
18
18
|
/* search menu events */
|
|
19
19
|
this.onBookSearchInitiated = this.onBookSearchInitiated.bind(this);
|
|
@@ -72,7 +72,7 @@ export default class SearchProvider {
|
|
|
72
72
|
errorMessage: '',
|
|
73
73
|
};
|
|
74
74
|
const updateMenuFor = {
|
|
75
|
-
searchCanceled: true
|
|
75
|
+
searchCanceled: true,
|
|
76
76
|
};
|
|
77
77
|
this.updateMenu(updateMenuFor);
|
|
78
78
|
|
|
@@ -28,7 +28,7 @@ export class IABookSearchResults extends LitElement {
|
|
|
28
28
|
this.query = '';
|
|
29
29
|
this.queryInProgress = false;
|
|
30
30
|
this.renderHeader = false;
|
|
31
|
-
this.
|
|
31
|
+
this.renderSearchAllFiles = false;
|
|
32
32
|
this.displayResultImages = false;
|
|
33
33
|
this.errorMessage = '';
|
|
34
34
|
|
|
@@ -43,7 +43,7 @@ export class IABookVisualAdjustments extends LitElement {
|
|
|
43
43
|
get activeOptions() {
|
|
44
44
|
return this.options.reduce(
|
|
45
45
|
(results, option) => (option.active ? [...results, option.id] : results),
|
|
46
|
-
[]
|
|
46
|
+
[],
|
|
47
47
|
);
|
|
48
48
|
}
|
|
49
49
|
|
|
@@ -71,7 +71,7 @@ export class IABookVisualAdjustments extends LitElement {
|
|
|
71
71
|
bubbles: true,
|
|
72
72
|
composed: true,
|
|
73
73
|
detail,
|
|
74
|
-
})
|
|
74
|
+
}),
|
|
75
75
|
);
|
|
76
76
|
}
|
|
77
77
|
|
|
@@ -93,7 +93,7 @@ export class IABookVisualAdjustments extends LitElement {
|
|
|
93
93
|
changeActiveStateFor(optionName) {
|
|
94
94
|
const updatedOptions = [...this.options];
|
|
95
95
|
const checkedOption = updatedOptions.find(
|
|
96
|
-
(option) => option.id === optionName
|
|
96
|
+
(option) => option.id === optionName,
|
|
97
97
|
);
|
|
98
98
|
checkedOption.active = !checkedOption.active;
|
|
99
99
|
this.options = updatedOptions;
|
|
@@ -179,7 +179,7 @@ export class DragScrollable {
|
|
|
179
179
|
// How much did the mouse move?
|
|
180
180
|
const delta = {
|
|
181
181
|
left: (lt.left - this.lastCoord.left),
|
|
182
|
-
top: (lt.top - this.lastCoord.top)
|
|
182
|
+
top: (lt.top - this.lastCoord.top),
|
|
183
183
|
};
|
|
184
184
|
|
|
185
185
|
const scrollTarget = this.settings.scrollWindow ? $(window) : this.handling_element;
|
|
@@ -218,7 +218,7 @@ export class DragScrollable {
|
|
|
218
218
|
// How much did the mouse move total?
|
|
219
219
|
const delta = {
|
|
220
220
|
left: Math.abs(this.lastCoord.left - this.firstCoord.left),
|
|
221
|
-
top: Math.abs(this.lastCoord.top - this.firstCoord.top)
|
|
221
|
+
top: Math.abs(this.lastCoord.top - this.firstCoord.top),
|
|
222
222
|
};
|
|
223
223
|
const distance = Math.max(delta.left, delta.top);
|
|
224
224
|
|
|
@@ -65,7 +65,7 @@ export class ModeSmoothZoom {
|
|
|
65
65
|
listeners: {
|
|
66
66
|
start: this._pinchStart,
|
|
67
67
|
end: this._pinchEnd,
|
|
68
|
-
}
|
|
68
|
+
},
|
|
69
69
|
});
|
|
70
70
|
if (isSamsungInternet()) {
|
|
71
71
|
// Samsung internet pinch-zoom will not work unless we disable
|
|
@@ -79,7 +79,7 @@ export class ModeSmoothZoom {
|
|
|
79
79
|
minSpeed: 100,
|
|
80
80
|
allowResume: true,
|
|
81
81
|
},
|
|
82
|
-
listeners: { move: this._dragMove }
|
|
82
|
+
listeners: { move: this._dragMove },
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
85
|
|
|
@@ -134,7 +134,7 @@ export class ModeSmoothZoom {
|
|
|
134
134
|
start: this._pinchStart,
|
|
135
135
|
move: this._pinchMove,
|
|
136
136
|
end: this._pinchEnd,
|
|
137
|
-
}
|
|
137
|
+
},
|
|
138
138
|
});
|
|
139
139
|
}
|
|
140
140
|
|
|
@@ -159,7 +159,7 @@ export class ModeSmoothZoom {
|
|
|
159
159
|
listeners: {
|
|
160
160
|
start: this._pinchStart,
|
|
161
161
|
end: this._pinchEnd,
|
|
162
|
-
}
|
|
162
|
+
},
|
|
163
163
|
});
|
|
164
164
|
// Want this to happen after the pinchMoveFrame,
|
|
165
165
|
// if one is in progress; otherwise setting oldScale
|
|
@@ -185,7 +185,7 @@ export class ModeSmoothZoom {
|
|
|
185
185
|
this.mode.$container.style.overflow = "hidden";
|
|
186
186
|
this.pinchMoveFramePromiseRes = null;
|
|
187
187
|
this.pinchMoveFramePromise = new Promise(
|
|
188
|
-
(res) => (this.pinchMoveFramePromiseRes = res)
|
|
188
|
+
(res) => (this.pinchMoveFramePromiseRes = res),
|
|
189
189
|
);
|
|
190
190
|
this.updateScaleCenter({
|
|
191
191
|
clientX: this.lastEvent.clientX,
|
|
@@ -252,7 +252,7 @@ export class ModeThumb {
|
|
|
252
252
|
this.br.thumbColumns = clamp(
|
|
253
253
|
this.br.thumbColumns,
|
|
254
254
|
this.br.options.thumbMinZoomColumns,
|
|
255
|
-
this.br.options.thumbMaxZoomColumns
|
|
255
|
+
this.br.options.thumbMaxZoomColumns,
|
|
256
256
|
);
|
|
257
257
|
|
|
258
258
|
if (this.br.thumbColumns != oldColumns) {
|
|
@@ -280,7 +280,7 @@ export class ModeThumb {
|
|
|
280
280
|
this.br.refs.$brContainer.empty();
|
|
281
281
|
this.br.refs.$brContainer.css({
|
|
282
282
|
overflowY: 'scroll',
|
|
283
|
-
overflowX: 'auto'
|
|
283
|
+
overflowX: 'auto',
|
|
284
284
|
});
|
|
285
285
|
|
|
286
286
|
this.br.refs.$brPageViewEl = $("<div class='BRpageview'></div>");
|
|
@@ -22,11 +22,11 @@ export class Navbar {
|
|
|
22
22
|
|
|
23
23
|
/** @type {Object} controls will be switch over "this.maximumControls" */
|
|
24
24
|
this.minimumControls = [
|
|
25
|
-
'viewmode'
|
|
25
|
+
'viewmode',
|
|
26
26
|
];
|
|
27
27
|
/** @type {Object} controls will be switch over "this.minimumControls" */
|
|
28
28
|
this.maximumControls = [
|
|
29
|
-
'book_left', 'book_right', 'zoom_in', 'zoom_out', 'onepg', 'twopg', 'thumb'
|
|
29
|
+
'book_left', 'book_right', 'zoom_in', 'zoom_out', 'onepg', 'twopg', 'thumb',
|
|
30
30
|
];
|
|
31
31
|
|
|
32
32
|
this.updateNavIndexThrottled = throttle(this.updateNavIndex.bind(this), 250, false);
|
|
@@ -115,7 +115,7 @@ export class Navbar {
|
|
|
115
115
|
this.updateViewModeButton(
|
|
116
116
|
$button,
|
|
117
117
|
currentViewModeButton.className,
|
|
118
|
-
currentViewModeButton.title
|
|
118
|
+
currentViewModeButton.title,
|
|
119
119
|
);
|
|
120
120
|
});
|
|
121
121
|
}
|
|
@@ -218,7 +218,7 @@ export class Navbar {
|
|
|
218
218
|
min: 0,
|
|
219
219
|
max: br.book.getNumLeafs() - 1,
|
|
220
220
|
value: br.currentIndex(),
|
|
221
|
-
range: "min"
|
|
221
|
+
range: "min",
|
|
222
222
|
});
|
|
223
223
|
|
|
224
224
|
$slider.on('slide', (event, ui) => {
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
/** @type {ReduceSet} */
|
|
8
8
|
export const IntegerReduceSet = {
|
|
9
9
|
floor: Math.floor,
|
|
10
|
-
decr(n) { return n - 1; }
|
|
10
|
+
decr(n) { return n - 1; },
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
/** @type {ReduceSet} */
|
|
@@ -17,7 +17,7 @@ export const Pow2ReduceSet = {
|
|
|
17
17
|
},
|
|
18
18
|
decr(n) {
|
|
19
19
|
return 2 ** (Math.log2(n) - 1);
|
|
20
|
-
}
|
|
20
|
+
},
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
export const NAMED_REDUCE_SETS = {
|
|
@@ -53,7 +53,7 @@ export class Toolbar {
|
|
|
53
53
|
$('<a>')
|
|
54
54
|
.attr({href: br.bookUrl, title: br.bookUrlTitle})
|
|
55
55
|
.addClass('BRreturn')
|
|
56
|
-
.html(br.bookUrlText || br.bookTitle)
|
|
56
|
+
.html(br.bookUrlText || br.bookTitle),
|
|
57
57
|
);
|
|
58
58
|
} else if (br.bookTitle) {
|
|
59
59
|
$titleSectionEl.append(br.bookUrlText || br.bookTitle);
|
|
@@ -113,7 +113,7 @@ export class Toolbar {
|
|
|
113
113
|
onLoad: () => {
|
|
114
114
|
br.trigger(EVENTS.stop);
|
|
115
115
|
br.$('.BRpageviewValue').val(window.location.href);
|
|
116
|
-
}
|
|
116
|
+
},
|
|
117
117
|
});
|
|
118
118
|
br.$('.info').colorbox({
|
|
119
119
|
inline: true,
|
|
@@ -121,7 +121,7 @@ export class Toolbar {
|
|
|
121
121
|
href: br.$('.BRinfo'),
|
|
122
122
|
onLoad: () => {
|
|
123
123
|
br.trigger(EVENTS.stop);
|
|
124
|
-
}
|
|
124
|
+
},
|
|
125
125
|
});
|
|
126
126
|
}
|
|
127
127
|
|
|
@@ -213,7 +213,7 @@ export class Toolbar {
|
|
|
213
213
|
$form.find('.twitter-share-button').on("click", () => {
|
|
214
214
|
const params = $.param({
|
|
215
215
|
url: this._getSocialShareUrl(),
|
|
216
|
-
text: br.bookTitle
|
|
216
|
+
text: br.bookTitle,
|
|
217
217
|
});
|
|
218
218
|
const url = 'https://twitter.com/intent/tweet?' + params;
|
|
219
219
|
createPopup(url, 600, 400, 'Share');
|
|
@@ -65,7 +65,7 @@ export const DEFAULT_OPTIONS = {
|
|
|
65
65
|
{reduce: 2, autofit: null},
|
|
66
66
|
{reduce: 3, autofit: null},
|
|
67
67
|
{reduce: 4, autofit: null},
|
|
68
|
-
{reduce: 6, autofit: null}
|
|
68
|
+
{reduce: 6, autofit: null},
|
|
69
69
|
],
|
|
70
70
|
|
|
71
71
|
/** Object to hold parameters related to 1up mode */
|
|
@@ -83,7 +83,7 @@ export const DEFAULT_OPTIONS = {
|
|
|
83
83
|
/** Width of book spine $$$ consider sizing based on book length */
|
|
84
84
|
bookSpineDivWidth: 64,
|
|
85
85
|
/** @type {AutoFitValues} */
|
|
86
|
-
autofit: 'auto'
|
|
86
|
+
autofit: 'auto',
|
|
87
87
|
},
|
|
88
88
|
|
|
89
89
|
onePageMinBreakpoint: 800,
|
|
@@ -225,31 +225,31 @@ export const DEFAULT_OPTIONS = {
|
|
|
225
225
|
visible: true,
|
|
226
226
|
label: 'Flip left',
|
|
227
227
|
className: 'book_left',
|
|
228
|
-
iconClassName: 'left-arrow'
|
|
228
|
+
iconClassName: 'left-arrow',
|
|
229
229
|
},
|
|
230
230
|
bookRight: {
|
|
231
231
|
visible: true,
|
|
232
232
|
label: 'Flip right',
|
|
233
233
|
className: 'book_right',
|
|
234
|
-
iconClassName: 'left-arrow hflip'
|
|
234
|
+
iconClassName: 'left-arrow hflip',
|
|
235
235
|
},
|
|
236
236
|
onePage: {
|
|
237
237
|
visible: true,
|
|
238
238
|
label: 'One-page view',
|
|
239
239
|
className: 'onepg',
|
|
240
|
-
iconClassName: 'onepg'
|
|
240
|
+
iconClassName: 'onepg',
|
|
241
241
|
},
|
|
242
242
|
twoPage: {
|
|
243
243
|
visible: true,
|
|
244
244
|
label: 'Two-page view',
|
|
245
245
|
className: 'twopg',
|
|
246
|
-
iconClassName: 'twopg'
|
|
246
|
+
iconClassName: 'twopg',
|
|
247
247
|
},
|
|
248
248
|
thumbnail: {
|
|
249
249
|
visible: true,
|
|
250
250
|
label: 'Thumbnail view',
|
|
251
251
|
className: 'thumb',
|
|
252
|
-
iconClassName: 'thumb'
|
|
252
|
+
iconClassName: 'thumb',
|
|
253
253
|
},
|
|
254
254
|
viewmode: {
|
|
255
255
|
visible: true,
|
|
@@ -260,19 +260,19 @@ export const DEFAULT_OPTIONS = {
|
|
|
260
260
|
visible: true,
|
|
261
261
|
label: 'Zoom out',
|
|
262
262
|
className: 'zoom_out',
|
|
263
|
-
iconClassName: 'magnify'
|
|
263
|
+
iconClassName: 'magnify',
|
|
264
264
|
},
|
|
265
265
|
zoomIn: {
|
|
266
266
|
visible: true,
|
|
267
267
|
label: 'Zoom in',
|
|
268
268
|
className: 'zoom_in',
|
|
269
|
-
iconClassName: 'magnify plus'
|
|
269
|
+
iconClassName: 'magnify plus',
|
|
270
270
|
},
|
|
271
271
|
fullScreen: {
|
|
272
272
|
visible: true,
|
|
273
273
|
label: 'Toggle fullscreen',
|
|
274
274
|
className: 'full',
|
|
275
|
-
iconClassName: 'fullscreen'
|
|
275
|
+
iconClassName: 'fullscreen',
|
|
276
276
|
},
|
|
277
277
|
},
|
|
278
278
|
|