@internetarchive/bookreader 5.0.0-61 → 5.0.0-62
Sign up to get free protection for your applications and to get access to all the features.
- package/BookReader/BookReader.css +63 -14
- package/BookReader/BookReader.js +1 -1
- package/BookReader/BookReader.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/BookReaderDemo/BookReaderDemo.css +2 -0
- package/BookReaderDemo/demo-internetarchive.html +91 -0
- package/CHANGELOG.md +5 -0
- package/package.json +2 -2
- package/src/BookReader/BookModel.js +2 -2
- package/src/BookReader/ModeThumb.js +1 -1
- package/src/BookReader/PageContainer.js +12 -0
- package/src/BookReader/events.js +0 -2
- package/src/BookReader/utils/SelectionObserver.js +43 -0
- package/src/BookReader.js +0 -264
- package/src/css/_BRpages.scss +2 -0
- package/src/css/_TextSelection.scss +84 -23
- package/src/plugins/plugin.text_selection.js +437 -112
- package/src/plugins/search/view.js +0 -9
- package/tests/jest/BookReader/BookModel.test.js +15 -0
- package/tests/jest/BookReader/utils/SelectionObserver.test.js +43 -0
- package/tests/jest/plugins/plugin.text_selection.test.js +166 -44
- package/src/BookReader/utils/SelectionStartedObserver.js +0 -46
- package/tests/jest/BookReader/utils/SelectionStartedObserver.test.js +0 -73
@@ -500,6 +500,8 @@ body.BRfullscreenActive .mm-menu {
|
|
500
500
|
position: relative;
|
501
501
|
overflow: hidden;
|
502
502
|
background: #FEFDEB;
|
503
|
+
overflow: hidden;
|
504
|
+
overflow: clip;
|
503
505
|
}
|
504
506
|
.BRpagecontainer img {
|
505
507
|
position: absolute;
|
@@ -2963,36 +2965,57 @@ li.BRtable-contents-el .BRTOCElementPage {
|
|
2963
2965
|
background-color: #ccc;
|
2964
2966
|
}
|
2965
2967
|
|
2966
|
-
.
|
2968
|
+
.BRtextLayer {
|
2967
2969
|
z-index: 2;
|
2970
|
+
position: absolute;
|
2971
|
+
top: 0;
|
2972
|
+
left: 0;
|
2973
|
+
color: transparent;
|
2974
|
+
transform-origin: 0 0;
|
2968
2975
|
pointer-events: none;
|
2976
|
+
cursor: text;
|
2969
2977
|
}
|
2970
|
-
|
2978
|
+
|
2979
|
+
.BRparagraphElement {
|
2980
|
+
margin: 0;
|
2981
|
+
cursor: text;
|
2982
|
+
font-family: Georgia, serif;
|
2983
|
+
line-height: 0;
|
2984
|
+
}
|
2985
|
+
|
2986
|
+
.BRlineElement {
|
2971
2987
|
pointer-events: all;
|
2988
|
+
white-space: nowrap;
|
2989
|
+
display: inline-block;
|
2972
2990
|
}
|
2973
|
-
.
|
2974
|
-
|
2975
|
-
cursor: text;
|
2991
|
+
.BRtextLayer[dir=ltr] .BRlineElement {
|
2992
|
+
margin-right: 100%;
|
2976
2993
|
}
|
2977
|
-
.
|
2994
|
+
.BRtextLayer[dir=rtl] .BRlineElement {
|
2995
|
+
margin-left: 100%;
|
2996
|
+
}
|
2997
|
+
|
2998
|
+
.BRwordElement::selection, .BRspace::selection, .BRparagraphElement::selection, .BRparagraphElement br::selection {
|
2978
2999
|
background: hsla(210deg, 74%, 62%, 0.4);
|
2979
3000
|
}
|
2980
|
-
.
|
3001
|
+
.BRwordElement::-moz-selection, .BRspace::-moz-selection, .BRparagraphElement::-moz-selection, .BRparagraphElement br::-moz-selection {
|
2981
3002
|
background: hsla(210deg, 74%, 62%, 0.4);
|
2982
3003
|
color: transparent;
|
2983
3004
|
}
|
2984
|
-
|
2985
|
-
|
2986
|
-
|
2987
|
-
|
2988
|
-
|
3005
|
+
|
3006
|
+
.BRparagraphElement br {
|
3007
|
+
visibility: hidden;
|
3008
|
+
}
|
3009
|
+
|
3010
|
+
.BRwordElement--hyphen::after {
|
3011
|
+
content: "-";
|
2989
3012
|
}
|
2990
3013
|
|
2991
|
-
.BRsmooth-zooming .
|
3014
|
+
.BRsmooth-zooming .BRpagecontainer:not(.BRpagecontainer--hasSelection) .BRtextLayer, .BRscrolling-active .BRpagecontainer:not(.BRpagecontainer--hasSelection) .BRtextLayer {
|
2992
3015
|
display: none;
|
2993
3016
|
}
|
2994
3017
|
|
2995
|
-
.BRmode1up .BRpagecontainer:not(.BRpage-visible) .
|
3018
|
+
.BRmode1up .BRpagecontainer:not(.BRpage-visible) .BRtextLayer {
|
2996
3019
|
display: none;
|
2997
3020
|
}
|
2998
3021
|
|
@@ -3002,6 +3025,32 @@ li.BRtable-contents-el .BRTOCElementPage {
|
|
3002
3025
|
user-select: none;
|
3003
3026
|
}
|
3004
3027
|
|
3028
|
+
.BRwordElement[_istranslated="1"], .BRwordElement[_msttexthash], .BRspace[_istranslated="1"], .BRspace[_msttexthash] {
|
3029
|
+
background-color: #e4dccd;
|
3030
|
+
color: black;
|
3031
|
+
letter-spacing: unset !important;
|
3032
|
+
background: #ccbfa7;
|
3033
|
+
}
|
3034
|
+
|
3035
|
+
.BRlineElement font[_mstmutation="1"] {
|
3036
|
+
background: #ccbfa7;
|
3037
|
+
}
|
3038
|
+
|
3039
|
+
.BRlineElement:has([_istranslated="1"], [_msttexthash]) {
|
3040
|
+
background-color: #e4dccd;
|
3041
|
+
color: black;
|
3042
|
+
text-align: justify;
|
3043
|
+
width: inherit;
|
3044
|
+
}
|
3045
|
+
.BRlineElement:has([_istranslated="1"], [_msttexthash]):not(:nth-last-child(2)) {
|
3046
|
+
text-align-last: justify;
|
3047
|
+
}
|
3048
|
+
|
3049
|
+
.BRlineElement[_msttexthash] {
|
3050
|
+
background: #ccbfa7;
|
3051
|
+
word-spacing: unset !important;
|
3052
|
+
}
|
3053
|
+
|
3005
3054
|
/**
|
3006
3055
|
* Hide modal-manager that loads item-navigator-modal
|
3007
3056
|
* loading bookmarks related alert messages
|