From 0cffc73901e199efd7a8e2b83c75d44a804e99cf Mon Sep 17 00:00:00 2001 From: Drini Cami Date: Wed, 26 Apr 2023 20:05:27 -0400 Subject: [PATCH] 5.0.0-59 --- BookReader/BookReader.css | 149 +++++++++++++----- BookReader/BookReader.js | 2 +- BookReader/BookReader.js.LICENSE.txt | 20 --- BookReader/BookReader.js.map | 2 +- BookReader/ia-bookreader-bundle.js | 2 +- BookReader/ia-bookreader-bundle.js.map | 2 +- .../plugins/plugin.archive_analytics.js | 2 +- .../plugins/plugin.archive_analytics.js.map | 2 +- BookReader/plugins/plugin.autoplay.js | 2 +- BookReader/plugins/plugin.autoplay.js.map | 2 +- BookReader/plugins/plugin.resume.js | 2 +- BookReader/plugins/plugin.resume.js.map | 2 +- BookReader/plugins/plugin.tts.js | 2 +- BookReader/plugins/plugin.tts.js.map | 2 +- BookReader/plugins/plugin.url.js | 2 +- BookReader/plugins/plugin.url.js.map | 2 +- CHANGELOG.md | 4 + package-lock.json | 4 +- package.json | 2 +- 19 files changed, 131 insertions(+), 76 deletions(-) diff --git a/BookReader/BookReader.css b/BookReader/BookReader.css index 19b4bd7b1..f1ffdc4f7 100644 --- a/BookReader/BookReader.css +++ b/BookReader/BookReader.css @@ -442,6 +442,23 @@ body.BRfullscreenActive .mm-menu { background-color: white; } +.BRfullscreenAnimation .br-mode-2up__book { + transition: transform 0.2s ease-in-out; +} + +.fullscreenActive.BRmodeThumb .BRcontainer, +.fullscreenActive.BRmode1up .BRcontainer { + animation: flash 0.3s ease-in-out; +} + +@keyframes flash { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} .BRpageview { position: relative; margin: auto; @@ -454,7 +471,7 @@ body.BRfullscreenActive .mm-menu { border: 0; } -.BRmodeThumb .BRpagecontainer, .BRmode2Up .BRpagecontainer { +.BRmodeThumb .BRpagecontainer, .BRmode2up .BRpagecontainer { cursor: pointer; } @@ -521,61 +538,115 @@ svg.BRPageLayer { display: none; } -.BRbookcover { - position: absolute; - background-image: none; - box-shadow: 1px 0 10px #111; +.br-mode-2up__root { + display: block; + overflow: auto; + width: 100%; + height: 100%; +} + +.br-mode-2up__book { + position: relative; + transform-origin: 0 0; + width: 0px; + height: 0px; } -.BRPreview .BRpageimage { - background-color: #eee; - -webkit-filter: grayscale(100%); - filter: grayscale(100%); +.BRmode2up { + transition: opacity 0.2s; } -.BRleafEdgeR { - border-style: solid solid solid none; - border-color: rgb(51, 51, 34); - border-width: 1px 1px 1px 0px; - background: transparent url(images/back_pages.png) repeat scroll 0% 0%; - position: absolute; - cursor: pointer; +.BRmode2up .BRpagecontainer { + backface-visibility: hidden; +} +.BRmode2up .BRpagecontainer:not(.BRpage-visible) { + display: none; } -.BRleafEdgeL { - /* border-style: solid none solid solid; - border-color: rgb(51, 51, 34); - border-width: 1px 0px 1px 1px; */ - background: transparent url(images/back_pages.png) repeat scroll 0% 0%; - /* XXXmang replace file */ +.br-mode-2up__leafs { position: absolute; cursor: pointer; + top: 0; + transform-style: preserve-3d; } - -.BRleafEdgeTmp { - /* border-style: solid none solid solid; - border-color: rgb(51, 51, 34); - border-width: 1px 0px 1px 1px; */ - background: transparent url(images/back_pages.png) repeat scroll 0% 0%; - /* XXXmang replace file */ +.br-mode-2up__leafs[side=left] { + border-radius: 4px 0 0 4px; +} +.br-mode-2up__leafs[side=left] .br-leaf-edges__label { + padding-right: 10px; + border-radius: 4px 0 0 4px; +} +.br-mode-2up__leafs[side=right] { + border-radius: 0 4px 4px 0; +} +.br-mode-2up__leafs[side=right] .br-leaf-edges__label { + padding-left: 20px; + border-radius: 0 4px 4px 0; +} +.br-mode-2up__leafs.br-mode-2up__leafs--flipping { + z-index: 200000; + transition: transform 5s; + transition-timing-function: ease-in-out; + border-radius: 0; +} +.br-mode-2up__leafs.br-mode-2up__leafs--flipping:before { + content: ""; + display: block; + width: 100%; + height: 100%; position: absolute; + transform: rotateY(-90deg); } - -.BRgutter { - /* border: 1px solid rgb(68, 25, 17); */ +.br-mode-2up__leafs, .br-mode-2up__leafs.br-mode-2up__leafs--flipping::before { + background: transparent url(images/back_pages.png) repeat scroll 0% 0%; +} +.br-mode-2up__leafs .br-leaf-edges__bar { + display: none; + pointer-events: none; position: absolute; - background: transparent url(images/booksplit.png) repeat scroll 0% 0%; + top: 0; + bottom: 0; + min-width: 1px; + background-color: #9A9B9D; + opacity: 0.85; + transform: translateX(-50%); } - -.BRtwoPagePopUp { - padding: 6px; +.br-mode-2up__leafs .br-leaf-edges__label { + display: none; + pointer-events: none; + z-index: 1000; position: absolute; - font-size: 12px; + padding: 6px; color: white; background-color: #9A9B9D; opacity: 0.85; - border-radius: 4px; white-space: nowrap; + transform: translateY(-10px); +} + +.br-mode-2up--flipping-left .BRpage-entering[data-side=R] { + z-index: 10; + transform-origin: left; + transform: rotateY(0deg); +} +.br-mode-2up--flipping-left .BRpage-exiting[data-side=L] { + z-index: 10; + transform-origin: right; +} +.br-mode-2up--flipping-left .BRpage-exiting[data-side=R] { + z-index: 9; +} + +.br-mode-2up--flipping-right .BRpage-entering[data-side=L] { + z-index: 10; + transform-origin: right; +} +.br-mode-2up--flipping-right .BRpage-exiting[data-side=R] { + z-index: 10; + transform-origin: left; +} +.br-mode-2up--flipping-right .BRpage-exiting[data-side=L] { + z-index: 9; } .BRToolbarButton, .BRicon { @@ -2954,7 +3025,7 @@ modal-manager[mode=closed] { opacity: 0; } -.BRtwopageview .BRpagecontainer[data-side=L] .bookmark-button { +.BRmode2up .BRpagecontainer[data-side=L] .bookmark-button { right: auto; left: 0; } diff --git a/BookReader/BookReader.js b/BookReader/BookReader.js index 82067b0c6..235d2cbd5 100644 --- a/BookReader/BookReader.js +++ b/BookReader/BookReader.js @@ -1,3 +1,3 @@ /*! For license information please see BookReader.js.LICENSE.txt */ -(function(){var __webpack_modules__={812:function(t,e,n){"use strict";n(5666),n(1539),n(9714),n(5827),n(2222),n(1249),n(6833),n(8674),n(7327),n(7941),n(4916),n(6992),n(8783),n(3948),n(1637),n(4765),n(7042),n(4747),n(9826),n(6699),n(2023),n(1058),n(3123),n(5306),n(9600),n(2526),n(1817),n(2165),n(1038),n(8309),n(3762),n(6891),n(6177),n(5557);var r=n(5685);function i(t,e,n,r,i,o){var a,s=(a=t.prototype[e],function(){return a.apply(o(this),arguments)});Object.defineProperty(r.prototype,i,{get:function(){return s},set:function(r){t.prototype[e]=function(){var e=this instanceof t?n(this):this;return r.apply(e,arguments)},s=r}})}n(6227);var o={fragmentChange:"fragmentChange",pageChanged:"pageChanged",PostInit:"PostInit",stop:"stop",resize:"resize",userAction:"userAction",navToggled:"navToggled",fullscreenToggled:"fullscreenToggled",zoomOut:"zoomOut",zoomIn:"zoomIn","1PageViewSelected":"1PageViewSelected","2PageViewSelected":"2PageViewSelected","3PageViewSelected":"3PageViewSelected",mobileNavOpen:"mobileNavOpen"},a=n(3609);function s(t,e){for(var n=0;n".concat(e.template(this.br),""):'
  • \n \n
  • "):""}},{key:"_renderControls",value:function(){var t=this;return["bookLeft","bookRight","onePage","twoPage","thumbnail","viewmode","zoomOut","zoomIn","fullScreen"].map((function(e){return t.controlFor(e)})).join("")}},{key:"_bindViewModeButton",value:function(){var t=this,e=this.br,n=e.options.controls.viewmode,r=[{mode:e.constMode1up,className:"onepg",title:"One-page view"},{mode:e.constMode2up,className:"twopg",title:"Two-page view"},{mode:e.constModeThumb,className:"thumb",title:"Thumbnail view"}].filter((function(t){return!n.excludedModes.includes(t.mode)})),i=r.map((function(t){return t.mode}));n.excludedModes.includes(e.mode)&&e.switchMode(i[0]);for(var s=i.indexOf(e.mode),u=0;u<=s;u++)i.push(i.shift());r.length<2&&this.$nav.find(".".concat(n.className)).remove(),this.br.bind(o.PostInit,(function(){var o=t.$nav.find(".".concat(n.className)).off(".bindNavigationHandlers").on("click",(function(n){var o=i.shift(),s=r.find((function(t){return t.mode===o})),u=r.find((function(t){return t.mode===i[0]}));i.push(o),e.viewModeOrder=i,t.updateViewModeButton(a(n.currentTarget),u.className,u.title),e.switchMode(s.mode)})),s=r.find((function(t){return t.mode===i[0]}));t.updateViewModeButton(o,s.className,s.title)}))}},{key:"updateViewModeButton",value:function(t,e,n){t.attr("title",n).find(".icon").removeClass().addClass("icon icon-".concat(e)).end().find(".tooltip").text(n)}},{key:"switchNavbarControls",value:function(){"linerNotes"!==this.br.options.bookType&&(this.br.refs.$brContainer.prop("clientWidth")<640?this.showMinimumNavbarControls():this.showMaximumNavbarControls())}},{key:"showMinimumNavbarControls",value:function(){this.minimumControls.forEach((function(t){var e=document.querySelector(".controls .".concat(t));e&&e.classList.remove("hide")})),this.maximumControls.forEach((function(t){var e=document.querySelector(".controls .".concat(t));e&&e.classList.add("hide")}))}},{key:"showMaximumNavbarControls",value:function(){this.maximumControls.forEach((function(t){var e=document.querySelector(".controls .".concat(t));e&&e.classList.remove("hide")})),this.minimumControls.forEach((function(t){var e=document.querySelector(".controls .".concat(t));e&&e.classList.add("hide")}))}},{key:"init",value:function(){var t=this,e=this.br,n=e.options.navbarTitle,r="rl"===e.pageProgression,i=r?"book_flip_next":"book_flip_prev",o=r?"book_flip_prev":"book_flip_next";this.br.options.controls.bookLeft.className="book_left ".concat(i),this.br.options.controls.bookRight.className="book_right ".concat(o),e.refs.$BRfooter=this.$root=a('
    '),e.refs.$BRnav=this.$nav=a('
    \n '.concat(n?'
    '.concat(n,"
    "):"",'\n \n
    ")),this.$root.append(this.$nav),e.refs.$br.append(this.$root);var s=this.$root.find(".BRpager").slider({animate:!0,min:0,max:e.book.getNumLeafs()-1,value:e.currentIndex(),range:"min"});return s.on("slide",(function(e,n){return t.updateNavPageNum(n.value),!0})),s.on("slidechange",(function(n,r){return t.updateNavPageNum(r.value),s.data("swallowchange")?s.data("swallowchange",!1):e.jumpToIndex(r.value),!0})),e.options.controls.viewmode.visible&&this._bindViewModeButton(),this.updateNavPageNum(e.currentIndex()),this.$nav}},{key:"getNavPageNumString",value:function(t){var e=this.br,n=e.book.getPageNum(t),r=(e.book.getPageProp(t,"pageType"),e.book.getNumLeafs());if(!this.maxPageNum){for(var i,o=0,a=0;ao&&(o=i);this.maxPageNum=o}return function(t,e,n,r,i){if("n"==n[0])return"(".concat(t+1," of ").concat(e,")");var o=i?" of ".concat(i):"";return"".concat(n).concat(o)}(t,r,n,0,this.maxPageNum)}},{key:"updateNavPageNum",value:function(t){this.$root.find(".BRcurrentpage").html(this.getNavPageNumString(t))}},{key:"updateNavIndex",value:function(t){t=void 0!==t?t:this.br.currentIndex(),this.$root.find(".BRpager").data("swallowchange",!0).slider("value",t)}}])&&s(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function c(t){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(t,e){if(e&&("object"===c(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function f(t){var e="function"==typeof Map?new Map:void 0;return(f=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return d(t,arguments,g(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),v(r,t)})(t)}function d(t,e,n){return(d=p()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return n&&v(i,n.prototype),i}).apply(null,arguments)}function p(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function v(t,e){return(v=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function g(t){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}n(489),n(2419),n(1532);var m={defaults:null,padding:10,ui:"full",uiAutoHide:!1,thumbRowBuffer:1,thumbColumns:6,thumbMaxLoading:4,thumbPadding:10,thumbMinZoomColumns:2,thumbMaxZoomColumns:8,flipSpeed:"fast",showToolbar:!0,showNavbar:!0,navBarTitle:"",showLogo:!0,logoURL:"https://archive.org",imagesBaseURL:"/BookReader/images/",reduceSet:"pow2",reductionFactors:[{reduce:.25,autofit:null},{reduce:.5,autofit:null},{reduce:1,autofit:null},{reduce:2,autofit:null},{reduce:3,autofit:null},{reduce:4,autofit:null},{reduce:6,autofit:null}],onePage:{autofit:"auto"},twoPage:{coverInternalPadding:0,coverExternalPadding:0,bookSpineDivWidth:64,autofit:"auto"},onePageMinBreakpoint:800,bookTitle:"",bookUrl:null,bookUrlText:null,bookUrlTitle:null,enableBookTitleLink:!0,bookLanguage:null,metadata:[],thumbnail:null,bookUrlMoreInfo:null,enableExperimentalControls:!1,el:"#BookReader",pageProgression:"lr",ppi:500,protected:!1,plugins:{textSelection:null},vars:{},data:[],getNumLeafs:null,getPageWidth:null,getPageHeight:null,getPageURI:null,getPageSide:null,getSpreadIndices:null,getPageNum:null,getPageProp:null,leafNumToIndex:null,getEmbedCode:null,controls:{bookLeft:{visible:!0,label:"Flip left",className:"book_left",iconClassName:"left-arrow"},bookRight:{visible:!0,label:"Flip right",className:"book_right",iconClassName:"left-arrow hflip"},onePage:{visible:!0,label:"One-page view",className:"onepg",iconClassName:"onepg"},twoPage:{visible:!0,label:"Two-page view",className:"twopg",iconClassName:"twopg"},thumbnail:{visible:!0,label:"Thumbnail view",className:"thumb",iconClassName:"thumb"},viewmode:{visible:!0,className:"viewmode",excludedModes:[]},zoomOut:{visible:!0,label:"Zoom out",className:"zoom_out",iconClassName:"magnify"},zoomIn:{visible:!0,label:"Zoom in",className:"zoom_in",iconClassName:"magnify plus"},fullScreen:{visible:!0,label:"Toggle fullscreen",className:"full",iconClassName:"fullscreen"}},startFullscreen:!1,enableFSLogoShortcut:!1,autoResize:!0,useSrcSet:!1},b=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&v(t,e)}(o,t);var e,n,r,i=(e=o,n=p(),function(){var t,r=g(e);if(n){var i=g(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return h(this,t)});function o(){return l(this,o),i.apply(this,arguments)}return r=o,Object.defineProperty(r,"prototype",{writable:!1}),r}(f(Error)),y=n(105),w=(n(4581),n(3609));function _(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n\n \n '):"";t.refs.$BRtoolbar=w('\n
    \n
    \n
    \n '.concat(e,'\n \n
    \n
    \n \n \n \n \n
    \n
    \n
    '));var n=t.refs.$BRtoolbar.find(".BRtoolbarSectionTitle");return t.bookUrl&&t.options.enableBookTitleLink?n.append(w("").attr({href:t.bookUrl,title:t.bookUrlTitle}).addClass("BRreturn").html(t.bookUrlText||t.bookTitle)):t.bookTitle&&n.append(t.bookUrlText||t.bookTitle),t.refs.$BRtoolbar}},{key:"initToolbar",value:function(t,e){var n=this.br;n.refs.$br.append(this.buildToolbarElement()),n.$(".BRnavCntl").addClass("BRup"),n.$(".pause").hide(),n.refs.$BRtoolbar.append(),n.canSwitchToMode(n.constMode2up)||n.$(".two_page_mode, .play, .pause").hide(),n.canSwitchToMode(n.constModeThumb)||n.$(".thumbnail_mode").hide(),n.canSwitchToMode(n.constMode2up)||n.canSwitchToMode(n.constModeThumb)||n.$(".one_page_mode").hide(),w('
    ').append(w('\n
    \n
    \n Share\n \n
    \n
    ')).append(w('\n
    ')).appendTo(n.refs.$br),n.$(".BRinfo .BRfloatTitle a").attr({href:n.bookUrl}).text(n.bookTitle).addClass("title"),this.buildInfoDiv(n.$(".BRinfo")),this.buildShareDiv(n.$(".BRshare")),n.$(".share").colorbox({inline:!0,opacity:"0.5",href:n.$(".BRshare"),onLoad:function(){n.trigger(o.stop),n.$(".BRpageviewValue").val(window.location.href)}}),n.$(".info").colorbox({inline:!0,opacity:"0.5",href:n.$(".BRinfo"),onLoad:function(){n.trigger(o.stop)}})}},{key:"buildShareDiv",value:function(t){var e=this,n=this.br,r=document.location+"",i=(r+"").replace(/#.*/,""),o=n.getEmbedCode?'\n '):"",a=w('\n \n