@internetarchive/bookreader 5.0.0-11-multiple-files → 5.0.0-110
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/474.js +2 -0
- package/BookReader/474.js.map +1 -0
- package/BookReader/BookReader.css +616 -1467
- package/BookReader/BookReader.js +2 -21564
- package/BookReader/BookReader.js.LICENSE.txt +20 -20
- package/BookReader/BookReader.js.map +1 -1
- package/BookReader/bergamot-translator-worker.js +2966 -0
- package/BookReader/bergamot-translator-worker.wasm +0 -0
- package/BookReader/hypothesis/LICENSE +50 -0
- package/BookReader/hypothesis/README.md +55 -0
- package/BookReader/hypothesis/build/boot.js +1 -0
- package/BookReader/hypothesis/build/manifest.json +20 -0
- package/BookReader/hypothesis/build/scripts/annotator.bundle.js +184 -0
- package/BookReader/hypothesis/build/scripts/annotator.bundle.js.map +1 -0
- package/BookReader/hypothesis/build/scripts/sidebar.bundle.js +798 -0
- package/BookReader/hypothesis/build/scripts/sidebar.bundle.js.map +1 -0
- package/BookReader/hypothesis/build/scripts/ui-playground.bundle.js +711 -0
- package/BookReader/hypothesis/build/scripts/ui-playground.bundle.js.map +1 -0
- package/BookReader/hypothesis/build/styles/annotator.css +2235 -0
- package/BookReader/hypothesis/build/styles/annotator.css.map +1 -0
- package/BookReader/hypothesis/build/styles/fonts/KaTeX_AMS-Regular.woff2 +0 -0
- package/BookReader/hypothesis/build/styles/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
- package/BookReader/hypothesis/build/styles/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
- package/BookReader/hypothesis/build/styles/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
- package/BookReader/hypothesis/build/styles/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
- package/BookReader/hypothesis/build/styles/fonts/KaTeX_Main-Bold.woff2 +0 -0
- package/BookReader/hypothesis/build/styles/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
- package/BookReader/hypothesis/build/styles/fonts/KaTeX_Main-Italic.woff2 +0 -0
- package/BookReader/hypothesis/build/styles/fonts/KaTeX_Main-Regular.woff2 +0 -0
- package/BookReader/hypothesis/build/styles/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
- package/BookReader/hypothesis/build/styles/fonts/KaTeX_Math-Italic.woff2 +0 -0
- package/BookReader/hypothesis/build/styles/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
- package/BookReader/hypothesis/build/styles/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
- package/BookReader/hypothesis/build/styles/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
- package/BookReader/hypothesis/build/styles/fonts/KaTeX_Script-Regular.woff2 +0 -0
- package/BookReader/hypothesis/build/styles/fonts/KaTeX_Size1-Regular.woff2 +0 -0
- package/BookReader/hypothesis/build/styles/fonts/KaTeX_Size2-Regular.woff2 +0 -0
- package/BookReader/hypothesis/build/styles/fonts/KaTeX_Size3-Regular.woff2 +0 -0
- package/BookReader/hypothesis/build/styles/fonts/KaTeX_Size4-Regular.woff2 +0 -0
- package/BookReader/hypothesis/build/styles/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
- package/BookReader/hypothesis/build/styles/highlights.css +2 -0
- package/BookReader/hypothesis/build/styles/highlights.css.map +1 -0
- package/BookReader/hypothesis/build/styles/katex.min.css +2 -0
- package/BookReader/hypothesis/build/styles/katex.min.css.map +1 -0
- package/BookReader/hypothesis/build/styles/pdfjs-overrides.css +2 -0
- package/BookReader/hypothesis/build/styles/pdfjs-overrides.css.map +1 -0
- package/BookReader/hypothesis/build/styles/sidebar.css +2731 -0
- package/BookReader/hypothesis/build/styles/sidebar.css.map +1 -0
- package/BookReader/hypothesis/build/styles/ui-playground.css +2659 -0
- package/BookReader/hypothesis/build/styles/ui-playground.css.map +1 -0
- package/BookReader/hypothesis/package.json +126 -0
- package/BookReader/ia-bookreader-bundle.js +1907 -0
- package/BookReader/ia-bookreader-bundle.js.LICENSE.txt +19 -0
- package/BookReader/ia-bookreader-bundle.js.map +1 -0
- package/BookReader/icons/1up.svg +1 -12
- package/BookReader/icons/2up.svg +1 -15
- package/BookReader/icons/advance.svg +3 -26
- package/BookReader/icons/chevron-right.svg +1 -1
- package/BookReader/icons/close-circle-dark.svg +1 -0
- package/BookReader/icons/close-circle.svg +1 -1
- package/BookReader/icons/fullscreen.svg +1 -17
- package/BookReader/icons/fullscreen_exit.svg +1 -17
- package/BookReader/icons/hamburger.svg +1 -15
- package/BookReader/icons/left-arrow.svg +1 -12
- package/BookReader/icons/magnify-minus.svg +1 -16
- package/BookReader/icons/magnify-plus.svg +1 -17
- package/BookReader/icons/magnify.svg +1 -15
- package/BookReader/icons/pause.svg +1 -23
- package/BookReader/icons/play.svg +1 -22
- package/BookReader/icons/playback-speed.svg +1 -34
- package/BookReader/icons/read-aloud.svg +1 -22
- package/BookReader/icons/review.svg +3 -22
- package/BookReader/icons/slider-toggle.svg +1 -0
- package/BookReader/icons/thumbnails.svg +1 -17
- package/BookReader/icons/voice.svg +1 -0
- package/BookReader/icons/volume-full.svg +1 -22
- package/BookReader/images/BRicons.svg +5 -94
- package/BookReader/images/books_graphic.svg +1 -177
- package/BookReader/images/hypothesis.ico +0 -0
- package/BookReader/images/icon_book.svg +1 -12
- package/BookReader/images/icon_bookmark.svg +1 -12
- package/BookReader/images/icon_experiment.svg +1 -0
- package/BookReader/images/icon_gear.svg +1 -14
- package/BookReader/images/icon_hamburger.svg +1 -20
- package/BookReader/images/icon_home.svg +1 -21
- package/BookReader/images/icon_info.svg +1 -11
- package/BookReader/images/icon_one_page.svg +1 -8
- package/BookReader/images/icon_pause.svg +1 -1
- package/BookReader/images/icon_play.svg +1 -1
- package/BookReader/images/icon_playback-rate.svg +1 -15
- package/BookReader/images/icon_search_button.svg +1 -8
- package/BookReader/images/icon_share.svg +1 -9
- package/BookReader/images/icon_skip-ahead.svg +1 -6
- package/BookReader/images/icon_skip-back.svg +2 -13
- package/BookReader/images/icon_speaker.svg +1 -18
- package/BookReader/images/icon_speaker_open.svg +1 -10
- package/BookReader/images/icon_thumbnails.svg +1 -12
- package/BookReader/images/icon_toc.svg +1 -5
- package/BookReader/images/icon_two_pages.svg +1 -9
- package/BookReader/images/marker_chap-off.svg +1 -11
- package/BookReader/images/marker_chap-on.svg +1 -11
- package/BookReader/images/marker_srch-on.svg +1 -11
- package/BookReader/images/translate.svg +1 -0
- package/BookReader/images/unviewable_page.png +0 -0
- package/BookReader/jquery-3.js +2 -0
- package/BookReader/jquery-3.js.LICENSE.txt +24 -0
- package/BookReader/plugins/plugin.archive_analytics.js +1 -172
- package/BookReader/plugins/plugin.archive_analytics.js.map +1 -1
- package/BookReader/plugins/plugin.autoplay.js +1 -165
- package/BookReader/plugins/plugin.autoplay.js.map +1 -1
- package/BookReader/plugins/plugin.chapters.js +19 -301
- package/BookReader/plugins/plugin.chapters.js.LICENSE.txt +1 -0
- package/BookReader/plugins/plugin.chapters.js.map +1 -1
- package/BookReader/plugins/plugin.experiments.js +3 -0
- package/BookReader/plugins/plugin.experiments.js.LICENSE.txt +1 -0
- package/BookReader/plugins/plugin.experiments.js.map +1 -0
- package/BookReader/plugins/plugin.iframe.js +1 -74
- package/BookReader/plugins/plugin.iframe.js.map +1 -1
- package/BookReader/plugins/plugin.iiif.js +2 -0
- package/BookReader/plugins/plugin.iiif.js.map +1 -0
- package/BookReader/plugins/plugin.resume.js +1 -368
- package/BookReader/plugins/plugin.resume.js.map +1 -1
- package/BookReader/plugins/plugin.search.js +2 -1420
- package/BookReader/plugins/plugin.search.js.LICENSE.txt +1 -0
- package/BookReader/plugins/plugin.search.js.map +1 -1
- package/BookReader/plugins/plugin.text_selection.js +2 -1080
- package/BookReader/plugins/plugin.text_selection.js.LICENSE.txt +1 -0
- package/BookReader/plugins/plugin.text_selection.js.map +1 -1
- package/BookReader/plugins/plugin.translate.js +137 -0
- package/BookReader/plugins/plugin.translate.js.LICENSE.txt +1 -0
- package/BookReader/plugins/plugin.translate.js.map +1 -0
- package/BookReader/plugins/plugin.tts.js +2 -9193
- package/BookReader/plugins/plugin.tts.js.LICENSE.txt +2 -0
- package/BookReader/plugins/plugin.tts.js.map +1 -1
- package/BookReader/plugins/plugin.url.js +1 -269
- package/BookReader/plugins/plugin.url.js.map +1 -1
- package/BookReader/plugins/plugin.vendor-fullscreen.js +1 -379
- package/BookReader/plugins/plugin.vendor-fullscreen.js.map +1 -1
- package/BookReader/plugins/translator-worker.js +2 -0
- package/BookReader/plugins/translator-worker.js.map +1 -0
- package/BookReader/silence.mp3 +0 -0
- package/BookReader/translator-worker.js +475 -0
- package/BookReader/webcomponents-bundle.js +3 -0
- package/BookReader/webcomponents-bundle.js.LICENSE.txt +9 -0
- package/BookReader/webcomponents-bundle.js.map +1 -0
- package/README.md +14 -3
- package/jsconfig.json +19 -0
- package/package.json +92 -70
- package/src/BookReader/BookModel.js +92 -46
- package/src/BookReader/DragScrollable.js +233 -0
- package/src/BookReader/ImageCache.js +49 -16
- package/src/BookReader/Mode1Up.js +66 -356
- package/src/BookReader/Mode1UpLit.js +392 -0
- package/src/BookReader/Mode2Up.js +87 -1315
- package/src/BookReader/Mode2UpLit.js +788 -0
- package/src/BookReader/ModeAbstract.js +43 -0
- package/src/BookReader/ModeCoordinateSpace.js +29 -0
- package/src/BookReader/ModeSmoothZoom.js +312 -0
- package/src/BookReader/ModeThumb.js +30 -16
- package/src/BookReader/Navbar/Navbar.js +201 -76
- package/src/BookReader/PageContainer.js +120 -23
- package/src/BookReader/ReduceSet.js +3 -3
- package/src/BookReader/Toolbar/Toolbar.js +19 -41
- package/src/BookReader/events.js +3 -3
- package/src/BookReader/options.js +94 -17
- package/src/BookReader/utils/HTMLDimensionsCacher.js +44 -0
- package/src/BookReader/utils/ScrollClassAdder.js +31 -0
- package/src/BookReader/utils/SelectionObserver.js +45 -0
- package/src/BookReader/utils/classes.js +1 -1
- package/src/BookReader/utils.js +141 -13
- package/src/BookReader.js +711 -1241
- package/src/BookReaderPlugin.js +52 -0
- package/src/assets/icons/close-circle-dark.svg +1 -0
- package/src/assets/icons/magnify-minus.svg +3 -7
- package/src/assets/icons/magnify-plus.svg +3 -7
- package/src/assets/icons/slider-toggle.svg +1 -0
- package/src/assets/icons/voice.svg +1 -0
- package/src/assets/images/hypothesis.ico +0 -0
- package/src/assets/images/icon_experiment.svg +1 -0
- package/src/assets/images/translate.svg +1 -0
- package/src/assets/images/unviewable_page.png +0 -0
- package/src/assets/silence.mp3 +0 -0
- package/src/css/BookReader.scss +1 -17
- package/src/css/_BRBookmarks.scss +1 -1
- package/src/css/_BRComponent.scss +1 -1
- package/src/css/_BRicon.scss +8 -2
- package/src/css/_BRmain.scss +33 -27
- package/src/css/_BRnav.scss +74 -70
- package/src/css/_BRpages.scss +171 -42
- package/src/css/_BRsearch.scss +69 -235
- package/src/css/_BRtoolbar.scss +5 -5
- package/src/css/_TextSelection.scss +129 -24
- package/src/css/_colorbox.scss +2 -2
- package/src/css/_controls.scss +24 -7
- package/src/css/_icons.scss +14 -1
- package/src/{BookNavigator/assets → css}/button-base.js +10 -3
- package/src/css/icon_checkmark.js +9 -0
- package/src/css/sharedStyles.js +15 -0
- package/src/ia-bookreader/downloads/downloads-provider.js +81 -0
- package/src/{BookNavigator → ia-bookreader}/downloads/downloads.js +29 -25
- package/src/ia-bookreader/ia-bookreader.js +666 -0
- package/src/ia-bookreader/sharing.js +27 -0
- package/src/ia-bookreader/viewable-files.js +98 -0
- package/src/{BookNavigator → ia-bookreader}/visual-adjustments/visual-adjustments-provider.js +17 -17
- package/src/{BookNavigator → ia-bookreader}/visual-adjustments/visual-adjustments.js +75 -67
- package/src/{BookNavigator → plugins}/bookmarks/bookmark-button.js +4 -3
- package/src/{BookNavigator/assets → plugins/bookmarks}/bookmark-colors.js +1 -1
- package/src/{BookNavigator → plugins}/bookmarks/bookmark-edit.js +44 -32
- package/src/{BookNavigator → plugins}/bookmarks/bookmarks-list.js +48 -49
- package/src/{BookNavigator → plugins}/bookmarks/bookmarks-loginCTA.js +5 -10
- package/src/plugins/bookmarks/bookmarks-provider.js +63 -0
- package/src/{BookNavigator → plugins/bookmarks}/delete-modal-actions.js +1 -1
- package/src/{BookNavigator → plugins}/bookmarks/ia-bookmarks.js +117 -68
- package/src/plugins/plugin.archive_analytics.js +84 -78
- package/src/plugins/plugin.autoplay.js +99 -104
- package/src/plugins/plugin.chapters.js +310 -201
- package/src/plugins/plugin.experiments.js +321 -0
- package/src/plugins/plugin.iframe.js +1 -1
- package/src/plugins/plugin.iiif.js +141 -0
- package/src/plugins/plugin.resume.js +53 -50
- package/src/plugins/plugin.text_selection.js +522 -219
- package/src/plugins/plugin.vendor-fullscreen.js +7 -7
- package/src/plugins/search/plugin.search.js +380 -360
- package/src/{BookNavigator → plugins}/search/search-provider.js +94 -32
- package/src/{BookNavigator → plugins}/search/search-results.js +108 -90
- package/src/plugins/search/utils.js +50 -0
- package/src/plugins/search/view.js +79 -210
- package/src/plugins/translate/TranslationManager.js +164 -0
- package/src/plugins/translate/plugin.translate.js +512 -0
- package/src/plugins/tts/AbstractTTSEngine.js +78 -49
- package/src/plugins/tts/FestivalTTSEngine.js +21 -31
- package/src/plugins/tts/PageChunk.js +33 -21
- package/src/plugins/tts/PageChunkIterator.js +11 -17
- package/src/plugins/tts/WebTTSEngine.js +131 -91
- package/src/plugins/tts/plugin.tts.js +345 -350
- package/src/plugins/tts/utils.js +77 -49
- package/src/plugins/url/UrlPlugin.js +191 -0
- package/src/plugins/{plugin.url.js → url/plugin.url.js} +47 -18
- package/src/util/TextSelectionManager.js +282 -0
- package/src/util/browserSniffing.js +33 -1
- package/src/util/cache.js +20 -0
- package/src/util/docCookies.js +21 -2
- package/src/util/lit.js +15 -0
- package/src/util/strings.js +1 -0
- package/.babelrc +0 -12
- package/.dependabot/config.yml +0 -6
- package/.eslintrc.js +0 -49
- package/.gitattributes +0 -2
- package/.github/ISSUE_TEMPLATE/bug.md +0 -32
- package/.github/ISSUE_TEMPLATE/feature-request.md +0 -30
- package/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md +0 -15
- package/.github/workflows/node.js.yml +0 -28
- package/.github/workflows/npm-publish.yml +0 -47
- package/.testcaferc.json +0 -5
- package/BookReader/bookreader-component-bundle.js +0 -14330
- package/BookReader/bookreader-component-bundle.js.LICENSE.txt +0 -38
- package/BookReader/bookreader-component-bundle.js.map +0 -1
- package/BookReader/icons/sort-ascending.svg +0 -1
- package/BookReader/icons/sort-descending.svg +0 -1
- package/BookReader/jquery-1.10.1.js +0 -108
- package/BookReader/jquery-1.10.1.js.LICENSE.txt +0 -24
- package/BookReader/plugins/plugin.menu_toggle.js +0 -369
- package/BookReader/plugins/plugin.menu_toggle.js.map +0 -1
- package/BookReader/plugins/plugin.mobile_nav.js +0 -335
- package/BookReader/plugins/plugin.mobile_nav.js.map +0 -1
- package/BookReaderDemo/BookReaderDemo.css +0 -41
- package/BookReaderDemo/BookReaderJSAdvanced.js +0 -115
- package/BookReaderDemo/BookReaderJSAutoplay.js +0 -56
- package/BookReaderDemo/BookReaderJSSimple.js +0 -55
- package/BookReaderDemo/IIIFBookReader.js +0 -207
- package/BookReaderDemo/assets/v5/Bookreader-logo-cool-grad.svg +0 -1
- package/BookReaderDemo/assets/v5/Bookreader-logo-flat.svg +0 -1
- package/BookReaderDemo/assets/v5/Bookreader-logo-hex-cool-grad.png +0 -0
- package/BookReaderDemo/assets/v5/Bookreader-logo-hex-flat.png +0 -0
- package/BookReaderDemo/assets/v5/Bookreader-logo-lines.png +0 -0
- package/BookReaderDemo/assets/v5/Bookreader-logo-lines.svg +0 -1
- package/BookReaderDemo/assets/v5/Bookreader-logo-warm.svg +0 -1
- package/BookReaderDemo/assets/v5/bookreader-logo-renders@1x.png +0 -0
- package/BookReaderDemo/assets/v5/bookreader-logo-renders@2x.png +0 -0
- package/BookReaderDemo/assets/v5/bookreader-v5-screenshot.png +0 -0
- package/BookReaderDemo/bookreader-template-bundle.js +0 -7178
- package/BookReaderDemo/demo-advanced.html +0 -33
- package/BookReaderDemo/demo-autoplay.html +0 -38
- package/BookReaderDemo/demo-embed-iframe-src.html +0 -84
- package/BookReaderDemo/demo-embed.html +0 -26
- package/BookReaderDemo/demo-fullscreen-mobile.html +0 -36
- package/BookReaderDemo/demo-fullscreen.html +0 -33
- package/BookReaderDemo/demo-iiif.html +0 -34
- package/BookReaderDemo/demo-iiif.js +0 -26
- package/BookReaderDemo/demo-internetarchive.html +0 -74
- package/BookReaderDemo/demo-multiple.html +0 -43
- package/BookReaderDemo/demo-plugin-menu-toggle.html +0 -34
- package/BookReaderDemo/demo-preview-pages.html +0 -1092
- package/BookReaderDemo/demo-simple.html +0 -34
- package/BookReaderDemo/demo-vendor-fullscreen.html +0 -36
- package/BookReaderDemo/immersion-1up.html +0 -64
- package/BookReaderDemo/immersion-mode.html +0 -35
- package/BookReaderDemo/toggle_controls.html +0 -53
- package/BookReaderDemo/view_mode.html +0 -39
- package/BookReaderDemo/viewmode-cycle.html +0 -41
- package/CHANGELOG.md +0 -476
- package/CONTRIBUTING.md +0 -7
- package/codecov.yml +0 -17
- package/index.html +0 -31
- package/karma.conf.js +0 -23
- package/screenshot.png +0 -0
- package/scripts/postversion.js +0 -10
- package/scripts/preversion.js +0 -14
- package/scripts/version.js +0 -26
- package/src/BookNavigator/BookModel.js +0 -14
- package/src/BookNavigator/BookNavigator.js +0 -451
- package/src/BookNavigator/assets/book-loader.js +0 -27
- package/src/BookNavigator/assets/icon_checkmark.js +0 -6
- package/src/BookNavigator/assets/icon_close.js +0 -3
- package/src/BookNavigator/assets/icon_sort_ascending.js +0 -5
- package/src/BookNavigator/assets/icon_sort_descending.js +0 -5
- package/src/BookNavigator/bookmarks/bookmarks-provider.js +0 -53
- package/src/BookNavigator/br-fullscreen-mgr.js +0 -83
- package/src/BookNavigator/downloads/downloads-provider.js +0 -66
- package/src/BookNavigator/search/a-search-result.js +0 -55
- package/src/BookNavigator/volumes/volumes-provider.js +0 -75
- package/src/BookNavigator/volumes/volumes.js +0 -161
- package/src/BookReader/DebugConsole.js +0 -54
- package/src/BookReaderComponent/BookReaderComponent.js +0 -112
- package/src/ItemNavigator/ItemNavigator.js +0 -372
- package/src/ItemNavigator/providers/sharing.js +0 -29
- package/src/assets/icons/sort-ascending.svg +0 -1
- package/src/assets/icons/sort-descending.svg +0 -1
- package/src/css/_MobileNav.scss +0 -194
- package/src/dragscrollable-br.js +0 -261
- package/src/plugins/menu_toggle/plugin.menu_toggle.js +0 -324
- package/src/plugins/plugin.mobile_nav.js +0 -287
- package/tests/BookReader/BookModel.test.js +0 -312
- package/tests/BookReader/BookReaderPublicFunctions.test.js +0 -171
- package/tests/BookReader/DebugConsole.test.js +0 -25
- package/tests/BookReader/ImageCache.test.js +0 -150
- package/tests/BookReader/Mode1Up.test.js +0 -164
- package/tests/BookReader/Mode2Up.test.js +0 -247
- package/tests/BookReader/Navbar/Navbar.test.js +0 -169
- package/tests/BookReader/PageContainer.test.js +0 -115
- package/tests/BookReader/ReduceSet.test.js +0 -38
- package/tests/BookReader/Toolbar/Toolbar.test.js +0 -26
- package/tests/BookReader/utils/classes.test.js +0 -88
- package/tests/BookReader/utils.test.js +0 -109
- package/tests/BookReader.options.test.js +0 -39
- package/tests/BookReader.test.js +0 -301
- package/tests/e2e/README.md +0 -75
- package/tests/e2e/autoplay.test.js +0 -13
- package/tests/e2e/base.test.js +0 -35
- package/tests/e2e/helpers/base.js +0 -258
- package/tests/e2e/helpers/debug.js +0 -13
- package/tests/e2e/helpers/desktopSearch.js +0 -72
- package/tests/e2e/helpers/mobileSearch.js +0 -85
- package/tests/e2e/helpers/mockSearch.js +0 -93
- package/tests/e2e/helpers/rightToLeft.js +0 -29
- package/tests/e2e/ia-production/ia-prod-base.js +0 -17
- package/tests/e2e/models/BookReader.js +0 -11
- package/tests/e2e/models/Navigation.js +0 -56
- package/tests/e2e/rightToLeft.test.js +0 -20
- package/tests/e2e/viewmode.test.js +0 -37
- package/tests/karma/BookNavigator/book-navigator.test.js +0 -132
- package/tests/karma/BookNavigator/bookmarks/bookmark-edit.test.js +0 -133
- package/tests/karma/BookNavigator/bookmarks/bookmarks-list.test.js +0 -222
- package/tests/karma/BookNavigator/search-results.test.js +0 -240
- package/tests/karma/BookNavigator/visual-adjustments.test.js +0 -201
- package/tests/karma/BookNavigator/volumes.test.js +0 -133
- package/tests/plugins/menu_toggle/plugin.menu_toggle.test.js +0 -68
- package/tests/plugins/plugin.archive_analytics.test.js +0 -23
- package/tests/plugins/plugin.autoplay.test.js +0 -52
- package/tests/plugins/plugin.chapters.test.js +0 -130
- package/tests/plugins/plugin.iframe.test.js +0 -42
- package/tests/plugins/plugin.mobile_nav.test.js +0 -66
- package/tests/plugins/plugin.resume.test.js +0 -98
- package/tests/plugins/plugin.text_selection.test.js +0 -203
- package/tests/plugins/plugin.url.test.js +0 -129
- package/tests/plugins/plugin.vendor-fullscreen.test.js +0 -65
- package/tests/plugins/search/plugin.search.test.js +0 -166
- package/tests/plugins/search/plugin.search.view.test.js +0 -106
- package/tests/plugins/tts/AbstractTTSEngine.test.js +0 -153
- package/tests/plugins/tts/FestivalTTSEngine.test.js +0 -59
- package/tests/plugins/tts/PageChunk.test.js +0 -57
- package/tests/plugins/tts/PageChunkIterator.test.js +0 -179
- package/tests/plugins/tts/WebTTSEngine.test.js +0 -126
- package/tests/plugins/tts/utils.test.js +0 -133
- package/tests/util/browserSniffing.test.js +0 -56
- package/tests/util/docCookies.test.js +0 -15
- package/tests/util/strings.test.js +0 -63
- package/tests/utils.js +0 -42
- package/webpack.config.js +0 -86
|
@@ -1,35 +1,97 @@
|
|
|
1
|
-
.
|
|
2
|
-
|
|
1
|
+
.BRtextLayer, .BRtranslateLayer {
|
|
2
|
+
z-index: 2;
|
|
3
3
|
position: absolute;
|
|
4
|
-
height: 100%;
|
|
5
4
|
top: 0;
|
|
6
5
|
left: 0;
|
|
7
|
-
|
|
6
|
+
color: transparent;
|
|
7
|
+
transform-origin: 0 0;
|
|
8
|
+
// Make it so right-clicking on "blank" part of text layer sends events to the image (for saving)
|
|
8
9
|
pointer-events: none;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
cursor: text;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.BRtextLayer {
|
|
14
|
+
mix-blend-mode: multiply;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.BRtranslateLayer {
|
|
18
|
+
hyphens: auto;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.BRparagraphElement {
|
|
22
|
+
margin: 0;
|
|
23
|
+
cursor: text;
|
|
24
|
+
font-family: Georgia, serif;
|
|
25
|
+
line-height: 0;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.BRlineElement {
|
|
29
|
+
pointer-events: all;
|
|
30
|
+
white-space: nowrap;
|
|
31
|
+
display: inline-block;
|
|
32
|
+
|
|
33
|
+
// We use display: inline-block, otherwise this causes every line
|
|
34
|
+
// to have newlines at the end in safari. BUT, since they're inline,
|
|
35
|
+
// if the OCR has to short line in the same paragraph, they can wrap
|
|
36
|
+
// and one can go onto the other. This adds an arbitrary margin to
|
|
37
|
+
// the right of each line, forcing things to wrap.
|
|
38
|
+
// See eg https://www-drini.archive.org/details/countofmontecris00duma_7/page/261/mode/2up
|
|
39
|
+
// Page 261, second last line on the page.
|
|
40
|
+
.BRtextLayer[dir=ltr] & { margin-right: 100%; }
|
|
41
|
+
.BRtextLayer[dir=rtl] & { margin-left: 100%; }
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Highlight colors for text selection layer
|
|
45
|
+
.BRwordElement, .BRspace, .BRparagraphElement, .BRparagraphElement br {
|
|
46
|
+
// these 2 properties do not work if joined
|
|
47
|
+
&::selection {
|
|
17
48
|
background: hsla(210, 74%, 62%, 0.4);
|
|
18
49
|
}
|
|
19
|
-
|
|
50
|
+
|
|
51
|
+
&::-moz-selection {
|
|
20
52
|
background: hsla(210, 74%, 62%, 0.4);
|
|
21
|
-
color:
|
|
53
|
+
color:transparent;
|
|
22
54
|
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// Style URI TextFragments, eg #:~:text=example
|
|
58
|
+
.BRtextLayer ::target-text {
|
|
59
|
+
// Similar colour to the default one used in Safari, Firefox. Note Chrome uses a purple colour
|
|
60
|
+
background-color: hsla(45, 80%, 66%, 0.6);
|
|
61
|
+
color: transparent;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.BRtranslateLayer ::selection {
|
|
65
|
+
background: hsla(210, 74%, 62%, 0.4);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.BRtranslateLayer ::-moz-selection {
|
|
69
|
+
background: hsla(210, 74%, 62%, 0.4);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.BRparagraphElement br {
|
|
73
|
+
visibility: hidden;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// Use CSS pseudo-elements to render the hyphens. This makes them
|
|
77
|
+
// not selectable, so copy/pasting text doesn't include them.
|
|
78
|
+
.BRwordElement--hyphen::after {
|
|
79
|
+
content: "-";
|
|
80
|
+
}
|
|
23
81
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
font-family: Georgia, serif;
|
|
82
|
+
// Hide text layer for performance during zooming & scrolling
|
|
83
|
+
.BRsmooth-zooming, .BRscrolling-active {
|
|
84
|
+
// If the text layer has an annotation, don't hide it
|
|
85
|
+
.BRpagecontainer:not(.BRpagecontainer--hasSelection):not(:has(hypothesis-highlight)) .BRtextLayer {
|
|
86
|
+
display: none;
|
|
30
87
|
}
|
|
31
88
|
}
|
|
32
89
|
|
|
90
|
+
// Hide text selection layers of off-screen pages
|
|
91
|
+
.BRmode1up .BRpagecontainer:not(.BRpage-visible) .BRtextLayer {
|
|
92
|
+
display: none;
|
|
93
|
+
}
|
|
94
|
+
|
|
33
95
|
// Makes page image unselectable
|
|
34
96
|
.BRpagecontainer img {
|
|
35
97
|
-webkit-user-select: none;
|
|
@@ -37,12 +99,55 @@
|
|
|
37
99
|
user-select: none;
|
|
38
100
|
}
|
|
39
101
|
|
|
40
|
-
|
|
41
|
-
|
|
102
|
+
|
|
103
|
+
// These are Microsoft Edge specific fixed to make some of the
|
|
104
|
+
// browsers features work well. These are for the in-place
|
|
105
|
+
// translation.
|
|
106
|
+
.BRtextLayer:has([_istranslated="1"], msreadoutspan) {
|
|
107
|
+
mix-blend-mode: normal;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.BRwordElement, .BRspace {
|
|
111
|
+
&[_istranslated="1"], &[_msttexthash] {
|
|
112
|
+
color: black;
|
|
113
|
+
letter-spacing: unset !important;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.BRlineElement:has([_istranslated="1"], [_msttexthash]) {
|
|
118
|
+
background: rgba(248, 237, 192, 0.8);
|
|
119
|
+
backdrop-filter: blur(8px);
|
|
120
|
+
color: black;
|
|
121
|
+
text-align: justify;
|
|
122
|
+
width: inherit;
|
|
123
|
+
&:not(:nth-last-child(2)) {
|
|
124
|
+
text-align-last: justify;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.BRlineElement[_msttexthash] {
|
|
129
|
+
word-spacing: unset !important;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.BRtranslateLayer .BRparagraphElement {
|
|
133
|
+
pointer-events: auto;
|
|
134
|
+
overflow-y: auto;
|
|
135
|
+
background: rgba(248, 237, 192, 0.8);
|
|
136
|
+
backdrop-filter: blur(8px);
|
|
137
|
+
color:black;
|
|
138
|
+
line-height: 1em;
|
|
139
|
+
text-align: justify;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.BRtranslateLayer .BRparagraphElement .BRlineElement {
|
|
143
|
+
white-space: break-spaces;
|
|
144
|
+
display: inline-block;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.BRtextLayer.showingTranslation {
|
|
42
148
|
display: none;
|
|
43
149
|
}
|
|
44
150
|
|
|
45
|
-
|
|
46
|
-
.BRpagecontainer.BRemptypage .textSelectionSVG{
|
|
151
|
+
.BRtranslateLayer .BRparagraphElement.BRtranslateHidden {
|
|
47
152
|
display: none;
|
|
48
153
|
}
|
package/src/css/_colorbox.scss
CHANGED
package/src/css/_controls.scss
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
.BRcontrols {
|
|
2
2
|
width: 100%;
|
|
3
3
|
|
|
4
|
-
.
|
|
4
|
+
.BRtooltip {
|
|
5
5
|
display: none;
|
|
6
6
|
position: absolute;
|
|
7
7
|
width: auto;
|
|
@@ -14,9 +14,10 @@
|
|
|
14
14
|
color: $controlsText;
|
|
15
15
|
border-radius: 3px;
|
|
16
16
|
background: $tooltipBG;
|
|
17
|
+
pointer-events: none;
|
|
17
18
|
}
|
|
18
19
|
|
|
19
|
-
.full .
|
|
20
|
+
.full .BRtooltip {
|
|
20
21
|
left: auto;
|
|
21
22
|
right: 0;
|
|
22
23
|
transform: translateX(0);
|
|
@@ -28,24 +29,32 @@
|
|
|
28
29
|
}
|
|
29
30
|
}
|
|
30
31
|
|
|
31
|
-
select.playback-speed {
|
|
32
|
-
width: 24px;
|
|
32
|
+
select.playback-speed, select.playback-voices {
|
|
33
33
|
padding-top: 18px;
|
|
34
34
|
-moz-appearance: none;
|
|
35
35
|
-webkit-appearance: none;
|
|
36
36
|
appearance: none;
|
|
37
37
|
font-size: 10px;
|
|
38
|
-
text-align: center;
|
|
39
38
|
text-align-last: center;
|
|
40
39
|
color: $controlsText;
|
|
41
40
|
border: none;
|
|
42
41
|
cursor: pointer;
|
|
43
|
-
|
|
44
|
-
option {
|
|
42
|
+
option, optgroup {
|
|
45
43
|
background: $controlsBG;
|
|
46
44
|
}
|
|
47
45
|
}
|
|
48
46
|
|
|
47
|
+
select.playback-speed {
|
|
48
|
+
width: 30px;
|
|
49
|
+
background: transparent url("icons/playback-speed.svg") 50% 0 no-repeat;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
select.playback-voices {
|
|
53
|
+
width: 30px;
|
|
54
|
+
background: transparent url("icons/voice.svg") 50% 0 no-repeat;
|
|
55
|
+
background-size: 18px;
|
|
56
|
+
}
|
|
57
|
+
|
|
49
58
|
.active {
|
|
50
59
|
background: $activeButtonBG;
|
|
51
60
|
}
|
|
@@ -72,6 +81,10 @@
|
|
|
72
81
|
height: 30px;
|
|
73
82
|
}
|
|
74
83
|
|
|
84
|
+
.controls .hide {
|
|
85
|
+
display: none;
|
|
86
|
+
}
|
|
87
|
+
|
|
75
88
|
@keyframes slideUp {
|
|
76
89
|
from {
|
|
77
90
|
opacity: 0;
|
|
@@ -100,6 +113,10 @@
|
|
|
100
113
|
&.visible {
|
|
101
114
|
display: flex;
|
|
102
115
|
animation: slideUp 0.2s;
|
|
116
|
+
button {
|
|
117
|
+
width: unset;
|
|
118
|
+
height: unset;
|
|
119
|
+
}
|
|
103
120
|
}
|
|
104
121
|
|
|
105
122
|
li {
|
package/src/css/_icons.scss
CHANGED
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
.icon-fullscreen-exit {
|
|
40
|
-
background-image: url("icons/
|
|
40
|
+
background-image: url("icons/fullscreen_exit.svg");
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
.icon-thumb {
|
|
@@ -113,3 +113,16 @@
|
|
|
113
113
|
height: 12px;
|
|
114
114
|
background-image: url("icons/close-circle.svg");
|
|
115
115
|
}
|
|
116
|
+
|
|
117
|
+
.icon-close-dark {
|
|
118
|
+
width: 12px;
|
|
119
|
+
height: 12px;
|
|
120
|
+
background-image: url("icons/close-circle-dark.svg");
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.icon-toggle-slider {
|
|
124
|
+
background-size: 25px;
|
|
125
|
+
width: 25px;
|
|
126
|
+
height: 25px;
|
|
127
|
+
background-image: url("icons/slider-toggle.svg");
|
|
128
|
+
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { css } from 'lit
|
|
1
|
+
import { css } from 'lit';
|
|
2
2
|
|
|
3
3
|
export default css`
|
|
4
4
|
.ia-button {
|
|
5
5
|
min-height: 3rem;
|
|
6
6
|
border: none;
|
|
7
|
-
outline: none;
|
|
8
7
|
cursor: pointer;
|
|
9
8
|
color: var(--primaryTextColor);
|
|
10
9
|
line-height: normal;
|
|
@@ -12,6 +11,7 @@ export default css`
|
|
|
12
11
|
text-align: center;
|
|
13
12
|
vertical-align: middle;
|
|
14
13
|
font-size: 1.4rem;
|
|
14
|
+
font-family: inherit;
|
|
15
15
|
display: inline-block;
|
|
16
16
|
padding: .6rem 1.2rem;
|
|
17
17
|
border: 1px solid transparent;
|
|
@@ -24,8 +24,10 @@ export default css`
|
|
|
24
24
|
user-select: none;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
.ia-button.link
|
|
27
|
+
.ia-button.link,
|
|
28
|
+
.ia-button.external {
|
|
28
29
|
min-height: unset;
|
|
30
|
+
text-decoration: none;
|
|
29
31
|
}
|
|
30
32
|
|
|
31
33
|
.ia-button:disabled,
|
|
@@ -51,4 +53,9 @@ export default css`
|
|
|
51
53
|
background-color: var(--primaryErrorCTAFill);
|
|
52
54
|
border-color: var(--primaryErrorCTABorder);
|
|
53
55
|
}
|
|
56
|
+
|
|
57
|
+
.ia-button.external {
|
|
58
|
+
background: var(--secondaryCTAFill);
|
|
59
|
+
border-color: var(--secondaryCTABorder);
|
|
60
|
+
}
|
|
54
61
|
`;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
|
|
3
|
+
export default html`
|
|
4
|
+
<svg height="10" viewBox="0 0 13 10" width="13" xmlns="http://www.w3.org/2000/svg">
|
|
5
|
+
<path
|
|
6
|
+
d="m4.33333333 10-4.33333333-4.16666667 1.73333333-1.66666666 2.6 2.5 6.93333337-6.66666667 1.7333333 1.66666667z"
|
|
7
|
+
fill="#fff" fill-rule="evenodd" />
|
|
8
|
+
</svg>
|
|
9
|
+
`;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
|
|
3
|
+
export const sharedStyles = css`
|
|
4
|
+
.sr-only {
|
|
5
|
+
position: absolute !important;
|
|
6
|
+
width: 1px !important;
|
|
7
|
+
height: 1px !important;
|
|
8
|
+
padding: 0 !important;
|
|
9
|
+
margin: -1px !important;
|
|
10
|
+
overflow: hidden !important;
|
|
11
|
+
clip: rect(0 0 0 0) !important;
|
|
12
|
+
white-space: nowrap !important;
|
|
13
|
+
border: 0 !important;
|
|
14
|
+
}
|
|
15
|
+
`;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
import '@internetarchive/icon-dl/icon-dl.js';
|
|
3
|
+
import './downloads.js';
|
|
4
|
+
|
|
5
|
+
const menuBase = {
|
|
6
|
+
pdf: {
|
|
7
|
+
type: 'Encrypted Adobe PDF',
|
|
8
|
+
url: '#',
|
|
9
|
+
note: 'PDF files contain high quality images of pages.',
|
|
10
|
+
},
|
|
11
|
+
lcppdf: {
|
|
12
|
+
type: 'Get LCP PDF',
|
|
13
|
+
url: '#',
|
|
14
|
+
note: 'PDF files contain high quality images of pages.',
|
|
15
|
+
},
|
|
16
|
+
lcpepub: {
|
|
17
|
+
type: 'Get LCP ePub',
|
|
18
|
+
url: '#',
|
|
19
|
+
note: 'ePub files are smaller in size, but may contain errors.',
|
|
20
|
+
},
|
|
21
|
+
epub: {
|
|
22
|
+
type: 'Encrypted Adobe ePub',
|
|
23
|
+
url: '#',
|
|
24
|
+
note: 'ePub files are smaller in size, but may contain errors.',
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const publicMenuBase = {
|
|
29
|
+
pdf: "PDF",
|
|
30
|
+
epub: "ePub",
|
|
31
|
+
lcppdf: "LCP PDF",
|
|
32
|
+
lcpepub: "LCP ePub",
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export default class DownloadsProvider {
|
|
36
|
+
|
|
37
|
+
constructor({ bookreader }) {
|
|
38
|
+
this.icon = html`<ia-icon-dl aria-hidden="true" role="presentation" style="width: var(--iconWidth); height: var(--iconHeight);"></ia-icon-dl>`;
|
|
39
|
+
this.label = 'Downloadable files';
|
|
40
|
+
this.menuDetails = '';
|
|
41
|
+
this.downloads = [];
|
|
42
|
+
this.id = 'downloads';
|
|
43
|
+
this.component = '';
|
|
44
|
+
this.isBookProtected = bookreader?.options?.isProtected || false;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
update(downloadTypes) {
|
|
48
|
+
this.computeAvailableTypes(downloadTypes);
|
|
49
|
+
this.component = this.menu;
|
|
50
|
+
this.component.isBookProtected = this.isBookProtected;
|
|
51
|
+
|
|
52
|
+
const ending = this.downloads.length === 1 ? '' : 's';
|
|
53
|
+
this.menuDetails = `(${this.downloads.length} format${ending})`;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Generates Download Menu Info for available types
|
|
58
|
+
* sets global `downloads`
|
|
59
|
+
* @param availableTypes
|
|
60
|
+
*/
|
|
61
|
+
computeAvailableTypes(availableTypes = []) {
|
|
62
|
+
const menuData = availableTypes.reduce((found, incoming = []) => {
|
|
63
|
+
const [ type = '', link = '' ] = incoming;
|
|
64
|
+
const formattedType = type.toLowerCase();
|
|
65
|
+
const downloadOption = menuBase[formattedType] || null;
|
|
66
|
+
|
|
67
|
+
if (downloadOption) {
|
|
68
|
+
const menuButtonText = this.isBookProtected ? menuBase[formattedType].type : publicMenuBase[formattedType];
|
|
69
|
+
const menuInfo = Object.assign({}, downloadOption, { url: link, type: menuButtonText});
|
|
70
|
+
found.push(menuInfo);
|
|
71
|
+
}
|
|
72
|
+
return found;
|
|
73
|
+
}, []);
|
|
74
|
+
|
|
75
|
+
this.downloads = menuData;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
get menu () {
|
|
79
|
+
return html`<ia-book-downloads .downloads=${this.downloads}></ia-book-downloads>`;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { css, html, LitElement } from 'lit
|
|
2
|
-
import
|
|
1
|
+
import { css, html, LitElement, nothing } from 'lit';
|
|
2
|
+
import buttonStyles from '../../css/button-base.js';
|
|
3
3
|
export class IABookDownloads extends LitElement {
|
|
4
4
|
static get properties() {
|
|
5
5
|
return {
|
|
6
6
|
downloads: { type: Array },
|
|
7
7
|
expiration: { type: Number },
|
|
8
8
|
renderHeader: { type: Boolean },
|
|
9
|
+
isBookProtected: { type: Boolean },
|
|
9
10
|
};
|
|
10
11
|
}
|
|
11
12
|
|
|
@@ -14,6 +15,7 @@ export class IABookDownloads extends LitElement {
|
|
|
14
15
|
this.downloads = [];
|
|
15
16
|
this.expiration = 0;
|
|
16
17
|
this.renderHeader = false;
|
|
18
|
+
this.isBookProtected = false;
|
|
17
19
|
}
|
|
18
20
|
|
|
19
21
|
get formatsCount() {
|
|
@@ -31,13 +33,23 @@ export class IABookDownloads extends LitElement {
|
|
|
31
33
|
return this.downloads.map(option => (
|
|
32
34
|
html`
|
|
33
35
|
<li>
|
|
34
|
-
<a class="button" href="${option.url}">Get ${option.type}</a>
|
|
36
|
+
<a class="ia-button link primary" href="${option.url}">Get ${option.type}</a>
|
|
35
37
|
${option.note ? html`<p>${option.note}</p>` : html``}
|
|
36
38
|
</li>
|
|
37
39
|
`
|
|
38
40
|
));
|
|
39
41
|
}
|
|
40
42
|
|
|
43
|
+
/**
|
|
44
|
+
* checks if downloads list contains an LCP option
|
|
45
|
+
* @return {boolean}
|
|
46
|
+
*/
|
|
47
|
+
get hasLCPOption() {
|
|
48
|
+
const regex = /^(LCP)/g;
|
|
49
|
+
const lcpAvailable = this.downloads.some(option => option.type?.match(regex));
|
|
50
|
+
return lcpAvailable;
|
|
51
|
+
}
|
|
52
|
+
|
|
41
53
|
get header() {
|
|
42
54
|
if (!this.renderHeader) {
|
|
43
55
|
return nothing;
|
|
@@ -50,18 +62,26 @@ export class IABookDownloads extends LitElement {
|
|
|
50
62
|
`;
|
|
51
63
|
}
|
|
52
64
|
|
|
65
|
+
get installLCPSoftwareMsg() {
|
|
66
|
+
return html`
|
|
67
|
+
<p>For LCP downloads, make sure you have LCP software such as <a href="https://thorium.edrlab.org/" rel="noopener noreferrer nofollow" target="_blank">Thorium (desktop)</a>, <a href="https://apps.apple.com/us/app/cantook-by-aldiko/id1476410111" rel="noopener noreferrer nofollow" target="_blank">Cantook (iOS)</a> or <a href="https://play.google.com/store/apps/details?id=com.aldiko.android" rel="noopener noreferrer nofollow" target="_blank">Cantook (Android)</a> installed on your device.</p>
|
|
68
|
+
`;
|
|
69
|
+
}
|
|
70
|
+
|
|
53
71
|
render() {
|
|
54
72
|
return html`
|
|
55
73
|
${this.header}
|
|
56
74
|
${this.loanExpiryMessage}
|
|
57
75
|
<ul>${this.renderDownloadOptions()}</ul>
|
|
58
|
-
|
|
59
|
-
|
|
76
|
+
${this.hasLCPOption
|
|
77
|
+
? this.installLCPSoftwareMsg
|
|
78
|
+
: nothing
|
|
79
|
+
}
|
|
60
80
|
`;
|
|
61
81
|
}
|
|
62
82
|
|
|
63
83
|
static get styles() {
|
|
64
|
-
|
|
84
|
+
const mainCss = css`
|
|
65
85
|
:host {
|
|
66
86
|
display: block;
|
|
67
87
|
height: 100%;
|
|
@@ -79,24 +99,6 @@ export class IABookDownloads extends LitElement {
|
|
|
79
99
|
justify-self: end;
|
|
80
100
|
}
|
|
81
101
|
|
|
82
|
-
.button {
|
|
83
|
-
color: var(--primaryTextColor);
|
|
84
|
-
background: var(--primaryCTAFill);
|
|
85
|
-
border: 1px solid var(--primaryCTABorder);
|
|
86
|
-
display: inline-block;
|
|
87
|
-
padding: .6rem 1rem;
|
|
88
|
-
font-size: 1.4rem;
|
|
89
|
-
text-decoration: none;
|
|
90
|
-
text-shadow: 1px 1px #484848;
|
|
91
|
-
border-radius: 4px;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.button.external {
|
|
95
|
-
background: var(--secondaryCTAFill, transparent);
|
|
96
|
-
border: 1px solid var(--secondaryCTABorder, #999);
|
|
97
|
-
text-shadow: none;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
102
|
header {
|
|
101
103
|
display: flex;
|
|
102
104
|
align-items: center;
|
|
@@ -109,7 +111,6 @@ export class IABookDownloads extends LitElement {
|
|
|
109
111
|
font-weight: bold;
|
|
110
112
|
font-style: italic;
|
|
111
113
|
}
|
|
112
|
-
|
|
113
114
|
header div {
|
|
114
115
|
display: flex;
|
|
115
116
|
align-items: baseline;
|
|
@@ -142,5 +143,8 @@ export class IABookDownloads extends LitElement {
|
|
|
142
143
|
line-height: 140%;
|
|
143
144
|
}
|
|
144
145
|
`;
|
|
146
|
+
|
|
147
|
+
return [buttonStyles, mainCss];
|
|
145
148
|
}
|
|
146
149
|
}
|
|
150
|
+
customElements.define('ia-book-downloads', IABookDownloads);
|